SlideShare a Scribd company logo
Mendel:
A Model, Metrics, and Rules
to Understand Class Hierarchies
Simon Denier & Yann-Gaël Guéhéneuc
Ptidej Team – Université de Montréal
ICPC 2008 12/06/2008
22 / 28/ 28
Outline
 Motivation and Problem
 Mendel Model
 Interesting Classes
 Subclassing Behaviors
 Conclusion
33 / 28/ 28
Motivation
 Context: maintenance of program without documentation
 Task: identify and understand the role of multiple classes
 Problem 1: where to start?
 Find entry points (main(...))
 Read large classes (by LOC or Number of Methods)
 Problem 2: what about inheritance?
44 / 28/ 28
Problem: Class Hierarchies
 Classes defined incrementally by inheritance
 Class “interesting” in its own hierarchy
 Class profiting from its hierarchy
55 / 28/ 28
Class Hierarchies
JHotDraw
5.2
66 / 28/ 28
Class Hierarchies (2)
Azureus
2.4.0.2
77 / 28/ 28
Outline
 Motivation and Problem
 Mendel Model
 Interesting Classes
 Subclassing Behaviors
 Conclusion
88 / 28/ 28
Mendel Approach
 Goal: insights on class hierarchies
 Interesting classes in their own hierarchy
 Subclassing behaviors: extending (adding) vs overriding
 Characteristics (requirements) of our approach
 Early stage in maintenance
 Intuitive
 Fast
99 / 28/ 28
Mendel: Generic Model
A
foo()
bar()
B
bar()
zorg()
Simple UML
bar()
foo()
zorg()New
Overridden
Inherited
Super
Local
Total
B
Mendel
1010 / 28/ 28
Mendel: Metrics and Rules
 Simple metrics:
 Based on interfaces = sets of method signatures
 Computed on a single class or a hierarchy
 Rules for:
 Selection (threshold)
 Classification
 Comprehension (rule of thumb)
1111 / 28/ 28
Outline
 Motivation and Problem
 Mendel Model
 Interesting Classes
 Subclassing Behaviors
 Conclusion
1212 / 28/ 28
Interesting Classes
 Classes defining a lot of new behaviors
 Large class: overall system
 Budding class: with respect to its hierarchy
 Blooming class: large and budding
1313 / 28/ 28
Large Class
 Class with a large interface
 Large Class: |Local| > threshold( |Local| )
 JHotDraw
1.StandardDrawingView (inherits from JPanel), 55 methods
2.DrawApplication (inherits from JFrame), 53 methods
3.AbstractFigure (inherits from Object), 34 methods
1414 / 28/ 28
Budding Class
 Class with a large interface with respect to its hierarchy
 Metrics:
 Branch Mean Size – bms = |Total| / (DIT + 1)
 Novelty Index – nvi = |Local| / bms(superclass)
 Budding class: nvi > threshold(nvi)
 JHotDraw
1.AbstractFigure, 3.09
2.TextFigure, 1.84
3.PolygonFigure, 1.59
1515 / 28/ 28
Blooming Class
 Synthesis: combining large and budding
 Novelty Score – nvs = |Local| × nvi
 Blooming Class: nvs > threshold(nvs)
 JHotDraw
1.AbstractFigure, 105.09
2.TextFigure, 55.1
3.LineConnection, 49.55
1616 / 28/ 28
JHotDraw Overview with Mendel
 JHotDraw 5.2: 148 classes
 13 large (9%)
 18 budding (12%)
 11 blooming (7%)
 Among 11 blooming classes
 8 in AbstractFigure hierarchy
 + DrawApplication, StandardDrawingView, ConnectionTool
1717 / 28/ 28
JHotDraw Base Classes
 Given documentation: 6 base classes
1818 / 28/ 28
Comparison with Documentation
 5 out of 6 in at least one set
 AbstractFigure in all 3 sets
Budding
Large
Blooming
1919 / 28/ 28
What about StandardDrawing?
 Max rank: 16th
by |Local| order
 Reason: overrider of CompositeFigure (4th
blooming class)
 Conclusion: StandardDrawing to be understood in relation
with CompositeFigure
2020 / 28/ 28
Outline
 Motivation and Problem
 Mendel Model
 Interesting Classes
 Subclassing Behaviors
 Conclusion
