SlideShare a Scribd company logo
1 of 46
Download to read offline
Bilal Karasneh, Michel R.V. Chaudron,
Foutse Khomh, and Yann-Gaël Guéhéneuc
This work is licensed under a Creative
Commons Attribution-NonCommercial-
ShareAlike 3.0 Unported License
Studying the Relation between
Anti-patterns in Design
Models and in Source Code
2016/03/16
2/27
Stir your interest for
research on the relations
between models and
corresponding source code
3/27
Context and Main Question
 Software engineers use models to describe
and reflect upon their software systems
– Even more true with model-driven engineering
 What is the impact of the quality of models
on the quality of the source code?
4/27
Software Quality
 Proxies
– Design anti-patterns
– Number of changes
– Number of faults
– Cyclomatic complexity and LOC
5/27
Questions
 Do the very design of the systems lead to
the occurrences of anti-patterns or are anti-
patterns introduced during implementation?
– Do anti-patterns occurring in models also occur
in the source code?
– What is the impact of the anti-patterns occurring
in models on the classes in the source code?
6/27
Needs
 Software development design models
 Matching between models and source code
 Anti-patterns in models and in the code
 Fault, change, and metric data
7/27
Needs
 Software development design models
– UML Repository: http://models-db.com
8/27
Needs
 Matching between models and source code
– One to many relations
– Names and semantics
 Manual analysis
9/27
Needs
 Anti-patterns in models and in the code
– Ptidej Tool Suite: http://wiki.ptidej.net
10/27
Needs
 Fault, change, and metric data
– IBDOOS, http://www.ptidej.net
– Ptidej Tool Suite
+
11/27
Source code
repository
Antipatterns
detection
PTIDEJ
Analyses
Anti-patterns
detection
PTIDEJ
UML models
repository
Approach
Bug
information
IBDOOS
Bugzilla
12/27
Programs Descriptions URLs
Annoyme Adds beautiful typewriter sounds to Desktop keyboards github.com/dedeibel/annoyme
ArgoUML An open source UML modeling tool argouml.sourceforge.net
JCoAP Java implementation of the Constrained Application Protocol github.com/dapaulid/JCoAP
JGAP Package of Genetic Algorithm and Genetic Programming jgap.sourceforge.net
Kartjax Cross-platform, tools to create object, animation and map code.google.com/p/kartjax/
Mars Simulation Project to create a simulation of future settlements on Mars mars-sim.sourceforge.net
Msv Poker Poker Game (poker server and poker client) github.com/mihhailnovik/msvPoker
Neuroph Lightweight neural network framework neuroph.sourceforge.net
Syntax-analyzer Syntax analyzer for (*.lng) file github.com/myzone/syntax-analyzer/
Wro4j Web resource optimizer for Java code.google.com/p/wro4j
Data Collection
 Ten open-source software projects
13/27
Data Collection
 Detected anti-patterns
– Complex classes
– Large classes
– Lazy classes
– Blob
– Classes with data that should be private
– Classes refusing parents’ bequests
– Base classes that should be abstract
14/27
Research Questions
RQ1: Do anti-patterns occurring in
models also occur in the source code?
RQ2: What is the impact of anti-patterns
from models on classes in code?
15/27
Do Anti-patterns Occurring in Models
Also Occur in the Source Code?
 Transfer of anti-patterns from models to code
Programs
# Anti-patterns
in models
# Anti-patterns
in source code
Proportions of same classes
with same anti-patterns in
models and source code
Annoyme 10 5 0.50
ArgoUML 18 10 0.56
JCoAP 4 3 0.75
JGAP 13 5 0.38
Kartjax 17 1 0.06
Mars_Simulation 22 3 0.14
Msv_Poker 11 4 0.36
Neuroph 12 4 0.33
Syntax-analyzer 9 1 0.11
Wro4j 25 12 0.48
Average 0.37
16/27
Do Anti-patterns Occurring in Models
Also Occur in the Source Code?
17/27
37% of the classes in the models that have
anti-patterns exist in the source code with
the same anti-patterns
RQ1: Do anti-patterns occurring in
models also occur in the source code?
18/27
What is the Impact of Anti-patterns
from Models on Classes in Code?
 Modeled classes
– Classes that are in the models and in the code
 Non-modeled classes
– Classes that are not in the models
Programs # Versions
Modeled
classes
Non-modeled
classes
Total
ArgoUML 9 88 2,731 2,819
Wro4j 6 197 876 1,073
19/27
What is the Impact of Anti-patterns
from Models on Classes in Code?
 Numbers of changes, faults
Programs Categories Means
Changes
ArgoUML
Modeled classes 22
Non-modeled classes 7.78
Wro4j
Modeled classes 15.17
Non-modeled classes 6.56
Programs Categories Means
Faults
ArgoUML
Modeled classes 0.82
Non-modeled classes 0.42
Wro4j
Modeled classes 2.91
Non-modeled classes 1.04
20/27
What is the Impact of Anti-patterns
from Models on Classes in Code?
 Changes, Faults vs. LOC, complexity
