SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
Textual Analysis for Code
Smell Detection
FA B I O PA L O M B A , U N I V E R S I T Y O F S A L E R N O
D I B T. U N I M O L . I T / F PA L O M B A
I C S E 2 0 1 5 S R C
M AY 2 2 , 2 0 1 5
F L O R E N C E , I TA LY
C O D E S M E L L S A R E
S Y M P T O M S O F P O O R
D E S I G N O R
I M P L E M E N TAT I O N C H O I S E S
Code Smell
[Martin Fowler]
C O D E S M E L L S A R E M O R E
C H A N G E - A N D FA U LT-
P R O N E N E S S
C O D E S M E L L S I N C R E A S E S
M A I N T E N A N C E C O S T S
Khomh et. al - EMSE 2012
Banker et. al - Communications of
the ACM 1993
C O D E S M E L L S
H I N D E R
C O M P R E H E N S I B I L I T Y
Abbes et. al - CSMR 2011
S E V E R A L A P P ROAC H E S H AV E B E E N P RO P O S E D, E X P L O I T I N G
D I F F E R E N T K I N D O F I N F O R M AT I O N
S T R U C T U R A L
I N F O R M AT I O N
H I S T O R I C A L
A N A LY S I S
I S I T P O S S I B L E T O D E T E C T S M E L L S U S I N G
C O N C E P T U A L I N F O R M AT I O N
?The Third Dimension
T H E C A S E O F L O N G M E T H O D D E T E C T I O N
TACO - Textual Analysis for Code Smell Detection
“A Long Method as a method in which there is the implementation
of a main functionality together with auxiliary functions that should
be managed in different methods.”
[Martin Fowler]
TACO - Textual Analysis for Code Smell Detection
T H E C A S E O F L O N G M E T H O D D E T E C T I O N
method mi
method mi
method blocks
extract
blocks
T H E C A S E O F L O N G M E T H O D D E T E C T I O N
TACO - Textual Analysis for Code Smell Detection
method blocks
pruned method blocks
extract
identifiers
extract
comments
extract
blocks
T H E C A S E O F L O N G M E T H O D D E T E C T I O N
TACO - Textual Analysis for Code Smell Detection
method mi
similarity matrix
method blocks
pruned method blocks
compute
similarity
extract
identifiers
extract
comments
extract
blocks
T H E C A S E O F L O N G M E T H O D D E T E C T I O N
TACO - Textual Analysis for Code Smell Detection
method mi
similarity matrix
method blocks
pruned method blocks
compute
similarity
extract
identifiers
extract
comments
I F E X I S T B L O C K S W I T H S I M I L A R I T Y <
T H E N A L O N G M E T H O D I S D E T E C T E D
extract
blocks
t
T H E C A S E O F L O N G M E T H O D D E T E C T I O N
TACO - Textual Analysis for Code Smell Detection
method m
T H E C A S E O F L O N G M E T H O D D E T E C T I O N - C A S E S T U D Y
TACO - Textual Analysis for Code Smell Detection
Apache Cassandra
Apache Xerces
Eclipse Core
TACO - Textual Analysis for Code Smell Detection
Apache Cassandra
Apache Xerces
Eclipse Core
Precision
Recall
F-Measure
T H E C A S E O F L O N G M E T H O D D E T E C T I O N - C A S E S T U D Y
TACO - Textual Analysis for Code Smell Detection
Apache Cassandra
Apache Xerces
Eclipse Core
Precision
Recall
F-Measure
Compared with
DECOR approach
[Moha et al.]
T H E C A S E O F L O N G M E T H O D D E T E C T I O N - C A S E S T U D Y
TACO - Textual Analysis for Code Smell Detection
Apache Cassandra
Apache Xerces
Eclipse Core
Precision
Recall
F-Measure
Compared with
DECOR approach
[Moha et al.]
T H E C A S E O F L O N G M E T H O D D E T E C T I O N - C A S E S T U D Y
63%
51%
DECOR
TACO
OVERALL F-MEASURE
OVERALL F-MEASURE
TACO - Textual Analysis for Code Smell Detection
Apache Cassandra
Apache Xerces
Eclipse Core
Precision
Recall
F-Measure
Compared with
DECOR approach
[Moha et al.]
TACO is highly complementary with
respect to DECOR on 2 systems analyzed
T H E C A S E O F L O N G M E T H O D D E T E C T I O N - C A S E S T U D Y
63%
51%
DECOR
TACO
OVERALL F-MEASURE
OVERALL F-MEASURE
A P R AT I C A L E X A M P L E
TACO - Textual Analysis for Code Smell Detection
Method: findTypesAndPackages()
Goal: Discover the classes and the packages of a given project
Class: CompletionEngine - Eclipse Core
TACO - Textual Analysis for Code Smell Detection
Method: findTypesAndPackages()
Goal: Discover the classes and the packages of a given project
This method has
65 lines of code
Class: CompletionEngine - Eclipse Core
A P R AT I C A L E X A M P L E
TACO - Textual Analysis for Code Smell Detection
Method: findTypesAndPackages()
Goal: Discover the classes and the packages of a given project
This method has
65 lines of code
A S TAT I C A P P R O A C H C A N N O T
D E T E C T A L O N G M E T H O D
Class: CompletionEngine - Eclipse Core
A P R AT I C A L E X A M P L E
TACO - Textual Analysis for Code Smell Detection
Class: CompletionEngine - Eclipse Core
Method: findTypesAndPackages()
Goal: Discover the classes and the packages of a given project
This method has
65 lines of code
A S TAT I C A P P R O A C H C A N N O T
D E T E C T A L O N G M E T H O D
But the method manages
more than one responsibility
I T A C T U A L LY
I S A L O N G M E T H O D !
A P R AT I C A L E X A M P L E
I S I T P O S S I B L E T O D E T E C T S M E L L S U S I N G
C O N C E P T U A L I N F O R M AT I O N
!The Third Dimension
YES, IT IS
S U M M A R I Z I N G
TACO - Textual Analysis for Code Smell Detection
Textual Analysis is useful for
smell detection
Textual Analysis is useful for
smell detection
Is TACO suitable for detectingother smells?
TACO - Textual Analysis for Code Smell Detection
What about a hybrid technique for
detecting smells?
C O M I N G S O O N …
Textual Analysis for Code
Smell Detection
FA B I O PA L O M B A , U N I V E R S I T Y O F S A L E R N O
D I B T. U N I M O L . I T / F PA L O M B A
I C S E 2 0 1 5 S R C
M AY 2 2 , 2 0 1 5
F L O R E N C E , I TA LY