2121 / 28/ 28
Subclassing Behaviors
INH INHINH INH
OVR OVROVR
NEW NEW NEW
Overrider Extender Pure ExtenderPure Overrider
|NEW|=0 |OVR|≥|NEW| |NEW|>|OVR| |OVR|=0
2222 / 28/ 28
Extender vs Overrider
 Rules of thumb
 Pure extender
 Adding new methods: no access through superclass
 Used for itself
 Implementation inheritance
 Pure overrider
 Overriding methods
 Used through substitution to superclass
 Interface inheritance
2323 / 28/ 28
JHotDraw in Verso
2424 / 28/ 28
Azureus in Verso
2525 / 28/ 28
Implementation in Java
 Tailored for Java
 BCEL as class files parser
 Performance for Azureus (1681 classes)
 Standard desktop machine (2Ghz processor, 1Go memory)
 9 seconds
2626 / 28/ 28
Outline
 Motivation and Problem
 Mendel Model
 Interesting Classes
 Subclassing Behaviors
 Conclusion
2727 / 28/ 28
Conclusion
 Mendel
 Generic model
 Simple metrics
 Rules
 Results
 Quick insights on interesting classes and concerns
 Large, budding, blooming: different views of interesting classes
 Concerns: keywords in classnames
 Different usage of inheritance in programs
 Some leaned to extending (Log4J, Azureus)
 Others to overriding (JHotDraw, ArgoUML)
2828 / 28/ 28
Future Work
 Family analysis
 Family = class + children
 Common behavior and interface
 Visualisation
 Hierarchy representation
 Visual patterns
2929 / 28/ 28
ArgoUML in Verso
3030 / 28/ 28
Blooming Classes Selectivity
 Log4J: 2 of 206 (1%)
 LogBrokerMonitor (104 methods), Category
 Budding set: Appender hierarchy
 ArgoUML: 18 of 1431 (1%)
 2 very big classes: NSUMLModelFacade, FacadeMDRImpl
 Design choice: Facade design pattern
 Keywords in class names: two products, normal and MDR
 Azureus: 54 of 1681 (3%)
 Keywords in class names: three concerns, download, peer, DHT
3131 / 28/ 28
Behaviors Discrimination
 Two categories
 JHotDraw and ArgoUML: overriding behaviors
 Large proportions of Pure Overriders
 Azureus and Log4J: extending behaviors
 Azureus: 58% of classes are Pure Extenders

More Related Content

What's hot

Second subjective assignment
Second  subjective assignmentSecond  subjective assignment
Second subjective assignment
yatheeshabodumalla
 
Study of Different Multi-instance Learning kNN Algorithms
Study of Different Multi-instance Learning kNN AlgorithmsStudy of Different Multi-instance Learning kNN Algorithms
Study of Different Multi-instance Learning kNN Algorithms
Editor IJCATR
 
IRJET- Evaluation of Classification Algorithms with Solutions to Class Imbala...
IRJET- Evaluation of Classification Algorithms with Solutions to Class Imbala...IRJET- Evaluation of Classification Algorithms with Solutions to Class Imbala...
IRJET- Evaluation of Classification Algorithms with Solutions to Class Imbala...
IRJET Journal
 
MACHINE LEARNING TOOLBOX
MACHINE LEARNING TOOLBOXMACHINE LEARNING TOOLBOX
MACHINE LEARNING TOOLBOX
mlaij
 
IMPROVING SUPERVISED CLASSIFICATION OF DAILY ACTIVITIES LIVING USING NEW COST...
IMPROVING SUPERVISED CLASSIFICATION OF DAILY ACTIVITIES LIVING USING NEW COST...IMPROVING SUPERVISED CLASSIFICATION OF DAILY ACTIVITIES LIVING USING NEW COST...
IMPROVING SUPERVISED CLASSIFICATION OF DAILY ACTIVITIES LIVING USING NEW COST...
csandit
 
A short introduction to statistical learning
A short introduction to statistical learningA short introduction to statistical learning
A short introduction to statistical learning
tuxette
 
A survey on methods and applications of meta-learning with GNNs
A survey on methods and applications of meta-learning with GNNsA survey on methods and applications of meta-learning with GNNs
A survey on methods and applications of meta-learning with GNNs
Shreya Goyal
 
