SlideShare a Scribd company logo
1 of 58
Download to read offline
Do They Really Smell Bad? 
A Study on Developers’ Perception of 
Bad Code Smells 
Fabio Palomba, Gabriele Bavota, Massimiliano Di Penta, 
Rocco Oliveto, Andrea De Lucia 
ICSME 2014 
Victoria - Canada 
October 1st, 2014 
giovedì 2 ottobre 14
giovedì 2 ottobre 14
giovedì 2 ottobre 14
giovedì 2 ottobre 14
giovedì 2 ottobre 14
Context 
Bad Code 
Smells 
giovedì 2 ottobre 14
Bad Code Smells 
giovedì 2 ottobre 14
Moha et al., “DECOR: A Method for the Specification and Detection of 
Code and Design Smells” - TSE 2010 
giovedì 2 ottobre 14
van Emden et al., “Java Quality Assurance by Detecting Code Smells” - 
WCRE 2002 
giovedì 2 ottobre 14
Tsantalis et al., “Identification of Move Method Refactoring 
Opportunities” - TSE 2009 
Fokaets et al., “Identification and Application of Extract Class 
Refactorings In Object Oriented Systems” - JSS 2012 
Tsantalis et al., “Identification of Extract Method Refactoring 
Opportunities for the Decomposition of Methods” - JSS 2011 
giovedì 2 ottobre 14
Kessentini et al., “Deviance from Perfection is a Better Criterion than 
Closeness to Evil when Identifying Risky Code” - ASE 2010 
giovedì 2 ottobre 14
Palomba et al., “Detecting Bad Smells in Source Code using Change 
History Information” - ASE 2013 
giovedì 2 ottobre 14
Abebe et al., “Lexicon Bad Smells in Software” - WCRE 2009 
giovedì 2 ottobre 14
Not only detection techniques! 
But also... 
giovedì 2 ottobre 14
A. Chatzigeorgiou et al., “Investigating the evolution of bad smells in 
object-oriented code” - QUATIC 2010 
giovedì 2 ottobre 14
R. Peters and A. Zaidman, “Evaluating the lifespan of code smells using 
software repository mining” - CSMR 2012 
R. Arcoverde, A. Garcia, and E. Figueiredo, “Understanding the longevity of 
code smells: preliminary results of an explanatory survey” - IWRT 2011 
giovedì 2 ottobre 14
F. Khomh, M. Di Penta, Y.-G. Guéhéneuc, and G. Antoniol, “An exploratory study of the impact of 
antipatterns on class change- and fault-proneness” - EMSE 2012 
W. Li and R. Shatnawi, “An empirical study of the bad smells and class error probability in the post-release 
object-oriented system evolution” - JSS 2007 
giovedì 2 ottobre 14
M. Abbes, F. Khomh,Y.-G. Guéhéneuc, and G. Antoniol, “An empirical study of the impact 
of two antipatterns, blob and spaghetti code, on program comprehension” - CSMR 2011 
giovedì 2 ottobre 14
“We don’t see things as they are, 
we see things as we are” 
Anais Nin 
giovedì 2 ottobre 14
S. M. Olbrich, D. S. Cruzes, and D. I. K. Sjøberg, “Are all code smells harmful? A study of 
God Classes and Brain Classes in the evolution of three open source systems” - ICSM 2010 
giovedì 2 ottobre 14
A. Yamashita and L. Moonen, “Do developers care about code smells? An exploratory 
survey” - WCRE 2013 
giovedì 2 ottobre 14
Investingating the 
developers’ point of view 
giovedì 2 ottobre 14
Investingating the 
developers’ point of view 
RQ1: To what extent do bad smells reflect 
developers’ perception of design problems? 
giovedì 2 ottobre 14
Investingating the 
developers’ point of view 
RQ1: To what extent do bad smells reflect 
developers’ perception of design problems? 
RQ2: What are the bad smells that 
developers feel as the most harmful? 
giovedì 2 ottobre 14
Study Design 
giovedì 2 ottobre 14
Study Design 
Class Data Should Be Private 
Complex Class 
Feature Envy 
God Class 
Inappropriate Intimacy 
Lazy Class 
Long Method 
Long Parameter List 
Middle Man 
Refused Bequest 
Spaghetti Code 
Speculative Generality 
giovedì 2 ottobre 14
Study Design 
Class Data Should Be Private 
Complex Class 
Feature Envy 
God Class 
Inappropriate Intimacy 
Lazy Class 
Long Method 
Long Parameter List 
Middle Man 
Refused Bequest 
Spaghetti Code 
Speculative Generality 
Argo UML 0.34 
Eclipse 3.6.1 
jEdit 4.5.1 
giovedì 2 ottobre 14
Study Design 
Argo UML 0.34 
Eclipse 3.6.1 
jEdit 4.5.1 
Original Developers: 
10 
Industrial Developers 
9 
Master’s Students 
15 
Class Data Should Be Private 
Complex Class 
Feature Envy 
God Class 
Inappropriate Intimacy 
Lazy Class 
Long Method 
Long Parameter List 
Middle Man 
Refused Bequest 
Spaghetti Code 
Speculative Generality 
giovedì 2 ottobre 14
Study Design 
Developer 
Smelly Class 
giovedì 2 ottobre 14
Study Design 
Developer 
Smelly Class 
In your opinion, does this code 
component exhibit any design and/or 
implementation problem? 
giovedì 2 ottobre 14
Study Design 
Developer 
Smelly Class 
In your opinion, does this code 
component exhibit any design and/or 
implementation problem? 
• If YES, please explain what are, in your 
opinion, the problems affecting the code 
component. 
giovedì 2 ottobre 14
Study Design 
Developer 
Smelly Class 
In your opinion, does this code 
component exhibit any design and/or 
implementation problem? 
• If YES, please explain what are, in your 
opinion, the problems affecting the code 
component. 
• If YES, please rate the severity of the 
design and/or implementation problem 
by assigning a score on the following five-points 
Likert scale: 1 (very low), 2 (low), 
3 (medium), 4 (high), 5 (very high). 
giovedì 2 ottobre 14
Results 
giovedì 2 ottobre 14
Smells generally not Perceived as 
Design or Implementation Problems 
Class Data Should Be Private 
Middle Man 
Long Parameter List 
Lazy Class 
Inappropriate Intimacy 
giovedì 2 ottobre 14
Smells generally not Perceived as 
Design or Implementation Problems 
Class Data Should Be Private 
Middle Man 
Lazy Class 
Inappropriate Intimacy 
< 25% perceived < 24% IDENTIFIED 
< 10% perceived < 5% IDENTIFIED 
< 36% PERCEIVED 
< 20% PERCEIVED 
< 30% PERCEIVED 
< 20% IDENTIFIED 
< 5% IDENTIFIED 
< 13% IDENTIFIED 
Long Parameter List 
giovedì 2 ottobre 14
Smells generally not Perceived as 
Design or Implementation Problems 
Class Data Should Be Private < 25% perceived < 24% IDENTIFIED 
30 
25 
20 
15 
10 
5 
0 
M I O 
Identified Perceived 
giovedì 2 ottobre 14
Smells generally not Perceived as 
Design or Implementation Problems 
Class Data Should Be Private < 25% perceived < 24% IDENTIFIED 
30 
25 
20 
15 
10 
5 
0 
M I O 
Identified Perceived 
Severity 
M I O 
1 2 2 
giovedì 2 ottobre 14
Smells generally not Perceived as 
Design or Implementation Problems 
Class Data Should Be Private < 25% perceived < 24% IDENTIFIED 
30 
25 
“This 20 
class exposes all its fields, and this could look like bad coding. 
However, 15 
at the end of the day this is an utility class with public static 
10 
5 
0 
M I O 
Identified Perceived 
Severity 
M I O 
fields that can be used from everywhere in the system” 
giovedì 2 ottobre 14
Smells generally Perceived and 
Identified by Respondents 
God Class 
Complex Class 
Long Method 
Spaghetti Code 
giovedì 2 ottobre 14
Smells generally Perceived and 
Identified by Respondents 
God Class 
Complex Class 
Long Method 
Spaghetti Code 
> 85% perceived > 83% IDENTIFIED 
> 75% perceived > 75% IDENTIFIED 
> 70% perceived > 70% IDENTIFIED 
> 68% perceived < 65% IDENTIFIED 
giovedì 2 ottobre 14
Smells generally Perceived and 
Identified by Respondents 
God Class 
100 
83 
67 
50 
33 
17 
0 
M I O 
Identified Perceived 
> 85% perceived > 83% IDENTIFIED 
giovedì 2 ottobre 14
Smells generally Perceived and 
Identified by Respondents 
God Class 
100 
83 
67 
50 
33 
17 
0 
M I O 
Identified Perceived 
> 85% perceived > 83% IDENTIFIED 
Severity 
M I O 
4 5 5 
giovedì 2 ottobre 14
Smells whose Perception may vary 
Refused Bequest 
Feature Envy 
Speculative Generality 
giovedì 2 ottobre 14
Smells whose Perception may vary 
Refused Bequest 
Feature Envy 
Speculative Generality 
DEPENDS FROM 
THE “INTENSITY” OF 
THE PROBLEM 
giovedì 2 ottobre 14
Smells whose Perception may vary 
Refused Bequest 
100 
90 
80 
70 
60 
50 
40 
30 
20 
10 
0 
Master Students Perception on the Three Analyzed Systems 
ArgoUML Eclipse jEdit 
Perceived Identified 
giovedì 2 ottobre 14
Smells whose Perception may vary 
Refused Bequest Master Students Perception on the Three Analyzed Systems 
100 
90 
80 
70 
60 
50 
40 
30 
20 
10 
0 
ArgoUML Eclipse jEdit 
Perceived Identified 
1 
1 
4 
giovedì 2 ottobre 14
Conclusion 
giovedì 2 ottobre 14
giovedì 2 ottobre 14
giovedì 2 ottobre 14
giovedì 2 ottobre 14
giovedì 2 ottobre 14
giovedì 2 ottobre 14
giovedì 2 ottobre 14
giovedì 2 ottobre 14
giovedì 2 ottobre 14
giovedì 2 ottobre 14
giovedì 2 ottobre 14
? giovedì 2 ottobre 14

