SlideShare a Scribd company logo
1 of 25
Download to read offline
Do Code Smells Impact the Effort of
Different Maintenance Programming
Activities?
Zephyrin Soh, AikoYamashita, Foutse Khomh, andYann-Gael Guéheneuc
SANER - Osaka, March 2016
CODE SMELLS AND ANTI-PATTERNS
➡ Long Method
➡ Large Class
Bloaters
Change preventers
➡ Divergent Change
➡ Shotgun Surgery
https://sourcemaking.com/refactoring/smells https://xkcd.com/844/
Spaghetti
monster
STATE OF ART ON CODE SMELLS
Empirical studies
• Code smells have deterring effects on the introduction of defects
‣ Monden (2002), Li &Shatnawi (2007), Kapser (2006), Juergens (2009), Rahman (2011)
• Larger maintenance effort
‣ Deligiannis (2004), Abbes (2011)
• Larger and more frequent changes in the code
‣ Olbrich (2009), Khomh (2009)
• The overall capacity of code smell analysis to explain or predict
maintenance problems or maintenance effort is rather modest
‣ Yamashita (2012), Sjøberg (2013)
Previous work: Multiple, controlled case study
(Yamashita 2012, Sjøberg et al., 2013)
• 4 Java Applications
• Same functionality
• Different design/code
• Size: 7KLOC to 14KLOC
Context
Task 3.
New Reporting
functionality
Task 1. Replacing external data source
✔
Task 2.
New authentication
mechanism
System!
Maintenance Tasks
DCBA
Developer
System
Study Design
Previous work: Multiple, controlled case study
(Yamashita 2012, Sjøberg et al., 2013)
System
Project context
Tasks
Source
code
Daily interviews
Audio files/notes
Subversion
database
Programming
Skill
Defects*
Development
Technology
Change
Size**
Effort**
Maintenance outcomes
Think aloud
Video files/notes
Task
progress
sheets
Eclipse
activity
logs
Trac (Issue tracker),
Acceptance test
reports
Open interviews
Audio files/notes
Variables
of interest
Data
sources
Moderator
variables
Code smells
(num. smells**
smell density**)
** System and file level
* Only at system level
Maintainability
perception*
Maintenance
problems**
Think aloud
Video files/notes
Study
diary
• 50,000 Euros
• Sep-Dec, 2008
• 7 Weeks• 6 Developers
• 2 Companies
Paper by
Sjøberg et al.
(2013)
• A model that includes file size and
number of changes and code smells
displayed a fit of R2 = 0.58
• Removing the smells from that model
did not decrease the fit!! (R2 = 0.58)
• Only smell that remained significant
was Refused Bequest, which registered
a decrease in effort (α < 0.01)
• File size and number of changes
remain the most significant predictors
of effort (α < 0.001)
Analysis done in previous work
(Sjøberg et al., 2013)
Dependent variable: Effort (time)
Independent variables: 12 smells
Control variables:
• File size (LOC)
• Number of revisions on a file
• System
• Developer
• Round
Analysis: Multiple Linear Regression
Explanatory model for Effort Results
• A model that includes file size and
number of changes and code smells
displayed a fit of R2 = 0.58
• Removing the smells from that model
did not decrease the fit!! (R2 = 0.58)
• Only smell that remained significant
was Refused Bequest, which registered
a decrease in effort (α < 0.01)
• File size and number of changes
remain the most significant predictors
of effort (α < 0.001)
Analysis done in previous work
(Sjøberg et al., 2013)
Dependent variable: Effort (time)
Independent variables: 12 smells
Control variables:
• File size (LOC)
• Number of revisions on a file
• System
• Developer
• Round
Analysis: Multiple Linear Regression
Explanatory model for Effort
Code smells are not better at
explaining sheer-effort at file level,
than size and number of revisions.
Results
Previous analysis considers sheer effort
Programming (code-related)
activities during Maintenance
Reading
Searching
Navigating
Editing
Others
Procedure for extracting activity effort
• Selection of artifacts in the package explorer
• Selection of Java elements in the editor window
• Selecting Java elements in the file outline
• Editing source files (Java files)
• Scrolling the source code window
• Switching between open files
• Running Eclipse “commands” (copy, paste, go to line)
Think aloud
Video files/notes
Task
progress
sheets
Eclipse
activity
logs
(Issue tracker),
ceptance test
reports
Activity logs
Annotation schema
Procedure for extracting activity effortThink aloud
Video files/notes
Task
progress
sheets
Eclipse
activity
logs
(Issue tracker),
ceptance test
reports
Think aloud
Video files/notes
Task
progress
sheets
se
ty
s
Activity logs
Automated
annotation
Annotated activity logs
Effort per
activity
Truncate consecutive
events with same
activity and calculate
elapsing time
Procedure for extracting activity effortThink aloud
Video files/notes
Task
progress
sheets
Eclipse
activity
logs
(Issue tracker),
ceptance test
reports
Categorization
Categorization of developers’
activities and sub-activities
was adapted from previous
work (Layman 2008)
Analysis performed
Only Java files
considered
Multiple linear regression
- Forward stepwise -
Results: Distribution of activity effort
➡ Mostly performed activities:
Navigating (58.72%), Reading
(28.27%), Editing (10.18%) and
searching (2.47%)
➡ Distribution is consistent with
Ko et al. 2006 (top four)
➡ Reading as most consuming
activity in Ko et al. 2006.
‣ Definition of event/action
belonging to an activity
For our analysis, we only consider:
Editing, Navigating, Searching and Reading
Results: Editing Effort
Model 0 + file size
R2 = 0.11
Model 3 - smellsR2 = 0.59
Results: Editing Effort
Model 0 + file size
R2 = 0.11
Model 3 - smellsR2 = 0.59
Compared to code smells, file size has limited impact
Contrast with previous study by Sjøberg et al [2013]
Effect of code smells vanishes when the revisions is included
God Class, ISPViolation, and Use interface instead of
implementation can indicate larger effort
Results: Navigating Effort
Results: Navigating Effort
Revisions still impacts more than file size and code smells
Only God Class remains significant after revisions
Results: Reading Effort
Results: Reading Effort
Revisions and file size explain more the effort than code smells
Change size explains the effort more than the file size
Results: Searching Effort
Results: Searching Effort
Revisions impacts more than file size (magnitude and model fit)
Only Feature Envy smell affects the searching effort
Summary of Results
Smells explain better Editing and
Navigating effort than file size, but
not for Reading and Searching
Maintenance problems in
previous work related to
increased effort for editing,
navigating and reading
Threats to validity
‣ Learning effect (accounted with rounds)
‣ Instrumentation and log processing accuracy
‣ Choice of tools for code smells (inCode and Together)
‣ Generalization is limited to context
‣Think-aloud + Log analysis = how smells affect the activities
‣Taxonomies on programming problems during maintenance
‣ Explore GLM for better explanatory models
‣ More replications!
Future work
What to take home today...
‣Structural attributes represented in the form of different code smells do
indeed have an effect on the developers’ effort for certain kinds of
activities.
‣Different code smells significantly impact the effort of different activities.
For example, we found that “Feature Envy” affects searching effort while
“Data Clumps” affects editing effort.
‣The effect of code smells on editing and navigating effort is, in fact, larger
than file size, whiles the opposite is the true for reading and searching
effort
‣If the effect of code smells is contingent on the type of activity, this may
mean that is contingent on the task at hand (e.g., some tasks may require
more reading than others)
ありがとうございます!
Contact: aiko.yamashita@hioa.no
(thank you!)