Statistical Pattern recognition(1)
Statistical Pattern recognition(1)Statistical Pattern recognition(1)
Statistical Pattern recognition(1)
Syed Atif Naseem
 
Cluster Analysis
Cluster AnalysisCluster Analysis
Cluster Analysis
guest0edcaf
 
2.8 accuracy and ensemble methods
2.8 accuracy and ensemble methods2.8 accuracy and ensemble methods
2.8 accuracy and ensemble methods
Krish_ver2
 
Methodological study of opinion mining and sentiment analysis techniques
Methodological study of opinion mining and sentiment analysis techniquesMethodological study of opinion mining and sentiment analysis techniques
Methodological study of opinion mining and sentiment analysis techniques
ijsc
 
Classifiers
ClassifiersClassifiers
Classifiers
Ayurdata
 
Data mining technique (decision tree)
Data mining technique (decision tree)Data mining technique (decision tree)
Data mining technique (decision tree)
Shweta Ghate
 
SVM Tutorial
SVM TutorialSVM Tutorial
SVM Tutorial
butest
 
Presentation on unsupervised learning
Presentation on unsupervised learning Presentation on unsupervised learning
Presentation on unsupervised learning
ANKUSH PAL
 
20070702 Text Categorization
20070702 Text Categorization20070702 Text Categorization
20070702 Text Categorization
midi
 
Introduction to Machine Learning Classifiers
Introduction to Machine Learning ClassifiersIntroduction to Machine Learning Classifiers
Introduction to Machine Learning Classifiers
Functional Imperative
 
Unsupervised learning clustering
Unsupervised learning clusteringUnsupervised learning clustering
Unsupervised learning clustering
Arshad Farhad
 
Cluster analysis
Cluster analysisCluster analysis
Cluster analysis
Hohai university
 

What's hot (19)

Second subjective assignment
Second  subjective assignmentSecond  subjective assignment
Second subjective assignment
 
Study of Different Multi-instance Learning kNN Algorithms
Study of Different Multi-instance Learning kNN AlgorithmsStudy of Different Multi-instance Learning kNN Algorithms
Study of Different Multi-instance Learning kNN Algorithms
 
IRJET- Evaluation of Classification Algorithms with Solutions to Class Imbala...
IRJET- Evaluation of Classification Algorithms with Solutions to Class Imbala...IRJET- Evaluation of Classification Algorithms with Solutions to Class Imbala...
IRJET- Evaluation of Classification Algorithms with Solutions to Class Imbala...
 
MACHINE LEARNING TOOLBOX
MACHINE LEARNING TOOLBOXMACHINE LEARNING TOOLBOX
MACHINE LEARNING TOOLBOX
 
IMPROVING SUPERVISED CLASSIFICATION OF DAILY ACTIVITIES LIVING USING NEW COST...
IMPROVING SUPERVISED CLASSIFICATION OF DAILY ACTIVITIES LIVING USING NEW COST...IMPROVING SUPERVISED CLASSIFICATION OF DAILY ACTIVITIES LIVING USING NEW COST...
IMPROVING SUPERVISED CLASSIFICATION OF DAILY ACTIVITIES LIVING USING NEW COST...
 
A short introduction to statistical learning
A short introduction to statistical learningA short introduction to statistical learning
A short introduction to statistical learning
 
A survey on methods and applications of meta-learning with GNNs
A survey on methods and applications of meta-learning with GNNsA survey on methods and applications of meta-learning with GNNs
A survey on methods and applications of meta-learning with GNNs
 
Statistical Pattern recognition(1)
Statistical Pattern recognition(1)Statistical Pattern recognition(1)
Statistical Pattern recognition(1)
 
Cluster Analysis
Cluster AnalysisCluster Analysis
Cluster Analysis
 
2.8 accuracy and ensemble methods
2.8 accuracy and ensemble methods2.8 accuracy and ensemble methods
2.8 accuracy and ensemble methods
 
Methodological study of opinion mining and sentiment analysis techniques
Methodological study of opinion mining and sentiment analysis techniquesMethodological study of opinion mining and sentiment analysis techniques
Methodological study of opinion mining and sentiment analysis techniques
 