Programs Categories
Correlations
R2
AvgCyc LOC
Changes
ArgoUML
Modeled classes 0.30 0.74 0.54
Non-modeled classes 0.21 0.43 0.19
Wro4j
Modeled classes 0.06 0.62 0.39
Non-modeled classes -0.00 0.38 0.17
Programs Categories
Correlations
R2
AvgCyc LOC
Faults
ArgoUML
Modeled classes 0.35 0.53 0.32
Non-Modeled classes 0.13 0.26 0.07
Wro4j
Modeled classes 0.02 0.60 0.35
Non-Modeled classes -0.01 0.40 0.18
21/27
What is the Impact of Anti-patterns
from Models on Classes in Code?
 Number of changes, faults
Programs Categories Means
Changes
ArgoUML
Anti-patterns classes 30.80
No-anti-patterns classes 06.59
Wro4j
Anti-patterns classes 16.60
No-anti-patterns classes 12.26
Programs Categories Means
Faults
ArgoUML
Anti-patterns classes 1.20
No-anti-patterns classes 0.15
Wro4j
Anti-patterns classes 3.16
No-anti-patterns classes 2.38
22/27
What is the Impact of Anti-patterns
from Models on Classes in Code?
 Anti- and no-anti-patterns vs. LOC, complexity
Programs Categories
Correlations
R2
AvgCyc LOC
Changes
ArgoUML
Anti-patterns classes 0.41 0.67 0.44
No-anti-patterns classes 0.33 0.85 0.72
Wro4j
Anti-patterns classes 0.06 0.59 0.35
No-anti-patterns classes 0.02 0.70 0.48
Programs Categories
Correlations
R2
AvgCyc LOC
Faults
ArgoUML
Anti-patterns classes 0.48 0.61 0.42
No-anti-patterns classes 0.35 0.65 0.65
Wro4j
Anti-patterns classes -0.01 0.49 0.49
No-anti-patterns classes 0.01 0.70 0.48
23/27
Modeled classes with anti-patterns have
more changes and faults in the source code
RQ2: What is the impact of anti-patterns
from models on classes in code?
24/27
Take Home
 Anti-patterns appear in models…
37% of the classes in the models that have anti-
patterns exist in the source code with the same
anti-patterns
… and impact source code
Classes in the models that have anti-patterns
have more changes and faults in source code
25/27
Take Home
 Anti-patterns must be detected early
– Avoid transfer to the source code
– Reduce number of changes/faults in code
 We expect that other problems in the models
can propagate to the source code
26/27
Interesting Future
 Automate matching of classes
 Measure distance btw. models, source code
 Analyse more pairs of models, source code
 Analyse more programs
 Link model and source code refactorings
 Propose prevention techniques
27/27
Stir your interest for
research on the relations
between models and
corresponding source code
28/27
29/27
Data Collection
 Relation between models and source code
Programs
# Classes in
Models
# Classes in
source code
Proportions
Annoyme 17 59 0.29
ArgoUML 51 909 0.03
JCoAP 21 52 0.40
JGAP 19 191 0.10
Kartjax 29 36 0.80
Mars_Simulation 32 953 0.03
Msv_Poker 22 55 0.40
Neuroph 26 179 0.15
Syntax-analyzer 26 34 0.76
Wro4j 28 289 0.10
30/27
Data Collection
 Relation between models and source code
Programs
# Classes
existing in
models and
source code
Proportions in both
models and source
code wrt. models
Proportion in both
models and source
code wrt. code
Annoyme 14 0.82 0.24
ArgoUML 44 0.86 0.05
JCoAP 3 0.14 0.06
JGAP 18 0.95 0.09
Kartjax 1 0.03 0.03
Mars_Simulation 29 0.91 0.03
Msv_Poker 13 0.59 0.24
Neuroph 24 0.92 0.13
Syntax-analyzer 1 0.04 0.03
Wro4j 11 0.39 0.011
31/27
Do Anti-patterns Occurring in Models
Also Occur in the Source Code?
 Anti-patterns in models and source code
Programs
# Anti-patterns
in Models
# Anti-patterns in
source code
# Same anti-patterns in
the same classes in
models and source code
Annoyme 10 16 5
ArgoUML 18 524 10
JCoAP 4 2 3
JGAP 13 252 5
Kartjax 17 4 1
Mars_Simulation 22 370 3
Msv_Poker 11 18 4
Neuroph 12 41 4
Syntax-analyzer 9 5 1
Wro4j 25 215 12
32/27
Do Anti-patterns Occurring in Models
Also Occur in the Source Code?
 Anti-patterns in models and source code
Programs
# Anti-patterns
in Models
# Anti-patterns in
source code
# Same anti-patterns in
the same classes in
models and source code
Annoyme 10 16 5
ArgoUML 18 524 10
JCoAP 4 2 3
JGAP 13 252 5
Kartjax 17 4 1
Mars_Simulation 22 370 3
Msv_Poker 11 18 4
Neuroph 12 41 4
Syntax-analyzer 9 5 1
Wro4j 25 215 12
33/27
Do Anti-patterns Occurring in Models
Also Occur in the Source Code?
 Anti-patterns in models and source code
– Some anti-patterns exist in both models and
source code, in the same classes
– JCoAP, Kartjax, and Syntax-analyzer
• Smallest systems
• Models are likely outdated
– In future work, measure the distance between
the models and the source code
34/27
Do Anti-patterns Occurring in Models
Also Occur in the Source Code?
 Few occurrences in design
– Designers avoid complex classes
– Methods are complex to implement
– Developers do not follow the design
35/27
Do Anti-patterns Occurring in Models
Also Occur in the Source Code?
 Large classes are rare in models
