Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Investigating design anti-pattern and design pattern mutations and their change- and fault-proneness

Published: 01 January 2021 Publication History

Abstract

During software evolution, inexperienced developers may introduce design anti-patterns when they modify their software systems to fix bugs or to add new functionalities based on changes in requirements. Developers may also use design patterns to promote software quality or as a possible cure for some design anti-patterns. Thus, design patterns and design anti-patterns are introduced, removed, and mutated from one another by developers. Many studies investigated the evolution of design patterns and design anti-patterns and their impact on software development. However, they investigated design patterns or design anti-patterns in isolation and did not consider their mutations and the impact of these mutations on software quality. Therefore, we report our study of bidirectional mutations between design patterns and design anti-patterns and the impacts of these mutations on software change- and fault-proneness. We analyzed snapshots of seven Java software systems with diverse sizes, evolution histories, and application domains. We built Markov models to capture the probability of occurrences of the different design patterns and design anti-patterns mutations. Results from our study show that (1) design patterns and design anti-patterns mutate into other design patterns and–or design anti-patterns. They also show that (2) some change types primarily trigger mutations of design patterns and design anti-patterns (renaming and changes to comments, declarations, and operators), and (3) some mutations of design anti-patterns and design patterns are more faulty in specific contexts. These results provide important insights into the evolution of design patterns and design anti-patterns and its impact on the change- and fault-proneness of software systems.

References