Weitere ähnliche Inhalte

Ähnlich wie Textual Analysis for Code Smell Detection

What every C++ programmer should know about modern compilers (w/o comments, A...
What every C++ programmer should know about modern compilers (w/o comments, A...What every C++ programmer should know about modern compilers (w/o comments, A...
What every C++ programmer should know about modern compilers (w/o comments, A...Sławomir Zborowski
 
Datathon_Entel_2022_Insight_ML.pdf
Datathon_Entel_2022_Insight_ML.pdfDatathon_Entel_2022_Insight_ML.pdf
Datathon_Entel_2022_Insight_ML.pdfRenatoCastro753818
 
Datathon_Entel_2022_Insight_ML.pdf
Datathon_Entel_2022_Insight_ML.pdfDatathon_Entel_2022_Insight_ML.pdf
Datathon_Entel_2022_Insight_ML.pdfRenatoCastro753818
 
Pintrace: Distributed tracing@Pinterest
Pintrace: Distributed tracing@PinterestPintrace: Distributed tracing@Pinterest
Pintrace: Distributed tracing@PinterestSuman Karumuri
 
3rd week internship report
3rd week internship report3rd week internship report
3rd week internship reportYafie Abdillah
 
Resume_Clasification.pptx
Resume_Clasification.pptxResume_Clasification.pptx
Resume_Clasification.pptxMOINDALVS
 
Code GPU with CUDA - Identifying performance limiters
Code GPU with CUDA - Identifying performance limitersCode GPU with CUDA - Identifying performance limiters
Code GPU with CUDA - Identifying performance limitersMarina Kolpakova
 
Testing Fuse Fabric with Pax Exam
Testing Fuse Fabric with Pax ExamTesting Fuse Fabric with Pax Exam
Testing Fuse Fabric with Pax ExamHenryk Konsek
 
Spring Roo 2.0 Preview at Spring I/O 2016
Spring Roo 2.0 Preview at Spring I/O 2016 Spring Roo 2.0 Preview at Spring I/O 2016
Spring Roo 2.0 Preview at Spring I/O 2016 DISID
 
IoT Technical Roadmap
IoT Technical RoadmapIoT Technical Roadmap
IoT Technical RoadmapReid Lai
 
SEO orientado a Ventas - DSMVALENCIA 2017
SEO orientado a Ventas - DSMVALENCIA 2017SEO orientado a Ventas - DSMVALENCIA 2017
SEO orientado a Ventas - DSMVALENCIA 2017Luis M Villanueva
 
Tecnologias de la informacion y la comunicación
Tecnologias de la informacion y la comunicaciónTecnologias de la informacion y la comunicación
Tecnologias de la informacion y la comunicaciónYalil Ramos
 
Extractive Evidence Based Medicine Summarisation Based on Sentence-Specific S...
Extractive Evidence Based Medicine Summarisation Based on Sentence-Specific S...Extractive Evidence Based Medicine Summarisation Based on Sentence-Specific S...
Extractive Evidence Based Medicine Summarisation Based on Sentence-Specific S...Diego Molla-Aliod
 
AWS Seminar Series 2015 Brisbane
AWS Seminar Series 2015 BrisbaneAWS Seminar Series 2015 Brisbane
AWS Seminar Series 2015 BrisbaneAmazon Web Services
 
Presentation Dividers and Article Outlines from AERA Standards for Reporting ...
Presentation Dividers and Article Outlines from AERA Standards for Reporting ...Presentation Dividers and Article Outlines from AERA Standards for Reporting ...
Presentation Dividers and Article Outlines from AERA Standards for Reporting ...Lisa Purvin Oliner
 
PRESENTACION DE REDES
PRESENTACION DE REDESPRESENTACION DE REDES
PRESENTACION DE REDESricarmerly
 

Ähnlich wie Textual Analysis for Code Smell Detection (20)

What every C++ programmer should know about modern compilers (w/o comments, A...
What every C++ programmer should know about modern compilers (w/o comments, A...What every C++ programmer should know about modern compilers (w/o comments, A...
What every C++ programmer should know about modern compilers (w/o comments, A...
 
Datathon_Entel_2022_Insight_ML.pdf
Datathon_Entel_2022_Insight_ML.pdfDatathon_Entel_2022_Insight_ML.pdf
Datathon_Entel_2022_Insight_ML.pdf
 
Datathon_Entel_2022_Insight_ML.pdf
Datathon_Entel_2022_Insight_ML.pdfDatathon_Entel_2022_Insight_ML.pdf
Datathon_Entel_2022_Insight_ML.pdf
 
Pintrace: Distributed tracing@Pinterest
Pintrace: Distributed tracing@PinterestPintrace: Distributed tracing@Pinterest
Pintrace: Distributed tracing@Pinterest
 
3rd week internship report
3rd week internship report3rd week internship report
3rd week internship report
 
Resume_Clasification.pptx
Resume_Clasification.pptxResume_Clasification.pptx
Resume_Clasification.pptx
 
Code GPU with CUDA - Identifying performance limiters
Code GPU with CUDA - Identifying performance limitersCode GPU with CUDA - Identifying performance limiters
Code GPU with CUDA - Identifying performance limiters
 
AWS SEMINAR SERIES 2015 Perth
AWS SEMINAR SERIES 2015 PerthAWS SEMINAR SERIES 2015 Perth
AWS SEMINAR SERIES 2015 Perth
 
Auckland AWS Seminar Series
Auckland AWS Seminar SeriesAuckland AWS Seminar Series
Auckland AWS Seminar Series
 
Testing Fuse Fabric with Pax Exam
Testing Fuse Fabric with Pax ExamTesting Fuse Fabric with Pax Exam
Testing Fuse Fabric with Pax Exam
 
FSLSO QTR
FSLSO QTRFSLSO QTR
FSLSO QTR
 
Spring Roo 2.0 Preview at Spring I/O 2016
Spring Roo 2.0 Preview at Spring I/O 2016 Spring Roo 2.0 Preview at Spring I/O 2016
Spring Roo 2.0 Preview at Spring I/O 2016
 
IoT Technical Roadmap
IoT Technical RoadmapIoT Technical Roadmap
IoT Technical Roadmap
 
SEO orientado a Ventas - DSMVALENCIA 2017
SEO orientado a Ventas - DSMVALENCIA 2017SEO orientado a Ventas - DSMVALENCIA 2017
SEO orientado a Ventas - DSMVALENCIA 2017
 
Tecnologias de la informacion y la comunicación
Tecnologias de la informacion y la comunicaciónTecnologias de la informacion y la comunicación
Tecnologias de la informacion y la comunicación
 
Extractive Evidence Based Medicine Summarisation Based on Sentence-Specific S...
Extractive Evidence Based Medicine Summarisation Based on Sentence-Specific S...Extractive Evidence Based Medicine Summarisation Based on Sentence-Specific S...
Extractive Evidence Based Medicine Summarisation Based on Sentence-Specific S...
 
Tic liz
Tic lizTic liz
Tic liz
 
AWS Seminar Series 2015 Brisbane
AWS Seminar Series 2015 BrisbaneAWS Seminar Series 2015 Brisbane
AWS Seminar Series 2015 Brisbane
 
Presentation Dividers and Article Outlines from AERA Standards for Reporting ...
Presentation Dividers and Article Outlines from AERA Standards for Reporting ...Presentation Dividers and Article Outlines from AERA Standards for Reporting ...
Presentation Dividers and Article Outlines from AERA Standards for Reporting ...
 
PRESENTACION DE REDES
PRESENTACION DE REDESPRESENTACION DE REDES
PRESENTACION DE REDES
 

Mehr von Fabio Palomba

Does Refactoring of Test Smells Induce Fixing Flaky Tests?
Does Refactoring of Test Smells Induce Fixing Flaky Tests?Does Refactoring of Test Smells Induce Fixing Flaky Tests?
Does Refactoring of Test Smells Induce Fixing Flaky Tests?Fabio Palomba
 
Social Debt Analytics for Improving the Management of Software Evolution Tasks
Social Debt Analytics for Improving the Management of Software Evolution TasksSocial Debt Analytics for Improving the Management of Software Evolution Tasks
Social Debt Analytics for Improving the Management of Software Evolution TasksFabio Palomba
 
Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...
Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...
Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...Fabio Palomba
 
A Textual-based Technique for Smell Detection
A Textual-based Technique for Smell DetectionA Textual-based Technique for Smell Detection
A Textual-based Technique for Smell DetectionFabio Palomba
 
On the Diffusion of Test Smells in Automatically Generated Test Code: An Empi...
On the Diffusion of Test Smells in Automatically Generated Test Code: An Empi...On the Diffusion of Test Smells in Automatically Generated Test Code: An Empi...
On the Diffusion of Test Smells in Automatically Generated Test Code: An Empi...Fabio Palomba
 
Extract Package Refactoring in ARIES
Extract Package Refactoring in ARIESExtract Package Refactoring in ARIES
Extract Package Refactoring in ARIESFabio Palomba
 
When and Why Your Code Starts to Smell Bad
When and Why Your Code Starts to Smell BadWhen and Why Your Code Starts to Smell Bad
When and Why Your Code Starts to Smell BadFabio Palomba
 
ARIES: An Eclipse Plug-in To Support Extract Class Refactoring
ARIES: An Eclipse Plug-in To Support Extract Class RefactoringARIES: An Eclipse Plug-in To Support Extract Class Refactoring
ARIES: An Eclipse Plug-in To Support Extract Class RefactoringFabio Palomba
 
Do They Really Smell Bad? A Study on Developers' Perception of Bad Code Smells
Do They Really Smell Bad? A Study on Developers' Perception of Bad Code SmellsDo They Really Smell Bad? A Study on Developers' Perception of Bad Code Smells
Do They Really Smell Bad? A Study on Developers' Perception of Bad Code SmellsFabio Palomba
 
Next! - An Android application to support tourists activities
Next! - An Android application to support tourists activitiesNext! - An Android application to support tourists activities
Next! - An Android application to support tourists activitiesFabio Palomba
 
Detecting Bad Smells in Source Code using Change History Information
Detecting Bad Smells in Source Code using Change History InformationDetecting Bad Smells in Source Code using Change History Information
Detecting Bad Smells in Source Code using Change History InformationFabio Palomba
 
A false digital alibi on Mac OS X
A false digital alibi on Mac OS XA false digital alibi on Mac OS X
A false digital alibi on Mac OS XFabio Palomba
 
Un plug-in Eclipse per il supporto all'Extract Class Refactoring
Un plug-in Eclipse per il supporto all'Extract Class RefactoringUn plug-in Eclipse per il supporto all'Extract Class Refactoring
Un plug-in Eclipse per il supporto all'Extract Class RefactoringFabio Palomba
 

Mehr von Fabio Palomba (15)

Does Refactoring of Test Smells Induce Fixing Flaky Tests?
Does Refactoring of Test Smells Induce Fixing Flaky Tests?Does Refactoring of Test Smells Induce Fixing Flaky Tests?
Does Refactoring of Test Smells Induce Fixing Flaky Tests?
 
Social Debt Analytics for Improving the Management of Software Evolution Tasks
Social Debt Analytics for Improving the Management of Software Evolution TasksSocial Debt Analytics for Improving the Management of Software Evolution Tasks
Social Debt Analytics for Improving the Management of Software Evolution Tasks
 
Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...
Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...
Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...
 
A Textual-based Technique for Smell Detection
A Textual-based Technique for Smell DetectionA Textual-based Technique for Smell Detection
A Textual-based Technique for Smell Detection
 
On the Diffusion of Test Smells in Automatically Generated Test Code: An Empi...
On the Diffusion of Test Smells in Automatically Generated Test Code: An Empi...On the Diffusion of Test Smells in Automatically Generated Test Code: An Empi...
On the Diffusion of Test Smells in Automatically Generated Test Code: An Empi...
 
Extract Package Refactoring in ARIES
Extract Package Refactoring in ARIESExtract Package Refactoring in ARIES
Extract Package Refactoring in ARIES
 
When and Why Your Code Starts to Smell Bad
When and Why Your Code Starts to Smell BadWhen and Why Your Code Starts to Smell Bad
When and Why Your Code Starts to Smell Bad
 
PhD Symposium 2014
PhD Symposium 2014PhD Symposium 2014
PhD Symposium 2014
 
ARIES: An Eclipse Plug-in To Support Extract Class Refactoring
ARIES: An Eclipse Plug-in To Support Extract Class RefactoringARIES: An Eclipse Plug-in To Support Extract Class Refactoring
ARIES: An Eclipse Plug-in To Support Extract Class Refactoring
 
Do They Really Smell Bad? A Study on Developers' Perception of Bad Code Smells
Do They Really Smell Bad? A Study on Developers' Perception of Bad Code SmellsDo They Really Smell Bad? A Study on Developers' Perception of Bad Code Smells
Do They Really Smell Bad? A Study on Developers' Perception of Bad Code Smells
 
People management
People managementPeople management
People management
 
Next! - An Android application to support tourists activities
Next! - An Android application to support tourists activitiesNext! - An Android application to support tourists activities
Next! - An Android application to support tourists activities
 
Detecting Bad Smells in Source Code using Change History Information
Detecting Bad Smells in Source Code using Change History InformationDetecting Bad Smells in Source Code using Change History Information
Detecting Bad Smells in Source Code using Change History Information
 
A false digital alibi on Mac OS X
A false digital alibi on Mac OS XA false digital alibi on Mac OS X
A false digital alibi on Mac OS X
 
Un plug-in Eclipse per il supporto all'Extract Class Refactoring
Un plug-in Eclipse per il supporto all'Extract Class RefactoringUn plug-in Eclipse per il supporto all'Extract Class Refactoring
Un plug-in Eclipse per il supporto all'Extract Class Refactoring
 

Kürzlich hochgeladen

Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 

Kürzlich hochgeladen (20)

Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 

Textual Analysis for Code Smell Detection

  • 1. Textual Analysis for Code Smell Detection FA B I O PA L O M B A , U N I V E R S I T Y O F S A L E R N O D I B T. U N I M O L . I T / F PA L O M B A I C S E 2 0 1 5 S R C M AY 2 2 , 2 0 1 5 F L O R E N C E , I TA LY
  • 2. C O D E S M E L L S A R E S Y M P T O M S O F P O O R D E S I G N O R I M P L E M E N TAT I O N C H O I S E S Code Smell [Martin Fowler]
  • 3. C O D E S M E L L S A R E M O R E C H A N G E - A N D FA U LT- P R O N E N E S S C O D E S M E L L S I N C R E A S E S M A I N T E N A N C E C O S T S Khomh et. al - EMSE 2012 Banker et. al - Communications of the ACM 1993 C O D E S M E L L S H I N D E R C O M P R E H E N S I B I L I T Y Abbes et. al - CSMR 2011
  • 4. S E V E R A L A P P ROAC H E S H AV E B E E N P RO P O S E D, E X P L O I T I N G D I F F E R E N T K I N D O F I N F O R M AT I O N S T R U C T U R A L I N F O R M AT I O N H I S T O R I C A L A N A LY S I S
  • 5. I S I T P O S S I B L E T O D E T E C T S M E L L S U S I N G C O N C E P T U A L I N F O R M AT I O N ?The Third Dimension
  • 6. T H E C A S E O F L O N G M E T H O D D E T E C T I O N TACO - Textual Analysis for Code Smell Detection “A Long Method as a method in which there is the implementation of a main functionality together with auxiliary functions that should be managed in different methods.” [Martin Fowler]
  • 7. TACO - Textual Analysis for Code Smell Detection T H E C A S E O F L O N G M E T H O D D E T E C T I O N method mi
  • 8. method mi method blocks extract blocks T H E C A S E O F L O N G M E T H O D D E T E C T I O N TACO - Textual Analysis for Code Smell Detection
  • 9. method blocks pruned method blocks extract identifiers extract comments extract blocks T H E C A S E O F L O N G M E T H O D D E T E C T I O N TACO - Textual Analysis for Code Smell Detection method mi
  • 10. similarity matrix method blocks pruned method blocks compute similarity extract identifiers extract comments extract blocks T H E C A S E O F L O N G M E T H O D D E T E C T I O N TACO - Textual Analysis for Code Smell Detection method mi
  • 11. similarity matrix method blocks pruned method blocks compute similarity extract identifiers extract comments I F E X I S T B L O C K S W I T H S I M I L A R I T Y < T H E N A L O N G M E T H O D I S D E T E C T E D extract blocks t T H E C A S E O F L O N G M E T H O D D E T E C T I O N TACO - Textual Analysis for Code Smell Detection method m
  • 12. T H E C A S E O F L O N G M E T H O D D E T E C T I O N - C A S E S T U D Y TACO - Textual Analysis for Code Smell Detection Apache Cassandra Apache Xerces Eclipse Core
  • 13. TACO - Textual Analysis for Code Smell Detection Apache Cassandra Apache Xerces Eclipse Core Precision Recall F-Measure T H E C A S E O F L O N G M E T H O D D E T E C T I O N - C A S E S T U D Y
  • 14. TACO - Textual Analysis for Code Smell Detection Apache Cassandra Apache Xerces Eclipse Core Precision Recall F-Measure Compared with DECOR approach [Moha et al.] T H E C A S E O F L O N G M E T H O D D E T E C T I O N - C A S E S T U D Y
  • 15. TACO - Textual Analysis for Code Smell Detection Apache Cassandra Apache Xerces Eclipse Core Precision Recall F-Measure Compared with DECOR approach [Moha et al.] T H E C A S E O F L O N G M E T H O D D E T E C T I O N - C A S E S T U D Y 63% 51% DECOR TACO OVERALL F-MEASURE OVERALL F-MEASURE
  • 16. TACO - Textual Analysis for Code Smell Detection Apache Cassandra Apache Xerces Eclipse Core Precision Recall F-Measure Compared with DECOR approach [Moha et al.] TACO is highly complementary with respect to DECOR on 2 systems analyzed T H E C A S E O F L O N G M E T H O D D E T E C T I O N - C A S E S T U D Y 63% 51% DECOR TACO OVERALL F-MEASURE OVERALL F-MEASURE
  • 17. A P R AT I C A L E X A M P L E TACO - Textual Analysis for Code Smell Detection Method: findTypesAndPackages() Goal: Discover the classes and the packages of a given project Class: CompletionEngine - Eclipse Core
  • 18. TACO - Textual Analysis for Code Smell Detection Method: findTypesAndPackages() Goal: Discover the classes and the packages of a given project This method has 65 lines of code Class: CompletionEngine - Eclipse Core A P R AT I C A L E X A M P L E
  • 19. TACO - Textual Analysis for Code Smell Detection Method: findTypesAndPackages() Goal: Discover the classes and the packages of a given project This method has 65 lines of code A S TAT I C A P P R O A C H C A N N O T D E T E C T A L O N G M E T H O D Class: CompletionEngine - Eclipse Core A P R AT I C A L E X A M P L E
  • 20. TACO - Textual Analysis for Code Smell Detection Class: CompletionEngine - Eclipse Core Method: findTypesAndPackages() Goal: Discover the classes and the packages of a given project This method has 65 lines of code A S TAT I C A P P R O A C H C A N N O T D E T E C T A L O N G M E T H O D But the method manages more than one responsibility I T A C T U A L LY I S A L O N G M E T H O D ! A P R AT I C A L E X A M P L E
  • 21. I S I T P O S S I B L E T O D E T E C T S M E L L S U S I N G C O N C E P T U A L I N F O R M AT I O N !The Third Dimension YES, IT IS
  • 22. S U M M A R I Z I N G TACO - Textual Analysis for Code Smell Detection Textual Analysis is useful for smell detection
  • 23. Textual Analysis is useful for smell detection Is TACO suitable for detectingother smells? TACO - Textual Analysis for Code Smell Detection What about a hybrid technique for detecting smells? C O M I N G S O O N …
  • 24. Textual Analysis for Code Smell Detection FA B I O PA L O M B A , U N I V E R S I T Y O F S A L E R N O D I B T. U N I M O L . I T / F PA L O M B A I C S E 2 0 1 5 S R C M AY 2 2 , 2 0 1 5 F L O R E N C E , I TA LY