– Designers focus on the “principles” of classes
– Developers lack time to introduce proper
abstractions and “grow” classes
36/27
Do Anti-patterns Occurring in Models
Also Occur in the Source Code?
 Most frequent anti-patterns
– Designers try to anticipate future evolutions
– Developers remove excessive abstractions
37/27
Do Anti-patterns Occurring in Models
Also Occur in the Source Code?
 Long methods are only in the source code
– Designs do not contains all details
– Developers implement features under time
pressure and little incentive to refactor
38/27
What is the Impact of Anti-patterns
from Models on Classes in Code?
 Modeled classes
– Classes that are in the models and in the code
 Non-modeled classes
– Classes that are not in the models
Programs # Versions
Modeled
classes
Non-modeled
classes
Total
ArgoUML 9 88 2,731 2,819
Wro4j 6 197 876 1,073
39/27
What is the Impact of Anti-patterns
from Models on Classes in Code?
 Numbers of changes, faults
Programs Categories Means
Changes
ArgoUML
Modeled classes 22
Non-modeled classes 7.78
Wro4j
Modeled classes 15.17
Non-modeled classes 6.56
Programs Categories Means
Faults
ArgoUML
Modeled classes 0.82
Non-modeled classes 0.42
Wro4j
Modeled classes 2.91
Non-modeled classes 1.04
40/27
What is the Impact of Anti-patterns
from Models on Classes in Code?
 There are significant differences between
modeled and non-modeled classes
– Classes in models describe core classes of the
source code, so they change more
– More changes leads to more faults
– Design problems could transferred to the code
41/27
What is the Impact of Anti-patterns
from Models on Classes in Code?
 Changes, Faults vs. LOC, complexity
Programs Categories
Correlations
R2
AvgCyc LOC
Changes
ArgoUML
Modeled classes 0.30 0.74 0.54
Non-modeled classes 0.21 0.43 0.19
Wro4j
Modeled classes 0.06 0.62 0.39
Non-modeled classes -0.00 0.38 0.17
Programs Categories
Correlations
R2
AvgCyc LOC
Faults
ArgoUML
Modeled classes 0.35 0.53 0.32
Non-Modeled classes 0.13 0.26 0.07
Wro4j
Modeled classes 0.02 0.60 0.35
Non-Modeled classes -0.01 0.40 0.18
42/27
What is the Impact of Anti-patterns
from Models on Classes in Code?
 There are significant differences between
modeled and non-modeled classes
– Modeled classes that have higher LOC have
more changes and faults
– AvgCyc does not have any correlations with
modeled, non-modeled classes
43/27
What is the Impact of Anti-patterns
from Models on Classes in Code?
 Number of changes, faults
Programs Categories Means
Changes
ArgoUML
Anti-patterns classes 30.80
No-anti-patterns classes 06.59
Wro4j
Anti-patterns classes 16.60
No-anti-patterns classes 12.26
Programs Categories Means
Faults
ArgoUML
Anti-patterns classes 1.20
No-anti-patterns classes 0.15
Wro4j
Anti-patterns classes 3.16
No-anti-patterns classes 2.38
44/27
What is the Impact of Anti-patterns
from Models on Classes in Code?
 There are significant differences between
classes with/out anti-patterns in numbers of
changes and faults
– Modeled classes with anti-patterns have more
changes and faults in the source code
– Design problems must be fixed quickly, else
they propagate from models to source code,
causing changes and faults
45/27
What is the Impact of Anti-patterns
from Models on Classes in Code?
 Anti- and no-anti-patterns vs. LOC, complexity
Programs Categories
Correlations
R2
AvgCyc LOC
Changes
ArgoUML
Anti-patterns classes 0.41 0.67 0.44
No-anti-patterns classes 0.33 0.85 0.72
Wro4j
Anti-patterns classes 0.06 0.59 0.35
No-anti-patterns classes 0.02 0.70 0.48
Programs Categories
Correlations
R2
AvgCyc LOC
Faults
ArgoUML
Anti-patterns classes 0.48 0.61 0.42
No-anti-patterns classes 0.35 0.65 0.65
Wro4j
Anti-patterns classes -0.01 0.49 0.49
No-anti-patterns classes 0.01 0.70 0.48
46/27
What is the Impact of Anti-patterns
from Models on Classes in Code?
 # Changes have significantly higher
correlations with LOC in no-anti-pattern
classes than anti-patterns classes
 # Changes and # Faults do not have strong
correlations with LOC in anti-pattern classes
– Changes/Faults exist no matter the class sizes

More Related Content

What's hot

A Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution TechniquesA Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution TechniquesSung Kim
 
Source code comprehension on evolving software
Source code comprehension on evolving softwareSource code comprehension on evolving software
Source code comprehension on evolving softwareSung Kim
 
Proactive Empirical Assessment of New Language Feature Adoption via Automated...
Proactive Empirical Assessment of New Language Feature Adoption via Automated...Proactive Empirical Assessment of New Language Feature Adoption via Automated...
Proactive Empirical Assessment of New Language Feature Adoption via Automated...Raffi Khatchadourian
 
Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...
Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...
Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...Fabio Palomba
 
Software Analytics: Data Analytics for Software Engineering
Software Analytics: Data Analytics for Software EngineeringSoftware Analytics: Data Analytics for Software Engineering
Software Analytics: Data Analytics for Software EngineeringTao Xie
 
