SlideShare una empresa de Scribd logo
1 de 12
Descargar para leer sin conexión
Automatic Generation of
Detection Algorithms for Design Defects

Naouel Moha, Yann-Gaël Guéhéneuc, Pierre Leduc
Ptidej team, GEODES, University of Montreal, Canada
LIFL, INRIA project Jacquard, University of Lille, France

CASCON 2006
October 17-20, 2006, Toronto, Canada
Context


Design Patterns are “good” solutions to recurring design problems



Design Defects (DDs)





are “bad” solutions to recurring problems
2 categories:
 High-level (global) problems: antipatterns [BRO 98]
 Low-level (local) problems: code smells [FOW 99]

Why it is important to detect DDs ?






DDs lessen the quality of OO architectures and impede their
evolution and their maintenance
Maintenance is expensive because of DDs [PER 92] : adding,
debugging, and evolving of features are difficult
A good software architecture without DDs: easier to understand,
change, and thus maintain

Moha © ASE 2006

Automatic Generation of Detection Algorithms for Design Defects

2
Context


2 examples of high-level DDs


Blob


Large controller class



Many fields and methods with a low cohesion*



Dependent on the data stored in associated
data classes

*How closely the methods are related to the instance variables
in the class. Measure: LCOM (Lack of Cohesion Metric)

Moha © ASE 2006

Automatic Generation of Detection Algorithms for Design Defects

3
Context


2 examples of high-level DDs


Spaghetti Code



Lack of structure : no inheritance, no reuse, no
polymorphism



Long process-oriented methods with no
parameters and low cohesion



Moha © ASE 2006

Procedural thinking in OO programming

Excessive use of class and global variables for
processing

Automatic Generation of Detection Algorithms for Design Defects

4
Problem Description


What are the problems ?


Textual descriptions of DDs [Brown 98] [Fowler 99]





Lack of precision and misinterpretations
Difficult to build detection algorithms from textual descriptions

Lack of precise specifications and tools: metrics only

[Marinescu 04]

[Tools: SmallLint, PMD]




Lack of work on high-level DDs




Metrics only : metrics cannot express important structural and semantic
properties

Focus only on low-level DDs (code smells)

Semi-manual detection [Marinescu 04] [Munro 05]

Moha © ASE 2006

Automatic Generation of Detection Algorithms for Design Defects

5
Solution
 How to address these problems ?




We propose a language and a framework
to specify precisely high-level DDs in order
to ease and automate their detection

We define a systematic method, called DECOR, to specify high-level DDs
significantly and to generate detection and correction algorithms
from the specifications of DDs

Method in 10 steps

Moha © ASE 2006

Automatic Generation of Detection Algorithms for Design Defects

6
Our Approach
We define a systematic method, called DECOR, to specify high-level DDs
significantly and to generate detection and correction algorithms
from the specifications of DDs

 Illustration with the Blob


Blob



Many fields and methods with a low cohesion



Moha © ASE 2006

Large controller class

Dependent on the data stored in data classes
associated

Automatic Generation of Detection Algorithms for Design Defects

7
Specification of Design Defects
Rule Cards


More structured description