Classifiers
ClassifiersClassifiers
Classifiers
 
Data mining technique (decision tree)
Data mining technique (decision tree)Data mining technique (decision tree)
Data mining technique (decision tree)
 
SVM Tutorial
SVM TutorialSVM Tutorial
SVM Tutorial
 
Presentation on unsupervised learning
Presentation on unsupervised learning Presentation on unsupervised learning
Presentation on unsupervised learning
 
20070702 Text Categorization
20070702 Text Categorization20070702 Text Categorization
20070702 Text Categorization
 
Introduction to Machine Learning Classifiers
Introduction to Machine Learning ClassifiersIntroduction to Machine Learning Classifiers
Introduction to Machine Learning Classifiers
 
Unsupervised learning clustering
Unsupervised learning clusteringUnsupervised learning clustering
Unsupervised learning clustering
 
Cluster analysis
Cluster analysisCluster analysis
Cluster analysis
 

Similar to Icpc08a.ppt

2013: Prototype-based learning and adaptive distances for classification
2013: Prototype-based learning and adaptive distances for classification2013: Prototype-based learning and adaptive distances for classification
2013: Prototype-based learning and adaptive distances for classification
University of Groningen
 
ICSE10b.ppt
ICSE10b.pptICSE10b.ppt
ICSE10b.ppt
Ptidej Team
 
Permission based group mutual exclusion
Permission based group mutual exclusionPermission based group mutual exclusion
Permission based group mutual exclusion
ijdpsjournal
 
PERMISSION BASED GROUP MUTUAL EXCLUSION ALGORITHMS FOR A CLUSTER TREE NETWORK
PERMISSION BASED GROUP MUTUAL EXCLUSION ALGORITHMS FOR A CLUSTER TREE NETWORKPERMISSION BASED GROUP MUTUAL EXCLUSION ALGORITHMS FOR A CLUSTER TREE NETWORK
PERMISSION BASED GROUP MUTUAL EXCLUSION ALGORITHMS FOR A CLUSTER TREE NETWORK
ijdpsjournal
 
MEME – An Integrated Tool For Advanced Computational Experiments
MEME – An Integrated Tool For Advanced Computational ExperimentsMEME – An Integrated Tool For Advanced Computational Experiments
MEME – An Integrated Tool For Advanced Computational Experiments
GIScRG
 
A Few Useful Things to Know about Machine Learning
A Few Useful Things to Know about Machine LearningA Few Useful Things to Know about Machine Learning
A Few Useful Things to Know about Machine Learning
nep_test_account
 
Machine Learning: Foundations Course Number 0368403401
Machine Learning: Foundations Course Number 0368403401Machine Learning: Foundations Course Number 0368403401
Machine Learning: Foundations Course Number 0368403401
butest
 
IRJET - A Survey on Machine Learning Algorithms, Techniques and Applications
IRJET - A Survey on Machine Learning Algorithms, Techniques and ApplicationsIRJET - A Survey on Machine Learning Algorithms, Techniques and Applications
IRJET - A Survey on Machine Learning Algorithms, Techniques and Applications
IRJET Journal
 
An introduction to Julia
An introduction to JuliaAn introduction to Julia
An introduction to Julia
Jiahao Chen
 
AIML2 DNN 3.5hr (111-1).pdf
AIML2 DNN  3.5hr (111-1).pdfAIML2 DNN  3.5hr (111-1).pdf
AIML2 DNN 3.5hr (111-1).pdf
ssuserb4d806
 
QSIC09.ppt
QSIC09.pptQSIC09.ppt
QSIC09.ppt
Ptidej Team
 
Overfitting.pptx
Overfitting.pptxOverfitting.pptx
Overfitting.pptx
PerumalPitchandi
 
Clustering
ClusteringClustering
Clustering
NLPseminar
 
Programming learning: a hierarchical model based diagnosis approach
Programming learning: a hierarchical model based diagnosis approachProgramming learning: a hierarchical model based diagnosis approach
Programming learning: a hierarchical model based diagnosis approach
Wellington Pinheiro
 