Transferring Software Testing Tools to Practice
Transferring Software Testing Tools to PracticeTransferring Software Testing Tools to Practice
Transferring Software Testing Tools to PracticeTao Xie
 
Software Product Line Analysis and Detection of Clones
Software Product Line Analysis and Detection of ClonesSoftware Product Line Analysis and Detection of Clones
Software Product Line Analysis and Detection of ClonesRSIS International
 
Software Analysis using Natural Language Queries
Software Analysis using Natural Language QueriesSoftware Analysis using Natural Language Queries
Software Analysis using Natural Language QueriesPooja Rani
 
Advanced support for executable statechart modelling
Advanced support for executable statechart modellingAdvanced support for executable statechart modelling
Advanced support for executable statechart modellingTom Mens
 
Speculative analysis for comment quality assessment
Speculative analysis for comment quality assessmentSpeculative analysis for comment quality assessment
Speculative analysis for comment quality assessmentPooja Rani
 
Codingstandards matiar
Codingstandards matiarCodingstandards matiar
Codingstandards matiarMatiar Rahman
 
Creating a new language to support open innovation
Creating a new language to support open innovationCreating a new language to support open innovation
Creating a new language to support open innovationMike Hucka
 
Regular use of static code analysis in team development
Regular use of static code analysis in team developmentRegular use of static code analysis in team development
Regular use of static code analysis in team developmentPVS-Studio
 
Comment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowlComment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowlPharo
 
Let linguistics guide software analysis
Let linguistics guide software analysisLet linguistics guide software analysis
Let linguistics guide software analysisPooja Rani
 

What's hot (17)

A Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution TechniquesA Survey on Automatic Software Evolution Techniques
A Survey on Automatic Software Evolution Techniques
 
Source code comprehension on evolving software
Source code comprehension on evolving softwareSource code comprehension on evolving software
Source code comprehension on evolving software
 
Proactive Empirical Assessment of New Language Feature Adoption via Automated...
Proactive Empirical Assessment of New Language Feature Adoption via Automated...Proactive Empirical Assessment of New Language Feature Adoption via Automated...
Proactive Empirical Assessment of New Language Feature Adoption via Automated...
 
Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...
Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...
Smells Like Teen Spirit: Improving Bug Prediction Performance using the Inten...
 
Software Analytics: Data Analytics for Software Engineering
Software Analytics: Data Analytics for Software EngineeringSoftware Analytics: Data Analytics for Software Engineering
Software Analytics: Data Analytics for Software Engineering
 
Transferring Software Testing Tools to Practice
Transferring Software Testing Tools to PracticeTransferring Software Testing Tools to Practice
Transferring Software Testing Tools to Practice
 
Software Product Line Analysis and Detection of Clones
Software Product Line Analysis and Detection of ClonesSoftware Product Line Analysis and Detection of Clones
Software Product Line Analysis and Detection of Clones
 
Software Analysis using Natural Language Queries
Software Analysis using Natural Language QueriesSoftware Analysis using Natural Language Queries
Software Analysis using Natural Language Queries
 
Advanced support for executable statechart modelling
Advanced support for executable statechart modellingAdvanced support for executable statechart modelling
Advanced support for executable statechart modelling
 
Speculative analysis for comment quality assessment
Speculative analysis for comment quality assessmentSpeculative analysis for comment quality assessment
Speculative analysis for comment quality assessment
 
Codingstandards matiar
Codingstandards matiarCodingstandards matiar
Codingstandards matiar
 
Msr17a.ppt
Msr17a.pptMsr17a.ppt
Msr17a.ppt
 
Creating a new language to support open innovation
Creating a new language to support open innovationCreating a new language to support open innovation
Creating a new language to support open innovation
 
Regular use of static code analysis in team development
Regular use of static code analysis in team developmentRegular use of static code analysis in team development
Regular use of static code analysis in team development
 
Comment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowlComment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowl
 
Let linguistics guide software analysis
Let linguistics guide software analysisLet linguistics guide software analysis
Let linguistics guide software analysis
 
Practices and Tools for Better Software Testing
Practices and Tools for  Better Software TestingPractices and Tools for  Better Software Testing
Practices and Tools for Better Software Testing
 

Similar to Saner16b.ppt

Model-based Analysis of Large Scale Software Repositories
Model-based Analysis of Large Scale Software RepositoriesModel-based Analysis of Large Scale Software Repositories
Model-based Analysis of Large Scale Software RepositoriesMarkus Scheidgen
 
Adaptation of the technology of the static code analyzer for developing paral...
Adaptation of the technology of the static code analyzer for developing paral...Adaptation of the technology of the static code analyzer for developing paral...
Adaptation of the technology of the static code analyzer for developing paral...PVS-Studio
 
Software Patterns
Software PatternsSoftware Patterns
Software Patternskim.mens
 
A new language for a new biology: How SBML and other tools are transforming m...
A new language for a new biology: How SBML and other tools are transforming m...A new language for a new biology: How SBML and other tools are transforming m...
A new language for a new biology: How SBML and other tools are transforming m...Mike Hucka
 
A Tale of Experiments on Bug Prediction
A Tale of Experiments on Bug PredictionA Tale of Experiments on Bug Prediction
A Tale of Experiments on Bug PredictionMartin Pinzger
 