More Related Content

What's hot

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
 
Investigating Code Review Practices in Defective Files
Investigating Code Review Practices in Defective FilesInvestigating Code Review Practices in Defective Files
Investigating Code Review Practices in Defective FilesThe University of Adelaide
 
A Method to Detect License Inconsistencies for Large-Scale Open Source Projects
A Method to Detect License Inconsistencies for Large-Scale Open Source ProjectsA Method to Detect License Inconsistencies for Large-Scale Open Source Projects
A Method to Detect License Inconsistencies for Large-Scale Open Source ProjectsYuhao Wu
 
QuaP2P Kickoff Slides 2006
QuaP2P Kickoff Slides 2006QuaP2P Kickoff Slides 2006
QuaP2P Kickoff Slides 2006Kalman Graffi
 
Enhancing Developer Productivity with Code Forensics
Enhancing Developer Productivity with Code ForensicsEnhancing Developer Productivity with Code Forensics
Enhancing Developer Productivity with Code ForensicsTechWell
 
Do software developers understand open source licenses?
Do software developers understand open source licenses?Do software developers understand open source licenses?
Do software developers understand open source licenses?Daniel Almeida
 
MAVIS: A Visualization Tool for Cohesion-based Bad Smell Inspection
MAVIS: A Visualization Tool for Cohesion-based Bad Smell InspectionMAVIS: A Visualization Tool for Cohesion-based Bad Smell Inspection
MAVIS: A Visualization Tool for Cohesion-based Bad Smell Inspection立偉 馬
 