More Related Content

Similar to Saner16a.ppt

Can we induce change with what we measure?
Can we induce change with what we measure?Can we induce change with what we measure?
Can we induce change with what we measure?Michaela Greiler
 
ISTQB Foundation - Chapter 3
ISTQB Foundation - Chapter 3ISTQB Foundation - Chapter 3
ISTQB Foundation - Chapter 3Chandukar
 
ISTQB / ISEB Foundation Exam Practice
ISTQB / ISEB Foundation Exam PracticeISTQB / ISEB Foundation Exam Practice
ISTQB / ISEB Foundation Exam PracticeYogindernath Gupta
 
Replication and Benchmarking in Software Analytics
Replication and Benchmarking in Software AnalyticsReplication and Benchmarking in Software Analytics
Replication and Benchmarking in Software AnalyticsUniversity of Zurich
 
Towards Software Sustainability Guides for Industrial Software Systems
Towards Software Sustainability Guides for Industrial Software SystemsTowards Software Sustainability Guides for Industrial Software Systems
Towards Software Sustainability Guides for Industrial Software SystemsHeiko Koziolek
 
Static testing techniques
Static testing techniquesStatic testing techniques
Static testing techniquesMazenetsolution
 
OLE Regional Workshop, Utah, Day One
OLE Regional Workshop, Utah, Day OneOLE Regional Workshop, Utah, Day One
OLE Regional Workshop, Utah, Day OneBeth Warner
 
