SlideShare a Scribd company logo
Preventive Software Maintenance:
The Past, the Present, the Future
Nikolaos Tsantalis
Computer Science & Software Engineering

Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

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

Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

2
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

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

Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

5
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

6
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

7
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

8
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)
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

9
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

10
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

11
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

12
• 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
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

13
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

14
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

15
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

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

Ranking and prioritizing solutions based on
their expected effect on design quality
A more holistic approach for preventive
maintenance
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

17
Focused on the automatic detection
of refactoring opportunities
for 4 major design problems

Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

18
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

19
Context

State
state

- state::int
type int
- STATE_A : int = 1
- STATE_B : int = 2

+method()

+ method() {
state.method();
if state == STATE_A
} doStateA();
else
if state == STATE_B
doStateB();
}

StateA

StateB

+method() {

+method() {

}

}

Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

20
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

21
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

22
• Goal: Given two clones, find the optimal way
to refactor them:
– Matching by minimizing the differences
– Explain the rationale of the solution to the user
– Apply the solution automatically in a behavior
preserving way
– Suggest possible design changes to make the
clones “refactorable”
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

23
Since the beginning of 2011 …

Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

24
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

25
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

26
Technical debt management
• “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
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

27
Clone management
•
•
•
•

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

Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

28
Every code smell involves a certain risk

for future maintainability

Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

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

Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

30
• 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)
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

31
• 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)

Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

32
• 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.
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

33
Visit our project at
Consortium for Software Engineering Research
2013 Spring Meeting, Montréal, Québec, Canada

34

More Related Content

What's hot

Revisiting Assert Use in GitHub Projects
Revisiting Assert Use in GitHub ProjectsRevisiting Assert Use in GitHub Projects
Revisiting Assert Use in GitHub Projects
Pavneet Singh Kochhar
 
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
 
An overview of automated test suites and defect density in Android
An overview of automated test suites and defect density in AndroidAn overview of automated test suites and defect density in Android
An overview of automated test suites and defect density in Android
Vahid Garousi
 
Scam2010 thomas presentation
Scam2010 thomas presentationScam2010 thomas presentation
Scam2010 thomas presentation
SAIL_QU
 
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Amine Barrak
 
Data collection for software defect prediction
Data collection for software defect predictionData collection for software defect prediction
Data collection for software defect prediction
AmmAr mobark
 
Resume_ChetanShetty
Resume_ChetanShettyResume_ChetanShetty
Resume_ChetanShetty
chetan shetty
 
Recommending Software Refactoring Using Search-based Software Enginnering
Recommending Software Refactoring Using Search-based Software EnginneringRecommending Software Refactoring Using Search-based Software Enginnering
Recommending Software Refactoring Using Search-based Software Enginnering
Ali Ouni
 
Semantically enhanced quality assurance in the jurion business use case
Semantically enhanced quality assurance in the jurion  business use caseSemantically enhanced quality assurance in the jurion  business use case
Semantically enhanced quality assurance in the jurion business use case
Dimitris Kontokostas
 
On the Distinction of Functional and Quality Requirements in Practice
On the Distinction of Functional and Quality Requirements in PracticeOn the Distinction of Functional and Quality Requirements in Practice
On the Distinction of Functional and Quality Requirements in Practice
Daniel Mendez
 
Reconstructing microservice-based architectures
Reconstructing microservice-based architecturesReconstructing microservice-based architectures
Reconstructing microservice-based architectures
Ivano Malavolta
 
A Mono- and Multi-objective Approach for Recommending Software Refactoring
A Mono- and Multi-objective Approach for Recommending Software RefactoringA Mono- and Multi-objective Approach for Recommending Software Refactoring
A Mono- and Multi-objective Approach for Recommending Software Refactoring
Ali Ouni
 

What's hot (12)

Revisiting Assert Use in GitHub Projects
Revisiting Assert Use in GitHub ProjectsRevisiting Assert Use in GitHub Projects
Revisiting Assert Use in GitHub Projects
 
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...
 
An overview of automated test suites and defect density in Android
An overview of automated test suites and defect density in AndroidAn overview of automated test suites and defect density in Android
An overview of automated test suites and defect density in Android
 
Scam2010 thomas presentation
Scam2010 thomas presentationScam2010 thomas presentation
Scam2010 thomas presentation
 
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
 
Data collection for software defect prediction
Data collection for software defect predictionData collection for software defect prediction
Data collection for software defect prediction
 
