SlideShare a Scribd company logo
1 of 29
Download to read offline
Refactorings of Design Defects usingRefactorings of Design Defects using
Relational Concept Analysis
Naouel Moha, Amine Mohamed Rouane Hacene,
LORIA, France
Petko Valtchev, and Yann-Gaël Guéhéneuc
DIRO, University of Montréal, Canada
LATECE, Université du Québec à Montréal, Montréal, Canada
ICFCA’08
Montréal (Qc), Canada, February 25-28, 2008
Context
Moha © Refactorings of Design Defects using RCA 2
Context
Moha © Refactorings of Design Defects using RCA 3
Context
Moha © Refactorings of Design Defects using RCA 4
Context: Overall Process
Textual descriptions
S
P
Textual descriptions
of design defects
S
1 3
E
C
I
F
I
C
A
S
U
G
G
E
S
T
I
A
T
I
O
N
Rules
I
O
N
RefactoringsRules
D
E
T
E
C
O
R
R
E
Refactorings
2 4
C
T
I
O
N
E
C
T
I
O
N
Moha © Refactorings of Design Defects using RCA 5
Classes having
design defects
Better
Design
Context: Overall Process
Textual descriptions
S
P
Textual descriptions
of design defects
S
1 3
E
C
I
F
I
C
A
S
U
G
G
E
S
T
I
A
T
I
O
N
Rules
I
O
N
RefactoringsRules
D
E
T
E
C
O
R
R
E
Refactorings
2 4
C
T
I
O
N
E
C
T
I
O
N
Moha © Refactorings of Design Defects using RCA 6
Classes having
design defects
Better
Design
Context: Overall Process
1-2. Specification and Detection of DDs
More and more tools and techniques
Actively researched area
Method DECOR (Defect dEtection for CORrection) [Moha 06]
3 S ti3. Suggestion
Manual identification of the modifications
Time-, resource-consuming, error-prone activity, g, p y
4. Correction
Refactoringsg
Technique used to change “the internal structure of software to make it
easier to understand and cheaper to modify without changing its
observable behavior”
Moha © Refactorings of Design Defects using RCA 7
What Kind of Defects ?
Design Patterns are “good” solutions to recurring design problems
Design Defects (DDs)
are “bad” solutions to recurring problems, Antipatterns [Brown 98]
hi d d l t d i t b ki h d thinder development and maintenance by making programs harder to
comprehend and/or evolve
DDs of interest: infected by low cohesion and high couplingDDs of interest: infected by low cohesion and high coupling
Cohesion: how closely the methods are related to the variables in
the class
Coupling: the degree of its reliance on services provided by other
classes
Moha © Refactorings of Design Defects using RCA 8
What Kind of Defects ?
An example of DDs [Brown 98]
Blob (God Class)
“ Procedural-style design leads to one object with a
lion’s share of the responsibilities while most other
objects only hold data or execute simple processes ”
Large controller class
Many fields and methods with a low cohesion
High coupled with the data stored in
associated data classes
Moha © Refactorings of Design Defects using RCA 9
An Example
Blob
Before
Moha © Refactorings of Design Defects using RCA 10
An Example
H t t th d f t ?How to correct the defect ?
Before After
Large class becomes less complexLarge and complex class
Moha © Refactorings of Design Defects using RCA 11
Data classes gain more behaviour
More object-oriented style
Small data classes
Not object-oriented
An Example
R di t ib t l b i ti l ( ith iblRedistribute class members among existing classes (with possibly
new classes) to increase cohesion and–or decrease coupling
Before After
Moha © Refactorings of Design Defects using RCA 12
Contribution
Suggestion
RCA [Rouane 07, Ph.D. Thesis]
E i f FCA l i l dExtension of FCA to relational data
Models the inter-object links and infers description logics role like
relations between concepts
RCA provides a suitable framework for clustering individuals along
the properties they share and their links with other individuals
Identify methods that share common fields and methods that call
common methods cohesive sets low coupled
Moha © Refactorings of Design Defects using RCA 13
Contribution
Suggestion
RCA [Rouane 07, Ph.D. Thesis]
E i f FCA l i l dExtension of FCA to relational data
Models the inter-object links and infers description logics role like
relations between concepts
RCA provides a suitable framework for clustering individuals along
the properties they share and their links with other individuals
Identify methods that share common fields and methods that call
common methods cohesive sets low coupled
D l t t d h f ti d f t« Develop an automated approach for suggesting defect-
correcting refactorings using RCA »
Moha © Refactorings of Design Defects using RCA 14
An Example
H t t th d f t ?How to correct the defect ?
Before After
Large class becomes less complexLarge and complex class
Moha © Refactorings of Design Defects using RCA 15
Data classes gain more behaviour
More object-oriented style
Small data classes
Not object-oriented
An Example
H t t th d f t ?How to correct the defect ?
Cohesive SetsBlob
Moha © Refactorings of Design Defects using RCA 16
An Example
H t t th d f t ?How to correct the defect ?
I = {W-borrow_date_Book, W-return_date_book}
E = {}
I = {call:c4}
I = {‘check_Availability_Book()’}
E = {check_Availability_Book()}
E {}
I = {‘reserve_Book()’, W-reserved_book}
E = {reserve_Book()}
I = {‘borrow_Book()’}
E = {borrow_Book()}
I {call:c4}
E = {}
Lattice Cohesive Set
Moha © Refactorings of Design Defects using RCA 17
An Example
H t t th d f t ?How to correct the defect ?
Cohesive Sets After Refactoring *
* Move Method Mode Field Create Class
Moha © Refactorings of Design Defects using RCA 18
Move Method, Mode Field, Create Class
Suggestion
Moha © Refactorings of Design Defects using RCA 19
Suggestion
1. RCF Modeling
Moha © Refactorings of Design Defects using RCA 20
Suggestion
RCA Al ith2. RCA Algorithms
Moha © Refactorings of Design Defects using RCA 21
Suggestion
RCA Al ith2. RCA Algorithms
I = {W-library opened}
9
I {W library_opened}
E = { }
I = {‘open_Library()’}
E = {open Library()}
10
I = {‘close_Library()’}
E = {close_Library()}
7
E {open_Library()}
Moha © Refactorings of Design Defects using RCA 22
Suggestion
RCA Al ith2. RCA Algorithms
Moha © Refactorings of Design Defects using RCA 23
Suggestion
RCA Al ith2. RCA Algorithms
I = {‘check_Availability_Book()’}
E = {check_Availability_Book()}
4
I = {call:c4}
E = { }
19
I = {‘reserve_Book()’,W-reserved_book}
E = {reserve_Book()}
12
I = {‘borrow_Book()’}
E = {borrow_Book() }
3
Moha © Refactorings of Design Defects using RCA 24
Suggestion
3. Interpretation
Cohesive Sets After RefactoringCohesive Sets After Refactoring
* Move Method Mode Field Create Class
Moha © Refactorings of Design Defects using RCA 25
Move Method, Mode Field, Create Class
Experimental Study
Tooling
PADL to model source code and generate contexts
Galicia to construct and visualize the concept lattices
E i tExperiments
Goal: evaluate the relevance of the cohesive sets suggested
4 different open-source programs
Moha © Refactorings of Design Defects using RCA 26
Experimental Study
Precision
Nb of real
cohesive
sets
Nb of
cohesive
sets
Nb of fields/
methods
moved
Size (fields +
methods)
LOCBlob Class
System
70%710(27+32) 59(42+66) 1082,049DHTTransportUDPImpl
Azureus
V2.3.0.6
58%1119(35+62) 97(47+80) 1271,868DHTControlImpl
31%516(24+33) 57(36+47) 831,393TRTrackerBTAnnouncerImpl
55%1731(23+85) 108(29+105)1341,142LogBrokerMonitor
Log4j
V1.2.1
50%918(8+44) 52(9+53) 62387Category
50%24(5+30) 35(7+52) 59236IndexReader
ene
.4
Luce
V1
77%1013(24+37) 61(36+48) 84829QueryParser
50%918(17+25) 42(24+35) 59710FSNamesystem
Nutch
V0.7.1
73%811(17+18) 35(22+31) 53555JobTracker ( )( )
57%Average Precision:
Moha © Refactorings of Design Defects using RCA 27
Conclusion
Contribution
an approach that uses RCA to suggest refactorings to correct
certain DDs in particular Blobcertain DDs, in particular Blob
Validation
4 different programs
Relevant refactorings to improve programs
Future Work
- Generalise to other DDs
Assess more programs via our approach- Assess more programs via our approach
- Discuss the suggested refactorings with their developers and
apply them
Moha © Refactorings of Design Defects using RCA 28
Questions
Contact: mohanaou@iro.umontreal.ca
http://www-etud.iro.umontreal.ca/~mohanaou
Thanks for your attention !
Moha © Refactorings of Design Defects using RCA 29
Thanks for your attention !

More Related Content

Similar to Icfca08.ppt

XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...Alessandro Confetti
 
Design patters java_meetup_slideshare [compatibility mode]
Design patters java_meetup_slideshare [compatibility mode]Design patters java_meetup_slideshare [compatibility mode]
Design patters java_meetup_slideshare [compatibility mode]Dimitris Dranidis
 
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdfcNguyn506241
 
Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...
Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...
Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...inside-BigData.com
 
LIFT: A Legacy InFormation retrieval Tool
LIFT: A Legacy InFormation retrieval ToolLIFT: A Legacy InFormation retrieval Tool
LIFT: A Legacy InFormation retrieval ToolKellyton Brito
 
HIT3328 - Chapter0701 - Dialogs, Tabs and Lists
HIT3328 - Chapter0701 - Dialogs, Tabs and ListsHIT3328 - Chapter0701 - Dialogs, Tabs and Lists
HIT3328 - Chapter0701 - Dialogs, Tabs and ListsYhal Htet Aung
 
Machine Learning Meets Quantitative Planning: Enabling Self-Adaptation in Aut...
Machine Learning Meets Quantitative Planning: Enabling Self-Adaptation in Aut...Machine Learning Meets Quantitative Planning: Enabling Self-Adaptation in Aut...
Machine Learning Meets Quantitative Planning: Enabling Self-Adaptation in Aut...Pooyan Jamshidi
 
Data Analysis and Visualization: R Workflow
Data Analysis and Visualization: R WorkflowData Analysis and Visualization: R Workflow
Data Analysis and Visualization: R WorkflowOlga Scrivner
 
Part 2 question 1 provide a technical description of 4b5b d
Part 2 question 1 provide a technical description of 4b5b dPart 2 question 1 provide a technical description of 4b5b d
Part 2 question 1 provide a technical description of 4b5b dDIPESH30
 
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...jaxLondonConference
 
Natural Language to SQL Query conversion using Machine Learning Techniques on...
Natural Language to SQL Query conversion using Machine Learning Techniques on...Natural Language to SQL Query conversion using Machine Learning Techniques on...
Natural Language to SQL Query conversion using Machine Learning Techniques on...HPCC Systems
 
CMPT470-usask-guest-lecture
CMPT470-usask-guest-lectureCMPT470-usask-guest-lecture
CMPT470-usask-guest-lectureMasud Rahman
 
The Download: Tech Talks by the HPCC Systems Community, Episode 16
The Download: Tech Talks by the HPCC Systems Community, Episode 16The Download: Tech Talks by the HPCC Systems Community, Episode 16
The Download: Tech Talks by the HPCC Systems Community, Episode 16HPCC Systems
 
Fractal analysis of good programming style
Fractal analysis of good programming styleFractal analysis of good programming style
Fractal analysis of good programming stylecsandit
 
FRACTAL ANALYSIS OF GOOD PROGRAMMING STYLE
FRACTAL ANALYSIS OF GOOD PROGRAMMING STYLEFRACTAL ANALYSIS OF GOOD PROGRAMMING STYLE
FRACTAL ANALYSIS OF GOOD PROGRAMMING STYLEcscpconf
 
Selected design patterns (as part of the the PTT lecture)
Selected design patterns (as part of the the PTT lecture)Selected design patterns (as part of the the PTT lecture)
Selected design patterns (as part of the the PTT lecture)Ralf Laemmel
 

Similar to Icfca08.ppt (20)

Cla06.ppt
Cla06.pptCla06.ppt
Cla06.ppt
 
CLA06.ppt
CLA06.pptCLA06.ppt
CLA06.ppt
 
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
 
Design patters java_meetup_slideshare [compatibility mode]
Design patters java_meetup_slideshare [compatibility mode]Design patters java_meetup_slideshare [compatibility mode]
Design patters java_meetup_slideshare [compatibility mode]
 
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
49.INS2065.Computer Based Technologies.TA.NguyenDucAnh.pdf
 
Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...
Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...
Abstractions and Directives for Adapting Wavefront Algorithms to Future Archi...
 
LIFT: A Legacy InFormation retrieval Tool
LIFT: A Legacy InFormation retrieval ToolLIFT: A Legacy InFormation retrieval Tool
LIFT: A Legacy InFormation retrieval Tool
 
HIT3328 - Chapter0701 - Dialogs, Tabs and Lists
HIT3328 - Chapter0701 - Dialogs, Tabs and ListsHIT3328 - Chapter0701 - Dialogs, Tabs and Lists
HIT3328 - Chapter0701 - Dialogs, Tabs and Lists
 
Machine Learning Meets Quantitative Planning: Enabling Self-Adaptation in Aut...
Machine Learning Meets Quantitative Planning: Enabling Self-Adaptation in Aut...Machine Learning Meets Quantitative Planning: Enabling Self-Adaptation in Aut...
Machine Learning Meets Quantitative Planning: Enabling Self-Adaptation in Aut...
 
Clotho: Saving Programs from Malformed Strings and Incorrect String-handling
Clotho: Saving Programs from Malformed Strings and Incorrect String-handling�Clotho: Saving Programs from Malformed Strings and Incorrect String-handling�
Clotho: Saving Programs from Malformed Strings and Incorrect String-handling
 
Data Analysis and Visualization: R Workflow
Data Analysis and Visualization: R WorkflowData Analysis and Visualization: R Workflow
Data Analysis and Visualization: R Workflow
 
Part 2 question 1 provide a technical description of 4b5b d
Part 2 question 1 provide a technical description of 4b5b dPart 2 question 1 provide a technical description of 4b5b d
Part 2 question 1 provide a technical description of 4b5b d
 
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
 
Natural Language to SQL Query conversion using Machine Learning Techniques on...
Natural Language to SQL Query conversion using Machine Learning Techniques on...Natural Language to SQL Query conversion using Machine Learning Techniques on...
Natural Language to SQL Query conversion using Machine Learning Techniques on...
 
CMPT470-usask-guest-lecture
CMPT470-usask-guest-lectureCMPT470-usask-guest-lecture
CMPT470-usask-guest-lecture
 
Enase20.ppt
Enase20.pptEnase20.ppt
Enase20.ppt
 
The Download: Tech Talks by the HPCC Systems Community, Episode 16
The Download: Tech Talks by the HPCC Systems Community, Episode 16The Download: Tech Talks by the HPCC Systems Community, Episode 16
The Download: Tech Talks by the HPCC Systems Community, Episode 16
 
Fractal analysis of good programming style
Fractal analysis of good programming styleFractal analysis of good programming style
Fractal analysis of good programming style
 
FRACTAL ANALYSIS OF GOOD PROGRAMMING STYLE
FRACTAL ANALYSIS OF GOOD PROGRAMMING STYLEFRACTAL ANALYSIS OF GOOD PROGRAMMING STYLE
FRACTAL ANALYSIS OF GOOD PROGRAMMING STYLE
 
Selected design patterns (as part of the the PTT lecture)
Selected design patterns (as part of the the PTT lecture)Selected design patterns (as part of the the PTT lecture)
Selected design patterns (as part of the the PTT lecture)
 

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

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

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

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

Recently uploaded

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 ...OnePlan Solutions
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
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...panagenda
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
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-...Steffen Staab
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
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...ICS
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
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.pdfkalichargn70th171
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
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 GoalsJhone kinadey
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 

Recently uploaded (20)

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 ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
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...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
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-...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
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
 
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...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
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
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
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
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 

Icfca08.ppt

  • 1. Refactorings of Design Defects usingRefactorings of Design Defects using Relational Concept Analysis Naouel Moha, Amine Mohamed Rouane Hacene, LORIA, France Petko Valtchev, and Yann-Gaël Guéhéneuc DIRO, University of Montréal, Canada LATECE, Université du Québec à Montréal, Montréal, Canada ICFCA’08 Montréal (Qc), Canada, February 25-28, 2008
  • 2. Context Moha © Refactorings of Design Defects using RCA 2
  • 3. Context Moha © Refactorings of Design Defects using RCA 3
  • 4. Context Moha © Refactorings of Design Defects using RCA 4
  • 5. Context: Overall Process Textual descriptions S P Textual descriptions of design defects S 1 3 E C I F I C A S U G G E S T I A T I O N Rules I O N RefactoringsRules D E T E C O R R E Refactorings 2 4 C T I O N E C T I O N Moha © Refactorings of Design Defects using RCA 5 Classes having design defects Better Design
  • 6. Context: Overall Process Textual descriptions S P Textual descriptions of design defects S 1 3 E C I F I C A S U G G E S T I A T I O N Rules I O N RefactoringsRules D E T E C O R R E Refactorings 2 4 C T I O N E C T I O N Moha © Refactorings of Design Defects using RCA 6 Classes having design defects Better Design
  • 7. Context: Overall Process 1-2. Specification and Detection of DDs More and more tools and techniques Actively researched area Method DECOR (Defect dEtection for CORrection) [Moha 06] 3 S ti3. Suggestion Manual identification of the modifications Time-, resource-consuming, error-prone activity, g, p y 4. Correction Refactoringsg Technique used to change “the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior” Moha © Refactorings of Design Defects using RCA 7
  • 8. What Kind of Defects ? Design Patterns are “good” solutions to recurring design problems Design Defects (DDs) are “bad” solutions to recurring problems, Antipatterns [Brown 98] hi d d l t d i t b ki h d thinder development and maintenance by making programs harder to comprehend and/or evolve DDs of interest: infected by low cohesion and high couplingDDs of interest: infected by low cohesion and high coupling Cohesion: how closely the methods are related to the variables in the class Coupling: the degree of its reliance on services provided by other classes Moha © Refactorings of Design Defects using RCA 8
  • 9. What Kind of Defects ? An example of DDs [Brown 98] Blob (God Class) “ Procedural-style design leads to one object with a lion’s share of the responsibilities while most other objects only hold data or execute simple processes ” Large controller class Many fields and methods with a low cohesion High coupled with the data stored in associated data classes Moha © Refactorings of Design Defects using RCA 9
  • 10. An Example Blob Before Moha © Refactorings of Design Defects using RCA 10
  • 11. An Example H t t th d f t ?How to correct the defect ? Before After Large class becomes less complexLarge and complex class Moha © Refactorings of Design Defects using RCA 11 Data classes gain more behaviour More object-oriented style Small data classes Not object-oriented
  • 12. An Example R di t ib t l b i ti l ( ith iblRedistribute class members among existing classes (with possibly new classes) to increase cohesion and–or decrease coupling Before After Moha © Refactorings of Design Defects using RCA 12
  • 13. Contribution Suggestion RCA [Rouane 07, Ph.D. Thesis] E i f FCA l i l dExtension of FCA to relational data Models the inter-object links and infers description logics role like relations between concepts RCA provides a suitable framework for clustering individuals along the properties they share and their links with other individuals Identify methods that share common fields and methods that call common methods cohesive sets low coupled Moha © Refactorings of Design Defects using RCA 13
  • 14. Contribution Suggestion RCA [Rouane 07, Ph.D. Thesis] E i f FCA l i l dExtension of FCA to relational data Models the inter-object links and infers description logics role like relations between concepts RCA provides a suitable framework for clustering individuals along the properties they share and their links with other individuals Identify methods that share common fields and methods that call common methods cohesive sets low coupled D l t t d h f ti d f t« Develop an automated approach for suggesting defect- correcting refactorings using RCA » Moha © Refactorings of Design Defects using RCA 14
  • 15. An Example H t t th d f t ?How to correct the defect ? Before After Large class becomes less complexLarge and complex class Moha © Refactorings of Design Defects using RCA 15 Data classes gain more behaviour More object-oriented style Small data classes Not object-oriented
  • 16. An Example H t t th d f t ?How to correct the defect ? Cohesive SetsBlob Moha © Refactorings of Design Defects using RCA 16
  • 17. An Example H t t th d f t ?How to correct the defect ? I = {W-borrow_date_Book, W-return_date_book} E = {} I = {call:c4} I = {‘check_Availability_Book()’} E = {check_Availability_Book()} E {} I = {‘reserve_Book()’, W-reserved_book} E = {reserve_Book()} I = {‘borrow_Book()’} E = {borrow_Book()} I {call:c4} E = {} Lattice Cohesive Set Moha © Refactorings of Design Defects using RCA 17
  • 18. An Example H t t th d f t ?How to correct the defect ? Cohesive Sets After Refactoring * * Move Method Mode Field Create Class Moha © Refactorings of Design Defects using RCA 18 Move Method, Mode Field, Create Class
  • 19. Suggestion Moha © Refactorings of Design Defects using RCA 19
  • 20. Suggestion 1. RCF Modeling Moha © Refactorings of Design Defects using RCA 20
  • 21. Suggestion RCA Al ith2. RCA Algorithms Moha © Refactorings of Design Defects using RCA 21
  • 22. Suggestion RCA Al ith2. RCA Algorithms I = {W-library opened} 9 I {W library_opened} E = { } I = {‘open_Library()’} E = {open Library()} 10 I = {‘close_Library()’} E = {close_Library()} 7 E {open_Library()} Moha © Refactorings of Design Defects using RCA 22
  • 23. Suggestion RCA Al ith2. RCA Algorithms Moha © Refactorings of Design Defects using RCA 23
  • 24. Suggestion RCA Al ith2. RCA Algorithms I = {‘check_Availability_Book()’} E = {check_Availability_Book()} 4 I = {call:c4} E = { } 19 I = {‘reserve_Book()’,W-reserved_book} E = {reserve_Book()} 12 I = {‘borrow_Book()’} E = {borrow_Book() } 3 Moha © Refactorings of Design Defects using RCA 24
  • 25. Suggestion 3. Interpretation Cohesive Sets After RefactoringCohesive Sets After Refactoring * Move Method Mode Field Create Class Moha © Refactorings of Design Defects using RCA 25 Move Method, Mode Field, Create Class
  • 26. Experimental Study Tooling PADL to model source code and generate contexts Galicia to construct and visualize the concept lattices E i tExperiments Goal: evaluate the relevance of the cohesive sets suggested 4 different open-source programs Moha © Refactorings of Design Defects using RCA 26
  • 27. Experimental Study Precision Nb of real cohesive sets Nb of cohesive sets Nb of fields/ methods moved Size (fields + methods) LOCBlob Class System 70%710(27+32) 59(42+66) 1082,049DHTTransportUDPImpl Azureus V2.3.0.6 58%1119(35+62) 97(47+80) 1271,868DHTControlImpl 31%516(24+33) 57(36+47) 831,393TRTrackerBTAnnouncerImpl 55%1731(23+85) 108(29+105)1341,142LogBrokerMonitor Log4j V1.2.1 50%918(8+44) 52(9+53) 62387Category 50%24(5+30) 35(7+52) 59236IndexReader ene .4 Luce V1 77%1013(24+37) 61(36+48) 84829QueryParser 50%918(17+25) 42(24+35) 59710FSNamesystem Nutch V0.7.1 73%811(17+18) 35(22+31) 53555JobTracker ( )( ) 57%Average Precision: Moha © Refactorings of Design Defects using RCA 27
  • 28. Conclusion Contribution an approach that uses RCA to suggest refactorings to correct certain DDs in particular Blobcertain DDs, in particular Blob Validation 4 different programs Relevant refactorings to improve programs Future Work - Generalise to other DDs Assess more programs via our approach- Assess more programs via our approach - Discuss the suggested refactorings with their developers and apply them Moha © Refactorings of Design Defects using RCA 28
  • 29. Questions Contact: mohanaou@iro.umontreal.ca http://www-etud.iro.umontreal.ca/~mohanaou Thanks for your attention ! Moha © Refactorings of Design Defects using RCA 29 Thanks for your attention !