Plagiarism introduction
Plagiarism introductionPlagiarism introduction
Plagiarism introductionMerin Paul
 
The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...Ali Ouni
 
A Multi-Objective Refactoring Approach to Introduce Design Patterns and Fix A...
A Multi-Objective Refactoring Approach to Introduce Design Patterns and Fix A...A Multi-Objective Refactoring Approach to Introduce Design Patterns and Fix A...
A Multi-Objective Refactoring Approach to Introduce Design Patterns and Fix A...Ali Ouni
 
Bristol 2009 q1_eder_kersten
Bristol 2009 q1_eder_kerstenBristol 2009 q1_eder_kersten
Bristol 2009 q1_eder_kerstenObsidian Software
 

What's hot (13)

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
 
Investigating Code Review Practices in Defective Files
Investigating Code Review Practices in Defective FilesInvestigating Code Review Practices in Defective Files
Investigating Code Review Practices in Defective Files
 
A Method to Detect License Inconsistencies for Large-Scale Open Source Projects
A Method to Detect License Inconsistencies for Large-Scale Open Source ProjectsA Method to Detect License Inconsistencies for Large-Scale Open Source Projects
A Method to Detect License Inconsistencies for Large-Scale Open Source Projects
 
Icsm20.ppt
Icsm20.pptIcsm20.ppt
Icsm20.ppt
 