RULE_CARD : Blob {
RULE : Blob {ASSOC: associated FROM: MainClass ONE TO: DataClass MANY } ;
RULE : MainClass {UNION LargeClassLowCohesion ControllerClass } ;
RULE : LargeClassLowCohesion {UNION LargeClass LowCohesion } ;
RULE : LargeClass { (METRIC: NMD + NAD, VERY_HIGH) } ;
RULE : LowCohesion { (METRIC: LCOM5, VERY_HIGH) } ;
RULE : ControllerClass {UNION (SEMANTIC: METHODNAME, {Process, Main, Ctrl})
(SEMANTIC: CLASSNAME, {Process, Main, Ctrl)};
RULE : DataClass { (STRUCT: METHOD, Accessor) } ;
} ;
Moha © ASE 2006

Automatic Generation of Detection Algorithms for Design Defects

8
Generation of Detection Algorithms


SAD Framework (Software Architectural Defects)








A meta-model to instantiate rule cards of DDs
A parser to analyse and reify rule cards
A repository of metrics
Services to analyse structural relationships
Services to perform semantic and structural analyses

Concrete Generation
1. Parse the rule card
2. Build a model representing this rule card
3. Visit the model of the rule card
4. Generate the detection algorithm

Moha © ASE 2006

Automatic Generation of Detection Algorithms for Design Defects

9
Our Approach
We define a systematic method, called DECOR, to specify high-level DDs
significantly and to generate detection and correction algorithms
from the specifications of DDs

Method in 10 steps

Moha © ASE 2006

Automatic Generation of Detection Algorithms for Design Defects

10
Preliminary Results
We specify and detect DDs in several open-source programs
Blob
ArgoUML

Precisions
Time

GanttProject

PMD

QuickUML

113 KLOC
1230 classes

Effectifs

Azureus
192 KLOC
1449 classes

22 KLOC
188 classes

42 KLOC
423 classes

9 KLOC
142 classes

Total

91

143

19

15

3

271

70/91
= 76.9%

82/143
= 57.3%

10/19
= 52.6%

3/15
= 20%

1/3
= 33.3%

166/271
= 61.5%

40.5s

2m

5.6s

31.6s

2.1s

3m 19.8s

Spaghetti Code
ArgoUML
Effectifs
Precisions
Time

Azureus

GanttProject

PMD

QuickUML

Total

26

35

8

11

1

81

21/26
= 80.7%

29/35
= 82.8%

6/8
= 75%

6/11
= 54.5%

0/1
= 0%

62/81
= 76.6%

39s

1m55s

5.4s

31s

1.9s

3m12s

 Results are encouraging ! 
Moha © ASE 2006

Automatic Generation of Detection Algorithms for Design Defects

11
Conclusion


Contributions
 Meta-model enriched with semantic and structural
properties
 Rule-based Language & Framework
 Method DECOR in 10 steps



Our approach




A systematic method based on a meta-model and a rule-based
language to generate automatically detection and correction
algos of high-level DDs

Future Work




Correction of DDs
More defects and case studies including commercial programs
Use of a dictionnary such as WordNet for semantics

Moha © ASE 2006

Automatic Generation of Detection Algorithms for Design Defects

12

Más contenido relacionado

La actualidad más candente

Resume_Nov2016 - LinkedIn
Resume_Nov2016 - LinkedInResume_Nov2016 - LinkedIn
Resume_Nov2016 - LinkedInMagnus Hök
 
Interactive Requirements Prioritization Using Search Based Optimization Techn...
Interactive Requirements Prioritization Using Search Based Optimization Techn...Interactive Requirements Prioritization Using Search Based Optimization Techn...
Interactive Requirements Prioritization Using Search Based Optimization Techn...Francis Palma
 
Software developer occupational brief
Software developer occupational briefSoftware developer occupational brief
Software developer occupational briefEnda Crossan
 
Understanding software metrics
Understanding software metricsUnderstanding software metrics
Understanding software metricsTushar Sharma
 
Software Engineering Sample Question paper for 2012
Software Engineering Sample Question paper for 2012Software Engineering Sample Question paper for 2012
Software Engineering Sample Question paper for 2012Neelamani Samal
 
SE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design PatternsSE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design PatternsAmr E. Mohamed
 
Quality and productivity factors
Quality and productivity factorsQuality and productivity factors
Quality and productivity factorsNancyBeaulah_R
 
Machine Learning Approach for Quality Assessment and Prediction in Large Soft...
Machine Learning Approach for Quality Assessmentand Prediction in Large Soft...Machine Learning Approach for Quality Assessmentand Prediction in Large Soft...
Machine Learning Approach for Quality Assessment and Prediction in Large Soft...RAKESH RANA
 
Analysing the concept of quality in model-driven engineering literature: a sy...
Analysing the concept of quality in model-driven engineering literature: a sy...Analysing the concept of quality in model-driven engineering literature: a sy...
Analysing the concept of quality in model-driven engineering literature: a sy...Fáber D. Giraldo
 
software engineering
software engineeringsoftware engineering
software engineeringramyavarkala
 
Refactoring for software design smells - icse 2014 tutorial
Refactoring for software design smells - icse 2014 tutorialRefactoring for software design smells - icse 2014 tutorial
Refactoring for software design smells - icse 2014 tutorialGanesh Samarthyam
 
Improving software econimics
Improving software econimicsImproving software econimics
Improving software econimicsKalica Wadhwa
 
Software systems engineering PRINCIPLES
Software systems engineering PRINCIPLESSoftware systems engineering PRINCIPLES
Software systems engineering PRINCIPLESIvano Malavolta
 

La actualidad más candente (19)

Resume_Nov2016 - LinkedIn
Resume_Nov2016 - LinkedInResume_Nov2016 - LinkedIn
Resume_Nov2016 - LinkedIn
 
Interactive Requirements Prioritization Using Search Based Optimization Techn...
Interactive Requirements Prioritization Using Search Based Optimization Techn...Interactive Requirements Prioritization Using Search Based Optimization Techn...
Interactive Requirements Prioritization Using Search Based Optimization Techn...
 
Software developer occupational brief
Software developer occupational briefSoftware developer occupational brief
Software developer occupational brief
 
A Regression Analysis Approach for Building a Prediction Model for System Tes...
A Regression Analysis Approach for Building a Prediction Model for System Tes...A Regression Analysis Approach for Building a Prediction Model for System Tes...
A Regression Analysis Approach for Building a Prediction Model for System Tes...
 
Understanding software metrics
Understanding software metricsUnderstanding software metrics
Understanding software metrics
 
Incremental
IncrementalIncremental
Incremental
 
Software Engineering Sample Question paper for 2012
Software Engineering Sample Question paper for 2012Software Engineering Sample Question paper for 2012
Software Engineering Sample Question paper for 2012
 
Correctness
CorrectnessCorrectness
Correctness
 
Slides chapter 15
Slides chapter 15Slides chapter 15
Slides chapter 15
 
SE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design PatternsSE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design Patterns
 
Quality and productivity factors
Quality and productivity factorsQuality and productivity factors
Quality and productivity factors
 
Machine Learning Approach for Quality Assessment and Prediction in Large Soft...
Machine Learning Approach for Quality Assessmentand Prediction in Large Soft...Machine Learning Approach for Quality Assessmentand Prediction in Large Soft...
Machine Learning Approach for Quality Assessment and Prediction in Large Soft...
 
Analysing the concept of quality in model-driven engineering literature: a sy...
Analysing the concept of quality in model-driven engineering literature: a sy...Analysing the concept of quality in model-driven engineering literature: a sy...
Analysing the concept of quality in model-driven engineering literature: a sy...
 
Slides chapters 21-23
Slides chapters 21-23Slides chapters 21-23
Slides chapters 21-23
 
software engineering
software engineeringsoftware engineering
software engineering
 
Refactoring for software design smells - icse 2014 tutorial
Refactoring for software design smells - icse 2014 tutorialRefactoring for software design smells - icse 2014 tutorial
Refactoring for software design smells - icse 2014 tutorial
 
Improving software econimics
Improving software econimicsImproving software econimics
Improving software econimics
 
Ch01
Ch01Ch01
Ch01
 
Software systems engineering PRINCIPLES
Software systems engineering PRINCIPLESSoftware systems engineering PRINCIPLES
Software systems engineering PRINCIPLES
 

Destacado

130823 eric vitouley - supporting source code maintenance using screencasts
130823   eric vitouley - supporting source code maintenance using screencasts130823   eric vitouley - supporting source code maintenance using screencasts
130823 eric vitouley - supporting source code maintenance using screencastsPtidej Team
 
130817 latifa guerrouj - context-aware source code vocabulary normalization...
130817   latifa guerrouj - context-aware source code vocabulary normalization...130817   latifa guerrouj - context-aware source code vocabulary normalization...
130817 latifa guerrouj - context-aware source code vocabulary normalization...Ptidej Team
 
130918 maelick claes - ecological studies of open source software ecosystems
130918   maelick claes - ecological studies of open source software ecosystems130918   maelick claes - ecological studies of open source software ecosystems
130918 maelick claes - ecological studies of open source software ecosystemsPtidej Team
 
130719 sebastiano panichella - who is going to mentor newcomers in open sou...
130719   sebastiano panichella - who is going to mentor newcomers in open sou...130719   sebastiano panichella - who is going to mentor newcomers in open sou...
130719 sebastiano panichella - who is going to mentor newcomers in open sou...Ptidej Team
 
131010 jim cordy - submodel pattern extraction for simulink models
131010   jim cordy - submodel pattern extraction for simulink models131010   jim cordy - submodel pattern extraction for simulink models
131010 jim cordy - submodel pattern extraction for simulink modelsPtidej Team
 

Destacado (12)

Ppap13b.ppt
Ppap13b.pptPpap13b.ppt
Ppap13b.ppt
 
130823 eric vitouley - supporting source code maintenance using screencasts
130823   eric vitouley - supporting source code maintenance using screencasts130823   eric vitouley - supporting source code maintenance using screencasts
130823 eric vitouley - supporting source code maintenance using screencasts
 
130817 latifa guerrouj - context-aware source code vocabulary normalization...
130817   latifa guerrouj - context-aware source code vocabulary normalization...130817   latifa guerrouj - context-aware source code vocabulary normalization...
130817 latifa guerrouj - context-aware source code vocabulary normalization...
 
Wcre12a.ppt
Wcre12a.pptWcre12a.ppt
Wcre12a.ppt
 
Icpc13.ppt
Icpc13.pptIcpc13.ppt
Icpc13.ppt
 
130918 maelick claes - ecological studies of open source software ecosystems
130918   maelick claes - ecological studies of open source software ecosystems130918   maelick claes - ecological studies of open source software ecosystems
130918 maelick claes - ecological studies of open source software ecosystems
 
130719 sebastiano panichella - who is going to mentor newcomers in open sou...
130719   sebastiano panichella - who is going to mentor newcomers in open sou...130719   sebastiano panichella - who is going to mentor newcomers in open sou...
130719 sebastiano panichella - who is going to mentor newcomers in open sou...
 
Cser13.ppt
Cser13.pptCser13.ppt
Cser13.ppt
 
Cpaior13.ppt
Cpaior13.pptCpaior13.ppt
Cpaior13.ppt
 
Wcre13b.ppt
Wcre13b.pptWcre13b.ppt
Wcre13b.ppt
 
Jcom02.ppt
Jcom02.pptJcom02.ppt
Jcom02.ppt
 
131010 jim cordy - submodel pattern extraction for simulink models
131010   jim cordy - submodel pattern extraction for simulink models131010   jim cordy - submodel pattern extraction for simulink models
131010 jim cordy - submodel pattern extraction for simulink models
 

Similar a Automatic Generation of Detection Algorithms for Design Defects (Blob, Spaghetti Code

Accelerated Disassembly, Reconstruction and Reversing training public slides
Accelerated Disassembly, Reconstruction and Reversing training public slidesAccelerated Disassembly, Reconstruction and Reversing training public slides
Accelerated Disassembly, Reconstruction and Reversing training public slidesDmitry Vostokov
 
MOND Semantics Integration
MOND Semantics IntegrationMOND Semantics Integration
MOND Semantics IntegrationSales Emea
 
Productivity mdd mdb_code_centric
Productivity mdd mdb_code_centricProductivity mdd mdb_code_centric
Productivity mdd mdb_code_centricSantiago Meliá
 
Our research lines on Model-Driven Engineering and Software Engineering
Our research lines on Model-Driven Engineering and Software EngineeringOur research lines on Model-Driven Engineering and Software Engineering
Our research lines on Model-Driven Engineering and Software EngineeringJordi Cabot
 
Model-Driven Development for Safety-Critical Software
Model-Driven Development for Safety-Critical SoftwareModel-Driven Development for Safety-Critical Software
Model-Driven Development for Safety-Critical Softwaregjuljo
 
DAE Tools 1.8.0 - Introduction
DAE Tools 1.8.0 - IntroductionDAE Tools 1.8.0 - Introduction
DAE Tools 1.8.0 - IntroductionDragan Nikolić
 
2014 01-ticosa
2014 01-ticosa2014 01-ticosa
2014 01-ticosaPharo
 
A Lightweight MDD Process Applied in Small Projects
A Lightweight MDD Process Applied in Small ProjectsA Lightweight MDD Process Applied in Small Projects
A Lightweight MDD Process Applied in Small ProjectsGabor Guta
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicDavid Solivan
 
Architecture Design Decisions and Group Decision Making
Architecture Design Decisions and Group Decision MakingArchitecture Design Decisions and Group Decision Making
Architecture Design Decisions and Group Decision MakingHenry Muccini
 
ECOOP05 WOORa.ppt
ECOOP05 WOORa.pptECOOP05 WOORa.ppt
ECOOP05 WOORa.pptPtidej Team
 
Model driven engineering for big data management systems
Model driven engineering for big data management systemsModel driven engineering for big data management systems
Model driven engineering for big data management systemsMarcos Almeida
 
CISQ and Software Quality Measurement - Software Assurance Forum (March 2010)
CISQ and Software Quality Measurement - Software Assurance Forum (March 2010)CISQ and Software Quality Measurement - Software Assurance Forum (March 2010)
CISQ and Software Quality Measurement - Software Assurance Forum (March 2010)CISQ - Consortium for IT Software Quality
 

Similar a Automatic Generation of Detection Algorithms for Design Defects (Blob, Spaghetti Code (20)

Cascon06 tooldemo.ppt
Cascon06 tooldemo.pptCascon06 tooldemo.ppt
Cascon06 tooldemo.ppt
 
Ase06.ppt
Ase06.pptAse06.ppt
Ase06.ppt
 
ASE06.ppt
ASE06.pptASE06.ppt
ASE06.ppt
 
Fase08.ppt
Fase08.pptFase08.ppt
Fase08.ppt
 
Waterfall model
Waterfall modelWaterfall model
Waterfall model
 
Accelerated Disassembly, Reconstruction and Reversing training public slides
Accelerated Disassembly, Reconstruction and Reversing training public slidesAccelerated Disassembly, Reconstruction and Reversing training public slides
Accelerated Disassembly, Reconstruction and Reversing training public slides
 
MOND Semantics Integration
MOND Semantics IntegrationMOND Semantics Integration
MOND Semantics Integration
 
Productivity mdd mdb_code_centric
Productivity mdd mdb_code_centricProductivity mdd mdb_code_centric
Productivity mdd mdb_code_centric
 
Our research lines on Model-Driven Engineering and Software Engineering
Our research lines on Model-Driven Engineering and Software EngineeringOur research lines on Model-Driven Engineering and Software Engineering
Our research lines on Model-Driven Engineering and Software Engineering
 
FASE08.ppt
FASE08.pptFASE08.ppt
FASE08.ppt
 
Model-Driven Development for Safety-Critical Software
Model-Driven Development for Safety-Critical SoftwareModel-Driven Development for Safety-Critical Software
Model-Driven Development for Safety-Critical Software
 
DAE Tools 1.8.0 - Introduction
DAE Tools 1.8.0 - IntroductionDAE Tools 1.8.0 - Introduction
DAE Tools 1.8.0 - Introduction
 
2014 01-ticosa
2014 01-ticosa2014 01-ticosa
2014 01-ticosa
 
A Lightweight MDD Process Applied in Small Projects
A Lightweight MDD Process Applied in Small ProjectsA Lightweight MDD Process Applied in Small Projects
A Lightweight MDD Process Applied in Small Projects
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
 
Architecture Design Decisions and Group Decision Making
Architecture Design Decisions and Group Decision MakingArchitecture Design Decisions and Group Decision Making
Architecture Design Decisions and Group Decision Making
 
Ecoop05 woo ra.ppt
Ecoop05 woo ra.pptEcoop05 woo ra.ppt
Ecoop05 woo ra.ppt
 
ECOOP05 WOORa.ppt
ECOOP05 WOORa.pptECOOP05 WOORa.ppt
ECOOP05 WOORa.ppt
 
Model driven engineering for big data management systems
Model driven engineering for big data management systemsModel driven engineering for big data management systems
Model driven engineering for big data management systems
 
CISQ and Software Quality Measurement - Software Assurance Forum (March 2010)
CISQ and Software Quality Measurement - Software Assurance Forum (March 2010)CISQ and Software Quality Measurement - Software Assurance Forum (March 2010)
CISQ and Software Quality Measurement - Software Assurance Forum (March 2010)
 

Más de Ptidej Team

From IoT to Software Miniaturisation
From IoT to Software MiniaturisationFrom IoT to Software Miniaturisation
From IoT to Software MiniaturisationPtidej Team
 
Presentation by Lionel Briand
Presentation by Lionel BriandPresentation by Lionel Briand
Presentation by Lionel BriandPtidej Team
 
Manel Abdellatif
Manel AbdellatifManel Abdellatif
Manel AbdellatifPtidej Team
 
Azadeh Kermansaravi
Azadeh KermansaraviAzadeh Kermansaravi
Azadeh KermansaraviPtidej Team
 
CSED - Manel Grichi
CSED - Manel GrichiCSED - Manel Grichi
CSED - Manel GrichiPtidej Team
 
Cristiano Politowski
Cristiano PolitowskiCristiano Politowski
Cristiano PolitowskiPtidej Team
 
Will io t trigger the next software crisis
Will io t trigger the next software crisisWill io t trigger the next software crisis
Will io t trigger the next software crisisPtidej Team
 
Thesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptThesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptPtidej Team
 
Thesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptThesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptPtidej Team
 

Más de Ptidej Team (20)

From IoT to Software Miniaturisation
From IoT to Software MiniaturisationFrom IoT to Software Miniaturisation
From IoT to Software Miniaturisation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation by Lionel Briand
Presentation by Lionel BriandPresentation by Lionel Briand
Presentation by Lionel Briand
 
Manel Abdellatif
Manel AbdellatifManel Abdellatif
Manel Abdellatif
 
Azadeh Kermansaravi
Azadeh KermansaraviAzadeh Kermansaravi
Azadeh Kermansaravi
 
Mouna Abidi
Mouna AbidiMouna Abidi
Mouna Abidi
 
CSED - Manel Grichi
CSED - Manel GrichiCSED - Manel Grichi
CSED - Manel Grichi
 
Cristiano Politowski
Cristiano PolitowskiCristiano Politowski
Cristiano Politowski
 
Will io t trigger the next software crisis
Will io t trigger the next software crisisWill io t trigger the next software crisis
Will io t trigger the next software crisis
 
MIPA
MIPAMIPA
MIPA
 
Thesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.pptThesis+of+laleh+eshkevari.ppt
Thesis+of+laleh+eshkevari.ppt
 
Thesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.pptThesis+of+nesrine+abdelkafi.ppt
Thesis+of+nesrine+abdelkafi.ppt
 
Medicine15.ppt
Medicine15.pptMedicine15.ppt
Medicine15.ppt
 
Qrs17b.ppt
Qrs17b.pptQrs17b.ppt
Qrs17b.ppt
 
Icpc11c.ppt
Icpc11c.pptIcpc11c.ppt
Icpc11c.ppt
 
Icsme16.ppt
Icsme16.pptIcsme16.ppt
Icsme16.ppt
 
Msr17a.ppt
Msr17a.pptMsr17a.ppt
Msr17a.ppt
 
Icsoc15.ppt
Icsoc15.pptIcsoc15.ppt
Icsoc15.ppt
 

Último

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 

Último (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 

Automatic Generation of Detection Algorithms for Design Defects (Blob, Spaghetti Code

  • 1. Automatic Generation of Detection Algorithms for Design Defects Naouel Moha, Yann-Gaël Guéhéneuc, Pierre Leduc Ptidej team, GEODES, University of Montreal, Canada LIFL, INRIA project Jacquard, University of Lille, France CASCON 2006 October 17-20, 2006, Toronto, Canada
  • 2. Context  Design Patterns are “good” solutions to recurring design problems  Design Defects (DDs)    are “bad” solutions to recurring problems 2 categories:  High-level (global) problems: antipatterns [BRO 98]  Low-level (local) problems: code smells [FOW 99] Why it is important to detect DDs ?    DDs lessen the quality of OO architectures and impede their evolution and their maintenance Maintenance is expensive because of DDs [PER 92] : adding, debugging, and evolving of features are difficult A good software architecture without DDs: easier to understand, change, and thus maintain Moha © ASE 2006 Automatic Generation of Detection Algorithms for Design Defects 2
  • 3. Context  2 examples of high-level DDs  Blob  Large controller class  Many fields and methods with a low cohesion*  Dependent on the data stored in associated data classes *How closely the methods are related to the instance variables in the class. Measure: LCOM (Lack of Cohesion Metric) Moha © ASE 2006 Automatic Generation of Detection Algorithms for Design Defects 3
  • 4. Context  2 examples of high-level DDs  Spaghetti Code   Lack of structure : no inheritance, no reuse, no polymorphism  Long process-oriented methods with no parameters and low cohesion  Moha © ASE 2006 Procedural thinking in OO programming Excessive use of class and global variables for processing Automatic Generation of Detection Algorithms for Design Defects 4
  • 5. Problem Description  What are the problems ?  Textual descriptions of DDs [Brown 98] [Fowler 99]    Lack of precision and misinterpretations Difficult to build detection algorithms from textual descriptions Lack of precise specifications and tools: metrics only [Marinescu 04] [Tools: SmallLint, PMD]   Lack of work on high-level DDs   Metrics only : metrics cannot express important structural and semantic properties Focus only on low-level DDs (code smells) Semi-manual detection [Marinescu 04] [Munro 05] Moha © ASE 2006 Automatic Generation of Detection Algorithms for Design Defects 5
  • 6. Solution  How to address these problems ?    We propose a language and a framework to specify precisely high-level DDs in order to ease and automate their detection We define a systematic method, called DECOR, to specify high-level DDs significantly and to generate detection and correction algorithms from the specifications of DDs Method in 10 steps Moha © ASE 2006 Automatic Generation of Detection Algorithms for Design Defects 6
  • 7. Our Approach We define a systematic method, called DECOR, to specify high-level DDs significantly and to generate detection and correction algorithms from the specifications of DDs  Illustration with the Blob  Blob   Many fields and methods with a low cohesion  Moha © ASE 2006 Large controller class Dependent on the data stored in data classes associated Automatic Generation of Detection Algorithms for Design Defects 7
  • 8. Specification of Design Defects Rule Cards  More structured description RULE_CARD : Blob { RULE : Blob {ASSOC: associated FROM: MainClass ONE TO: DataClass MANY } ; RULE : MainClass {UNION LargeClassLowCohesion ControllerClass } ; RULE : LargeClassLowCohesion {UNION LargeClass LowCohesion } ; RULE : LargeClass { (METRIC: NMD + NAD, VERY_HIGH) } ; RULE : LowCohesion { (METRIC: LCOM5, VERY_HIGH) } ; RULE : ControllerClass {UNION (SEMANTIC: METHODNAME, {Process, Main, Ctrl}) (SEMANTIC: CLASSNAME, {Process, Main, Ctrl)}; RULE : DataClass { (STRUCT: METHOD, Accessor) } ; } ; Moha © ASE 2006 Automatic Generation of Detection Algorithms for Design Defects 8
  • 9. Generation of Detection Algorithms  SAD Framework (Software Architectural Defects)       A meta-model to instantiate rule cards of DDs A parser to analyse and reify rule cards A repository of metrics Services to analyse structural relationships Services to perform semantic and structural analyses Concrete Generation 1. Parse the rule card 2. Build a model representing this rule card 3. Visit the model of the rule card 4. Generate the detection algorithm Moha © ASE 2006 Automatic Generation of Detection Algorithms for Design Defects 9
  • 10. Our Approach We define a systematic method, called DECOR, to specify high-level DDs significantly and to generate detection and correction algorithms from the specifications of DDs Method in 10 steps Moha © ASE 2006 Automatic Generation of Detection Algorithms for Design Defects 10
  • 11. Preliminary Results We specify and detect DDs in several open-source programs Blob ArgoUML Precisions Time GanttProject PMD QuickUML 113 KLOC 1230 classes Effectifs Azureus 192 KLOC 1449 classes 22 KLOC 188 classes 42 KLOC 423 classes 9 KLOC 142 classes Total 91 143 19 15 3 271 70/91 = 76.9% 82/143 = 57.3% 10/19 = 52.6% 3/15 = 20% 1/3 = 33.3% 166/271 = 61.5% 40.5s 2m 5.6s 31.6s 2.1s 3m 19.8s Spaghetti Code ArgoUML Effectifs Precisions Time Azureus GanttProject PMD QuickUML Total 26 35 8 11 1 81 21/26 = 80.7% 29/35 = 82.8% 6/8 = 75% 6/11 = 54.5% 0/1 = 0% 62/81 = 76.6% 39s 1m55s 5.4s 31s 1.9s 3m12s  Results are encouraging !  Moha © ASE 2006 Automatic Generation of Detection Algorithms for Design Defects 11
  • 12. Conclusion  Contributions  Meta-model enriched with semantic and structural properties  Rule-based Language & Framework  Method DECOR in 10 steps  Our approach   A systematic method based on a meta-model and a rule-based language to generate automatically detection and correction algos of high-level DDs Future Work    Correction of DDs More defects and case studies including commercial programs Use of a dictionnary such as WordNet for semantics Moha © ASE 2006 Automatic Generation of Detection Algorithms for Design Defects 12