Bad Smells of Gang of Four Design Patterns: A Decade Systematic Literature Review

Gang of Four (GoF) design patterns are widely approved solutions for recurring software design problems, and their benefits to software quality are extensively studied. However, the occurrence of bad smells in design patterns increases the crisis of degenerating design patterns’ structure and behavior. Their occurrences are detrimental to the benefits of design patterns and they influence software sustainability by increasing maintenance costs and energy consumption. Despite the destructive roles of bad smells in such designs, there are an absence of studies systematically reviewing bad smells of GoF design patterns. This study systematically reviews a 10-year state of the art sample, identifying 16 studies investigating this phenomenon. Following a thorough evaluation of the full contents, we observed that the occurrence of bad smells have been investigated in proportion to four granularity levels of analysis: Design level, category level, pattern level, and role level. We identified 28 bad smells, categorized under code smells and grime symptoms, and emphasized their relationship with GoF pattern types and categories. The utilization of design pattern bad smell detection approaches and datasets were also discussed. Consequently, we observed that the research phenomenon is growing intensively, with a prominent focus of studies analyzing code smell occurrences rather than grime occurrences, at various granularity levels. Finally, we uncovered research gaps and areas with significant potentials for future research.

[1]  Mahmoud O. Elish,et al.  Quantitative analysis of fault density in design patterns: An empirical study , 2015, Inf. Softw. Technol..

[2]  Richard T. Watson,et al.  Analyzing the Past to Prepare for the Future: Writing a Literature Review , 2002, MIS Q..

[3]  Bruno L. Sousa,et al.  Evaluating Co-Occurrence of GOF Design Patterns with God Class and Long Method Bad Smells , 2017, SBSI.

[4]  Craig Anslow,et al.  Code smells detection and visualization: A systematic literature review , 2020, ArXiv.

[5]  Walter F. Tichy,et al.  A Controlled Experiment Comparing the Maintainability of Programs Designed with and without Design Patterns—A Replication in a Real Programming Environment , 2004, Empirical Software Engineering.

[6]  Clemente Izurieta,et al.  Towards Assessing the Technical Debt of Undesired Software Behaviors in Design Patterns , 2016, 2016 IEEE 8th International Workshop on Managing Technical Debt (MTD).

[7]  Ambrosio Toval,et al.  Surveying the Environmental and Technical Dimensions of Sustainability in Software Development Companies , 2018, Applied Sciences.

[8]  Pearl Brereton,et al.  Systematic literature reviews in software engineering - A tertiary study , 2010, Inf. Softw. Technol..

[9]  Arif Ali Khan,et al.  Methodology for the quantification of the effect of patterns and anti-patterns association on the software quality , 2019, IET Softw..

[10]  Bartosz Walter,et al.  The relationship between design patterns and code smells: An exploratory study , 2016, Inf. Softw. Technol..

[11]  Daniel Speicher,et al.  Code Quality Cultivation , 2011, IC3K.

[12]  María N. Moreno,et al.  Association Rules: Problems, solutions and new applications , 2005 .

[13]  Tarek Alkhaeir,et al.  The Effect of Code Smells on the Relationship Between Design Patterns and Defects , 2021, IEEE Access.

[14]  Apostolos Ampatzoglou,et al.  What can violations of good practices tell about the relationship between GoF patterns and run-time quality attributes? , 2019, Inf. Softw. Technol..

[15]  Tevfik Kosar,et al.  Software Sustainability: A Systematic Literature Review and Comprehensive Analysis , 2019, SSRN Electronic Journal.

[16]  Dirk Riehle Lessons Learned from Using Design Patterns in Industry Projects , 2011, Trans. Pattern Lang. Program..

[17]  Peggy Wayburn The Redwoods: Jobs and Environment. , 1978 .

[18]  Deepti Mehrotra,et al.  Green software: Refactoring approach , 2020, J. King Saud Univ. Comput. Inf. Sci..

[19]  Premkumar T. Devanbu,et al.  An empirical study on the influence of pattern roles on change-proneness , 2010, Empirical Software Engineering.