Resume_ChetanShetty
Resume_ChetanShettyResume_ChetanShetty
Resume_ChetanShetty
 
Recommending Software Refactoring Using Search-based Software Enginnering
Recommending Software Refactoring Using Search-based Software EnginneringRecommending Software Refactoring Using Search-based Software Enginnering
Recommending Software Refactoring Using Search-based Software Enginnering
 
Semantically enhanced quality assurance in the jurion business use case
Semantically enhanced quality assurance in the jurion  business use caseSemantically enhanced quality assurance in the jurion  business use case
Semantically enhanced quality assurance in the jurion business use case
 
On the Distinction of Functional and Quality Requirements in Practice
On the Distinction of Functional and Quality Requirements in PracticeOn the Distinction of Functional and Quality Requirements in Practice
On the Distinction of Functional and Quality Requirements in Practice
 
Reconstructing microservice-based architectures
Reconstructing microservice-based architecturesReconstructing microservice-based architectures
Reconstructing microservice-based architectures
 
A Mono- and Multi-objective Approach for Recommending Software Refactoring
A Mono- and Multi-objective Approach for Recommending Software RefactoringA Mono- and Multi-objective Approach for Recommending Software Refactoring
A Mono- and Multi-objective Approach for Recommending Software Refactoring
 

Viewers also liked

Preventive Maintenance on Operating Systems
Preventive Maintenance on Operating SystemsPreventive Maintenance on Operating Systems
Preventive Maintenance on Operating Systems
Marek Majtan
 
Penyelenggaraan cartaalir
Penyelenggaraan cartaalirPenyelenggaraan cartaalir
Penyelenggaraan cartaalir
Is Wan
 
Hsp ict t4
Hsp ict t4Hsp ict t4
Hsp ict t4
Saadiah Mohammad
 
Kertas cadangan/ paperwork
Kertas cadangan/ paperworkKertas cadangan/ paperwork
Kertas cadangan/ paperwork
Nor Kamaruddin
 
Preventive maintenance
Preventive maintenancePreventive maintenance
Preventive maintenance
Athena Catindig
 
Masonry: Tools and Preventive Maintenance
Masonry: Tools and Preventive MaintenanceMasonry: Tools and Preventive Maintenance
Masonry: Tools and Preventive Maintenance
Alyssa Natano
 
GUIDE HARDWARE AND SOFTWARE MAINTENANCE English
GUIDE HARDWARE AND SOFTWARE MAINTENANCE EnglishGUIDE HARDWARE AND SOFTWARE MAINTENANCE English
GUIDE HARDWARE AND SOFTWARE MAINTENANCE English
Felipe Luis Garcia C
 
Preventive maintenance and troubleshooting
Preventive maintenance and troubleshootingPreventive maintenance and troubleshooting
Preventive maintenance and troubleshooting
Christian Macatangay
 
Preventive Maintenance Presentation
Preventive Maintenance PresentationPreventive Maintenance Presentation
Preventive Maintenance Presentation
imhoffm
 
Preventive maintenance final
Preventive maintenance finalPreventive maintenance final
Preventive maintenance final
garfield Tulloch
 
Pc Preventative Maintenance Checklist
Pc Preventative Maintenance ChecklistPc Preventative Maintenance Checklist
Pc Preventative Maintenance Checklist
Miss Cheska
 

Viewers also liked (11)

Preventive Maintenance on Operating Systems
Preventive Maintenance on Operating SystemsPreventive Maintenance on Operating Systems
Preventive Maintenance on Operating Systems
 
Penyelenggaraan cartaalir
Penyelenggaraan cartaalirPenyelenggaraan cartaalir
Penyelenggaraan cartaalir
 
Hsp ict t4
Hsp ict t4Hsp ict t4
Hsp ict t4
 
Kertas cadangan/ paperwork
Kertas cadangan/ paperworkKertas cadangan/ paperwork
Kertas cadangan/ paperwork
 
Preventive maintenance
Preventive maintenancePreventive maintenance
Preventive maintenance
 
Masonry: Tools and Preventive Maintenance
Masonry: Tools and Preventive MaintenanceMasonry: Tools and Preventive Maintenance
Masonry: Tools and Preventive Maintenance
 
