Skip to main content
main-content
Top

Hint

Swipe to navigate through the articles of this issue

Published in: Empirical Software Engineering 1/2021

01-01-2021

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

Authors: Zeinab Azadeh Kermansaravi, Md Saidur Rahman, Foutse Khomh, Fehmi Jaafar, Yann-Gaël Guéhéneuc

Published in: Empirical Software Engineering | Issue 1/2021

Login to get access
share
SHARE

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.
Literature
go back to reference 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 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
go back to reference Ampatzoglou A, Frantzeskou G, Stamelos I (2012) A methodology to assess the impact of design patterns on software quality. Inf Softw Technol 54 (4):331–346 CrossRef Ampatzoglou A, Frantzeskou G, Stamelos I (2012) A methodology to assess the impact of design patterns on software quality. Inf Softw Technol 54 (4):331–346 CrossRef
go back to reference 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 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
go back to reference Arnaoudova V, Eshkevari LM, Di Penta M, Oliveto R, Antoniol G, Gueheneuc Y-G (2014) Repent: Analyzing the nature of identifier renamings. IEEE Trans Softw Eng 40(5):502–532 CrossRef Arnaoudova V, Eshkevari LM, Di Penta M, Oliveto R, Antoniol G, Gueheneuc Y-G (2014) Repent: Analyzing the nature of identifier renamings. IEEE Trans Softw Eng 40(5):502–532 CrossRef
go back to reference 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 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
go back to reference 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 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
go back to reference Brown WH, Malveau RC, Mowbray TJ (1998) AntiPatterns: refactoring software, architectures, and projects in crisis, Wiley, New York Brown WH, Malveau RC, Mowbray TJ (1998) AntiPatterns: refactoring software, architectures, and projects in crisis, Wiley, New York
go back to reference 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 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
go back to reference 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 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
go back to reference 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 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
go back to reference Fowler M, Beck K (1999) Refactoring: improving the design of existing code. Addison-Wesley Professional Fowler M, Beck K (1999) Refactoring: improving the design of existing code. Addison-Wesley Professional
go back to reference 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 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
go back to reference Gamma E (1995) Design patterns: elements of reusable object-oriented software. Pearson Education, India Gamma E (1995) Design patterns: elements of reusable object-oriented software. Pearson Education, India
go back to reference 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 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
go back to reference Guéhéneuc Y-G, Antoniol G (2008) Demima: A multilayered approach for design pattern identification. IEEE Trans Softw Eng 34(5):667–684 CrossRef Guéhéneuc Y-G, Antoniol G (2008) Demima: A multilayered approach for design pattern identification. IEEE Trans Softw Eng 34(5):667–684 CrossRef
go back to reference Gueheneuc Y-G, Sahraoui H, Zaidi F (2004) Fingerprinting design patterns. In: Reverse engineering, 2004. Proceedings. 11th Working conference on. IEEE, pp 172–181 Gueheneuc Y-G, Sahraoui H, Zaidi F (2004) Fingerprinting design patterns. In: Reverse engineering, 2004. Proceedings. 11th Working conference on. IEEE, pp 172–181
go back to reference 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 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
go back to reference 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 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
go back to reference Jaafar F, Guéhéneuc Y-G, Hamel S (2013a) Analysing anti-patterns static relationships with design patterns. Proc PPAP 2:26 Jaafar F, Guéhéneuc Y-G, Hamel S (2013a) Analysing anti-patterns static relationships with design patterns. Proc PPAP 2:26
go back to reference 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 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
go back to reference 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 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
go back to reference Kamei Y, Shihab E, Adams B, Hassan AE, Mockus A, Sinha A, Ubayashi N (2013) A large-scale empirical study of just-in-time quality assurance. IEEE Trans Softw Eng 39(6):757–773 CrossRef Kamei Y, Shihab E, Adams B, Hassan AE, Mockus A, Sinha A, Ubayashi N (2013) A large-scale empirical study of just-in-time quality assurance. IEEE Trans Softw Eng 39(6):757–773 CrossRef
go back to reference Khomh F, Di Penta M, Guéhéneuc Y-G, Antoniol G (2012) An exploratory study of the impact of antipatterns on class change-and fault-proneness. Empir Softw Eng 17(3):243–275 CrossRef Khomh F, Di Penta M, Guéhéneuc Y-G, Antoniol G (2012) An exploratory study of the impact of antipatterns on class change-and fault-proneness. Empir Softw Eng 17(3):243–275 CrossRef
go back to reference 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 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
go back to reference 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 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
go back to reference 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 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
go back to reference 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 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
go back to reference Lanza M, Marinescu R (2007) Object-oriented metrics in practice: using software metrics to characterize, evaluate, and improve the design of object-oriented systems. Springer Science & Business Media, New York MATH Lanza M, Marinescu R (2007) Object-oriented metrics in practice: using software metrics to characterize, evaluate, and improve the design of object-oriented systems. Springer Science & Business Media, New York MATH
go back to reference Long J (2001) Software reuse antipatterns. ACM SIGSOFT Softw Eng Notes 26(4):68–76 CrossRef Long J (2001) Software reuse antipatterns. ACM SIGSOFT Softw Eng Notes 26(4):68–76 CrossRef
go back to reference 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 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
go back to reference Marinescu R, Lanza M (2006) Object-oriented metrics in practice Marinescu R, Lanza M (2006) Object-oriented metrics in practice
go back to reference Meyn SP, Tweedie RL (2012) Markov chains and stochastic stability. Springer Science & Business Media, New York MATH Meyn SP, Tweedie RL (2012) Markov chains and stochastic stability. Springer Science & Business Media, New York MATH
go back to reference Moha N, Gueheneuc Y-G, Duchien L, Le Meur A-F (2010) Decor: A method for the specification and detection of code and design smells. IEEE Trans Softw Eng 36(1):20–36 CrossRef Moha N, Gueheneuc Y-G, Duchien L, Le Meur A-F (2010) Decor: A method for the specification and detection of code and design smells. IEEE Trans Softw Eng 36(1):20–36 CrossRef
go back to reference 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 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
go back to reference 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 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
go back to reference Riel AJ (1996) Object-oriented design heuristics, vol 335. Addison-Wesley, Reading Riel AJ (1996) Object-oriented design heuristics, vol 335. Addison-Wesley, Reading
go back to reference 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 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
go back to reference Settas D, Cerone A, Fenz S (2012) Enhancing ontology-based antipattern detection using bayesian networks. Expert Syst Appl 39(10):9041–9053 CrossRef Settas D, Cerone A, Fenz S (2012) Enhancing ontology-based antipattern detection using bayesian networks. Expert Syst Appl 39(10):9041–9053 CrossRef
go back to reference Śliwerski J, Zimmermann T, Zeller A (2005) When do changes induce fixes?. In: ACM sigsoft software engineering notes, vol 30. ACM, pp 1–5 Śliwerski J, Zimmermann T, Zeller A (2005) When do changes induce fixes?. In: ACM sigsoft software engineering notes, vol 30. ACM, pp 1–5
go back to reference Stamelos I, Angelis L, Oikonomou A, Bleris GL (2002) Code quality analysis in open source software development. Inf Syst J 12(1):43–60 CrossRef Stamelos I, Angelis L, Oikonomou A, Bleris GL (2002) Code quality analysis in open source software development. Inf Syst J 12(1):43–60 CrossRef
go back to reference Strazzullo P, D’Elia L, Kandala N-B, Cappuccio FP (2009) Salt intake, stroke, and cardiovascular disease: meta-analysis of prospective studies. Bmj 339:b4567 CrossRef Strazzullo P, D’Elia L, Kandala N-B, Cappuccio FP (2009) Salt intake, stroke, and cardiovascular disease: meta-analysis of prospective studies. Bmj 339:b4567 CrossRef
go back to reference 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 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
go back to reference 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 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
go back to reference Tsantalis N, Chatzigeorgiou A, Stephanides G, Halkidis ST (2006) Design pattern detection using similarity scoring. IEEE Trans Softw Eng 32(11):896–909 CrossRef Tsantalis N, Chatzigeorgiou A, Stephanides G, Halkidis ST (2006) Design pattern detection using similarity scoring. IEEE Trans Softw Eng 32(11):896–909 CrossRef
go back to reference 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 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
go back to reference 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) 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)
go back to reference Vlissides J, Helm R, Johnson R, Gamma E (1995) Design patterns: elements of reusable object-oriented software, vol 49. Addison-Wesley, Reading, p 11 Vlissides J, Helm R, Johnson R, Gamma E (1995) Design patterns: elements of reusable object-oriented software, vol 49. Addison-Wesley, Reading, p 11
go back to reference Vokáč M (2004) Defect frequency and design patterns: An empirical study of industrial code. IEEE Trans Softw Eng 30(12):904–917 CrossRef Vokáč M (2004) Defect frequency and design patterns: An empirical study of industrial code. IEEE Trans Softw Eng 30(12):904–917 CrossRef
go back to reference Webster BF (1995) Pitfalls of object oriented development. M&T Books Webster BF (1995) Pitfalls of object oriented development. M&T Books
go back to reference Wohlin C, Runeson P, Höst M, Ohlsson MC, Regnell B, Wesslén A (2012) Experimentation in software engineering. Springer Science & Business Media, New York CrossRef Wohlin C, Runeson P, Höst M, Ohlsson MC, Regnell B, Wesslén A (2012) Experimentation in software engineering. Springer Science & Business Media, New York CrossRef
go back to reference Yamashita AF, Moonen L (2013) Do developers care about code smells? an exploratory survey. In: WCRE, vol 13, pp 242–251 Yamashita AF, Moonen L (2013) Do developers care about code smells? an exploratory survey. In: WCRE, vol 13, pp 242–251
go back to reference Yin RK (2013) Case study research: design and methods. Sage publications, Newbury Park Yin RK (2013) Case study research: design and methods. Sage publications, Newbury Park
Metadata
Title
Investigating design anti-pattern and design pattern mutations and their change- and fault-proneness
Authors
Zeinab Azadeh Kermansaravi
Md Saidur Rahman
Foutse Khomh
Fehmi Jaafar
Yann-Gaël Guéhéneuc
Publication date
01-01-2021
Publisher
Springer US
Published in
Empirical Software Engineering / Issue 1/2021
Print ISSN: 1382-3256
Electronic ISSN: 1573-7616
DOI
https://doi.org/10.1007/s10664-020-09900-0

Other articles of this Issue 1/2021

Empirical Software Engineering 1/2021 Go to the issue

Premium Partner