Software Analytics - Achievements and Challenges
Software Analytics - Achievements and ChallengesSoftware Analytics - Achievements and Challenges
Software Analytics - Achievements and ChallengesTao Xie
 
Using Agile Processes on Documentum Projects
Using Agile Processes on Documentum ProjectsUsing Agile Processes on Documentum Projects
Using Agile Processes on Documentum ProjectsBlueFish
 
Anti Patterns Siddhesh Lecture1 Of3
Anti Patterns Siddhesh Lecture1 Of3Anti Patterns Siddhesh Lecture1 Of3
Anti Patterns Siddhesh Lecture1 Of3Siddhesh Bhobe
 
Using Agile Processes on Documentum Projects
Using Agile Processes on Documentum ProjectsUsing Agile Processes on Documentum Projects
Using Agile Processes on Documentum Projectsmufflerdog
 
Empirical Methods in Software Engineering - an Overview
Empirical Methods in Software Engineering - an OverviewEmpirical Methods in Software Engineering - an Overview
Empirical Methods in Software Engineering - an Overviewalessio_ferrari
 
OLE Project Regional Workshop - University of Kansas - Day 1
OLE Project Regional Workshop - University of Kansas - Day 1OLE Project Regional Workshop - University of Kansas - Day 1
OLE Project Regional Workshop - University of Kansas - Day 1Beth Warner
 
15 object orienteddesign
15 object orienteddesign15 object orienteddesign
15 object orienteddesignrandhirlpu
 
Collaborative Data Analysis with Taverna Workflows
Collaborative Data Analysis with Taverna WorkflowsCollaborative Data Analysis with Taverna Workflows
Collaborative Data Analysis with Taverna WorkflowsAndrea Wiggins
 
Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013SmartBear
 
DevOps for absolute beginners
DevOps for absolute beginnersDevOps for absolute beginners
DevOps for absolute beginnersAhmed Misbah
 
Document Control
Document ControlDocument Control
Document ControlDan Junkins
 
#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databases#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databasesAlessandro Alpi
 

Similar to Saner16a.ppt (20)

Can we induce change with what we measure?
Can we induce change with what we measure?Can we induce change with what we measure?
Can we induce change with what we measure?
 
ISTQB Foundation - Chapter 3
ISTQB Foundation - Chapter 3ISTQB Foundation - Chapter 3
ISTQB Foundation - Chapter 3
 
ISTQB / ISEB Foundation Exam Practice
ISTQB / ISEB Foundation Exam PracticeISTQB / ISEB Foundation Exam Practice
ISTQB / ISEB Foundation Exam Practice
 
Replication and Benchmarking in Software Analytics
Replication and Benchmarking in Software AnalyticsReplication and Benchmarking in Software Analytics
Replication and Benchmarking in Software Analytics
 
Towards Software Sustainability Guides for Industrial Software Systems
Towards Software Sustainability Guides for Industrial Software SystemsTowards Software Sustainability Guides for Industrial Software Systems
Towards Software Sustainability Guides for Industrial Software Systems
 
Static testing techniques
Static testing techniquesStatic testing techniques
Static testing techniques
 
OLE Regional Workshop, Utah, Day One
OLE Regional Workshop, Utah, Day OneOLE Regional Workshop, Utah, Day One
OLE Regional Workshop, Utah, Day One
 
Software Analytics - Achievements and Challenges
Software Analytics - Achievements and ChallengesSoftware Analytics - Achievements and Challenges
Software Analytics - Achievements and Challenges
 
Using Agile Processes on Documentum Projects
Using Agile Processes on Documentum ProjectsUsing Agile Processes on Documentum Projects
Using Agile Processes on Documentum Projects
 
Anti Patterns Siddhesh Lecture1 Of3
Anti Patterns Siddhesh Lecture1 Of3Anti Patterns Siddhesh Lecture1 Of3
Anti Patterns Siddhesh Lecture1 Of3
 
Using Agile Processes on Documentum Projects
Using Agile Processes on Documentum ProjectsUsing Agile Processes on Documentum Projects
Using Agile Processes on Documentum Projects
 
