SlideShare une entreprise Scribd logo
1  sur  59
Code Smell Research:
History and Future Directions
Nikolaos Tsantalis
Computer Science & Software Engineering

Second PLOW Installment - March 5, 2014

1
Changes aiming to improve the future
maintainability and reliability of the
software system.

Second PLOW Installment - March 5, 2014

2
3
• Refactoring Object-oriented Frameworks,
University of Illinois at Urbana-Champaign
– Introduced the concept of refactorings as behaviorpreserving program restructuring operations.
– Introduced the concept of preconditions as
conditions that should be examined to determine
whether a refactoring can be applied safely.

Second PLOW Installment - March 5, 2014

4
Second PLOW Installment - March 5, 2014

5
Duplicated Code:
“If you see the same code
structure in more than one
place, … find a way to unify
them.”

Second PLOW Installment - March 5, 2014

6
Second PLOW Installment - March 5, 2014

7
Second PLOW Installment - March 5, 2014

8
Second PLOW Installment - March 5, 2014

9
Second PLOW Installment - March 5, 2014

10
Second PLOW Installment - March 5, 2014

11
Code smell definition for Inappropriate Interface
inappropriateInterface(?class,?interface,?subclasses) :findall(<?itf,?scs>,
commonSubclassInterface(?class,?itf,?scs),
?result),
removeDuplicates(?result,?nodups),
member(<?interface,?subclasses>,?nodups)
Second PLOW Installment - March 5, 2014

12
Second PLOW Installment - March 5, 2014

13
Second PLOW Installment - March 5, 2014

14
Second PLOW Installment - March 5, 2014

15
• Treat the improvement of object-oriented design
as a search problem in the space of

alternative designs
• The move in the search space is achieved by
modeling refactorings (inheritance-related)
• Apply search algorithms using QMOOD as the
fitness function (rank alternative designs)
• The outcome is a sequence of refactorings
leading to the optimal design
Second PLOW Installment - March 5, 2014

16
Second PLOW Installment - March 5, 2014

17
Second PLOW Installment - March 5, 2014

18
Second PLOW Installment - March 5, 2014

19
Second PLOW Installment - March 5, 2014

20
Many code smell definitions are based on
historical change information
– Shotgun Surgery: When every time you make a
kind of change, you have to make a lot of little
changes to a lot of different classes.
– Parallel Inheritance Hierarchies: When every time
you make a subclass of one class, you also have to
make a subclass of another.

Second PLOW Installment - March 5, 2014

21
Second PLOW Installment - March 5, 2014

22
Second PLOW Installment - March 5, 2014

23
• 12 code smells
• 6 Professional developers were hired to
implement change requests
• 4 medium-sized Java systems with known
code smells
• 4 weeks of development
• Daily interviews and think-aloud sessions

Second PLOW Installment - March 5, 2014

24
Second PLOW Installment - March 5, 2014

25
Second PLOW Installment - March 5, 2014

26
Advantages:
Feasible and behavior preserving solutions
to design problems

Ranking and prioritizing solutions based on
their expected effect on design quality
A holistic approach for preventive
maintenance
Second PLOW Installment - March 5, 2014

27
1. Identify places where software should be refactored
(known as bad smells).
2. Determine which refactoring(s) should be applied to the
identified places.
3. Guarantee that the applied refactoring preserves
behavior.
4. Apply the refactoring.
5. Assess the effect of the refactoring on quality
characteristics of the software.
6. Maintain the consistency between the refactored code
and other software artifacts.
Second PLOW Installment - March 5, 2014

28
Second PLOW Installment - March 5, 2014

29
Second PLOW Installment - March 5, 2014

30
Second PLOW Installment - March 5, 2014

31
Context

State
state

- state::int
type int
- STATE_A : int = 1
- STATE_B : int = 2
+ method() {
state.method();
if state == STATE_A
} doStateA();
else
if state == STATE_B
doStateB();
}

+method()

StateA

StateB

+method() {

+method() {

}

}

Second PLOW Installment - March 5, 2014

32
Second PLOW Installment - March 5, 2014