GUIDE HARDWARE AND SOFTWARE MAINTENANCE English
GUIDE HARDWARE AND SOFTWARE MAINTENANCE EnglishGUIDE HARDWARE AND SOFTWARE MAINTENANCE English
GUIDE HARDWARE AND SOFTWARE MAINTENANCE English
 
Preventive maintenance and troubleshooting
Preventive maintenance and troubleshootingPreventive maintenance and troubleshooting
Preventive maintenance and troubleshooting
 
Preventive Maintenance Presentation
Preventive Maintenance PresentationPreventive Maintenance Presentation
Preventive Maintenance Presentation
 
Preventive maintenance final
Preventive maintenance finalPreventive maintenance final
Preventive maintenance final
 
Pc Preventative Maintenance Checklist
Pc Preventative Maintenance ChecklistPc Preventative Maintenance Checklist
Pc Preventative Maintenance Checklist
 

Similar to Preventive Software Maintenance: The Past, the Present, the Future

Would Static Analysis Tools Help Developers with Code Reviews?
Would Static Analysis Tools Help Developers with Code Reviews?Would Static Analysis Tools Help Developers with Code Reviews?
Would Static Analysis Tools Help Developers with Code Reviews?
Sebastiano Panichella
 
CS2006Ch02A.ppt dfxgbfdcgbhfcdhbfdcbfdcgfdg
CS2006Ch02A.ppt dfxgbfdcgbhfcdhbfdcbfdcgfdgCS2006Ch02A.ppt dfxgbfdcgbhfcdhbfdcbfdcgfdg
CS2006Ch02A.ppt dfxgbfdcgbhfcdhbfdcbfdcgfdg
RahithAhsan1
 
Deepcoder to Self-Code with Machine Learning
Deepcoder to Self-Code with Machine LearningDeepcoder to Self-Code with Machine Learning
Deepcoder to Self-Code with Machine Learning
IRJET Journal
 
Software testing presentation for engineering students of computer science
Software testing presentation for engineering students of computer scienceSoftware testing presentation for engineering students of computer science
Software testing presentation for engineering students of computer science
AmaanAli86
 
Software Architecture Evaluation: A Systematic Mapping Study
Software Architecture Evaluation: A Systematic Mapping StudySoftware Architecture Evaluation: A Systematic Mapping Study
Software Architecture Evaluation: A Systematic Mapping Study
Sofia Ouhbi
 
Put Your Hands in the Mud: What Technique, Why, and How
Put Your Hands in the Mud: What Technique, Why, and HowPut Your Hands in the Mud: What Technique, Why, and How
Put Your Hands in the Mud: What Technique, Why, and How
Massimiliano Di Penta
 
Model-based Analysis of Large Scale Software Repositories
Model-based Analysis of Large Scale Software RepositoriesModel-based Analysis of Large Scale Software Repositories
Model-based Analysis of Large Scale Software Repositories
Markus Scheidgen
 
Software Analytics - Achievements and Challenges
Software Analytics - Achievements and ChallengesSoftware Analytics - Achievements and Challenges
Software Analytics - Achievements and Challenges
Tao Xie
 
Software engineering practices and software quality empirical research results
Software engineering practices and software quality empirical research resultsSoftware engineering practices and software quality empirical research results
Software engineering practices and software quality empirical research results
Nikolai Avteniev
 
poster_3.0
poster_3.0poster_3.0
poster_3.0
Stefano Sansone
 
Leveraging the Crowd: Supporting Newcomers to Build an OSS Community
Leveraging the Crowd: Supporting Newcomers to Build an OSS CommunityLeveraging the Crowd: Supporting Newcomers to Build an OSS Community
Leveraging the Crowd: Supporting Newcomers to Build an OSS Community
Marco Aurelio Gerosa
 
Software Engineering Culture - Improve Code Quality
Software Engineering Culture - Improve Code QualitySoftware Engineering Culture - Improve Code Quality
Software Engineering Culture - Improve Code Quality
Dmytro Patserkovskyi
 
Unit 1.ppt
Unit 1.pptUnit 1.ppt
Unit 1.ppt
MsRAMYACSE
 
A Tale of Experiments on Bug Prediction
A Tale of Experiments on Bug PredictionA Tale of Experiments on Bug Prediction
A Tale of Experiments on Bug Prediction
Martin Pinzger
 
The Cloudification Perspectives of Search-based Software Testing
The Cloudification Perspectives of Search-based Software TestingThe Cloudification Perspectives of Search-based Software Testing
The Cloudification Perspectives of Search-based Software Testing
Sebastiano Panichella
 