Workshop nwav 47 - LVS - Tool for Quantitative Data Analysis
Workshop nwav 47 - LVS - Tool for Quantitative Data AnalysisWorkshop nwav 47 - LVS - Tool for Quantitative Data Analysis
Workshop nwav 47 - LVS - Tool for Quantitative Data Analysis
Olga Scrivner
 
ICSM09.ppt
ICSM09.pptICSM09.ppt
ICSM09.ppt
Ptidej Team
 
Nearest Class Mean Metric Learning
Nearest Class Mean Metric LearningNearest Class Mean Metric Learning
Nearest Class Mean Metric Learning
Sangjun Han
 
On cascading small decision trees
On cascading small decision treesOn cascading small decision trees
On cascading small decision trees
Julià Minguillón
 
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
Daniele Gianni
 
3rd sem
3rd sem3rd sem
3rd sem
nastysuman009
 

Similar to Icpc08a.ppt (20)

2013: Prototype-based learning and adaptive distances for classification
2013: Prototype-based learning and adaptive distances for classification2013: Prototype-based learning and adaptive distances for classification
2013: Prototype-based learning and adaptive distances for classification
 
ICSE10b.ppt
ICSE10b.pptICSE10b.ppt
ICSE10b.ppt
 
Permission based group mutual exclusion
Permission based group mutual exclusionPermission based group mutual exclusion
Permission based group mutual exclusion
 
PERMISSION BASED GROUP MUTUAL EXCLUSION ALGORITHMS FOR A CLUSTER TREE NETWORK
PERMISSION BASED GROUP MUTUAL EXCLUSION ALGORITHMS FOR A CLUSTER TREE NETWORKPERMISSION BASED GROUP MUTUAL EXCLUSION ALGORITHMS FOR A CLUSTER TREE NETWORK
PERMISSION BASED GROUP MUTUAL EXCLUSION ALGORITHMS FOR A CLUSTER TREE NETWORK
 
MEME – An Integrated Tool For Advanced Computational Experiments
MEME – An Integrated Tool For Advanced Computational ExperimentsMEME – An Integrated Tool For Advanced Computational Experiments
MEME – An Integrated Tool For Advanced Computational Experiments
 
A Few Useful Things to Know about Machine Learning
A Few Useful Things to Know about Machine LearningA Few Useful Things to Know about Machine Learning
A Few Useful Things to Know about Machine Learning
 
Machine Learning: Foundations Course Number 0368403401
Machine Learning: Foundations Course Number 0368403401Machine Learning: Foundations Course Number 0368403401
Machine Learning: Foundations Course Number 0368403401
 
IRJET - A Survey on Machine Learning Algorithms, Techniques and Applications
IRJET - A Survey on Machine Learning Algorithms, Techniques and ApplicationsIRJET - A Survey on Machine Learning Algorithms, Techniques and Applications
IRJET - A Survey on Machine Learning Algorithms, Techniques and Applications
 
An introduction to Julia
An introduction to JuliaAn introduction to Julia
An introduction to Julia
 
AIML2 DNN 3.5hr (111-1).pdf
AIML2 DNN  3.5hr (111-1).pdfAIML2 DNN  3.5hr (111-1).pdf
AIML2 DNN 3.5hr (111-1).pdf
 
QSIC09.ppt
QSIC09.pptQSIC09.ppt
QSIC09.ppt
 
Overfitting.pptx
Overfitting.pptxOverfitting.pptx
Overfitting.pptx
 
Clustering
ClusteringClustering
Clustering
 
Programming learning: a hierarchical model based diagnosis approach
Programming learning: a hierarchical model based diagnosis approachProgramming learning: a hierarchical model based diagnosis approach
Programming learning: a hierarchical model based diagnosis approach
 
Workshop nwav 47 - LVS - Tool for Quantitative Data Analysis
Workshop nwav 47 - LVS - Tool for Quantitative Data AnalysisWorkshop nwav 47 - LVS - Tool for Quantitative Data Analysis
Workshop nwav 47 - LVS - Tool for Quantitative Data Analysis
 
ICSM09.ppt
ICSM09.pptICSM09.ppt
ICSM09.ppt
 
Nearest Class Mean Metric Learning
Nearest Class Mean Metric LearningNearest Class Mean Metric Learning
Nearest Class Mean Metric Learning
 
On cascading small decision trees
On cascading small decision treesOn cascading small decision trees
On cascading small decision trees
 
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
 