33
Second PLOW Installment - March 5, 2014

34
Second PLOW Installment - March 5, 2014

35
Second PLOW Installment - March 5, 2014

36
Second PLOW Installment - March 5, 2014

37
Second PLOW Installment - March 5, 2014

38
Second PLOW Installment - March 5, 2014

39
Second PLOW Installment - March 5, 2014

40
Second PLOW Installment - March 5, 2014

41
Since the beginning of 2011 …

Second PLOW Installment - March 5, 2014

42
Second PLOW Installment - March 5, 2014

43
Second PLOW Installment - March 5, 2014

44
Second PLOW Installment - March 5, 2014

45
• “Debt” is the effect of incomplete, immature,
or inadequate maintenance activities
• Delayed tasks may bring a short-term benefit
(higher productivity, shorter release time)
• Might have to be paid back in the future with
“Interest” (increased effort)
• “Principal” is the effort to pay off the debt
Second PLOW Installment - March 5, 2014

46
•
•
•
•

Tracking clones as project evolves
Verifying the consistent modification of clones
Updating clones and groups as project evolves
Assessing the harmfulness of clones

Second PLOW Installment - March 5, 2014

47
Second PLOW Installment - March 5, 2014

48
Second PLOW Installment - March 5, 2014

49
Second PLOW Installment - March 5, 2014

50
• So far, we used
– Static source code analysis
– Semantic analysis
– Change history analysis

Second PLOW Installment - March 5, 2014

51
Second PLOW Installment - March 5, 2014

52
Every code smell involves a certain risk

for future maintainability

Second PLOW Installment - March 5, 2014

53
• Likelihood of occurrence of the risky event
• Exposure of the system to the event
• Consequence of the event

Second PLOW Installment - March 5, 2014

54
• Risky events  changes driven by code smells
– Ex. 1: Fixing the same bug in a clone group
– Ex. 2: Making a method more “envy” to another class

• Intuition: code that changes frequently due to
a design flaw imposes a high risk to the
maintainability of a system

• Likelihood  proneness to code smell driven
changes (estimated from the history of changes)
Second PLOW Installment - March 5, 2014

55
• Intuition: the more extensively a module is used,
the more extensive the propagation of code
smell driven changes to dependent modules

• Exposure  the number and strength of
incoming dependencies (estimated from static
and dynamic analysis)

Second PLOW Installment - March 5, 2014

56
• Consequence  cost of code smell driven
changes (effort, time, money).
From the opposite perspective:
• Consequence  effect of removing the code
smell.
• Estimated by computing the impact of the
corresponding refactoring on metrics.
Second PLOW Installment - March 5, 2014

57
Given a set of different types of refactoring
opportunities in a software system

• Conflicts
• Dependencies
Second PLOW Installment - March 5, 2014

58
Visit our project at
Second PLOW Installment - March 5, 2014

59

Contenu connexe

Similaire à Code Smell Research: History and Future Directions

Co-evolving changes in a data-intensive software system
Co-evolving changes in a data-intensive software systemCo-evolving changes in a data-intensive software system
Co-evolving changes in a data-intensive software systemTom Mens
 
Software System Engineering - Chapter 2
Software System Engineering - Chapter 2Software System Engineering - Chapter 2
Software System Engineering - Chapter 2Fadhil Ismail
 
Iwsm2014 evaluating software product quality (ali idri)
Iwsm2014   evaluating software product quality (ali idri)Iwsm2014   evaluating software product quality (ali idri)
Iwsm2014 evaluating software product quality (ali idri)Nesma
 
3-D Cloud Monitoring: Enabling Effective Cloud Infrastructure and Application...
3-D Cloud Monitoring: Enabling Effective Cloud Infrastructure and Application...3-D Cloud Monitoring: Enabling Effective Cloud Infrastructure and Application...
3-D Cloud Monitoring: Enabling Effective Cloud Infrastructure and Application...Florian Blum
 
Rapid Continuous Software Engineering - Meeting the challenges of modern sof...
Rapid Continuous Software Engineering - Meeting the challenges of modern sof...Rapid Continuous Software Engineering - Meeting the challenges of modern sof...
Rapid Continuous Software Engineering - Meeting the challenges of modern sof...Ivica Crnkovic
 