J034057065
J034057065J034057065
J034057065
ijceronline
 
lecture 1.pdf
lecture 1.pdflecture 1.pdf
lecture 1.pdf
ssuser2d043c
 
Multi step automated refactoring for code smell
Multi step automated refactoring for code smellMulti step automated refactoring for code smell
Multi step automated refactoring for code smell
eSAT Journals
 
Multi step automated refactoring for code smell
Multi step automated refactoring for code smellMulti step automated refactoring for code smell
Multi step automated refactoring for code smell
eSAT Publishing House
 
e-Business - SE trends
e-Business - SE trendse-Business - SE trends
e-Business - SE trends
Vladimir Kotov
 

Similar to Preventive Software Maintenance: The Past, the Present, the Future (20)

Would Static Analysis Tools Help Developers with Code Reviews?
Would Static Analysis Tools Help Developers with Code Reviews?Would Static Analysis Tools Help Developers with Code Reviews?
Would Static Analysis Tools Help Developers with Code Reviews?
 
CS2006Ch02A.ppt dfxgbfdcgbhfcdhbfdcbfdcgfdg
CS2006Ch02A.ppt dfxgbfdcgbhfcdhbfdcbfdcgfdgCS2006Ch02A.ppt dfxgbfdcgbhfcdhbfdcbfdcgfdg
CS2006Ch02A.ppt dfxgbfdcgbhfcdhbfdcbfdcgfdg
 
Deepcoder to Self-Code with Machine Learning
Deepcoder to Self-Code with Machine LearningDeepcoder to Self-Code with Machine Learning
Deepcoder to Self-Code with Machine Learning
 
Software testing presentation for engineering students of computer science
Software testing presentation for engineering students of computer scienceSoftware testing presentation for engineering students of computer science
Software testing presentation for engineering students of computer science
 
Software Architecture Evaluation: A Systematic Mapping Study
Software Architecture Evaluation: A Systematic Mapping StudySoftware Architecture Evaluation: A Systematic Mapping Study
Software Architecture Evaluation: A Systematic Mapping Study
 
Put Your Hands in the Mud: What Technique, Why, and How
Put Your Hands in the Mud: What Technique, Why, and HowPut Your Hands in the Mud: What Technique, Why, and How
Put Your Hands in the Mud: What Technique, Why, and How
 
Model-based Analysis of Large Scale Software Repositories
Model-based Analysis of Large Scale Software RepositoriesModel-based Analysis of Large Scale Software Repositories
Model-based Analysis of Large Scale Software Repositories
 
Software Analytics - Achievements and Challenges
Software Analytics - Achievements and ChallengesSoftware Analytics - Achievements and Challenges
Software Analytics - Achievements and Challenges
 
Software engineering practices and software quality empirical research results
Software engineering practices and software quality empirical research resultsSoftware engineering practices and software quality empirical research results
Software engineering practices and software quality empirical research results
 
poster_3.0
poster_3.0poster_3.0
poster_3.0
 
Leveraging the Crowd: Supporting Newcomers to Build an OSS Community
Leveraging the Crowd: Supporting Newcomers to Build an OSS CommunityLeveraging the Crowd: Supporting Newcomers to Build an OSS Community
Leveraging the Crowd: Supporting Newcomers to Build an OSS Community
 
Software Engineering Culture - Improve Code Quality
Software Engineering Culture - Improve Code QualitySoftware Engineering Culture - Improve Code Quality
Software Engineering Culture - Improve Code Quality
 
Unit 1.ppt
Unit 1.pptUnit 1.ppt
Unit 1.ppt
 
A Tale of Experiments on Bug Prediction
A Tale of Experiments on Bug PredictionA Tale of Experiments on Bug Prediction
A Tale of Experiments on Bug Prediction
 
The Cloudification Perspectives of Search-based Software Testing
The Cloudification Perspectives of Search-based Software TestingThe Cloudification Perspectives of Search-based Software Testing
The Cloudification Perspectives of Search-based Software Testing
 
J034057065
J034057065J034057065
J034057065
 
lecture 1.pdf
lecture 1.pdflecture 1.pdf
lecture 1.pdf
 
Multi step automated refactoring for code smell
Multi step automated refactoring for code smellMulti step automated refactoring for code smell
Multi step automated refactoring for code smell
 