Code-Review-COW56-Meeting
Code-Review-COW56-MeetingCode-Review-COW56-Meeting
Code-Review-COW56-MeetingMasud Rahman
 
Preventive Software Maintenance: The Past, the Present, the Future
Preventive Software Maintenance: The Past, the Present, the FuturePreventive Software Maintenance: The Past, the Present, the Future
Preventive Software Maintenance: The Past, the Present, the FutureNikolaos Tsantalis
 
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...Amine Barrak
 
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...Amine Barrak
 
Recommendations for Building Machine Learning Software
Recommendations for Building Machine Learning SoftwareRecommendations for Building Machine Learning Software
Recommendations for Building Machine Learning SoftwareJustin Basilico
 
SurfClipse-- An IDE based context-aware Meta Search Engine
SurfClipse-- An IDE based context-aware Meta Search EngineSurfClipse-- An IDE based context-aware Meta Search Engine
SurfClipse-- An IDE based context-aware Meta Search EngineMasud Rahman
 
A Survey on Design Pattern Detection Approaches
A Survey on Design Pattern Detection ApproachesA Survey on Design Pattern Detection Approaches
A Survey on Design Pattern Detection ApproachesCSCJournals
 
Prioritization of Code Anomalies Based on Architecture Sensitiveness
Prioritization of Code Anomalies Based on Architecture SensitivenessPrioritization of Code Anomalies Based on Architecture Sensitiveness
Prioritization of Code Anomalies Based on Architecture Sensitivenessroberta arcoverde
 
Scalable constrained spectral clustering
Scalable constrained spectral clusteringScalable constrained spectral clustering
Scalable constrained spectral clusteringNishanth Harapanahalli
 
PVS-Studio advertisement - static analysis of C/C++ code
PVS-Studio advertisement - static analysis of C/C++ codePVS-Studio advertisement - static analysis of C/C++ code
PVS-Studio advertisement - static analysis of C/C++ codeAndrey Karpov
 
Deepcoder to Self-Code with Machine Learning
Deepcoder to Self-Code with Machine LearningDeepcoder to Self-Code with Machine Learning
Deepcoder to Self-Code with Machine LearningIRJET Journal
 
Generic Model-based Approaches for Software Reverse Engineering and Comprehen...
Generic Model-based Approaches for Software Reverse Engineering and Comprehen...Generic Model-based Approaches for Software Reverse Engineering and Comprehen...
Generic Model-based Approaches for Software Reverse Engineering and Comprehen...Hugo Bruneliere
 

Similar to Saner16b.ppt (20)

Model-based Analysis of Large Scale Software Repositories
Model-based Analysis of Large Scale Software RepositoriesModel-based Analysis of Large Scale Software Repositories
Model-based Analysis of Large Scale Software Repositories
 
poster_3.0
poster_3.0poster_3.0
poster_3.0
 
Adaptation of the technology of the static code analyzer for developing paral...
Adaptation of the technology of the static code analyzer for developing paral...Adaptation of the technology of the static code analyzer for developing paral...
Adaptation of the technology of the static code analyzer for developing paral...
 
Software Patterns
Software PatternsSoftware Patterns
Software Patterns
 
A new language for a new biology: How SBML and other tools are transforming m...
A new language for a new biology: How SBML and other tools are transforming m...A new language for a new biology: How SBML and other tools are transforming m...
A new language for a new biology: How SBML and other tools are transforming m...
 
A Tale of Experiments on Bug Prediction
A Tale of Experiments on Bug PredictionA Tale of Experiments on Bug Prediction
A Tale of Experiments on Bug Prediction
 
Code-Review-COW56-Meeting
Code-Review-COW56-MeetingCode-Review-COW56-Meeting
Code-Review-COW56-Meeting
 
Preventive Software Maintenance: The Past, the Present, the Future
Preventive Software Maintenance: The Past, the Present, the FuturePreventive Software Maintenance: The Past, the Present, the Future
Preventive Software Maintenance: The Past, the Present, the Future
 
Slides chapter 3
Slides chapter 3Slides chapter 3
Slides chapter 3
 
Slides chapter 3
Slides chapter 3Slides chapter 3
Slides chapter 3
 
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
 
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
Just-in-time Detection of Protection-Impacting Changes on WordPress and Media...
 
Recommendations for Building Machine Learning Software
Recommendations for Building Machine Learning SoftwareRecommendations for Building Machine Learning Software
Recommendations for Building Machine Learning Software
 
SurfClipse-- An IDE based context-aware Meta Search Engine
SurfClipse-- An IDE based context-aware Meta Search EngineSurfClipse-- An IDE based context-aware Meta Search Engine
SurfClipse-- An IDE based context-aware Meta Search Engine
 
A Survey on Design Pattern Detection Approaches
A Survey on Design Pattern Detection ApproachesA Survey on Design Pattern Detection Approaches
A Survey on Design Pattern Detection Approaches
 
Prioritization of Code Anomalies Based on Architecture Sensitiveness
Prioritization of Code Anomalies Based on Architecture SensitivenessPrioritization of Code Anomalies Based on Architecture Sensitiveness
Prioritization of Code Anomalies Based on Architecture Sensitiveness
 
Scalable constrained spectral clustering
Scalable constrained spectral clusteringScalable constrained spectral clustering
Scalable constrained spectral clustering
 