[1]
Abbes M, Khomh F, Gueheneuc Y-G, Antoniol G (2011) An empirical study of the impact of two antipatterns, blob and spaghetti code, on program comprehension. In: Software maintenance and reengineering (CSMR), 2011 15th European conference on. IEEE, pp 181–190
[2]
Ampatzoglou A, Frantzeskou G, and Stamelos I A methodology to assess the impact of design patterns on software quality Inf Softw Technol 2012 54 4 331-346
[3]
An L, Khomh F (2015) An empirical study of crash-inducing commits in Mozilla Firefox. In: Proceedings of the 11th International conference on predictive models and data analytics in software engineering. ACM, p 5
[4]
Arnaoudova V, Eshkevari LM, Di Penta M, Oliveto R, Antoniol G, and Gueheneuc Y-G Repent: Analyzing the nature of identifier renamings IEEE Trans Softw Eng 2014 40 5 502-532
[5]
Aversano L, Canfora G, Cerulo L, Del Grosso C, Di Penta M (2007) An empirical study on the evolution of design patterns. In: Proceedings of the the 6th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering. ACM, pp 385–394
[6]
Bieman JM, Straw G, Wang H, Munger PW, Alexander RT (2003) Design patterns and change proneness: An examination of five evolving systems. In: Software metrics symposium, 2003. Proceedings. Ninth international. IEEE, pp 40–49
[7]
Brown WH, Malveau RC, Mowbray TJ (1998) AntiPatterns: refactoring software, architectures, and projects in crisis, Wiley, New York
[8]
Canfora G, Cerulo L, Di Penta M, Pacilio F (2010) An exploratory study of factors influencing change entropy. In: 2010 IEEE 18th International conference on program comprehension. IEEE, pp 134–143
[9]
Ducasse S, Gîrba T, Marinescu R (2004) Using history information to improve design flaws detection. In: CSMR 2004: 8th european conference on software maintenance and reengineering. Citeseer
[10]
Fischer M, Pinzger M, Gall H (2003) Populating a release history database from version control and bug tracking systems. In: Software maintenance, 2003. ICSM 2003. Proceedings. International conference on. IEEE, pp 23–32
[11]
Fowler M, Beck K (1999) Refactoring: improving the design of existing code. Addison-Wesley Professional
[12]
Fukushima T, Kamei Y, McIntosh S, Yamashita K, Ubayashi N (2014) An empirical study of just-in-time defect prediction using cross-project models. In: Proceedings of the 11th working conference on mining software repositories. ACM, pp 172–181
[13]
Gamma E Design patterns: elements of reusable object-oriented software 1995 India Pearson Education
[14]
Gatrell M, Counsell S, Hall T (2009) Design patterns and change proneness: a replication using proprietary c# software. In: Reverse engineering, 2009. WCRE’09. 16th working conference on. IEEE, pp 160–164
[15]
Guéhéneuc Y-G and Antoniol G Demima: A multilayered approach for design pattern identification IEEE Trans Softw Eng 2008 34 5 667-684
[16]
Gueheneuc Y-G, Sahraoui H, Zaidi F (2004) Fingerprinting design patterns. In: Reverse engineering, 2004. Proceedings. 11th Working conference on. IEEE, pp 172–181
[17]
Hassan AE (2009) Predicting faults using the complexity of code changes. In: Proceedings of the 31st international conference on software engineering. IEEE Computer Society, pp 78–88
[18]
Iacob C (2011) A design pattern mining method for interaction design. In: Proceedings of the 3rd ACM SIGCHI symposium on Engineering interactive computing systems. ACM, pp 217–222
[19]
Jaafar F, Guéhéneuc Y-G, and Hamel S Analysing anti-patterns static relationships with design patterns Proc PPAP 2013 2 26
[20]
Jaafar F, Guéhéneuc Y-G, Hamel S, Khomh F (2013b) Mining the relationship between anti-patterns dependencies and fault-proneness. In: 2013 20th Working conference on reverse engineering (WCRE). IEEE, pp 351–360
[21]
Jaafar F, Khomh F, Guéhéneuc Y-G, Zulkernine M (2014) Anti-pattern mutations and fault-proneness. In: Quality software (QSIC), 2014 14th International conference on. IEEE, pp 246–255
[22]
Kamei Y, Shihab E, Adams B, Hassan AE, Mockus A, Sinha A, and Ubayashi N A large-scale empirical study of just-in-time quality assurance IEEE Trans Softw Eng 2013 39 6 757-773
[23]
Khomh F, Di Penta M, Guéhéneuc Y-G, and Antoniol G An exploratory study of the impact of antipatterns on class change-and fault-proneness Empir Softw Eng 2012 17 3 243-275
[24]
Khomh F, Guéhéneuc Y-G (2007) Perception and reality: What are design patterns good for?. In: Proceedings of 11th ECOOP workshop on quantitative approaches in object oriented software engineering (QAOOSE). Springer, p 7
[25]
Khomh F, Guéhéneuc Y-G (2008) Do design patterns impact software quality positively?. In: Software maintenance and reengineering, 2008. CSMR 2008. 12th European conference on. IEEE, pp 274–278
[26]
Khomh F, Guéhéneuc Y-G, Antoniol G (2009) Playing roles in design patterns: An empirical descriptive and analytic study. In: IEEE International conference on software maintenance, 2009. ICSM 2009. IEEE, pp 83–92
[27]
Kramer C, Prechelt L (1996) Design recovery by automated search for structural design patterns in object-oriented software. In: Reverse engineering, 1996., Proceedings of the Third working conference on. IEEE, pp 208–215
[28]
Lanza M and Marinescu R Object-oriented metrics in practice: using software metrics to characterize, evaluate, and improve the design of object-oriented systems 2007 New York Springer Science & Business Media
[29]
Long J Software reuse antipatterns ACM SIGSOFT Softw Eng Notes 2001 26 4 68-76
[30]
Mäntylä M, Vanhanen J, Lassenius C (2003) A taxonomy and an initial empirical study of bad smells in code. In: Software maintenance, 2003. ICSM 2003. Proceedings. International conference on., pp 381–384
[31]
Marinescu R, Lanza M (2006) Object-oriented metrics in practice
[32]
Meyn SP and Tweedie RL Markov chains and stochastic stability 2012 New York Springer Science & Business Media
[33]
Moha N, Gueheneuc Y-G, Duchien L, and Le Meur A-F Decor: A method for the specification and detection of code and design smells IEEE Trans Softw Eng 2010 36 1 20-36
[34]
Olbrich S, Cruzes DS, Basili V, Zazworka N (2009) The evolution and impact of code smells: A case study of two open source systems. In: Proceedings of the 2009 3rd international symposium on empirical software engineering and measurement. IEEE Computer Society, pp 390–400
[35]
Rapu D, Ducasse S, Gîrba T, Marinescu R (2004) Using history information to improve design flaws detection. In: Software maintenance and reengineering, 2004. CSMR 2004. Proceedings. Eighth European Conference on. IEEE, pp 223–232
[36]
Riel AJ Object-oriented design heuristics, vol 335 1996 Reading Addison-Wesley
[37]
Romano D, Raila P, Pinzger M, Khomh F (2012) Analyzing the impact of antipatterns on change-proneness using fine-grained source code changes. In: 2012 19th Working conference on reverse engineering (WCRE). IEEE, pp 437–446
[38]
srcML (2016) http://www.srcml.org, 2016, online; Accessed March 31st
[39]
Settas D, Cerone A, and Fenz S Enhancing ontology-based antipattern detection using bayesian networks Expert Syst Appl 2012 39 10 9041-9053
[40]
Śliwerski J, Zimmermann T, Zeller A (2005) When do changes induce fixes?. In: ACM sigsoft software engineering notes, vol 30. ACM, pp 1–5
[41]
Stamelos I, Angelis L, Oikonomou A, and Bleris GL Code quality analysis in open source software development Inf Syst J 2002 12 1 43-60
[42]
Strazzullo P, D’Elia L, Kandala N-B, and Cappuccio FP Salt intake, stroke, and cardiovascular disease: meta-analysis of prospective studies Bmj 2009 339 b4567
[43]
Taba SES, Khomh F, Zou Y, Hassan AE, Nagappan M (2013) Predicting bugs using antipatterns. In: Software maintenance (ICSM), 2013 29th IEEE International conference on. IEEE, pp 270–279
[44]
Tichelaar S, Ducasse S, Demeyer S, Nierstrasz O (2000) A meta-model for language-independent refactoring. In: Proceedings international symposium on principles of software evolution. IEEE, pp 154–164
[45]
Tsantalis N, Chatzigeorgiou A, Stephanides G, and Halkidis ST Design pattern detection using similarity scoring IEEE Trans Softw Eng 2006 32 11 896-909
[46]
Van Emden E, Moonen L (2002) Java quality assurance by detecting code smells. In: Reverse engineering, 2002. Proceedings. Ninth working conference on, pp 97–106
[47]
Vaucher S, Khomh F, Moha N, Guéhéneuc Y-G (2009) Tracking design smells: Lessons from a study of god classes. In: 16th Working conference on reverse engineering (WCRE 2009), IEEE Computer Society Press (WCRE’09)
[48]
Vlissides J, Helm R, Johnson R, and Gamma E Design patterns: elements of reusable object-oriented software, vol 49 1995 Reading Addison-Wesley 11-11
[49]
Vokáč M Defect frequency and design patterns: An empirical study of industrial code IEEE Trans Softw Eng 2004 30 12 904-917
[50]
Webster BF (1995) Pitfalls of object oriented development. M&T Books
[51]
Wohlin C, Runeson P, Höst M, Ohlsson MC, Regnell B, and Wesslén A Experimentation in software engineering 2012 New York Springer Science & Business Media
[52]
Yamashita AF, Moonen L (2013) Do developers care about code smells? an exploratory survey. In: WCRE, vol 13, pp 242–251
[53]
Yin RK Case study research: design and methods 2013 Newbury Park Sage publications

Cited By

View all
  • (2024)A longitudinal study on the temporal validity of software samplesInformation and Software Technology10.1016/j.infsof.2024.107404168:COnline publication date: 1-Apr-2024

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Empirical Software Engineering
Empirical Software Engineering  Volume 26, Issue 1
Jan 2021
460 pages

Publisher

Kluwer Academic Publishers

United States

Publication History

Published: 01 January 2021
Accepted: 02 October 2020

Author Tags

  1. Design smells
  2. Design patterns
  3. Anti-patterns
  4. Fault-proneness
  5. Change-proneness
  6. Markov chain

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 10 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2024)A longitudinal study on the temporal validity of software samplesInformation and Software Technology10.1016/j.infsof.2024.107404168:COnline publication date: 1-Apr-2024

View Options

View options

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media