Multi step automated refactoring for code smell
Multi step automated refactoring for code smellMulti step automated refactoring for code smell
Multi step automated refactoring for code smell
 
e-Business - SE trends
e-Business - SE trendse-Business - SE trends
e-Business - SE trends
 

More from 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 evolution
Nikolaos 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 Talk
Nikolaos Tsantalis
 
SANER 2019 Most Influential Paper Talk
SANER 2019 Most Influential Paper TalkSANER 2019 Most Influential Paper Talk
SANER 2019 Most Influential Paper Talk
Nikolaos 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 History
Nikolaos Tsantalis
 
Clone Refactoring with Lambda Expressions
Clone Refactoring with Lambda ExpressionsClone Refactoring with Lambda Expressions
Clone Refactoring with Lambda Expressions
Nikolaos 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 Contributors
Nikolaos Tsantalis
 
Migrating cascading style sheets to preprocessors
Migrating cascading style sheets to preprocessorsMigrating cascading style sheets to preprocessors
Migrating cascading style sheets to preprocessors
Nikolaos Tsantalis
 
JDeodorant: Clone Refactoring
JDeodorant: Clone RefactoringJDeodorant: Clone Refactoring
JDeodorant: Clone Refactoring
Nikolaos 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 preprocessors
Nikolaos 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 Preprocessors
Nikolaos 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
 
Code Smell Research: History and Future Directions
Code Smell Research: History and Future DirectionsCode Smell Research: History and Future Directions
Code Smell Research: History and Future Directions
Nikolaos 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 Sheets
Nikolaos 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 Volatility
Nikolaos 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 Applications
Nikolaos 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 Activity
Nikolaos Tsantalis
 
Unification and Refactoring of Clones
Unification and Refactoring of ClonesUnification and Refactoring of Clones
Unification and Refactoring of Clones
Nikolaos Tsantalis
 

More from 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...
 
Code Smell Research: History and Future Directions
Code Smell Research: History and Future DirectionsCode Smell Research: History and Future Directions
Code Smell Research: History and Future Directions
 
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
 

Recently uploaded

在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
vluwdy49
 
Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.
Aditi Bajpai
 
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Leonel Morgado
 
The binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defectsThe binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defects
Sérgio Sacani
 
Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...
Leonel Morgado
 
ESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptxESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptx
PRIYANKA PATEL
 
Farming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptxFarming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptx
Frédéric Baudron
 
Eukaryotic Transcription Presentation.pptx
Eukaryotic Transcription Presentation.pptxEukaryotic Transcription Presentation.pptx
Eukaryotic Transcription Presentation.pptx
RitabrataSarkar3
 
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
PsychoTech Services
 
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
frank0071
 
Pests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdfPests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdf
PirithiRaju
 
Basics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different formsBasics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different forms
MaheshaNanjegowda
 
Compexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titrationCompexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titration
Vandana Devesh Sharma
 
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdfMending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Selcen Ozturkcan
 
8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf
by6843629
 
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
Advanced-Concepts-Team
 
Sciences of Europe journal No 142 (2024)
Sciences of Europe journal No 142 (2024)Sciences of Europe journal No 142 (2024)
Sciences of Europe journal No 142 (2024)
Sciences of Europe
 
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
Sérgio Sacani
 
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
Scintica Instrumentation
 
AJAY KUMAR NIET GreNo Guava Project File.pdf
AJAY KUMAR NIET GreNo Guava Project File.pdfAJAY KUMAR NIET GreNo Guava Project File.pdf
AJAY KUMAR NIET GreNo Guava Project File.pdf
AJAY KUMAR
 

Recently uploaded (20)

在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
在线办理(salfor毕业证书)索尔福德大学毕业证毕业完成信一模一样
 
Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.
 
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
 
The binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defectsThe binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defects
 
Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...Authoring a personal GPT for your research and practice: How we created the Q...
Authoring a personal GPT for your research and practice: How we created the Q...
 
ESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptxESR spectroscopy in liquid food and beverages.pptx
ESR spectroscopy in liquid food and beverages.pptx
 
Farming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptxFarming systems analysis: what have we learnt?.pptx
Farming systems analysis: what have we learnt?.pptx
 
Eukaryotic Transcription Presentation.pptx
Eukaryotic Transcription Presentation.pptxEukaryotic Transcription Presentation.pptx
Eukaryotic Transcription Presentation.pptx
 
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
 
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
 