Msr17a.ppt
Msr17a.pptMsr17a.ppt
Msr17a.ppt
 
QuaP2P Kickoff Slides 2006
QuaP2P Kickoff Slides 2006QuaP2P Kickoff Slides 2006
QuaP2P Kickoff Slides 2006
 
Enhancing Developer Productivity with Code Forensics
Enhancing Developer Productivity with Code ForensicsEnhancing Developer Productivity with Code Forensics
Enhancing Developer Productivity with Code Forensics
 
Do software developers understand open source licenses?
Do software developers understand open source licenses?Do software developers understand open source licenses?
Do software developers understand open source licenses?
 
MAVIS: A Visualization Tool for Cohesion-based Bad Smell Inspection
MAVIS: A Visualization Tool for Cohesion-based Bad Smell InspectionMAVIS: A Visualization Tool for Cohesion-based Bad Smell Inspection
MAVIS: A Visualization Tool for Cohesion-based Bad Smell Inspection
 
Plagiarism introduction
Plagiarism introductionPlagiarism introduction
Plagiarism introduction
 
The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...The Use of Development History in Software Refactoring Using a Multi-Objectiv...
The Use of Development History in Software Refactoring Using a Multi-Objectiv...
 
A Multi-Objective Refactoring Approach to Introduce Design Patterns and Fix A...
A Multi-Objective Refactoring Approach to Introduce Design Patterns and Fix A...A Multi-Objective Refactoring Approach to Introduce Design Patterns and Fix A...
A Multi-Objective Refactoring Approach to Introduce Design Patterns and Fix A...
 
Bristol 2009 q1_eder_kersten
Bristol 2009 q1_eder_kerstenBristol 2009 q1_eder_kersten
Bristol 2009 q1_eder_kersten
 

Similar to Do They Really Smell Bad? A Study on Developers' Perception of Bad Code Smells

Search-based Software Testing (SBST) '22
Search-based Software Testing (SBST) '22Search-based Software Testing (SBST) '22
Search-based Software Testing (SBST) '22Sebastiano Panichella
 
Emerging practices 2019 week 7
Emerging practices 2019 week 7Emerging practices 2019 week 7
Emerging practices 2019 week 7R. Sosa
 
Emerging practices 2019 week 2
Emerging practices 2019 week 2Emerging practices 2019 week 2
Emerging practices 2019 week 2R. Sosa
 
La préservation des logiciels: défis et opportunités pour la reproductibilité...
La préservation des logiciels: défis et opportunités pour la reproductibilité...La préservation des logiciels: défis et opportunités pour la reproductibilité...
La préservation des logiciels: défis et opportunités pour la reproductibilité...Roberto Di Cosmo
 
Deep learning based code smell detection - Qualifying Talk
Deep learning based code smell detection - Qualifying TalkDeep learning based code smell detection - Qualifying Talk
Deep learning based code smell detection - Qualifying TalkSayed Mohsin Reza
 
Being a professional software tester
Being a professional software testerBeing a professional software tester
Being a professional software testerAnton Keks
 