[20]  Mariza A. S. Bigonha,et al.  An exploratory study on cooccurrence of design patterns and bad smells using software metrics , 2019, Softw. Pract. Exp..

[21]  Ping Zhang,et al.  Efficiently detecting structural design pattern instances based on ordered sequences , 2018, J. Syst. Softw..

[22]  Satwinder Singh,et al.  Detecting Software Bad Smells from Software Design Patterns using Machine Learning Algorithms , 2018 .

[23]  Clemente Izurieta,et al.  Behavioral Evolution of Design Patterns: Understanding Software Reuse Through the Evolution of Pattern Behavior , 2019, ICSR.

[24]  Eduardo Figueiredo,et al.  Co-Occurrence of Design Patterns and Bad Smells in Software Systems: An Exploratory Study , 2015, SBSI.

[25]  Apostolos Ampatzoglou,et al.  The Effect of GoF Design Patterns on Stability: A Case Study , 2015, IEEE Transactions on Software Engineering.

[26]  Apostolos Ampatzoglou,et al.  The Evolution of Design Pattern Grime: An Industrial Case Study , 2017, PROFES.

[27]  N. A. Diamantidis,et al.  Automated refactoring of super-class method invocations to the Template Method design pattern , 2017, Inf. Softw. Technol..

[28]  Yongjian Fu,et al.  A Case Study on Design Patterns and Software Defects in Open Source Software , 2018 .

[29]  Foutse Khomh,et al.  Evaluating the impact of design pattern and anti-pattern dependencies on changes and faults , 2015, Empirical Software Engineering.

[30]  Wasif Afzal,et al.  Knowledge transfer challenges and mitigation strategies in global software development - A systematic literature review and industrial validation , 2013, Int. J. Inf. Manag..

[31]  James M. Bieman,et al.  A multiple case study of design pattern decay, grime, and rot in evolving software systems , 2012, Software Quality Journal.

[32]  Daniel J. Duffy,et al.  An Introduction to Design Patterns , 2013 .

[33]  Apostolos Ampatzoglou,et al.  Correlating Pattern Grime and Quality Attributes , 2018, IEEE Access.

[34]  Fabio Stella,et al.  On applying machine learning techniques for design pattern detection , 2015, J. Syst. Softw..

[35]  Katsuro Inoue,et al.  MORE: A multi‐objective refactoring recommendation approach to introducing design patterns and fixing code smells , 2017, J. Softw. Evol. Process..

[36]  Abbas Rasoolzadegan Barforoush,et al.  The state of the art on design patterns: A systematic mapping of the literature , 2017, J. Syst. Softw..

[37]  Azham Hussain,et al.  Software Sustainability Characteristic for Software Development Towards Long Living Software , 2018 .

[38]  Xiong Luo,et al.  Detecting Defects With Support Vector Machine in Logistics Packaging Boxes for Edge Computing , 2020, IEEE Access.

[39]  Clemente Izurieta,et al.  Impacts of design pattern decay on system quality , 2014, ESEM '14.

[40]  Mario Piattini,et al.  Interactions between environmental sustainability goals and software product quality: A mapping study , 2018, Inf. Softw. Technol..

[41]  Pearl Brereton,et al.  Systematic literature reviews in software engineering - A systematic literature review , 2009, Inf. Softw. Technol..

[42]  Eugenia Smyrnova-Trybulska,et al.  Conceptual Framework for Programming Skills Development Based on Microlearning and Automated Source Code Evaluation in Virtual Learning Environment , 2021, Sustainability.

[43]  Davide Arcelli,et al.  Applying Design Patterns to Remove Software Performance Antipatterns: A Preliminary Approach , 2017, ANT/SEIT.

[44]  Neeraj Bhargava,et al.  Decision Tree Analysis on J48 Algorithm for Data Mining , 2013 .

[45]  Mohammad Alshayeb,et al.  Empirical study of the relationship between design patterns and code smells , 2020, PloS one.