Tweets Classification
Tweets ClassificationTweets Classification
Tweets ClassificationVarun Gupta
 
Juan Vazquez & Julián Vilas – Tú a Barcelona y yo a Tejas, a patadas con mi S...
Juan Vazquez & Julián Vilas – Tú a Barcelona y yo a Tejas, a patadas con mi S...Juan Vazquez & Julián Vilas – Tú a Barcelona y yo a Tejas, a patadas con mi S...
Juan Vazquez & Julián Vilas – Tú a Barcelona y yo a Tejas, a patadas con mi S...RootedCON
 
From requirements quality to requirements authoring
From requirements quality to requirements authoringFrom requirements quality to requirements authoring
From requirements quality to requirements authoringThe REUSE Company
 
SCAM: Multi-layer Software Configuration: Empirical Study on Wordpress
SCAM: Multi-layer Software Configuration: Empirical Study on WordpressSCAM: Multi-layer Software Configuration: Empirical Study on Wordpress
SCAM: Multi-layer Software Configuration: Empirical Study on WordpressSimo Ssimo
 
Empirical research results for the evolution of a data-intensive software sys...
Empirical research results for the evolution of a data-intensive software sys...Empirical research results for the evolution of a data-intensive software sys...
Empirical research results for the evolution of a data-intensive software sys...Tom Mens
 
A DECISION SUPPORT SYSTEM TO CHOOSE OPTIMAL RELEASE CYCLE LENGTH IN INCREMENT...
A DECISION SUPPORT SYSTEM TO CHOOSE OPTIMAL RELEASE CYCLE LENGTH IN INCREMENT...A DECISION SUPPORT SYSTEM TO CHOOSE OPTIMAL RELEASE CYCLE LENGTH IN INCREMENT...
A DECISION SUPPORT SYSTEM TO CHOOSE OPTIMAL RELEASE CYCLE LENGTH IN INCREMENT...ijseajournal
 
Jeremy Brown & David Seidman - Microsoft Vulnerability Research: How to be a ...
Jeremy Brown & David Seidman - Microsoft Vulnerability Research: How to be a ...Jeremy Brown & David Seidman - Microsoft Vulnerability Research: How to be a ...
Jeremy Brown & David Seidman - Microsoft Vulnerability Research: How to be a ...RootedCON
 
Framework for a Software Quality Rating System
Framework for a Software Quality Rating SystemFramework for a Software Quality Rating System
Framework for a Software Quality Rating SystemKarthik Murali
 
Assessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in IndustryAssessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in IndustryDharmalingam Ganesan
 
Keynote - DevOps and the bottom line.
Keynote - DevOps and the bottom line.Keynote - DevOps and the bottom line.
Keynote - DevOps and the bottom line.especificacoes.com
 
PhD Thesis Defense - Enhancing Software Quality and Quality of Experience thr...
PhD Thesis Defense - Enhancing Software Quality and Quality of Experience thr...PhD Thesis Defense - Enhancing Software Quality and Quality of Experience thr...
PhD Thesis Defense - Enhancing Software Quality and Quality of Experience thr...Pedro Luis Mateo Navarro
 
Sd times-june-24-2015
Sd times-june-24-2015Sd times-june-24-2015
Sd times-june-24-2015Dan Boutin
 
The system development life cycle (SDLC)
The system development life cycle (SDLC)The system development life cycle (SDLC)
The system development life cycle (SDLC)gourav kottawar
 

Similaire à Code Smell Research: History and Future Directions (20)

Furuyama - analysis of factors that affect productivity
Furuyama - analysis of factors that affect productivityFuruyama - analysis of factors that affect productivity
Furuyama - analysis of factors that affect productivity
 
Co-evolving changes in a data-intensive software system
Co-evolving changes in a data-intensive software systemCo-evolving changes in a data-intensive software system
Co-evolving changes in a data-intensive software system
 
Software System Engineering - Chapter 2
Software System Engineering - Chapter 2Software System Engineering - Chapter 2
Software System Engineering - Chapter 2
 