3rd sem
3rd sem3rd sem
3rd sem
 

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

Some Pitfalls with Python and Their Possible Solutions v1.0
Some Pitfalls with Python and Their Possible Solutions v1.0Some Pitfalls with Python and Their Possible Solutions v1.0
Some Pitfalls with Python and Their Possible Solutions v1.0
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.5
Yann-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.1
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
 
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
Yann-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 Consequences
Yann-Gaël Guéhéneuc
 
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
Yann-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
 
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
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.1
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
 
ICSOC'21
ICSOC'21ICSOC'21
Vissoft21.ppt
Vissoft21.pptVissoft21.ppt
Vissoft21.ppt
Yann-Gaël Guéhéneuc
 
Service computation20.ppt
Service computation20.pptService computation20.ppt
Service computation20.ppt
Yann-Gaël Guéhéneuc
 
Serp4 iot20.ppt
Serp4 iot20.pptSerp4 iot20.ppt
Serp4 iot20.ppt
Yann-Gaël Guéhéneuc
 
Msr20.ppt
Msr20.pptMsr20.ppt
Iwesep19.ppt
Iwesep19.pptIwesep19.ppt
Icsoc20.ppt
Icsoc20.pptIcsoc20.ppt

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

Some Pitfalls with Python and Their Possible Solutions v1.0
Some Pitfalls with Python and Their Possible Solutions v1.0Some Pitfalls with Python and Their Possible Solutions v1.0
Some Pitfalls with Python and Their Possible Solutions v1.0
 
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
 

Recently uploaded

Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
GohKiangHock
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
TaghreedAltamimi
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
Peter Muessig
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 

Recently uploaded (20)

Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 

