SlideShare a Scribd company logo
1 of 28
Download to read offline
BackgroundBackground
Work on the detection of bad smells
Idea is that when something smells bad,
it should be changed
02/08/10 1WCRE2009 - S. Vaucher et al.
Open IssuesOpen Issues
Identify factors that cause these smells to
guide engineering efforts for :
Prevention
Detection
Correction
02/08/10 2WCRE2009 - S. Vaucher et al.
How to Track SmellsHow to Track Smells
Use a nose
Follow the evolution of a smell
02/08/10 3WCRE2009 - S. Vaucher et al.
Overview of the PresentationOverview of the Presentation
• Nose
• Systems
• Analysis
• Results
• Thoughts on prevention and correction
02/08/10 WCRE2009 - S. Vaucher et al. 4
The Nose
02/08/10 WCRE2009 - S. Vaucher et al. 5
The NoseThe Nose –– In two slides (1)In two slides (1)
We built one in previous work
[QSIC2009]
Works with God classes
Probability of a God class given
symptoms:
Cohesion
Naming
Size
Presence of data classes
02/08/10 6WCRE2009 - S. Vaucher et al.
NoseNose –– In Two Slides (2)In Two Slides (2)
Size Lexical Little
Cohesion
Deals with
data
classes
Large
Controller
Class?
God class?
MAX MAX MAX MAX
47%
Conditional
probabilities
02/08/10 7WCRE2009 - S. Vaucher et al.
Systems
02/08/10 8WCRE2009 - S. Vaucher et al.
Xerces-J Eclipse JDT
02/08/10 9WCRE2009 - S. Vaucher et al.
System statisticsSystem statistics
Xerces-J Eclipse JDT
10-15% god classes
70% start as god
classes
30% of god classes
are deleted
2% god classes
61% start as god
classes
19% of god classes
are deleted
02/08/10 10WCRE2009 - S. Vaucher et al.
Analysis
02/08/10 WCRE2009 - S. Vaucher et al. 11
3 Step Program3 Step Program -- AnalysisAnalysis
• Find patterns in the evolution of the smell
• Label these patterns
• Analyse the commonalities of these
patterns
02/08/10 12WCRE2009 - S. Vaucher et al.
DataData
02/08/10 13WCRE2009 - S. Vaucher et al.
TimeTime--independent Analysisindependent Analysis
• Use DTW to compare time-independent
signals
• Apply clustering to discover patterns
• Apply classification to group and analyse
02/08/10 14WCRE2009 - S. Vaucher et al.
Finding PatternsFinding Patterns
Hierarchical agglomerative
clustering using DTW as a
distance measure
Constant (smelly)
Gradual
improvement
Sharp
improvement
Gradual
degradation
Sharp
degradation
Temporary
Relief
Temporary
badness
Time
Signal
02/08/10 15WCRE2009 - S. Vaucher et al.
Classifying PatternsClassifying Patterns
02/08/10 16WCRE2009 - S. Vaucher et al.
Pattern DistributionPattern Distribution
Xerces-J Eclipse JDT
02/08/10 17WCRE2009 - S. Vaucher et al.
Constant PatternConstant Pattern
~65% are always smelly
Questions: Quick and dirty design or
willful decision?
◦ Look for signs of design effort
◦ Ask the developers
02/08/10 18WCRE2009 - S. Vaucher et al.
Constant PatternConstant Pattern -- ResultsResults
Xerces main developer mentioned that
problems were complex and required
complex design
Similarly, 82% of classes play a role in a
design pattern
The code is not a hack
02/08/10 19WCRE2009 - S. Vaucher et al.
DegradationDegradation
~18% of smelly classes were okay
initially
In most cases, sharp degradation occurs
when developers add data classes to
already large class
Degradation always requires new code to
be added
02/08/10 20WCRE2009 - S. Vaucher et al.
DegradationDegradation –– growth trends ingrowth trends in
XercesXerces
02/08/10 21WCRE2009 - S. Vaucher
ImprovementsImprovements
More classes are removed than are
corrected (30% in Xerces)
Reason justifying the study of antipatterns
is to find some standard solutions
Were they used?
02/08/10 22WCRE2009 - S. Vaucher et al.
ImprovementsImprovements ––resultsresults
Eclipse, lots of added responsibility to
data classes (rebalancing)
Xerces, few textbook refactorings
Not obvious since design correction often
occurs with enhancements
02/08/10 WCRE2009 - S. Vaucher et al. 23
PreventionPrevention
Rule mining:
When large amounts of code are added to a
class, the probability of it being a god class
increases
Inputs:
◦ Use code/method change metrics
(added/removed/modified)
◦ Current state (clean, borderline, smelly)
Output:
◦ Increase, stable, decrease probability of god class
02/08/10 WCRE2009 - S. Vaucher et al. 24
RulesRules
02/08/10 WCRE2009 - S. Vaucher et al. 25
Correcting god classesCorrecting god classes
Gap between theoretical refactorings and
their applications.
Too little cohesion (LCOM5): should lead
to an extract class refactoring, but almost
never used (and metric change not
reflected)
Responsibility distribution: move
methods. Done more regularly, but
almost never from god to data class
02/08/10 WCRE2009 - S. Vaucher et al. 26
What was saidWhat was said
Methodology to track smells in systems
Discussed the introduction and removal of
smells in two open-source systems
02/08/10 WCRE2009 - S. Vaucher et al. 27
What to rememberWhat to remember
Most god classes tends to be god classes
from the start and do not improve
More deletions than improvements
Improvements are hard to classify
Degradation is the result of significant
growth (>100%), or because
responsibilities are unbalanced
02/08/10 WCRE2009 - S. Vaucher et al. 28
et al.