Iwsm2014 evaluating software product quality (ali idri)
Iwsm2014   evaluating software product quality (ali idri)Iwsm2014   evaluating software product quality (ali idri)
Iwsm2014 evaluating software product quality (ali idri)
 
3-D Cloud Monitoring: Enabling Effective Cloud Infrastructure and Application...
3-D Cloud Monitoring: Enabling Effective Cloud Infrastructure and Application...3-D Cloud Monitoring: Enabling Effective Cloud Infrastructure and Application...
3-D Cloud Monitoring: Enabling Effective Cloud Infrastructure and Application...
 
Rapid Continuous Software Engineering - Meeting the challenges of modern sof...
Rapid Continuous Software Engineering - Meeting the challenges of modern sof...Rapid Continuous Software Engineering - Meeting the challenges of modern sof...
Rapid Continuous Software Engineering - Meeting the challenges of modern sof...
 
Tweets Classification
Tweets ClassificationTweets Classification
Tweets Classification
 
Juan Vazquez & Julián Vilas – Tú a Barcelona y yo a Tejas, a patadas con mi S...
Juan Vazquez & Julián Vilas – Tú a Barcelona y yo a Tejas, a patadas con mi S...Juan Vazquez & Julián Vilas – Tú a Barcelona y yo a Tejas, a patadas con mi S...
Juan Vazquez & Julián Vilas – Tú a Barcelona y yo a Tejas, a patadas con mi S...
 
From requirements quality to requirements authoring
From requirements quality to requirements authoringFrom requirements quality to requirements authoring
From requirements quality to requirements authoring
 
SCAM: Multi-layer Software Configuration: Empirical Study on Wordpress
SCAM: Multi-layer Software Configuration: Empirical Study on WordpressSCAM: Multi-layer Software Configuration: Empirical Study on Wordpress
SCAM: Multi-layer Software Configuration: Empirical Study on Wordpress
 
Empirical research results for the evolution of a data-intensive software sys...
Empirical research results for the evolution of a data-intensive software sys...Empirical research results for the evolution of a data-intensive software sys...
Empirical research results for the evolution of a data-intensive software sys...
 
A DECISION SUPPORT SYSTEM TO CHOOSE OPTIMAL RELEASE CYCLE LENGTH IN INCREMENT...
A DECISION SUPPORT SYSTEM TO CHOOSE OPTIMAL RELEASE CYCLE LENGTH IN INCREMENT...A DECISION SUPPORT SYSTEM TO CHOOSE OPTIMAL RELEASE CYCLE LENGTH IN INCREMENT...
A DECISION SUPPORT SYSTEM TO CHOOSE OPTIMAL RELEASE CYCLE LENGTH IN INCREMENT...
 
Jeremy Brown & David Seidman - Microsoft Vulnerability Research: How to be a ...
Jeremy Brown & David Seidman - Microsoft Vulnerability Research: How to be a ...Jeremy Brown & David Seidman - Microsoft Vulnerability Research: How to be a ...
Jeremy Brown & David Seidman - Microsoft Vulnerability Research: How to be a ...
 
Framework for a Software Quality Rating System
Framework for a Software Quality Rating SystemFramework for a Software Quality Rating System
Framework for a Software Quality Rating System
 
Assessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in IndustryAssessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in Industry
 
Keynote - DevOps and the bottom line.
Keynote - DevOps and the bottom line.Keynote - DevOps and the bottom line.
Keynote - DevOps and the bottom line.
 
PhD Thesis Defense - Enhancing Software Quality and Quality of Experience thr...
PhD Thesis Defense - Enhancing Software Quality and Quality of Experience thr...PhD Thesis Defense - Enhancing Software Quality and Quality of Experience thr...
PhD Thesis Defense - Enhancing Software Quality and Quality of Experience thr...
 
Sd times-june-24-2015
Sd times-june-24-2015Sd times-june-24-2015
Sd times-june-24-2015
 
ERP Unit iii
ERP  Unit   iii ERP  Unit   iii
ERP Unit iii
 