On the Malware Detection Problem: Challenges & Novel Approaches
On the Malware Detection Problem: Challenges & Novel ApproachesOn the Malware Detection Problem: Challenges & Novel Approaches
On the Malware Detection Problem: Challenges & Novel ApproachesMarcus Botacin
 
Testing the ideas
Testing the ideasTesting the ideas
Testing the ideasDan Ashby
 
Treating Code Quality as a First Class Entity (icsme15) [doc. symposium]
Treating Code Quality as a First Class Entity (icsme15) [doc. symposium]Treating Code Quality as a First Class Entity (icsme15) [doc. symposium]
Treating Code Quality as a First Class Entity (icsme15) [doc. symposium]Yuriy Tymchuk
 
Got Myth? Myths in Software Engineering
Got Myth? Myths in Software EngineeringGot Myth? Myths in Software Engineering
Got Myth? Myths in Software EngineeringThomas Zimmermann
 
What's that smell? Tidying Up our Test Code by Angie Jones
What's that smell? Tidying Up our Test Code by Angie JonesWhat's that smell? Tidying Up our Test Code by Angie Jones
What's that smell? Tidying Up our Test Code by Angie JonesSauce Labs
 
Automatically Identifying the Quality of Developer Chats for Post Hoc Use
Automatically Identifying the Quality of Developer Chats for Post Hoc UseAutomatically Identifying the Quality of Developer Chats for Post Hoc Use
Automatically Identifying the Quality of Developer Chats for Post Hoc UsePreetha Chatterjee
 
Emerging practices 2019 week 1
Emerging practices 2019 week 1Emerging practices 2019 week 1
Emerging practices 2019 week 1R. Sosa
 
Ossiannilsson langoer 02_april2015 (2)
Ossiannilsson langoer 02_april2015 (2)Ossiannilsson langoer 02_april2015 (2)
Ossiannilsson langoer 02_april2015 (2)Ebba Ossiannilsson
 
Presentation feb-2020-hackathon-public
Presentation feb-2020-hackathon-publicPresentation feb-2020-hackathon-public
Presentation feb-2020-hackathon-publicTom Kelly
 
Architectural Smells Detected by Tools: a Catalogue Proposal
Architectural Smells Detected by Tools:  a Catalogue ProposalArchitectural Smells Detected by Tools:  a Catalogue Proposal
Architectural Smells Detected by Tools: a Catalogue ProposalUmbertoAzadi
 

Similar to Do They Really Smell Bad? A Study on Developers' Perception of Bad Code Smells (20)

Search-based Software Testing (SBST) '22
Search-based Software Testing (SBST) '22Search-based Software Testing (SBST) '22
Search-based Software Testing (SBST) '22
 
Emerging practices 2019 week 7
Emerging practices 2019 week 7Emerging practices 2019 week 7
Emerging practices 2019 week 7
 
Emerging practices 2019 week 2
Emerging practices 2019 week 2Emerging practices 2019 week 2
Emerging practices 2019 week 2
 
PhD Welcome Day 2014
PhD Welcome Day 2014PhD Welcome Day 2014
PhD Welcome Day 2014
 
La préservation des logiciels: défis et opportunités pour la reproductibilité...
La préservation des logiciels: défis et opportunités pour la reproductibilité...La préservation des logiciels: défis et opportunités pour la reproductibilité...
La préservation des logiciels: défis et opportunités pour la reproductibilité...
 
Deep learning based code smell detection - Qualifying Talk
Deep learning based code smell detection - Qualifying TalkDeep learning based code smell detection - Qualifying Talk
Deep learning based code smell detection - Qualifying Talk
 
Being a professional software tester
Being a professional software testerBeing a professional software tester
Being a professional software tester
 
On the Malware Detection Problem: Challenges & Novel Approaches
On the Malware Detection Problem: Challenges & Novel ApproachesOn the Malware Detection Problem: Challenges & Novel Approaches
On the Malware Detection Problem: Challenges & Novel Approaches
 
Testing the ideas
Testing the ideasTesting the ideas
Testing the ideas
 