More Related Content

Similar to Wcre09b.ppt

2Regression testing refers to a software testing technique that re-runs non-f...
2Regression testing refers to a software testing technique that re-runs non-f...2Regression testing refers to a software testing technique that re-runs non-f...
2Regression testing refers to a software testing technique that re-runs non-f...
gjeyasriitaamecnew
 
2013-04-30 EE DSS Approach and Demo
2013-04-30 EE DSS Approach and Demo2013-04-30 EE DSS Approach and Demo
2013-04-30 EE DSS Approach and Demo
Rudolf Husar
 

Similar to Wcre09b.ppt (20)

02 stein intro_4th-pv_modeling_workshop_2015-10-22_sand2015-8571_c
02 stein intro_4th-pv_modeling_workshop_2015-10-22_sand2015-8571_c02 stein intro_4th-pv_modeling_workshop_2015-10-22_sand2015-8571_c
02 stein intro_4th-pv_modeling_workshop_2015-10-22_sand2015-8571_c
 
2Regression testing refers to a software testing technique that re-runs non-f...
2Regression testing refers to a software testing technique that re-runs non-f...2Regression testing refers to a software testing technique that re-runs non-f...
2Regression testing refers to a software testing technique that re-runs non-f...
 
Ontologies For the Modern Age - McGuinness' Keynote at ISWC 2017
Ontologies For the Modern Age - McGuinness' Keynote at ISWC 2017Ontologies For the Modern Age - McGuinness' Keynote at ISWC 2017
Ontologies For the Modern Age - McGuinness' Keynote at ISWC 2017
 
DuraMat CO1 Central Data Resource: How it started, how it’s going …
DuraMat CO1 Central Data Resource: How it started, how it’s going …DuraMat CO1 Central Data Resource: How it started, how it’s going …
DuraMat CO1 Central Data Resource: How it started, how it’s going …
 
2013-04-30 EE DSS Approach and Demo
2013-04-30 EE DSS Approach and Demo2013-04-30 EE DSS Approach and Demo
2013-04-30 EE DSS Approach and Demo
 
DSD-INT 2017 State updating using OpenDA and WFlow - Weerts
DSD-INT 2017 State updating using OpenDA and WFlow - WeertsDSD-INT 2017 State updating using OpenDA and WFlow - Weerts
DSD-INT 2017 State updating using OpenDA and WFlow - Weerts
 
Detection of SOA Antipatterns
Detection of SOA AntipatternsDetection of SOA Antipatterns
Detection of SOA Antipatterns
 