The system development life cycle (SDLC)
The system development life cycle (SDLC)The system development life cycle (SDLC)
The system development life cycle (SDLC)
 

Plus de Nikolaos Tsantalis

Refactoring Mining - The key to unlock software evolution
Refactoring Mining - The key to unlock software evolutionRefactoring Mining - The key to unlock software evolution
Refactoring Mining - The key to unlock software evolutionNikolaos Tsantalis
 
CASCON 2023 Most Influential Paper Award Talk
CASCON 2023 Most Influential Paper Award TalkCASCON 2023 Most Influential Paper Award Talk
CASCON 2023 Most Influential Paper Award TalkNikolaos Tsantalis
 
SANER 2019 Most Influential Paper Talk
SANER 2019 Most Influential Paper TalkSANER 2019 Most Influential Paper Talk
SANER 2019 Most Influential Paper TalkNikolaos Tsantalis
 
Accurate and Efficient Refactoring Detection in Commit History
Accurate and Efficient Refactoring Detection in Commit HistoryAccurate and Efficient Refactoring Detection in Commit History
Accurate and Efficient Refactoring Detection in Commit HistoryNikolaos Tsantalis
 
Clone Refactoring with Lambda Expressions
Clone Refactoring with Lambda ExpressionsClone Refactoring with Lambda Expressions
Clone Refactoring with Lambda ExpressionsNikolaos Tsantalis
 
Why We Refactor? Confessions of GitHub Contributors
Why We Refactor? Confessions of GitHub ContributorsWhy We Refactor? Confessions of GitHub Contributors
Why We Refactor? Confessions of GitHub ContributorsNikolaos Tsantalis
 
Migrating cascading style sheets to preprocessors
Migrating cascading style sheets to preprocessorsMigrating cascading style sheets to preprocessors
Migrating cascading style sheets to preprocessorsNikolaos Tsantalis
 
An empirical study on the use of CSS preprocessors
An empirical study on the use of CSS preprocessorsAn empirical study on the use of CSS preprocessors
An empirical study on the use of CSS preprocessorsNikolaos Tsantalis
 
An Empirical Study on the Use of CSS Preprocessors
An Empirical Study on the Use of CSS PreprocessorsAn Empirical Study on the Use of CSS Preprocessors
An Empirical Study on the Use of CSS PreprocessorsNikolaos Tsantalis
 
Improving the Unification of Software Clones Using Tree and Graph Matching Al...
Improving the Unification of Software Clones Using Tree and Graph Matching Al...Improving the Unification of Software Clones Using Tree and Graph Matching Al...
Improving the Unification of Software Clones Using Tree and Graph Matching Al...Nikolaos Tsantalis
 
Preventive Software Maintenance: The Past, the Present, the Future
Preventive Software Maintenance: The Past, the Present, the FuturePreventive Software Maintenance: The Past, the Present, the Future
Preventive Software Maintenance: The Past, the Present, the FutureNikolaos Tsantalis
 
An Empirical Study of Duplication in Cascading Style Sheets
An Empirical Study of Duplication in Cascading Style SheetsAn Empirical Study of Duplication in Cascading Style Sheets
An Empirical Study of Duplication in Cascading Style SheetsNikolaos Tsantalis
 
Ranking Refactoring Suggestions based on Historical Volatility
Ranking Refactoring Suggestions based on Historical VolatilityRanking Refactoring Suggestions based on Historical Volatility
Ranking Refactoring Suggestions based on Historical VolatilityNikolaos Tsantalis
 
Feature Detection in Ajax-enabled Web Applications
Feature Detection in Ajax-enabled Web ApplicationsFeature Detection in Ajax-enabled Web Applications
Feature Detection in Ajax-enabled Web ApplicationsNikolaos Tsantalis
 
A Multidimensional Empirical Study on Refactoring Activity
A Multidimensional Empirical Study on Refactoring ActivityA Multidimensional Empirical Study on Refactoring Activity
A Multidimensional Empirical Study on Refactoring ActivityNikolaos Tsantalis
 