PVS-Studio advertisement - static analysis of C/C++ code
PVS-Studio advertisement - static analysis of C/C++ codePVS-Studio advertisement - static analysis of C/C++ code
PVS-Studio advertisement - static analysis of C/C++ code
 
Deepcoder to Self-Code with Machine Learning
Deepcoder to Self-Code with Machine LearningDeepcoder to Self-Code with Machine Learning
Deepcoder to Self-Code with Machine Learning
 
Generic Model-based Approaches for Software Reverse Engineering and Comprehen...
Generic Model-based Approaches for Software Reverse Engineering and Comprehen...Generic Model-based Approaches for Software Reverse Engineering and Comprehen...
Generic Model-based Approaches for Software Reverse Engineering and Comprehen...
 

More from 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
 

More from 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
 

Recently uploaded

Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Lecture # 8 software design and architecture (SDA).ppt
Lecture # 8 software design and architecture (SDA).pptLecture # 8 software design and architecture (SDA).ppt
Lecture # 8 software design and architecture (SDA).pptesrabilgic2
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 

Recently uploaded (20)

Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Lecture # 8 software design and architecture (SDA).ppt
Lecture # 8 software design and architecture (SDA).pptLecture # 8 software design and architecture (SDA).ppt
Lecture # 8 software design and architecture (SDA).ppt
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 