Treating Code Quality as a First Class Entity (icsme15) [doc. symposium]
Treating Code Quality as a First Class Entity (icsme15) [doc. symposium]Treating Code Quality as a First Class Entity (icsme15) [doc. symposium]
Treating Code Quality as a First Class Entity (icsme15) [doc. symposium]
 
Got Myth? Myths in Software Engineering
Got Myth? Myths in Software EngineeringGot Myth? Myths in Software Engineering
Got Myth? Myths in Software Engineering
 
Refactor to the Limit!
Refactor to the Limit!Refactor to the Limit!
Refactor to the Limit!
 
What's that smell? Tidying Up our Test Code by Angie Jones
What's that smell? Tidying Up our Test Code by Angie JonesWhat's that smell? Tidying Up our Test Code by Angie Jones
What's that smell? Tidying Up our Test Code by Angie Jones
 
Andrew Moore past-present-potential
Andrew Moore past-present-potentialAndrew Moore past-present-potential
Andrew Moore past-present-potential
 
Automatically Identifying the Quality of Developer Chats for Post Hoc Use
Automatically Identifying the Quality of Developer Chats for Post Hoc UseAutomatically Identifying the Quality of Developer Chats for Post Hoc Use
Automatically Identifying the Quality of Developer Chats for Post Hoc Use
 
Emerging practices 2019 week 1
Emerging practices 2019 week 1Emerging practices 2019 week 1
Emerging practices 2019 week 1
 
Ossiannilsson langoer 02_april2015 (2)
Ossiannilsson langoer 02_april2015 (2)Ossiannilsson langoer 02_april2015 (2)
Ossiannilsson langoer 02_april2015 (2)
 
Data science - Bricks with Clay
Data science - Bricks with ClayData science - Bricks with Clay
Data science - Bricks with Clay
 
Presentation feb-2020-hackathon-public
Presentation feb-2020-hackathon-publicPresentation feb-2020-hackathon-public
Presentation feb-2020-hackathon-public
 
Architectural Smells Detected by Tools: a Catalogue Proposal
Architectural Smells Detected by Tools:  a Catalogue ProposalArchitectural Smells Detected by Tools:  a Catalogue Proposal
Architectural Smells Detected by Tools: a Catalogue Proposal
 

More from 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
 
Extract Package Refactoring in ARIES
Extract Package Refactoring in ARIESExtract Package Refactoring in ARIES
Extract Package Refactoring in ARIESFabio Palomba
 
Textual Analysis for Code Smell Detection
Textual Analysis for Code Smell DetectionTextual Analysis for Code Smell Detection
Textual Analysis for Code Smell DetectionFabio 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
 
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
 
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
 

More from Fabio Palomba (8)

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?
 
Extract Package Refactoring in ARIES
Extract Package Refactoring in ARIESExtract Package Refactoring in ARIES
Extract Package Refactoring in ARIES
 
Textual Analysis for Code Smell Detection
Textual Analysis for Code Smell DetectionTextual Analysis for Code Smell Detection
Textual Analysis for Code Smell Detection
 
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
 
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
 
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
 

Recently uploaded

Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 

Recently uploaded (20)

Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 