Unification and Refactoring of Clones
Unification and Refactoring of ClonesUnification and Refactoring of Clones
Unification and Refactoring of ClonesNikolaos Tsantalis
 

Plus de Nikolaos Tsantalis (17)

Refactoring Mining - The key to unlock software evolution
Refactoring Mining - The key to unlock software evolutionRefactoring Mining - The key to unlock software evolution
Refactoring Mining - The key to unlock software evolution
 
CASCON 2023 Most Influential Paper Award Talk
CASCON 2023 Most Influential Paper Award TalkCASCON 2023 Most Influential Paper Award Talk
CASCON 2023 Most Influential Paper Award Talk
 
SANER 2019 Most Influential Paper Talk
SANER 2019 Most Influential Paper TalkSANER 2019 Most Influential Paper Talk
SANER 2019 Most Influential Paper Talk
 
Accurate and Efficient Refactoring Detection in Commit History
Accurate and Efficient Refactoring Detection in Commit HistoryAccurate and Efficient Refactoring Detection in Commit History
Accurate and Efficient Refactoring Detection in Commit History
 
Clone Refactoring with Lambda Expressions
Clone Refactoring with Lambda ExpressionsClone Refactoring with Lambda Expressions
Clone Refactoring with Lambda Expressions
 
Why We Refactor? Confessions of GitHub Contributors
Why We Refactor? Confessions of GitHub ContributorsWhy We Refactor? Confessions of GitHub Contributors
Why We Refactor? Confessions of GitHub Contributors
 
Migrating cascading style sheets to preprocessors
Migrating cascading style sheets to preprocessorsMigrating cascading style sheets to preprocessors
Migrating cascading style sheets to preprocessors
 
JDeodorant: Clone Refactoring
JDeodorant: Clone RefactoringJDeodorant: Clone Refactoring
JDeodorant: Clone Refactoring
 
An empirical study on the use of CSS preprocessors
An empirical study on the use of CSS preprocessorsAn empirical study on the use of CSS preprocessors
An empirical study on the use of CSS preprocessors
 
An Empirical Study on the Use of CSS Preprocessors
An Empirical Study on the Use of CSS PreprocessorsAn Empirical Study on the Use of CSS Preprocessors
An Empirical Study on the Use of CSS Preprocessors
 
Improving the Unification of Software Clones Using Tree and Graph Matching Al...
Improving the Unification of Software Clones Using Tree and Graph Matching Al...Improving the Unification of Software Clones Using Tree and Graph Matching Al...
Improving the Unification of Software Clones Using Tree and Graph Matching Al...
 
Preventive Software Maintenance: The Past, the Present, the Future
Preventive Software Maintenance: The Past, the Present, the FuturePreventive Software Maintenance: The Past, the Present, the Future
Preventive Software Maintenance: The Past, the Present, the Future
 
An Empirical Study of Duplication in Cascading Style Sheets
An Empirical Study of Duplication in Cascading Style SheetsAn Empirical Study of Duplication in Cascading Style Sheets
An Empirical Study of Duplication in Cascading Style Sheets
 
Ranking Refactoring Suggestions based on Historical Volatility
Ranking Refactoring Suggestions based on Historical VolatilityRanking Refactoring Suggestions based on Historical Volatility
Ranking Refactoring Suggestions based on Historical Volatility
 
Feature Detection in Ajax-enabled Web Applications
Feature Detection in Ajax-enabled Web ApplicationsFeature Detection in Ajax-enabled Web Applications
Feature Detection in Ajax-enabled Web Applications
 
A Multidimensional Empirical Study on Refactoring Activity
A Multidimensional Empirical Study on Refactoring ActivityA Multidimensional Empirical Study on Refactoring Activity
A Multidimensional Empirical Study on Refactoring Activity
 
Unification and Refactoring of Clones
Unification and Refactoring of ClonesUnification and Refactoring of Clones
Unification and Refactoring of Clones
 

Dernier

Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |aasikanpl
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...RohitNehra6
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSarthak Sekhar Mondal
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksSérgio Sacani
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡anilsa9823
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxAleenaTreesaSaji
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsSérgio Sacani
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 sciencefloriejanemacaya1
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxgindu3009
 
Cultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxCultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxpradhanghanshyam7136
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Types of different blotting techniques.pptx
Types of different blotting techniques.pptxTypes of different blotting techniques.pptx
Types of different blotting techniques.pptxkhadijarafiq2012
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhousejana861314
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCEPRINCE C P
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...Sérgio Sacani
 

Dernier (20)

Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...
 
Engler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomyEngler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomy
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
 
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service  🪡
CALL ON ➥8923113531 🔝Call Girls Kesar Bagh Lucknow best Night Fun service 🪡
 
CELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdfCELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdf
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptx
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 science
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
Cultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxCultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptx
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
Types of different blotting techniques.pptx
Types of different blotting techniques.pptxTypes of different blotting techniques.pptx
Types of different blotting techniques.pptx
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhouse
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
 

Code Smell Research: History and Future Directions

  • 1. Code Smell Research: History and Future Directions Nikolaos Tsantalis Computer Science & Software Engineering Second PLOW Installment - March 5, 2014 1
  • 2. Changes aiming to improve the future maintainability and reliability of the software system. Second PLOW Installment - March 5, 2014 2
  • 3. 3
  • 4. • Refactoring Object-oriented Frameworks, University of Illinois at Urbana-Champaign – Introduced the concept of refactorings as behaviorpreserving program restructuring operations. – Introduced the concept of preconditions as conditions that should be examined to determine whether a refactoring can be applied safely. Second PLOW Installment - March 5, 2014 4
  • 5. Second PLOW Installment - March 5, 2014 5
  • 6. Duplicated Code: “If you see the same code structure in more than one place, … find a way to unify them.” Second PLOW Installment - March 5, 2014 6
  • 7. Second PLOW Installment - March 5, 2014 7
  • 8. Second PLOW Installment - March 5, 2014 8
  • 9. Second PLOW Installment - March 5, 2014 9
  • 10. Second PLOW Installment - March 5, 2014 10
  • 11. Second PLOW Installment - March 5, 2014 11
  • 12. Code smell definition for Inappropriate Interface inappropriateInterface(?class,?interface,?subclasses) :findall(<?itf,?scs>, commonSubclassInterface(?class,?itf,?scs), ?result), removeDuplicates(?result,?nodups), member(<?interface,?subclasses>,?nodups) Second PLOW Installment - March 5, 2014 12
  • 13. Second PLOW Installment - March 5, 2014 13
  • 14. Second PLOW Installment - March 5, 2014 14
  • 15. Second PLOW Installment - March 5, 2014 15
  • 16. • Treat the improvement of object-oriented design as a search problem in the space of alternative designs • The move in the search space is achieved by modeling refactorings (inheritance-related) • Apply search algorithms using QMOOD as the fitness function (rank alternative designs) • The outcome is a sequence of refactorings leading to the optimal design Second PLOW Installment - March 5, 2014 16
  • 17. Second PLOW Installment - March 5, 2014 17
  • 18. Second PLOW Installment - March 5, 2014 18
  • 19. Second PLOW Installment - March 5, 2014 19
  • 20. Second PLOW Installment - March 5, 2014 20
  • 21. Many code smell definitions are based on historical change information – Shotgun Surgery: When every time you make a kind of change, you have to make a lot of little changes to a lot of different classes. – Parallel Inheritance Hierarchies: When every time you make a subclass of one class, you also have to make a subclass of another. Second PLOW Installment - March 5, 2014 21
  • 22. Second PLOW Installment - March 5, 2014 22
  • 23. Second PLOW Installment - March 5, 2014 23
  • 24. • 12 code smells • 6 Professional developers were hired to implement change requests • 4 medium-sized Java systems with known code smells • 4 weeks of development • Daily interviews and think-aloud sessions Second PLOW Installment - March 5, 2014 24
  • 25. Second PLOW Installment - March 5, 2014 25
  • 26. Second PLOW Installment - March 5, 2014 26
  • 27. Advantages: Feasible and behavior preserving solutions to design problems Ranking and prioritizing solutions based on their expected effect on design quality A holistic approach for preventive maintenance Second PLOW Installment - March 5, 2014 27
  • 28. 1. Identify places where software should be refactored (known as bad smells). 2. Determine which refactoring(s) should be applied to the identified places. 3. Guarantee that the applied refactoring preserves behavior. 4. Apply the refactoring. 5. Assess the effect of the refactoring on quality characteristics of the software. 6. Maintain the consistency between the refactored code and other software artifacts. Second PLOW Installment - March 5, 2014 28
  • 29. Second PLOW Installment - March 5, 2014 29
  • 30. Second PLOW Installment - March 5, 2014 30
  • 31. Second PLOW Installment - March 5, 2014 31
  • 32. Context State state - state::int type int - STATE_A : int = 1 - STATE_B : int = 2 + method() { state.method(); if state == STATE_A } doStateA(); else if state == STATE_B doStateB(); } +method() StateA StateB +method() { +method() { } } Second PLOW Installment - March 5, 2014 32
  • 33. Second PLOW Installment - March 5, 2014 33
  • 34. Second PLOW Installment - March 5, 2014 34
  • 35. Second PLOW Installment - March 5, 2014 35
  • 36. Second PLOW Installment - March 5, 2014 36
  • 37. Second PLOW Installment - March 5, 2014 37
  • 38. Second PLOW Installment - March 5, 2014 38
  • 39. Second PLOW Installment - March 5, 2014 39
  • 40. Second PLOW Installment - March 5, 2014 40
  • 41. Second PLOW Installment - March 5, 2014 41
  • 42. Since the beginning of 2011 … Second PLOW Installment - March 5, 2014 42
  • 43. Second PLOW Installment - March 5, 2014 43
  • 44. Second PLOW Installment - March 5, 2014 44
  • 45. Second PLOW Installment - March 5, 2014 45
  • 46. • “Debt” is the effect of incomplete, immature, or inadequate maintenance activities • Delayed tasks may bring a short-term benefit (higher productivity, shorter release time) • Might have to be paid back in the future with “Interest” (increased effort) • “Principal” is the effort to pay off the debt Second PLOW Installment - March 5, 2014 46
  • 47. • • • • Tracking clones as project evolves Verifying the consistent modification of clones Updating clones and groups as project evolves Assessing the harmfulness of clones Second PLOW Installment - March 5, 2014 47
  • 48. Second PLOW Installment - March 5, 2014 48
  • 49. Second PLOW Installment - March 5, 2014 49
  • 50. Second PLOW Installment - March 5, 2014 50
  • 51. • So far, we used – Static source code analysis – Semantic analysis – Change history analysis Second PLOW Installment - March 5, 2014 51
  • 52. Second PLOW Installment - March 5, 2014 52
  • 53. Every code smell involves a certain risk for future maintainability Second PLOW Installment - March 5, 2014 53
  • 54. • Likelihood of occurrence of the risky event • Exposure of the system to the event • Consequence of the event Second PLOW Installment - March 5, 2014 54
  • 55. • Risky events  changes driven by code smells – Ex. 1: Fixing the same bug in a clone group – Ex. 2: Making a method more “envy” to another class • Intuition: code that changes frequently due to a design flaw imposes a high risk to the maintainability of a system • Likelihood  proneness to code smell driven changes (estimated from the history of changes) Second PLOW Installment - March 5, 2014 55
  • 56. • Intuition: the more extensively a module is used, the more extensive the propagation of code smell driven changes to dependent modules • Exposure  the number and strength of incoming dependencies (estimated from static and dynamic analysis) Second PLOW Installment - March 5, 2014 56
  • 57. • Consequence  cost of code smell driven changes (effort, time, money). From the opposite perspective: • Consequence  effect of removing the code smell. • Estimated by computing the impact of the corresponding refactoring on metrics. Second PLOW Installment - March 5, 2014 57
  • 58. Given a set of different types of refactoring opportunities in a software system • Conflicts • Dependencies Second PLOW Installment - March 5, 2014 58
  • 59. Visit our project at Second PLOW Installment - March 5, 2014 59