Empirical Methods in Software Engineering - an Overview
Empirical Methods in Software Engineering - an OverviewEmpirical Methods in Software Engineering - an Overview
Empirical Methods in Software Engineering - an Overview
 
OLE Project Regional Workshop - University of Kansas - Day 1
OLE Project Regional Workshop - University of Kansas - Day 1OLE Project Regional Workshop - University of Kansas - Day 1
OLE Project Regional Workshop - University of Kansas - Day 1
 
15 object orienteddesign
15 object orienteddesign15 object orienteddesign
15 object orienteddesign
 
Collaborative Data Analysis with Taverna Workflows
Collaborative Data Analysis with Taverna WorkflowsCollaborative Data Analysis with Taverna Workflows
Collaborative Data Analysis with Taverna Workflows
 
Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013
 
Cser13.ppt
Cser13.pptCser13.ppt
Cser13.ppt
 
DevOps for absolute beginners
DevOps for absolute beginnersDevOps for absolute beginners
DevOps for absolute beginners
 
Document Control
Document ControlDocument Control
Document Control
 
#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databases#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databases
 

More from Yann-Gaël Guéhéneuc

Advice for writing a NSERC Discovery grant application v0.5
Advice for writing a NSERC Discovery grant application v0.5Advice for writing a NSERC Discovery grant application v0.5
Advice for writing a NSERC Discovery grant application v0.5Yann-Gaël Guéhéneuc
 
Ptidej Architecture, Design, and Implementation in Action v2.1
Ptidej Architecture, Design, and Implementation in Action v2.1Ptidej Architecture, Design, and Implementation in Action v2.1
Ptidej Architecture, Design, and Implementation in Action v2.1Yann-Gaël Guéhéneuc
 
Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22Yann-Gaël Guéhéneuc
 
Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3Yann-Gaël Guéhéneuc
 
Some Pitfalls with Python and Their Possible Solutions v0.9
Some Pitfalls with Python and Their Possible Solutions v0.9Some Pitfalls with Python and Their Possible Solutions v0.9
Some Pitfalls with Python and Their Possible Solutions v0.9Yann-Gaël Guéhéneuc
 
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...Yann-Gaël Guéhéneuc
 
An Explanation of the Halting Problem and Its Consequences
An Explanation of the Halting Problem and Its ConsequencesAn Explanation of the Halting Problem and Its Consequences
An Explanation of the Halting Problem and Its ConsequencesYann-Gaël Guéhéneuc
 
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)Yann-Gaël Guéhéneuc
 
On Java Generics, History, Use, Caveats v1.1
On Java Generics, History, Use, Caveats v1.1On Java Generics, History, Use, Caveats v1.1
On Java Generics, History, Use, Caveats v1.1Yann-Gaël Guéhéneuc
 
On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6Yann-Gaël Guéhéneuc
 

More from Yann-Gaël Guéhéneuc (20)

Advice for writing a NSERC Discovery grant application v0.5
Advice for writing a NSERC Discovery grant application v0.5Advice for writing a NSERC Discovery grant application v0.5
Advice for writing a NSERC Discovery grant application v0.5
 
Ptidej Architecture, Design, and Implementation in Action v2.1
Ptidej Architecture, Design, and Implementation in Action v2.1Ptidej Architecture, Design, and Implementation in Action v2.1
Ptidej Architecture, Design, and Implementation in Action v2.1
 
Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22
 
Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3
 
Some Pitfalls with Python and Their Possible Solutions v0.9
Some Pitfalls with Python and Their Possible Solutions v0.9Some Pitfalls with Python and Their Possible Solutions v0.9
Some Pitfalls with Python and Their Possible Solutions v0.9
 
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
 
An Explanation of the Halting Problem and Its Consequences
An Explanation of the Halting Problem and Its ConsequencesAn Explanation of the Halting Problem and Its Consequences
An Explanation of the Halting Problem and Its Consequences
 
Are CPUs VMs Like Any Others? v1.0
Are CPUs VMs Like Any Others? v1.0Are CPUs VMs Like Any Others? v1.0
Are CPUs VMs Like Any Others? v1.0
 
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
 
Well-known Computer Scientists v1.0.2
Well-known Computer Scientists v1.0.2Well-known Computer Scientists v1.0.2
Well-known Computer Scientists v1.0.2
 