TeraWatt Project
TeraWatt ProjectTeraWatt Project
TeraWatt Project
 
Test Estimation
Test Estimation Test Estimation
Test Estimation
 
JDD2015: Sustainability Supporting Data Variability: Keeping Core Components ...
JDD2015: Sustainability Supporting Data Variability: Keeping Core Components ...JDD2015: Sustainability Supporting Data Variability: Keeping Core Components ...
JDD2015: Sustainability Supporting Data Variability: Keeping Core Components ...
 
JDD2015: Sustainability Supporting Data Variability: Keeping Core Components ...
JDD2015: Sustainability Supporting Data Variability: Keeping Core Components ...JDD2015: Sustainability Supporting Data Variability: Keeping Core Components ...
JDD2015: Sustainability Supporting Data Variability: Keeping Core Components ...
 
Chem draW
Chem draWChem draW
Chem draW
 
Open-source tools for generating and analyzing large materials data sets
Open-source tools for generating and analyzing large materials data setsOpen-source tools for generating and analyzing large materials data sets
Open-source tools for generating and analyzing large materials data sets
 
IEA-GHG project and findings to date
IEA-GHG project and findings to dateIEA-GHG project and findings to date
IEA-GHG project and findings to date
 
Cosmic rays and clouds: using open science to clear the confusion
Cosmic rays and clouds: using open science to clear the confusionCosmic rays and clouds: using open science to clear the confusion
Cosmic rays and clouds: using open science to clear the confusion
 
Sound Empirical Evidence in Software Testing
Sound Empirical Evidence in Software TestingSound Empirical Evidence in Software Testing
Sound Empirical Evidence in Software Testing
 
1-Hour SO2 NAAQS Implementation Modeling
1-Hour SO2 NAAQS Implementation Modeling1-Hour SO2 NAAQS Implementation Modeling
1-Hour SO2 NAAQS Implementation Modeling
 
Test specifications and designs session 4
Test specifications and designs  session 4Test specifications and designs  session 4
Test specifications and designs session 4
 
Test specifications and designs
Test specifications and designs  Test specifications and designs
Test specifications and designs
 
A package system for maintaining large model distributions in vle software
A package system for maintaining large model distributions in vle softwareA package system for maintaining large model distributions in vle software
A package system for maintaining large model distributions in vle software
 

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

Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22
Yann-Gaël Guéhéneuc
 
Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3
Yann-Gaël Guéhéneuc
 
On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6
Yann-Gaël Guéhéneuc
 

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

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

Recently uploaded

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 