Icpc08a.ppt

  • 1. Mendel: A Model, Metrics, and Rules to Understand Class Hierarchies Simon Denier & Yann-Gaël Guéhéneuc Ptidej Team – Université de Montréal ICPC 2008 12/06/2008
  • 2. 22 / 28/ 28 Outline  Motivation and Problem  Mendel Model  Interesting Classes  Subclassing Behaviors  Conclusion
  • 3. 33 / 28/ 28 Motivation  Context: maintenance of program without documentation  Task: identify and understand the role of multiple classes  Problem 1: where to start?  Find entry points (main(...))  Read large classes (by LOC or Number of Methods)  Problem 2: what about inheritance?
  • 4. 44 / 28/ 28 Problem: Class Hierarchies  Classes defined incrementally by inheritance  Class “interesting” in its own hierarchy  Class profiting from its hierarchy
  • 5. 55 / 28/ 28 Class Hierarchies JHotDraw 5.2
  • 6. 66 / 28/ 28 Class Hierarchies (2) Azureus 2.4.0.2
  • 7. 77 / 28/ 28 Outline  Motivation and Problem  Mendel Model  Interesting Classes  Subclassing Behaviors  Conclusion
  • 8. 88 / 28/ 28 Mendel Approach  Goal: insights on class hierarchies  Interesting classes in their own hierarchy  Subclassing behaviors: extending (adding) vs overriding  Characteristics (requirements) of our approach  Early stage in maintenance  Intuitive  Fast
  • 9. 99 / 28/ 28 Mendel: Generic Model A foo() bar() B bar() zorg() Simple UML bar() foo() zorg()New Overridden Inherited Super Local Total B Mendel
  • 10. 1010 / 28/ 28 Mendel: Metrics and Rules  Simple metrics:  Based on interfaces = sets of method signatures  Computed on a single class or a hierarchy  Rules for:  Selection (threshold)  Classification  Comprehension (rule of thumb)
  • 11. 1111 / 28/ 28 Outline  Motivation and Problem  Mendel Model  Interesting Classes  Subclassing Behaviors  Conclusion
  • 12. 1212 / 28/ 28 Interesting Classes  Classes defining a lot of new behaviors  Large class: overall system  Budding class: with respect to its hierarchy  Blooming class: large and budding
  • 13. 1313 / 28/ 28 Large Class  Class with a large interface  Large Class: |Local| > threshold( |Local| )  JHotDraw 1.StandardDrawingView (inherits from JPanel), 55 methods 2.DrawApplication (inherits from JFrame), 53 methods 3.AbstractFigure (inherits from Object), 34 methods
  • 14. 1414 / 28/ 28 Budding Class  Class with a large interface with respect to its hierarchy  Metrics:  Branch Mean Size – bms = |Total| / (DIT + 1)  Novelty Index – nvi = |Local| / bms(superclass)  Budding class: nvi > threshold(nvi)  JHotDraw 1.AbstractFigure, 3.09 2.TextFigure, 1.84 3.PolygonFigure, 1.59
  • 15. 1515 / 28/ 28 Blooming Class  Synthesis: combining large and budding  Novelty Score – nvs = |Local| × nvi  Blooming Class: nvs > threshold(nvs)  JHotDraw 1.AbstractFigure, 105.09 2.TextFigure, 55.1 3.LineConnection, 49.55
  • 16. 1616 / 28/ 28 JHotDraw Overview with Mendel  JHotDraw 5.2: 148 classes  13 large (9%)  18 budding (12%)  11 blooming (7%)  Among 11 blooming classes  8 in AbstractFigure hierarchy  + DrawApplication, StandardDrawingView, ConnectionTool
  • 17. 1717 / 28/ 28 JHotDraw Base Classes  Given documentation: 6 base classes
  • 18. 1818 / 28/ 28 Comparison with Documentation  5 out of 6 in at least one set  AbstractFigure in all 3 sets Budding Large Blooming
  • 19. 1919 / 28/ 28 What about StandardDrawing?  Max rank: 16th by |Local| order  Reason: overrider of CompositeFigure (4th blooming class)  Conclusion: StandardDrawing to be understood in relation with CompositeFigure
  • 20. 2020 / 28/ 28 Outline  Motivation and Problem  Mendel Model  Interesting Classes  Subclassing Behaviors  Conclusion
  • 21. 2121 / 28/ 28 Subclassing Behaviors INH INHINH INH OVR OVROVR NEW NEW NEW Overrider Extender Pure ExtenderPure Overrider |NEW|=0 |OVR|≥|NEW| |NEW|>|OVR| |OVR|=0
  • 22. 2222 / 28/ 28 Extender vs Overrider  Rules of thumb  Pure extender  Adding new methods: no access through superclass  Used for itself  Implementation inheritance  Pure overrider  Overriding methods  Used through substitution to superclass  Interface inheritance
  • 23. 2323 / 28/ 28 JHotDraw in Verso
  • 24. 2424 / 28/ 28 Azureus in Verso
  • 25. 2525 / 28/ 28 Implementation in Java  Tailored for Java  BCEL as class files parser  Performance for Azureus (1681 classes)  Standard desktop machine (2Ghz processor, 1Go memory)  9 seconds
  • 26. 2626 / 28/ 28 Outline  Motivation and Problem  Mendel Model  Interesting Classes  Subclassing Behaviors  Conclusion
  • 27. 2727 / 28/ 28 Conclusion  Mendel  Generic model  Simple metrics  Rules  Results  Quick insights on interesting classes and concerns  Large, budding, blooming: different views of interesting classes  Concerns: keywords in classnames  Different usage of inheritance in programs  Some leaned to extending (Log4J, Azureus)  Others to overriding (JHotDraw, ArgoUML)
  • 28. 2828 / 28/ 28 Future Work  Family analysis  Family = class + children  Common behavior and interface  Visualisation  Hierarchy representation  Visual patterns
  • 29. 2929 / 28/ 28 ArgoUML in Verso
  • 30. 3030 / 28/ 28 Blooming Classes Selectivity  Log4J: 2 of 206 (1%)  LogBrokerMonitor (104 methods), Category  Budding set: Appender hierarchy  ArgoUML: 18 of 1431 (1%)  2 very big classes: NSUMLModelFacade, FacadeMDRImpl  Design choice: Facade design pattern  Keywords in class names: two products, normal and MDR  Azureus: 54 of 1681 (3%)  Keywords in class names: three concerns, download, peer, DHT
  • 31. 3131 / 28/ 28 Behaviors Discrimination  Two categories  JHotDraw and ArgoUML: overriding behaviors  Large proportions of Pure Overriders  Azureus and Log4J: extending behaviors  Azureus: 58% of classes are Pure Extenders