On Java Generics, History, Use, Caveats v1.1
On Java Generics, History, Use, Caveats v1.1On Java Generics, History, Use, Caveats v1.1
On Java Generics, History, Use, Caveats v1.1
 
On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6
 
ICSOC'21
ICSOC'21ICSOC'21
ICSOC'21
 
Vissoft21.ppt
Vissoft21.pptVissoft21.ppt
Vissoft21.ppt
 
Service computation20.ppt
Service computation20.pptService computation20.ppt
Service computation20.ppt
 
Serp4 iot20.ppt
Serp4 iot20.pptSerp4 iot20.ppt
Serp4 iot20.ppt
 
Msr20.ppt
Msr20.pptMsr20.ppt
Msr20.ppt
 
Iwesep19.ppt
Iwesep19.pptIwesep19.ppt
Iwesep19.ppt
 
Icsoc20.ppt
Icsoc20.pptIcsoc20.ppt
Icsoc20.ppt
 
Icsoc18.ppt
Icsoc18.pptIcsoc18.ppt
Icsoc18.ppt
 

Recently uploaded

From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIInflectra
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...drm1699
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio, Inc.
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaNeo4j
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAShane Coughlan
 
Test Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdfTest Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdfkalichargn70th171
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AIAGATSoftware
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024MulesoftMunichMeetup
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Conceptsthomashtkim
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdfSelfMade bd
 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit MilanNeo4j
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Eraconfluent
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Lisi Hocke
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jNeo4j
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)Roberto Bettazzoni
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanNeo4j
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNeo4j
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletAndrea Goulet
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckMarc Lester
 

Recently uploaded (20)

From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
 
Test Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdfTest Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdf
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Concepts
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea Goulet
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
 