Do They Really Smell Bad? A Study on Developers' Perception of Bad Code Smells

  • 1. Do They Really Smell Bad? A Study on Developers’ Perception of Bad Code Smells Fabio Palomba, Gabriele Bavota, Massimiliano Di Penta, Rocco Oliveto, Andrea De Lucia ICSME 2014 Victoria - Canada October 1st, 2014 giovedì 2 ottobre 14
  • 6. Context Bad Code Smells giovedì 2 ottobre 14
  • 7. Bad Code Smells giovedì 2 ottobre 14
  • 8. Moha et al., “DECOR: A Method for the Specification and Detection of Code and Design Smells” - TSE 2010 giovedì 2 ottobre 14
  • 9. van Emden et al., “Java Quality Assurance by Detecting Code Smells” - WCRE 2002 giovedì 2 ottobre 14
  • 10. Tsantalis et al., “Identification of Move Method Refactoring Opportunities” - TSE 2009 Fokaets et al., “Identification and Application of Extract Class Refactorings In Object Oriented Systems” - JSS 2012 Tsantalis et al., “Identification of Extract Method Refactoring Opportunities for the Decomposition of Methods” - JSS 2011 giovedì 2 ottobre 14
  • 11. Kessentini et al., “Deviance from Perfection is a Better Criterion than Closeness to Evil when Identifying Risky Code” - ASE 2010 giovedì 2 ottobre 14
  • 12. Palomba et al., “Detecting Bad Smells in Source Code using Change History Information” - ASE 2013 giovedì 2 ottobre 14
  • 13. Abebe et al., “Lexicon Bad Smells in Software” - WCRE 2009 giovedì 2 ottobre 14
  • 14. Not only detection techniques! But also... giovedì 2 ottobre 14
  • 15. A. Chatzigeorgiou et al., “Investigating the evolution of bad smells in object-oriented code” - QUATIC 2010 giovedì 2 ottobre 14
  • 16. R. Peters and A. Zaidman, “Evaluating the lifespan of code smells using software repository mining” - CSMR 2012 R. Arcoverde, A. Garcia, and E. Figueiredo, “Understanding the longevity of code smells: preliminary results of an explanatory survey” - IWRT 2011 giovedì 2 ottobre 14
  • 17. F. Khomh, M. Di Penta, Y.-G. Guéhéneuc, and G. Antoniol, “An exploratory study of the impact of antipatterns on class change- and fault-proneness” - EMSE 2012 W. Li and R. Shatnawi, “An empirical study of the bad smells and class error probability in the post-release object-oriented system evolution” - JSS 2007 giovedì 2 ottobre 14
  • 18. M. Abbes, F. Khomh,Y.-G. Guéhéneuc, and G. Antoniol, “An empirical study of the impact of two antipatterns, blob and spaghetti code, on program comprehension” - CSMR 2011 giovedì 2 ottobre 14
  • 19. “We don’t see things as they are, we see things as we are” Anais Nin giovedì 2 ottobre 14
  • 20. S. M. Olbrich, D. S. Cruzes, and D. I. K. Sjøberg, “Are all code smells harmful? A study of God Classes and Brain Classes in the evolution of three open source systems” - ICSM 2010 giovedì 2 ottobre 14
  • 21. A. Yamashita and L. Moonen, “Do developers care about code smells? An exploratory survey” - WCRE 2013 giovedì 2 ottobre 14
  • 22. Investingating the developers’ point of view giovedì 2 ottobre 14
  • 23. Investingating the developers’ point of view RQ1: To what extent do bad smells reflect developers’ perception of design problems? giovedì 2 ottobre 14
  • 24. Investingating the developers’ point of view RQ1: To what extent do bad smells reflect developers’ perception of design problems? RQ2: What are the bad smells that developers feel as the most harmful? giovedì 2 ottobre 14
  • 25. Study Design giovedì 2 ottobre 14
  • 26. Study Design Class Data Should Be Private Complex Class Feature Envy God Class Inappropriate Intimacy Lazy Class Long Method Long Parameter List Middle Man Refused Bequest Spaghetti Code Speculative Generality giovedì 2 ottobre 14
  • 27. Study Design Class Data Should Be Private Complex Class Feature Envy God Class Inappropriate Intimacy Lazy Class Long Method Long Parameter List Middle Man Refused Bequest Spaghetti Code Speculative Generality Argo UML 0.34 Eclipse 3.6.1 jEdit 4.5.1 giovedì 2 ottobre 14
  • 28. Study Design Argo UML 0.34 Eclipse 3.6.1 jEdit 4.5.1 Original Developers: 10 Industrial Developers 9 Master’s Students 15 Class Data Should Be Private Complex Class Feature Envy God Class Inappropriate Intimacy Lazy Class Long Method Long Parameter List Middle Man Refused Bequest Spaghetti Code Speculative Generality giovedì 2 ottobre 14
  • 29. Study Design Developer Smelly Class giovedì 2 ottobre 14
  • 30. Study Design Developer Smelly Class In your opinion, does this code component exhibit any design and/or implementation problem? giovedì 2 ottobre 14
  • 31. Study Design Developer Smelly Class In your opinion, does this code component exhibit any design and/or implementation problem? • If YES, please explain what are, in your opinion, the problems affecting the code component. giovedì 2 ottobre 14
  • 32. Study Design Developer Smelly Class In your opinion, does this code component exhibit any design and/or implementation problem? • If YES, please explain what are, in your opinion, the problems affecting the code component. • If YES, please rate the severity of the design and/or implementation problem by assigning a score on the following five-points Likert scale: 1 (very low), 2 (low), 3 (medium), 4 (high), 5 (very high). giovedì 2 ottobre 14
  • 33. Results giovedì 2 ottobre 14
  • 34. Smells generally not Perceived as Design or Implementation Problems Class Data Should Be Private Middle Man Long Parameter List Lazy Class Inappropriate Intimacy giovedì 2 ottobre 14
  • 35. Smells generally not Perceived as Design or Implementation Problems Class Data Should Be Private Middle Man Lazy Class Inappropriate Intimacy < 25% perceived < 24% IDENTIFIED < 10% perceived < 5% IDENTIFIED < 36% PERCEIVED < 20% PERCEIVED < 30% PERCEIVED < 20% IDENTIFIED < 5% IDENTIFIED < 13% IDENTIFIED Long Parameter List giovedì 2 ottobre 14
  • 36. Smells generally not Perceived as Design or Implementation Problems Class Data Should Be Private < 25% perceived < 24% IDENTIFIED 30 25 20 15 10 5 0 M I O Identified Perceived giovedì 2 ottobre 14
  • 37. Smells generally not Perceived as Design or Implementation Problems Class Data Should Be Private < 25% perceived < 24% IDENTIFIED 30 25 20 15 10 5 0 M I O Identified Perceived Severity M I O 1 2 2 giovedì 2 ottobre 14
  • 38. Smells generally not Perceived as Design or Implementation Problems Class Data Should Be Private < 25% perceived < 24% IDENTIFIED 30 25 “This 20 class exposes all its fields, and this could look like bad coding. However, 15 at the end of the day this is an utility class with public static 10 5 0 M I O Identified Perceived Severity M I O fields that can be used from everywhere in the system” giovedì 2 ottobre 14
  • 39. Smells generally Perceived and Identified by Respondents God Class Complex Class Long Method Spaghetti Code giovedì 2 ottobre 14
  • 40. Smells generally Perceived and Identified by Respondents God Class Complex Class Long Method Spaghetti Code > 85% perceived > 83% IDENTIFIED > 75% perceived > 75% IDENTIFIED > 70% perceived > 70% IDENTIFIED > 68% perceived < 65% IDENTIFIED giovedì 2 ottobre 14
  • 41. Smells generally Perceived and Identified by Respondents God Class 100 83 67 50 33 17 0 M I O Identified Perceived > 85% perceived > 83% IDENTIFIED giovedì 2 ottobre 14
  • 42. Smells generally Perceived and Identified by Respondents God Class 100 83 67 50 33 17 0 M I O Identified Perceived > 85% perceived > 83% IDENTIFIED Severity M I O 4 5 5 giovedì 2 ottobre 14
  • 43. Smells whose Perception may vary Refused Bequest Feature Envy Speculative Generality giovedì 2 ottobre 14
  • 44. Smells whose Perception may vary Refused Bequest Feature Envy Speculative Generality DEPENDS FROM THE “INTENSITY” OF THE PROBLEM giovedì 2 ottobre 14
  • 45. Smells whose Perception may vary Refused Bequest 100 90 80 70 60 50 40 30 20 10 0 Master Students Perception on the Three Analyzed Systems ArgoUML Eclipse jEdit Perceived Identified giovedì 2 ottobre 14
  • 46. Smells whose Perception may vary Refused Bequest Master Students Perception on the Three Analyzed Systems 100 90 80 70 60 50 40 30 20 10 0 ArgoUML Eclipse jEdit Perceived Identified 1 1 4 giovedì 2 ottobre 14
  • 47. Conclusion giovedì 2 ottobre 14
  • 58. ? giovedì 2 ottobre 14