SlideShare a Scribd company logo
Jaafar, YannGuéhéneuc,
Fehmi Jaafar, Yann-Gaël Guéhéneuc, and Sylvie Hamel
DIRO, Université de Montréal, QC, Canada

1
1. Introduction
2. Related Work
3. Problem Statement
4. Empirical Study
5. Research Question
6. Results
7. Ongoing Work
8. Conclusion

2
Anti-patterns are motifs that are commonly used by developers but
they are ineffective and counterproductive in program development
and–or maintenance.
Opposite to anti-patterns, design patterns are “good” solutions to
recurring design problems, conceived to increase reuse, code quality,
code readability and, above all, maintainability and resilience to
changes.
These motifs evolve and they may have dependencies.

3
Vokac[1] analyzed the corrective maintenance of a large commercial
program, compared the defect rates of classes participating in design
motifs against those that did not.
Observer and Singleton motifs are correlated with larger classes
Classes playing roles in Factory Method were more compact, less
coupled, and less defect prone than others classes.
No clear tendency exists for Template Method.
Pietrzak and Walter[2] defined and analyzed the different relationships
that exist among smells.
These relationships presented dependencies between smells and
could be exploited to improve the detection tools of anti-patterns.

[1] M. Vokac, “Defect frequency and design patterns: An empirical study
of industrial code,” IEEE Trans. Softw. Eng., vol. 30, December 2004.
[2] B. Pietrzak and B. Walter, “Leveraging code smell detection with intersmell relations,” Extreme Programming and Agile Processes in Software

Engineering, pp. 75–84, 2006.
4
Most previous work agree that anti-patterns make the maintenance of
systems more difficult and that design patterns can serve as guide in
program exploration and, thus, ease maintenance.
However, there are no investigation in the literature about the static
relationships among anti-patterns and design patterns.
Better understand systems by giving knowledge about the
dependencies between what is “good” and what is “bad” in system.
Explain the co-existence of such motifs

5
org.apache.xerces.validators.common.XMLValidator.java
r315086 | twl | 1999-11-08 20:10:52 -0500 (Mon, 08 Nov 1999)
Initial revision
org.apache.xerces.validators.dtd.DTDImporter.java
r315397 | jeffreyr | 2000-04-04 15:38:39 -0400 (Tue, 04 Apr
2000)
Factoring Validators code by Glenn Marcy

6
We use the Defect DEtection for CORrection Approach (DECOR
to specify and detect anti-patterns.

[3])

We use the Design Motif Identification Multilayered Approach
(DeMIMA [4]) to detect design patterns and static relationships

[4] Naouel Moha, Y.-G. Guéhéneuc, L. Duchien, and A.-F. Le Meur,
“DECOR: A method for the specification and detection of code and
design smells,” Transactions on Software Engineering (TSE), vol. 36, no.
1, 2010.
Y.-G. Guéhéneuc and G. Antoniol, “DeMIMA: A multilayered framework
for design pattern identification,” Transactions on Software Engineering
(TSE), vol. 34, no. 5, pp. 667–684, 2008.
7
System

AntiAnti-pattern

Design pattern

Static
relationship

ArgoUML

ComplexClass

Command

Use

JFreeChart

LongMethod

Composite

Association

XercesJ

LongParameterList

Decorator

Agregation

MessageChains

FactoryMethod

Composition

RefusedParentBequest Prototype
SpaghettiCode

Observer

SpeculativeGenerality
SwissArmyKnife

8
Are there static relationships between antiantipatterns and design patterns?
We assume that a design pattern P has a static relationships with the
anti-pattern A if at least one class belonging to P has a use, association,
aggregation, or composition relationship with one class belonging to A.

9
10
11
12
Different anti-patterns can have different proportions of static
relationships with design patterns.
The design pattern that often has the most relationships with anti
patterns is the Command design pattern.
For example, we noted that 50% of static relationships among
SpeculativeGenerality and design patterns in ArgoUML, are with the
Command motifs.
In XercesJ, we observe that 41% of relationships among
ClassDataShouldBePrivate was with the Command design pattern.

13
SpaghettiCodes have no static relationships (use, association,
aggregation, and composition) with design patterns.
SpaghettiCode are revealed by classes with no structure, declaring long
methods with no parameters, and using global variables for processing.
A SpaghettiCode does not take the advantage of object-orientation
mechanisms: polymorphism and inheritance.
SpaghettiCodes are difficult to reuse and to maintain.

14
The evolution of relationships among motifs.
Prevent the co-exsitence of anti-patterns and design patterns.
Studying the effect of the anti-patterns dependencies on change-proneness.
The relation between classes having static dependencies with anti-patterns
and fault-proneness.
The relation between classes co-changed with anti-patterns and faultproneness.

15
We provide empirical evidence of the relationships between anti-patterns
and design patterns.
Some anti-patterns are significantly more likely to have relationships with
design patterns than other.
We provide a basis for future research to understand the causes and the
eventual consequences of these relationships.

16

More Related Content