Pests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdfPests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdf
 
Basics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different formsBasics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different forms
 
Compexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titrationCompexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titration
 
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdfMending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
 
8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf8.Isolation of pure cultures and preservation of cultures.pdf
8.Isolation of pure cultures and preservation of cultures.pdf
 
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
 
Sciences of Europe journal No 142 (2024)
Sciences of Europe journal No 142 (2024)Sciences of Europe journal No 142 (2024)
Sciences of Europe journal No 142 (2024)
 
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
EWOCS-I: The catalog of X-ray sources in Westerlund 1 from the Extended Weste...
 
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
(June 12, 2024) Webinar: Development of PET theranostics targeting the molecu...
 
AJAY KUMAR NIET GreNo Guava Project File.pdf
AJAY KUMAR NIET GreNo Guava Project File.pdfAJAY KUMAR NIET GreNo Guava Project File.pdf
AJAY KUMAR NIET GreNo Guava Project File.pdf
 

Preventive Software Maintenance: The Past, the Present, the Future

  • 1. Preventive Software Maintenance: The Past, the Present, the Future Nikolaos Tsantalis Computer Science & Software Engineering Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 1
  • 2. Changes aiming to improve the future maintainability and reliability of the software system. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 2
  • 3.
  • 4. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 4
  • 5. Duplicated Code: “If you see the same code structure in more than one place, … find a way to unify them.” Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 5
  • 6. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 6
  • 7. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 7
  • 8. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 8
  • 9. 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) Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 9
  • 10. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 10
  • 11. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 11
  • 12. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 12
  • 13. • 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 Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 13
  • 14. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 14
  • 15. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 15
  • 16. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 16
  • 17. Advantages: Feasible and behavior preserving solutions to design problems Ranking and prioritizing solutions based on their expected effect on design quality A more holistic approach for preventive maintenance Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 17
  • 18. Focused on the automatic detection of refactoring opportunities for 4 major design problems Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 18
  • 19. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 19
  • 20. Context State state - state::int type int - STATE_A : int = 1 - STATE_B : int = 2 +method() + method() { state.method(); if state == STATE_A } doStateA(); else if state == STATE_B doStateB(); } StateA StateB +method() { +method() { } } Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 20
  • 21. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 21
  • 22. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 22
  • 23. • Goal: Given two clones, find the optimal way to refactor them: – Matching by minimizing the differences – Explain the rationale of the solution to the user – Apply the solution automatically in a behavior preserving way – Suggest possible design changes to make the clones “refactorable” Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 23
  • 24. Since the beginning of 2011 … Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 24
  • 25. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 25
  • 26. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 26
  • 27. Technical debt management • “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 Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 27
  • 28. Clone management • • • • Tracking clones as project evolves Verifying the consistent modification of clones Updating clones and groups as project evolves Assessing the harmfulness of clones Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 28
  • 29. Every code smell involves a certain risk for future maintainability Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 29
  • 30. • Likelihood of occurrence of the risky event • Exposure of the system to the event • Consequence of the event Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 30
  • 31. • 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) Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 31
  • 32. • 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) Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 32
  • 33. • 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. Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 33
  • 34. Visit our project at Consortium for Software Engineering Research 2013 Spring Meeting, Montréal, Québec, Canada 34