Saner16b.ppt

  • 1. Bilal Karasneh, Michel R.V. Chaudron, Foutse Khomh, and Yann-Gaël Guéhéneuc This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 3.0 Unported License Studying the Relation between Anti-patterns in Design Models and in Source Code 2016/03/16
  • 2. 2/27 Stir your interest for research on the relations between models and corresponding source code
  • 3. 3/27 Context and Main Question  Software engineers use models to describe and reflect upon their software systems – Even more true with model-driven engineering  What is the impact of the quality of models on the quality of the source code?
  • 4. 4/27 Software Quality  Proxies – Design anti-patterns – Number of changes – Number of faults – Cyclomatic complexity and LOC
  • 5. 5/27 Questions  Do the very design of the systems lead to the occurrences of anti-patterns or are anti- patterns introduced during implementation? – Do anti-patterns occurring in models also occur in the source code? – What is the impact of the anti-patterns occurring in models on the classes in the source code?
  • 6. 6/27 Needs  Software development design models  Matching between models and source code  Anti-patterns in models and in the code  Fault, change, and metric data
  • 7. 7/27 Needs  Software development design models – UML Repository: http://models-db.com
  • 8. 8/27 Needs  Matching between models and source code – One to many relations – Names and semantics  Manual analysis
  • 9. 9/27 Needs  Anti-patterns in models and in the code – Ptidej Tool Suite: http://wiki.ptidej.net
  • 10. 10/27 Needs  Fault, change, and metric data – IBDOOS, http://www.ptidej.net – Ptidej Tool Suite +
  • 12. 12/27 Programs Descriptions URLs Annoyme Adds beautiful typewriter sounds to Desktop keyboards github.com/dedeibel/annoyme ArgoUML An open source UML modeling tool argouml.sourceforge.net JCoAP Java implementation of the Constrained Application Protocol github.com/dapaulid/JCoAP JGAP Package of Genetic Algorithm and Genetic Programming jgap.sourceforge.net Kartjax Cross-platform, tools to create object, animation and map code.google.com/p/kartjax/ Mars Simulation Project to create a simulation of future settlements on Mars mars-sim.sourceforge.net Msv Poker Poker Game (poker server and poker client) github.com/mihhailnovik/msvPoker Neuroph Lightweight neural network framework neuroph.sourceforge.net Syntax-analyzer Syntax analyzer for (*.lng) file github.com/myzone/syntax-analyzer/ Wro4j Web resource optimizer for Java code.google.com/p/wro4j Data Collection  Ten open-source software projects
  • 13. 13/27 Data Collection  Detected anti-patterns – Complex classes – Large classes – Lazy classes – Blob – Classes with data that should be private – Classes refusing parents’ bequests – Base classes that should be abstract
  • 14. 14/27 Research Questions RQ1: Do anti-patterns occurring in models also occur in the source code? RQ2: What is the impact of anti-patterns from models on classes in code?
  • 15. 15/27 Do Anti-patterns Occurring in Models Also Occur in the Source Code?  Transfer of anti-patterns from models to code Programs # Anti-patterns in models # Anti-patterns in source code Proportions of same classes with same anti-patterns in models and source code Annoyme 10 5 0.50 ArgoUML 18 10 0.56 JCoAP 4 3 0.75 JGAP 13 5 0.38 Kartjax 17 1 0.06 Mars_Simulation 22 3 0.14 Msv_Poker 11 4 0.36 Neuroph 12 4 0.33 Syntax-analyzer 9 1 0.11 Wro4j 25 12 0.48 Average 0.37
  • 16. 16/27 Do Anti-patterns Occurring in Models Also Occur in the Source Code?
  • 17. 17/27 37% of the classes in the models that have anti-patterns exist in the source code with the same anti-patterns RQ1: Do anti-patterns occurring in models also occur in the source code?
  • 18. 18/27 What is the Impact of Anti-patterns from Models on Classes in Code?  Modeled classes – Classes that are in the models and in the code  Non-modeled classes – Classes that are not in the models Programs # Versions Modeled classes Non-modeled classes Total ArgoUML 9 88 2,731 2,819 Wro4j 6 197 876 1,073
  • 19. 19/27 What is the Impact of Anti-patterns from Models on Classes in Code?  Numbers of changes, faults Programs Categories Means Changes ArgoUML Modeled classes 22 Non-modeled classes 7.78 Wro4j Modeled classes 15.17 Non-modeled classes 6.56 Programs Categories Means Faults ArgoUML Modeled classes 0.82 Non-modeled classes 0.42 Wro4j Modeled classes 2.91 Non-modeled classes 1.04
  • 20. 20/27 What is the Impact of Anti-patterns from Models on Classes in Code?  Changes, Faults vs. LOC, complexity Programs Categories Correlations R2 AvgCyc LOC Changes ArgoUML Modeled classes 0.30 0.74 0.54 Non-modeled classes 0.21 0.43 0.19 Wro4j Modeled classes 0.06 0.62 0.39 Non-modeled classes -0.00 0.38 0.17 Programs Categories Correlations R2 AvgCyc LOC Faults ArgoUML Modeled classes 0.35 0.53 0.32 Non-Modeled classes 0.13 0.26 0.07 Wro4j Modeled classes 0.02 0.60 0.35 Non-Modeled classes -0.01 0.40 0.18
  • 21. 21/27 What is the Impact of Anti-patterns from Models on Classes in Code?  Number of changes, faults Programs Categories Means Changes ArgoUML Anti-patterns classes 30.80 No-anti-patterns classes 06.59 Wro4j Anti-patterns classes 16.60 No-anti-patterns classes 12.26 Programs Categories Means Faults ArgoUML Anti-patterns classes 1.20 No-anti-patterns classes 0.15 Wro4j Anti-patterns classes 3.16 No-anti-patterns classes 2.38
  • 22. 22/27 What is the Impact of Anti-patterns from Models on Classes in Code?  Anti- and no-anti-patterns vs. LOC, complexity Programs Categories Correlations R2 AvgCyc LOC Changes ArgoUML Anti-patterns classes 0.41 0.67 0.44 No-anti-patterns classes 0.33 0.85 0.72 Wro4j Anti-patterns classes 0.06 0.59 0.35 No-anti-patterns classes 0.02 0.70 0.48 Programs Categories Correlations R2 AvgCyc LOC Faults ArgoUML Anti-patterns classes 0.48 0.61 0.42 No-anti-patterns classes 0.35 0.65 0.65 Wro4j Anti-patterns classes -0.01 0.49 0.49 No-anti-patterns classes 0.01 0.70 0.48
  • 23. 23/27 Modeled classes with anti-patterns have more changes and faults in the source code RQ2: What is the impact of anti-patterns from models on classes in code?
  • 24. 24/27 Take Home  Anti-patterns appear in models… 37% of the classes in the models that have anti- patterns exist in the source code with the same anti-patterns … and impact source code Classes in the models that have anti-patterns have more changes and faults in source code
  • 25. 25/27 Take Home  Anti-patterns must be detected early – Avoid transfer to the source code – Reduce number of changes/faults in code  We expect that other problems in the models can propagate to the source code
  • 26. 26/27 Interesting Future  Automate matching of classes  Measure distance btw. models, source code  Analyse more pairs of models, source code  Analyse more programs  Link model and source code refactorings  Propose prevention techniques
  • 27. 27/27 Stir your interest for research on the relations between models and corresponding source code
  • 28. 28/27
  • 29. 29/27 Data Collection  Relation between models and source code Programs # Classes in Models # Classes in source code Proportions Annoyme 17 59 0.29 ArgoUML 51 909 0.03 JCoAP 21 52 0.40 JGAP 19 191 0.10 Kartjax 29 36 0.80 Mars_Simulation 32 953 0.03 Msv_Poker 22 55 0.40 Neuroph 26 179 0.15 Syntax-analyzer 26 34 0.76 Wro4j 28 289 0.10
  • 30. 30/27 Data Collection  Relation between models and source code Programs # Classes existing in models and source code Proportions in both models and source code wrt. models Proportion in both models and source code wrt. code Annoyme 14 0.82 0.24 ArgoUML 44 0.86 0.05 JCoAP 3 0.14 0.06 JGAP 18 0.95 0.09 Kartjax 1 0.03 0.03 Mars_Simulation 29 0.91 0.03 Msv_Poker 13 0.59 0.24 Neuroph 24 0.92 0.13 Syntax-analyzer 1 0.04 0.03 Wro4j 11 0.39 0.011
  • 31. 31/27 Do Anti-patterns Occurring in Models Also Occur in the Source Code?  Anti-patterns in models and source code Programs # Anti-patterns in Models # Anti-patterns in source code # Same anti-patterns in the same classes in models and source code Annoyme 10 16 5 ArgoUML 18 524 10 JCoAP 4 2 3 JGAP 13 252 5 Kartjax 17 4 1 Mars_Simulation 22 370 3 Msv_Poker 11 18 4 Neuroph 12 41 4 Syntax-analyzer 9 5 1 Wro4j 25 215 12
  • 32. 32/27 Do Anti-patterns Occurring in Models Also Occur in the Source Code?  Anti-patterns in models and source code Programs # Anti-patterns in Models # Anti-patterns in source code # Same anti-patterns in the same classes in models and source code Annoyme 10 16 5 ArgoUML 18 524 10 JCoAP 4 2 3 JGAP 13 252 5 Kartjax 17 4 1 Mars_Simulation 22 370 3 Msv_Poker 11 18 4 Neuroph 12 41 4 Syntax-analyzer 9 5 1 Wro4j 25 215 12
  • 33. 33/27 Do Anti-patterns Occurring in Models Also Occur in the Source Code?  Anti-patterns in models and source code – Some anti-patterns exist in both models and source code, in the same classes – JCoAP, Kartjax, and Syntax-analyzer • Smallest systems • Models are likely outdated – In future work, measure the distance between the models and the source code
  • 34. 34/27 Do Anti-patterns Occurring in Models Also Occur in the Source Code?  Few occurrences in design – Designers avoid complex classes – Methods are complex to implement – Developers do not follow the design
  • 35. 35/27 Do Anti-patterns Occurring in Models Also Occur in the Source Code?  Large classes are rare in models – Designers focus on the “principles” of classes – Developers lack time to introduce proper abstractions and “grow” classes
  • 36. 36/27 Do Anti-patterns Occurring in Models Also Occur in the Source Code?  Most frequent anti-patterns – Designers try to anticipate future evolutions – Developers remove excessive abstractions
  • 37. 37/27 Do Anti-patterns Occurring in Models Also Occur in the Source Code?  Long methods are only in the source code – Designs do not contains all details – Developers implement features under time pressure and little incentive to refactor
  • 38. 38/27 What is the Impact of Anti-patterns from Models on Classes in Code?  Modeled classes – Classes that are in the models and in the code  Non-modeled classes – Classes that are not in the models Programs # Versions Modeled classes Non-modeled classes Total ArgoUML 9 88 2,731 2,819 Wro4j 6 197 876 1,073
  • 39. 39/27 What is the Impact of Anti-patterns from Models on Classes in Code?  Numbers of changes, faults Programs Categories Means Changes ArgoUML Modeled classes 22 Non-modeled classes 7.78 Wro4j Modeled classes 15.17 Non-modeled classes 6.56 Programs Categories Means Faults ArgoUML Modeled classes 0.82 Non-modeled classes 0.42 Wro4j Modeled classes 2.91 Non-modeled classes 1.04
  • 40. 40/27 What is the Impact of Anti-patterns from Models on Classes in Code?  There are significant differences between modeled and non-modeled classes – Classes in models describe core classes of the source code, so they change more – More changes leads to more faults – Design problems could transferred to the code
  • 41. 41/27 What is the Impact of Anti-patterns from Models on Classes in Code?  Changes, Faults vs. LOC, complexity Programs Categories Correlations R2 AvgCyc LOC Changes ArgoUML Modeled classes 0.30 0.74 0.54 Non-modeled classes 0.21 0.43 0.19 Wro4j Modeled classes 0.06 0.62 0.39 Non-modeled classes -0.00 0.38 0.17 Programs Categories Correlations R2 AvgCyc LOC Faults ArgoUML Modeled classes 0.35 0.53 0.32 Non-Modeled classes 0.13 0.26 0.07 Wro4j Modeled classes 0.02 0.60 0.35 Non-Modeled classes -0.01 0.40 0.18
  • 42. 42/27 What is the Impact of Anti-patterns from Models on Classes in Code?  There are significant differences between modeled and non-modeled classes – Modeled classes that have higher LOC have more changes and faults – AvgCyc does not have any correlations with modeled, non-modeled classes
  • 43. 43/27 What is the Impact of Anti-patterns from Models on Classes in Code?  Number of changes, faults Programs Categories Means Changes ArgoUML Anti-patterns classes 30.80 No-anti-patterns classes 06.59 Wro4j Anti-patterns classes 16.60 No-anti-patterns classes 12.26 Programs Categories Means Faults ArgoUML Anti-patterns classes 1.20 No-anti-patterns classes 0.15 Wro4j Anti-patterns classes 3.16 No-anti-patterns classes 2.38
  • 44. 44/27 What is the Impact of Anti-patterns from Models on Classes in Code?  There are significant differences between classes with/out anti-patterns in numbers of changes and faults – Modeled classes with anti-patterns have more changes and faults in the source code – Design problems must be fixed quickly, else they propagate from models to source code, causing changes and faults
  • 45. 45/27 What is the Impact of Anti-patterns from Models on Classes in Code?  Anti- and no-anti-patterns vs. LOC, complexity Programs Categories Correlations R2 AvgCyc LOC Changes ArgoUML Anti-patterns classes 0.41 0.67 0.44 No-anti-patterns classes 0.33 0.85 0.72 Wro4j Anti-patterns classes 0.06 0.59 0.35 No-anti-patterns classes 0.02 0.70 0.48 Programs Categories Correlations R2 AvgCyc LOC Faults ArgoUML Anti-patterns classes 0.48 0.61 0.42 No-anti-patterns classes 0.35 0.65 0.65 Wro4j Anti-patterns classes -0.01 0.49 0.49 No-anti-patterns classes 0.01 0.70 0.48
  • 46. 46/27 What is the Impact of Anti-patterns from Models on Classes in Code?  # Changes have significantly higher correlations with LOC in no-anti-pattern classes than anti-patterns classes  # Changes and # Faults do not have strong correlations with LOC in anti-pattern classes – Changes/Faults exist no matter the class sizes