PDF
Csmr13c.ppt
PDF
130404 fehmi jaafar - on the relationship between program evolution and fau...
PPT
Materi diagram kelas-implementasi-1
PDF
Natural Language Processing Through Different Classes of Machine Learning
PDF
الواجججج
PDF
Icsm07 tooldemo.pdf
PDF
Wcre13a.ppt
PDF
Wcre13b.ppt
Csmr13c.ppt
130404 fehmi jaafar - on the relationship between program evolution and fau...
Materi diagram kelas-implementasi-1
Natural Language Processing Through Different Classes of Machine Learning
الواجججج
Icsm07 tooldemo.pdf
Wcre13a.ppt
Wcre13b.ppt

Viewers also liked (16)

PDF
Mribp13.ppt
PDF
MSR Asia Summit
PDF
Wcre12b.ppt
PDF
Ssbse12b.ppt
PDF
Ppap13b.ppt
PDF
See12.ppt
PDF
Ssbse12a.ppt
PDF
Icsoc12 tooldemo.ppt
PDF
Wcre13c.pdf
PDF
Rsse12.ppt
PDF
Wcre12c.ppt
PDF
Software Design Patterns in Theory
PDF
Quality and Software Design Patterns
PDF
AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges
PDF
Software Design Patterns in Practice
PDF
Jcom02.ppt
Mribp13.ppt
MSR Asia Summit
Wcre12b.ppt
Ssbse12b.ppt
Ppap13b.ppt
See12.ppt
Ssbse12a.ppt
Icsoc12 tooldemo.ppt
Wcre13c.pdf
Rsse12.ppt
Wcre12c.ppt
Software Design Patterns in Theory
Quality and Software Design Patterns
AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges
Software Design Patterns in Practice
Jcom02.ppt
Ad

Similar to Ppap13a.ppt (20)

PDF
PPTX
Mining the Relationship between Anti-patterns Dependencies and Fault-Proneness
PDF
PDF
A systematic analysis on machine learning classifiers with data pre-processin...
PDF
010821+presentation+oti.ppt
PPT
Design Patterns
PDF
(E book pdf) thinking in patterns with java
PDF
PDF
Qrs17b.ppt
PPTX
Software Patterns
PDF
[DevDay 2016] Design Pattern at a glance - Speaker: Tuan Do – Scrum Master a...
PPTX
Introduction to Design Patterns
PDF
PDF
Saner16b.ppt
PDF
sdec11-Advanced-design-patterns
PDF
A baryklo design-patterns
DOCX
Patterns (contd)Software Development ProcessDesign patte.docx
PPTX
Design Pattern lecture 2
PDF
Code camp 2012-advanced-design-patterns
Mining the Relationship between Anti-patterns Dependencies and Fault-Proneness
A systematic analysis on machine learning classifiers with data pre-processin...
010821+presentation+oti.ppt
Design Patterns
(E book pdf) thinking in patterns with java
Qrs17b.ppt
Software Patterns
[DevDay 2016] Design Pattern at a glance - Speaker: Tuan Do – Scrum Master a...
Introduction to Design Patterns
Saner16b.ppt
sdec11-Advanced-design-patterns
A baryklo design-patterns
Patterns (contd)Software Development ProcessDesign patte.docx
Design Pattern lecture 2
Code camp 2012-advanced-design-patterns
Ad

More from Ptidej Team (20)

PDF
From IoT to Software Miniaturisation
PDF
Presentation
PDF
Presentation
PDF
Presentation
PDF
Presentation by Lionel Briand
PDF
Manel Abdellatif
PDF
Azadeh Kermansaravi
PDF
Mouna Abidi
PDF
CSED - Manel Grichi
PDF
Cristiano Politowski
PDF
Will io t trigger the next software crisis
PDF
PDF
Thesis+of+laleh+eshkevari.ppt
PDF
Thesis+of+nesrine+abdelkafi.ppt
PDF
Medicine15.ppt
PDF
Icpc11c.ppt
PDF
Icsme16.ppt
PDF
Msr17a.ppt
PDF
Icsoc15.ppt
PDF
Thesis+of+étienne+duclos.ppt
From IoT to Software Miniaturisation
Presentation
Presentation
Presentation
Presentation by Lionel Briand
Manel Abdellatif
Azadeh Kermansaravi
Mouna Abidi
CSED - Manel Grichi
Cristiano Politowski
Will io t trigger the next software crisis
Thesis+of+laleh+eshkevari.ppt
Thesis+of+nesrine+abdelkafi.ppt
Medicine15.ppt
Icpc11c.ppt
Icsme16.ppt
Msr17a.ppt
Icsoc15.ppt
Thesis+of+étienne+duclos.ppt

Recently uploaded (20)

PDF
Zenith AI: Advanced Artificial Intelligence
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
A Presentation on Touch Screen Technology
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
Tartificialntelligence_presentation.pptx
PDF
A novel scalable deep ensemble learning framework for big data classification...
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
project resource management chapter-09.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
Zenith AI: Advanced Artificial Intelligence
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
OMC Textile Division Presentation 2021.pptx
NewMind AI Weekly Chronicles - August'25-Week II
Unlocking AI with Model Context Protocol (MCP)
A Presentation on Touch Screen Technology
Assigned Numbers - 2025 - Bluetooth® Document
DP Operators-handbook-extract for the Mautical Institute
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Chapter 5: Probability Theory and Statistics
Group 1 Presentation -Planning and Decision Making .pptx
SOPHOS-XG Firewall Administrator PPT.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Enhancing emotion recognition model for a student engagement use case through...
Tartificialntelligence_presentation.pptx
A novel scalable deep ensemble learning framework for big data classification...
cloud_computing_Infrastucture_as_cloud_p
project resource management chapter-09.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
MIND Revenue Release Quarter 2 2025 Press Release