Saner16a.ppt

  • 1. Do Code Smells Impact the Effort of Different Maintenance Programming Activities? Zephyrin Soh, AikoYamashita, Foutse Khomh, andYann-Gael Guéheneuc SANER - Osaka, March 2016
  • 2. CODE SMELLS AND ANTI-PATTERNS ➡ Long Method ➡ Large Class Bloaters Change preventers ➡ Divergent Change ➡ Shotgun Surgery https://sourcemaking.com/refactoring/smells https://xkcd.com/844/ Spaghetti monster
  • 3. STATE OF ART ON CODE SMELLS Empirical studies • Code smells have deterring effects on the introduction of defects ‣ Monden (2002), Li &Shatnawi (2007), Kapser (2006), Juergens (2009), Rahman (2011) • Larger maintenance effort ‣ Deligiannis (2004), Abbes (2011) • Larger and more frequent changes in the code ‣ Olbrich (2009), Khomh (2009) • The overall capacity of code smell analysis to explain or predict maintenance problems or maintenance effort is rather modest ‣ Yamashita (2012), Sjøberg (2013)
  • 4. Previous work: Multiple, controlled case study (Yamashita 2012, Sjøberg et al., 2013) • 4 Java Applications • Same functionality • Different design/code • Size: 7KLOC to 14KLOC Context Task 3. New Reporting functionality Task 1. Replacing external data source ✔ Task 2. New authentication mechanism System! Maintenance Tasks DCBA Developer System Study Design
  • 5. Previous work: Multiple, controlled case study (Yamashita 2012, Sjøberg et al., 2013) System Project context Tasks Source code Daily interviews Audio files/notes Subversion database Programming Skill Defects* Development Technology Change Size** Effort** Maintenance outcomes Think aloud Video files/notes Task progress sheets Eclipse activity logs Trac (Issue tracker), Acceptance test reports Open interviews Audio files/notes Variables of interest Data sources Moderator variables Code smells (num. smells** smell density**) ** System and file level * Only at system level Maintainability perception* Maintenance problems** Think aloud Video files/notes Study diary • 50,000 Euros • Sep-Dec, 2008 • 7 Weeks• 6 Developers • 2 Companies Paper by Sjøberg et al. (2013)
  • 6. • A model that includes file size and number of changes and code smells displayed a fit of R2 = 0.58 • Removing the smells from that model did not decrease the fit!! (R2 = 0.58) • Only smell that remained significant was Refused Bequest, which registered a decrease in effort (α < 0.01) • File size and number of changes remain the most significant predictors of effort (α < 0.001) Analysis done in previous work (Sjøberg et al., 2013) Dependent variable: Effort (time) Independent variables: 12 smells Control variables: • File size (LOC) • Number of revisions on a file • System • Developer • Round Analysis: Multiple Linear Regression Explanatory model for Effort Results
  • 7. • A model that includes file size and number of changes and code smells displayed a fit of R2 = 0.58 • Removing the smells from that model did not decrease the fit!! (R2 = 0.58) • Only smell that remained significant was Refused Bequest, which registered a decrease in effort (α < 0.01) • File size and number of changes remain the most significant predictors of effort (α < 0.001) Analysis done in previous work (Sjøberg et al., 2013) Dependent variable: Effort (time) Independent variables: 12 smells Control variables: • File size (LOC) • Number of revisions on a file • System • Developer • Round Analysis: Multiple Linear Regression Explanatory model for Effort Code smells are not better at explaining sheer-effort at file level, than size and number of revisions. Results
  • 8. Previous analysis considers sheer effort Programming (code-related) activities during Maintenance Reading Searching Navigating Editing Others
  • 9. Procedure for extracting activity effort • Selection of artifacts in the package explorer • Selection of Java elements in the editor window • Selecting Java elements in the file outline • Editing source files (Java files) • Scrolling the source code window • Switching between open files • Running Eclipse “commands” (copy, paste, go to line) Think aloud Video files/notes Task progress sheets Eclipse activity logs (Issue tracker), ceptance test reports Activity logs
  • 10. Annotation schema Procedure for extracting activity effortThink aloud Video files/notes Task progress sheets Eclipse activity logs (Issue tracker), ceptance test reports Think aloud Video files/notes Task progress sheets se ty s Activity logs Automated annotation Annotated activity logs Effort per activity Truncate consecutive events with same activity and calculate elapsing time
  • 11. Procedure for extracting activity effortThink aloud Video files/notes Task progress sheets Eclipse activity logs (Issue tracker), ceptance test reports Categorization Categorization of developers’ activities and sub-activities was adapted from previous work (Layman 2008)
  • 12. Analysis performed Only Java files considered Multiple linear regression - Forward stepwise -
  • 13. Results: Distribution of activity effort ➡ Mostly performed activities: Navigating (58.72%), Reading (28.27%), Editing (10.18%) and searching (2.47%) ➡ Distribution is consistent with Ko et al. 2006 (top four) ➡ Reading as most consuming activity in Ko et al. 2006. ‣ Definition of event/action belonging to an activity For our analysis, we only consider: Editing, Navigating, Searching and Reading
  • 14. Results: Editing Effort Model 0 + file size R2 = 0.11 Model 3 - smellsR2 = 0.59
  • 15. Results: Editing Effort Model 0 + file size R2 = 0.11 Model 3 - smellsR2 = 0.59 Compared to code smells, file size has limited impact Contrast with previous study by Sjøberg et al [2013] Effect of code smells vanishes when the revisions is included God Class, ISPViolation, and Use interface instead of implementation can indicate larger effort
  • 17. Results: Navigating Effort Revisions still impacts more than file size and code smells Only God Class remains significant after revisions
  • 19. Results: Reading Effort Revisions and file size explain more the effort than code smells Change size explains the effort more than the file size
  • 21. Results: Searching Effort Revisions impacts more than file size (magnitude and model fit) Only Feature Envy smell affects the searching effort
  • 22. Summary of Results Smells explain better Editing and Navigating effort than file size, but not for Reading and Searching Maintenance problems in previous work related to increased effort for editing, navigating and reading
  • 23. Threats to validity ‣ Learning effect (accounted with rounds) ‣ Instrumentation and log processing accuracy ‣ Choice of tools for code smells (inCode and Together) ‣ Generalization is limited to context ‣Think-aloud + Log analysis = how smells affect the activities ‣Taxonomies on programming problems during maintenance ‣ Explore GLM for better explanatory models ‣ More replications! Future work
  • 24. What to take home today... ‣Structural attributes represented in the form of different code smells do indeed have an effect on the developers’ effort for certain kinds of activities. ‣Different code smells significantly impact the effort of different activities. For example, we found that “Feature Envy” affects searching effort while “Data Clumps” affects editing effort. ‣The effect of code smells on editing and navigating effort is, in fact, larger than file size, whiles the opposite is the true for reading and searching effort ‣If the effect of code smells is contingent on the type of activity, this may mean that is contingent on the task at hand (e.g., some tasks may require more reading than others)