Wcre09b.ppt

  • 1. BackgroundBackground Work on the detection of bad smells Idea is that when something smells bad, it should be changed 02/08/10 1WCRE2009 - S. Vaucher et al.
  • 2. Open IssuesOpen Issues Identify factors that cause these smells to guide engineering efforts for : Prevention Detection Correction 02/08/10 2WCRE2009 - S. Vaucher et al.
  • 3. How to Track SmellsHow to Track Smells Use a nose Follow the evolution of a smell 02/08/10 3WCRE2009 - S. Vaucher et al.
  • 4. Overview of the PresentationOverview of the Presentation • Nose • Systems • Analysis • Results • Thoughts on prevention and correction 02/08/10 WCRE2009 - S. Vaucher et al. 4
  • 5. The Nose 02/08/10 WCRE2009 - S. Vaucher et al. 5
  • 6. The NoseThe Nose –– In two slides (1)In two slides (1) We built one in previous work [QSIC2009] Works with God classes Probability of a God class given symptoms: Cohesion Naming Size Presence of data classes 02/08/10 6WCRE2009 - S. Vaucher et al.
  • 7. NoseNose –– In Two Slides (2)In Two Slides (2) Size Lexical Little Cohesion Deals with data classes Large Controller Class? God class? MAX MAX MAX MAX 47% Conditional probabilities 02/08/10 7WCRE2009 - S. Vaucher et al.
  • 8. Systems 02/08/10 8WCRE2009 - S. Vaucher et al.
  • 9. Xerces-J Eclipse JDT 02/08/10 9WCRE2009 - S. Vaucher et al.
  • 10. System statisticsSystem statistics Xerces-J Eclipse JDT 10-15% god classes 70% start as god classes 30% of god classes are deleted 2% god classes 61% start as god classes 19% of god classes are deleted 02/08/10 10WCRE2009 - S. Vaucher et al.
  • 11. Analysis 02/08/10 WCRE2009 - S. Vaucher et al. 11
  • 12. 3 Step Program3 Step Program -- AnalysisAnalysis • Find patterns in the evolution of the smell • Label these patterns • Analyse the commonalities of these patterns 02/08/10 12WCRE2009 - S. Vaucher et al.
  • 13. DataData 02/08/10 13WCRE2009 - S. Vaucher et al.
  • 14. TimeTime--independent Analysisindependent Analysis • Use DTW to compare time-independent signals • Apply clustering to discover patterns • Apply classification to group and analyse 02/08/10 14WCRE2009 - S. Vaucher et al.
  • 15. Finding PatternsFinding Patterns Hierarchical agglomerative clustering using DTW as a distance measure Constant (smelly) Gradual improvement Sharp improvement Gradual degradation Sharp degradation Temporary Relief Temporary badness Time Signal 02/08/10 15WCRE2009 - S. Vaucher et al.
  • 16. Classifying PatternsClassifying Patterns 02/08/10 16WCRE2009 - S. Vaucher et al.
  • 17. Pattern DistributionPattern Distribution Xerces-J Eclipse JDT 02/08/10 17WCRE2009 - S. Vaucher et al.
  • 18. Constant PatternConstant Pattern ~65% are always smelly Questions: Quick and dirty design or willful decision? ◦ Look for signs of design effort ◦ Ask the developers 02/08/10 18WCRE2009 - S. Vaucher et al.
  • 19. Constant PatternConstant Pattern -- ResultsResults Xerces main developer mentioned that problems were complex and required complex design Similarly, 82% of classes play a role in a design pattern The code is not a hack 02/08/10 19WCRE2009 - S. Vaucher et al.
  • 20. DegradationDegradation ~18% of smelly classes were okay initially In most cases, sharp degradation occurs when developers add data classes to already large class Degradation always requires new code to be added 02/08/10 20WCRE2009 - S. Vaucher et al.
  • 21. DegradationDegradation –– growth trends ingrowth trends in XercesXerces 02/08/10 21WCRE2009 - S. Vaucher
  • 22. ImprovementsImprovements More classes are removed than are corrected (30% in Xerces) Reason justifying the study of antipatterns is to find some standard solutions Were they used? 02/08/10 22WCRE2009 - S. Vaucher et al.
  • 23. ImprovementsImprovements ––resultsresults Eclipse, lots of added responsibility to data classes (rebalancing) Xerces, few textbook refactorings Not obvious since design correction often occurs with enhancements 02/08/10 WCRE2009 - S. Vaucher et al. 23
  • 24. PreventionPrevention Rule mining: When large amounts of code are added to a class, the probability of it being a god class increases Inputs: ◦ Use code/method change metrics (added/removed/modified) ◦ Current state (clean, borderline, smelly) Output: ◦ Increase, stable, decrease probability of god class 02/08/10 WCRE2009 - S. Vaucher et al. 24
  • 25. RulesRules 02/08/10 WCRE2009 - S. Vaucher et al. 25
  • 26. Correcting god classesCorrecting god classes Gap between theoretical refactorings and their applications. Too little cohesion (LCOM5): should lead to an extract class refactoring, but almost never used (and metric change not reflected) Responsibility distribution: move methods. Done more regularly, but almost never from god to data class 02/08/10 WCRE2009 - S. Vaucher et al. 26
  • 27. What was saidWhat was said Methodology to track smells in systems Discussed the introduction and removal of smells in two open-source systems 02/08/10 WCRE2009 - S. Vaucher et al. 27
  • 28. What to rememberWhat to remember Most god classes tends to be god classes from the start and do not improve More deletions than improvements Improvements are hard to classify Degradation is the result of significant growth (>100%), or because responsibilities are unbalanced 02/08/10 WCRE2009 - S. Vaucher et al. 28 et al.