Ppap13a.ppt

  • 1. Jaafar, YannGuéhéneuc, Fehmi Jaafar, Yann-Gaël Guéhéneuc, and Sylvie Hamel DIRO, Université de Montréal, QC, Canada 1
  • 2. 1. Introduction 2. Related Work 3. Problem Statement 4. Empirical Study 5. Research Question 6. Results 7. Ongoing Work 8. Conclusion 2
  • 3. Anti-patterns are motifs that are commonly used by developers but they are ineffective and counterproductive in program development and–or maintenance. Opposite to anti-patterns, design patterns are “good” solutions to recurring design problems, conceived to increase reuse, code quality, code readability and, above all, maintainability and resilience to changes. These motifs evolve and they may have dependencies. 3
  • 4. Vokac[1] analyzed the corrective maintenance of a large commercial program, compared the defect rates of classes participating in design motifs against those that did not. Observer and Singleton motifs are correlated with larger classes Classes playing roles in Factory Method were more compact, less coupled, and less defect prone than others classes. No clear tendency exists for Template Method. Pietrzak and Walter[2] defined and analyzed the different relationships that exist among smells. These relationships presented dependencies between smells and could be exploited to improve the detection tools of anti-patterns. [1] M. Vokac, “Defect frequency and design patterns: An empirical study of industrial code,” IEEE Trans. Softw. Eng., vol. 30, December 2004. [2] B. Pietrzak and B. Walter, “Leveraging code smell detection with intersmell relations,” Extreme Programming and Agile Processes in Software Engineering, pp. 75–84, 2006. 4
  • 5. Most previous work agree that anti-patterns make the maintenance of systems more difficult and that design patterns can serve as guide in program exploration and, thus, ease maintenance. However, there are no investigation in the literature about the static relationships among anti-patterns and design patterns. Better understand systems by giving knowledge about the dependencies between what is “good” and what is “bad” in system. Explain the co-existence of such motifs 5
  • 6. org.apache.xerces.validators.common.XMLValidator.java r315086 | twl | 1999-11-08 20:10:52 -0500 (Mon, 08 Nov 1999) Initial revision org.apache.xerces.validators.dtd.DTDImporter.java r315397 | jeffreyr | 2000-04-04 15:38:39 -0400 (Tue, 04 Apr 2000) Factoring Validators code by Glenn Marcy 6
  • 7. We use the Defect DEtection for CORrection Approach (DECOR to specify and detect anti-patterns. [3]) We use the Design Motif Identification Multilayered Approach (DeMIMA [4]) to detect design patterns and static relationships [4] Naouel Moha, Y.-G. Guéhéneuc, L. Duchien, and A.-F. Le Meur, “DECOR: A method for the specification and detection of code and design smells,” Transactions on Software Engineering (TSE), vol. 36, no. 1, 2010. Y.-G. Guéhéneuc and G. Antoniol, “DeMIMA: A multilayered framework for design pattern identification,” Transactions on Software Engineering (TSE), vol. 34, no. 5, pp. 667–684, 2008. 7
  • 9. Are there static relationships between antiantipatterns and design patterns? We assume that a design pattern P has a static relationships with the anti-pattern A if at least one class belonging to P has a use, association, aggregation, or composition relationship with one class belonging to A. 9
  • 10. 10
  • 11. 11
  • 12. 12
  • 13. Different anti-patterns can have different proportions of static relationships with design patterns. The design pattern that often has the most relationships with anti patterns is the Command design pattern. For example, we noted that 50% of static relationships among SpeculativeGenerality and design patterns in ArgoUML, are with the Command motifs. In XercesJ, we observe that 41% of relationships among ClassDataShouldBePrivate was with the Command design pattern. 13
  • 14. SpaghettiCodes have no static relationships (use, association, aggregation, and composition) with design patterns. SpaghettiCode are revealed by classes with no structure, declaring long methods with no parameters, and using global variables for processing. A SpaghettiCode does not take the advantage of object-orientation mechanisms: polymorphism and inheritance. SpaghettiCodes are difficult to reuse and to maintain. 14
  • 15. The evolution of relationships among motifs. Prevent the co-exsitence of anti-patterns and design patterns. Studying the effect of the anti-patterns dependencies on change-proneness. The relation between classes having static dependencies with anti-patterns and fault-proneness. The relation between classes co-changed with anti-patterns and faultproneness. 15
  • 16. We provide empirical evidence of the relationships between anti-patterns and design patterns. Some anti-patterns are significantly more likely to have relationships with design patterns than other. We provide a basis for future research to understand the causes and the eventual consequences of these relationships. 16