Editor's Notes

  1. In this talk I will present the past and present research highlights in the area of preventive software maintenance.I will then focus on the current challenges related to the management of maintenance activities and finish with some future research directions.
  2. Software is aging. It has been observed that the design quality of a software system deteriorates throughout its evolutionThe reason is that developers do not always apply the best design solutionsdue to time pressure to deliver new features, orbecause they are new developers joining the development team and are unfamiliar with the system’s architecture &amp; design decisions)As a result, it becomes more and more difficult to perform maintenance tasks, such as the addition of new requirements, fixing of bugs.Refactorings constitute the main form of preventive maintenance and are source code transformations that can improve the design quality of a system and gradually bring it back to its original design state.
  3. It all started back in ’99 with the book by Martin Fowler on Refactorings.
  4. In this book they introduced the concept of “code smells”, which are essentially design flaws, and proposed refactorings that can resolve them.However, the code smell definitions are very abstract and vague.For example, in the definition of duplicated code we can see that both the detection and resolution steps are vague.
  5. The first attempt to turn refactoring into science was performed by Simon and Lewerentz in 2001.
  6. They defined a metric based on Jaccard distance to quantify the cohesion between attributes and methodsand place them in a three-dimensional space. The developer could visually identify methods or attributes that have been misplaced.Limitation: The visual interpretation can be quite subjective. This kind of visualization does not scale for large systems.
  7. In 2003, Tourwe and Mens proposed an approach based on Logic Meta Programming
  8. They expressed object-oriented programs as logic-terms and factsand defined logic rules for the detection of code smells that can be evaluated as Prolog queries.Limitation: The definition of code smells requires the knowledge of logic programming languages (Prolog)The logic rules used to define code smells may not be able to capture actual instances that deviate from the standard definition.
  9. In 2005, RaduMarinescu introduced the “detection strategies” for code smells.
  10. A detection strategy is a composition of various metric rules (i.e., metrics that should comply with proper threshold values) combined with AND/OR operators into a single rule that expresses a violation of a design heuristic.Limitation: Threshold values should be manually determined and are project-specific. Different threshold values return different results.
  11. Limitation: The outcome is a sequence of refactorings that the designer of the system has to accept in its entirety.From our experience, developers prefer step-wise approaches in which they have total control of the refactoringsbeing applied.
  12. They defined a domain-specific language (DSL) for the specification and detection of code smells.This is the most formal approach so far.
  13. This limitation led to another research area that focused on the detection of refactoring opportunities as a means to remove code smells and design problems from software systems.
  14. My research during my PhD studies and afterwards focused on the detection of refactoring opportunities for 4 major design problems.
  15. The first design problem refers to misallocated behavior in classes.In this example, we can see a method that is using significantly more data from another class (LegendItem) compared to the data used from the class it belongs to (LegendTitle). Thus, moving this method will improve the cohesion of both classes and decrease the strength of coupling between them.
  16. The second design problem refers to the use of conditional logic instead of polymorphism.This design problem usually appears in the form of “if/else if” statements that examine the value of a variable representing the state of an object and execute the corresponding branch.The alternative solution is to create an inheritance hierarchy representing the states and replace the conditional logic with a single polymorphic method call.The polymorphic solution facilitates extension, since the introduction of a new state simply requires the addition of a new subclass in the hierarchy without changing the rest of the system.
  17. The third design problem refers to long and complex methods.Our goal was to detect code fragments within the method implementing a distinct functionality (a set of statements containing the computation of a variable, or a set of statements affecting the state of an object) and extract them into a separate method.In this way we can reduce the complexity of the original method and introduce a potentially reusable method.
  18. The fourth design problem refers to Large and Complex classes, also known as God classes. These classes usually violate the single responsibility principle.Our goal was to detect strongly cohesive groups of methods and attributes in the God class that can be extracted to a separate class.In this example, the original class had 70 methods, 15 fields, and over 900 LOC. The extracted class contains 19 methods and 11 fields which are strongly dependent with each other, while the dependencies to elements of the original class is very weak.
  19. Currently, we are working on the detection of refactoring opportunities for software clones.
  20. All these techniques for the detection of refactoring opportunities have been implemented as an Eclipse plug-in namedJDeodorant.
  21. There are also some commercial tools focusing on design quality assessment and improvement.In 2008, RaduMarinescu co-founded a spin-off company and created inCode, a tool that detects code smells based on the detection strategies he proposed. One of his most well-known customers is HuaWei, a Chinese multinational telecommunications company.Another company is Tocea which is based in France and Quebec. It is offering technical debt assessment and computer-aided refactoring
  22. Right now we have several tools detecting design problems, which may produce a very large number of suggestions.Obviously, inspecting all of them is quite overwhelming. So, we need automatic approaches to tell us which are the most important ones.
  23. There have been some ideas on the management of maintenance activities.The first is based on the metaphor of technical debt.Limitation: The principal and interest for each maintenance activity have to be manually determined and are assigned with coarse-grained values (i.e., high, medium, or low)
  24. The clone detection community has introduced clone management.Limitation: Tailored to the design problem of duplicated code
  25. With respect to future maintainability
  26. Within the context of maintenance, risky events correspond to changes driven by code smells.On the other side, there is no urgent need to refactor code that never changed after its initial introduction in a system.
  27. On the other side, there is no urgent need to refactor a piece of code that is not used by other system modules (e.g., dead code).