Bad Smells of Gang of Four Design Patterns: A Decade Systematic Literature Review
Abstract
:1. Introduction
- RQ1: What are the characteristics and objectives of studies dealing with design pattern bad smell occurrences?
- RQ2: What are the types of bad smells occurring in design patterns, and how are they associated with DBGL and design pattern categories or types?
- RQ3: What are the approaches and datasets used to detect DBS occurrences?
2. Materials and Methods
2.1. Database and Keywords
2.2. Inclusion and Exclusion Criteria
2.3. Study Selection and Data Analysis
2.4. Study Selection and Data Analysis
- QA1: Are the study objectives and goals clearly defined?
- QA2: Does the paper clearly state the research methodology?
- QA3: Are the study contributions and limitations clearly stated?
- QA4: Is the study data collection process clearly explained?
- QA5: Does the study mention how design patterns and bad smells such as code smell and grime relationships were detected?
2.5. Data Extraction
3. Results
3.1. Characteristics and Objectives of DBS Studies
3.2. DBS Occurrence Types
3.2.1. Code Smell Occurrences in GoF Design Patterns
3.2.2. Grime Occurrence in GoF Design Patterns
- (1)
- Behavioral grime shows a symptom of pattern behavioral deviation which can be measured by improper order of sequences or excessive actions. Improper order indicates that the order of pattern behaviors occur incorrectly, while excessive actions indicates that the pattern behavior shows excessive actions, obstructing the pattern’s expected run time [44].
- (2)
- Modular grime, within the Structural grime, is a symptom of increasing the pattern’s coupling, which could be tracked by the number of relationships (generalizations, realizations, associations, and dependencies) that the pattern class has with another pattern or non-pattern class [45].
- (3)
- Class grime, within the Structural grime, is considered a symptom of increasing pattern class methods and attributes which are not related to the responsibilities of the pattern [19].
- (4)
- Organizational grime, within the Structural grime, reflects a symptom of increasing the number of pattern files and namespace coupling, which is not involved in the responsibilities of the pattern [24].
3.3. The Association of DBS to Granularity Levels
3.4. The Association of DBS to GoF Design Pattern Categories and Types
3.5. DBS Detection Approaches and the Utilized Datasets
4. Discussion
4.1. DBS Characteristics and Objectives
4.2. Types of DBS Occurrences and Their Association with DBS Granularity Levels and Design Pattern Types and Categories: A Sustainability Perspective
4.2.1. Technical Dimension
4.2.2. Environmental Dimension
4.3. DBS Detection and the Utilized Datasets
5. Limitations
6. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Appendix A
DBS Category | Type | Description | |
---|---|---|---|
Grime | Behavioral grime | Behavioral grime refers to the deviations observed from a flow of information perspective that captures the operational side of a design pattern at run time which could be reflected by UML sequence diagrams. It indicates two symptoms:
| |
Modular grime | Modular grime is a symptom of build-up unrelated relationships-generalizations, realizations, associations, dependencies-to pattern responsibilities. | ||
Structural grime | Class grime | Class grime indicates increasing the number of methods and public attributes in pattern classes that are not relevant to the pattern’s responsibilities. | |
Organizational grime | Organizational grime is a symptom of increasing coupling of the pattern files and namespaces that are not relevant to pattern responsibilities. |
DBS Category | Type | Description | |
---|---|---|---|
Code Smells | Complex class | Indicates that the class is too complex, includes several complex methods, and is very difficult to understand. | |
Data class | Indicates a symptom of class that only holds fields and crude methods for accessing them. | ||
Feature envy | Indicates a symptom of methods that accesses data of another object more than its own data. | ||
Brain Class | Indicates a symptom of class that is complex and centralizes the functionality of the system. | ||
Long method | Indicates a method or function that has grown too large in terms of LOCs. | ||
Refused bequest | Indicates a class inherited from a base class; however, not all the inherited behavior are needed. | ||
Large class/God Class/blob class | Indicates classes which operate most of the work, have too many responsibilities, and excessively large and complex. | ||
Data Clumps | Indicates that different parts of the codes, including similar groups of variables should be transformed into their own classes. | ||
Schizophrenic Class | Indicates a class that captures two or more key abstractions. | ||
Blob Methods | Indicates a class that holds most of the processing and executes most of the decisions. | ||
Duplication | Sibling Duplication | Indicates a duplication between siblings in an inheritance hierarchy. | |
Internal Duplication | Indicates methods that are related to the same class or module. | ||
External Duplication | Indicates unrelated operations. | ||
Duplicated Code | Indicates a very similar code that is repeated at different locations. | ||
Intensive Coupling | Indicates a class that calls many other methods from a few classes. | ||
Tradition Breaker | Indicates classes that do not use their parents protected members. | ||
Message Chains | Indicates a long list of call methods. | ||
Shotgun surgery | Indicates a method called by many classes, many times. | ||
Divergent Change | Indicates classes with many changes made to them. | ||
Middelman | Indicates a class that implements one action, while assigning the work to another class. | ||
AntiSingleton | Indicates a class that has changeable variables, which could be used as global variables. | ||
SwissArmykinfe | Indicates a class that has a set of many methods, providing unrelated functionalities. | ||
Long Parameter List | Indicates a class that has at least one method with a long list of parameters. | ||
Speculative Generality | Indicates a class that is an abstract class; however, it has few children that do not use its methods. |
References
- Reimanis, D.; Izurieta, C. Behavioral Evolution of Design Patterns: Understanding Software Reuse Through the Evolution of Pattern Behavior. In International Conference on Software and Systems Reuse; Springer Science and Business Media LLC: Berlin/Heidelberg, Germany, 2019; pp. 77–93. [Google Scholar]
- Izurieta, C.; Bieman, J.M. A multiple case study of design pattern decay, grime, and rot in evolving software systems. Softw. Qual. J. 2013, 21, 289–323. [Google Scholar] [CrossRef]
- Feitosa, D.; Ampatzoglou, A.; Avgeriou, P.; Chatzigeorgiou, A.; Nakagawa, E.Y. What can violations of good practices tell about the relationship between GoF patterns and run-time quality attributes? Inf. Softw. Technol. 2019, 105, 1–16. [Google Scholar] [CrossRef]
- Sousa, B.L.; Bigonha, M.; Ferreira, K.A.M. An exploratory study on cooccurrence of design patterns and bad smells using software metrics. Softw. Pract. Exp. 2019, 49, 1079–1113. [Google Scholar] [CrossRef]
- Freeman, E.; Robson, E.; Bates, B.; Sierra, K. Head First Design Patterns; O’Reilly Media, Inc: Newton, MA, USA, 2004. [Google Scholar]
- Gamma, E. Design Patterns: Elements of Reusable Object-Oriented Software; Pearson Education India: Delhi, India, 1995. [Google Scholar]
- Voorhees, D.P. Introduction to Design Patterns. In The Data Science Design Manual; Springer Science and Business Media LLC: Cham, Switzerland, 2020; pp. 389–402. [Google Scholar]
- Elish, M.O.; Mohammed, M.A. Quantitative analysis of fault density in design patterns: An empirical study. Inf. Softw. Technol. 2015, 66, 58–72. [Google Scholar] [CrossRef]
- Onarcan, M.O.; Fu, Y. A Case Study on Design Patterns and Software Defects in Open Source Software. J. Softw. Eng. Appl. 2018, 11, 249–273. [Google Scholar] [CrossRef] [Green Version]
- Riehle, D. Lessons Learned from Using Design Patterns in Industry Projects. In Transactions on Pattern Languages of Programming II; Springer Science and Business Media LLC: Berlin/Heidelberg, Germany, 2011; Volume 6510, pp. 1–15. [Google Scholar]
- Beck, K.; Crocker, R.; Meszaros, G.; Coplien, J.O.; Dominick, L.; Paulisch, F.; Vlissides, J. Industrial experience with design patterns. In Proceedings of the IEEE 18th International Conference on Software Engineering, Montreal, QC, Canada, 1–6 October 2002; pp. 103–114. [Google Scholar]
- Vokáč, M.; Tichy, W.; Sjøberg, D.I.K.; Arisholm, E.; Aldrin, M. A Controlled Experiment Comparing the Maintainability of Programs Designed with and without Design Patterns—A Replication in a Real Programming Environment. Empir. Softw. Eng. 2004, 9, 149–195. [Google Scholar] [CrossRef]
- Zafeiris, V.E.; Poulias, S.H.; Diamantidis, N.; Giakoumakis, E. Automated refactoring of super-class method invocations to the Template Method design pattern. Inf. Softw. Technol. 2016, 82, 19–35. [Google Scholar] [CrossRef]
- Turkistani, B.; Liu, Y. Reducing the Large Class Code Smell by Applying Design Patterns. In Proceedings of the 2019 IEEE International Conference on Electro Information Technology (EIT), Brookings, SD, USA, 20–22 May 2019; Institute of Electrical and Electronics Engineers (IEEE): Piscataway, NJ, USA, 2019; pp. 590–595. [Google Scholar]
- Ouni, A.; Kessentini, M.; Cinnéide, M.Ó.; Sahraoui, H.; Deb, K.; Inoue, K. MORE: A multi-objective refactoring recommendation approach to introducing design patterns and fixing code smells. J. Softw. Evol. Process 2017, 29, e1843. [Google Scholar] [CrossRef]
- Arcelli, D.; Di Pompeo, D. Applying Design Patterns to Remove Software Performance Antipatterns: A Preliminary Approach. Procedia Comput. Sci. 2017, 109, 521–528. [Google Scholar] [CrossRef]
- Alfadel, M.; AlJasser, K.; Alshayeb, M. Empirical study of the relationship between design patterns and code smells. PLoS ONE 2020, 15, e0231731. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Walter, B.; Alkhaeir, T. The relationship between design patterns and code smells: An exploratory study. Inf. Softw. Technol. 2016, 74, 127–142. [Google Scholar] [CrossRef]
- Griffith, I.; Izurieta, C. Design pattern decay: The case for class grime. In Proceedings of the 8th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, Torino, Italy, 18–19 September 2014; pp. 1–4. [Google Scholar]
- Sousa, B.; Bigonha, M.; Ferreira, K.A.M. A systematic literature mapping on the relationship between design patterns and bad smells. In Proceedings of the 33rd Annual ACM Symposium on Applied Computing, ACM, Pau, France, 9–13 April 2018; pp. 1528–1535. [Google Scholar]
- Mayvan, B.B.; Rasoolzadegan, A.; Yazdi, Z.G. The state of the art on design patterns: A systematic mapping of the literature. J. Syst. Softw. 2017, 125, 93–118. [Google Scholar] [CrossRef]
- Sehgal, R.; Mehrotra, D.; Nagpal, R.; Sharma, R. Green software: Refactoring approach. J. King Saud Univ. Comput. Inf. Sci. 2020. [Google Scholar] [CrossRef]
- Hussain, S.; Keung, J.; Sohail, M.K.; Khan, A.A.; Ahmad, G.; Mufti, M.R.; Khatak, H.A. Methodology for the quantification of the effect of patterns and anti-patterns association on the software quality. IET Softw. 2019, 13, 414–422. [Google Scholar] [CrossRef]
- Feitosa, D.; Ampatzoglou, A.; Avgeriou, P.; Nakagawa, E.Y. Correlating Pattern Grime and Quality Attributes. IEEE Access 2018, 6, 23065–23078. [Google Scholar] [CrossRef]
- Feitosa, D.; Avgeriou, P.; Ampatzoglou, A.; Nakagawa, E.Y. The Evolution of Design Pattern Grime: An Industrial Case Study. In International Conference on Product-Focused Software Process Improvement, Innsbruck, Austria, 29 November–1 December 2017; Springer Science and Business Media LLC: Berlin/Heidelberg, Germany, 2017; pp. 165–181. [Google Scholar]
- Dale, M.; Izurieta, C. Impacts of design pattern decay on system quality. In Proceedings of the 8th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement—ESEM ’14, Torino, Italy, 18–19 September 2014; pp. 1–4. [Google Scholar] [CrossRef]
- Schanz, T.; Izurieta, C. Object oriented design pattern decay: A taxonomy. In Proceedings of the 2010 ACM-IEEE International Symposium on Empirical Software Engineering and Measurement, Bolzano-Bolzen, Italy, 16–17 September 2010; pp. 1–8. [Google Scholar]
- Alkhaeir, T.; Walter, B. The Effect of Code Smells on the Relationship Between Design Patterns and Defects. IEEE Access 2021, 9, 3360–3373. [Google Scholar] [CrossRef]
- Imran, A.; Kosar, T. Software Sustainability: A Systematic Literature Review and Comprehensive Analysis. arXiv 2019, arXiv:1910.06109. [Google Scholar]
- Kitchenham, B.; Brereton, O.P.; Budgen, D.; Turner, M.; Bailey, J.; Linkman, S. Systematic literature reviews in software engineering—A systematic literature review. Inf. Softw. Technol. 2009, 51, 7–15. [Google Scholar] [CrossRef]
- Kitchenham, B.; Charters, S. Guidelines for Performing Systematic Literature Reviews in Software Engineering, Version 2.3, EBSE Technical Report EBSE-2007-01, Keele University and University of Durham. 2007. Available online: https://www.bibsonomy.org/bibtex/aed0229656ada843d3e3f24e5e5c9eb9 (accessed on 20 August 2021).
- Webster, J.; Watson, R.T. Analyzing the past to prepare for the future: Writing a literature review. MIS Q. 2002, 26, xiii–xxiii. [Google Scholar]
- Kitchenham, B.; Pretorius, R.; Budgen, D.; Brereton, O.P.; Turner, M.; Niazi, M.; Linkman, S. Systematic literature reviews in software engineering—A tertiary study. Inf. Softw. Technol. 2010, 52, 792–805. [Google Scholar] [CrossRef]
- Nidhra, S.; Yanamadala, M.; Afzal, W.; Torkar, R. Knowledge transfer challenges and mitigation strategies in global software development—A systematic literature review and industrial validation. Int. J. Inf. Manag. 2013, 33, 333–355. [Google Scholar] [CrossRef] [Green Version]
- Jaafar, F.; Guéhéneuc, Y.-G.; Hamel, S.; Khomh, F.; Zulkernine, M. Evaluating the impact of design pattern and anti-pattern dependencies on changes and faults. Empir. Softw. Eng. 2016, 21, 896–931. [Google Scholar] [CrossRef]
- Cardoso, B.; Figueiredo, E. Co-Occurrence of Design Patterns and Bad Smells in Software Systems: An Exploratory Study. In Anais do XI Simpósio Brasileiro de Sistemas de Informação (SBSI); Sociedade Brasileira de Computação: Porto Alegre, Brazil, 2015. [Google Scholar]
- Speicher, D. Code Quality Cultivation. In International Joint Conference on Knowledge Discovery, Knowledge Engineering, and Knowledge Management; Springer Science and Business Media LLC: Berlin/Heidelberg, Germany, 2013; pp. 334–349. [Google Scholar]
- Sousa, B.; Bigonha, M.; Ferreira, K. Evaluating Co-Occurrence of GOF Design Patterns with God Class and Long Method Bad Smells. In Anais do Simpósio Brasileiro de Sistemas de Informação (SBSI); Sociedade Brasileira de Computação: Agronomia, Brazil, 2017; pp. 396–403. [Google Scholar]
- Kaur, A.; Singh, S. Detecting software bad smells from software design patterns using machine learning algorithms. Int. J. Appl. Eng. Res. 2018, 13, 10005–10010. [Google Scholar]
- Mohammed, M.A.; Elish, M.O. Empirical assessment of design patterns’ fault-proneness at different granularity levels. Adv. Comput. Des. 2017, 2, 293–311. [Google Scholar]
- Fowler, M.; Beck, K.; Brant, J.; Opdyke, W. Refactoring: Improving the Design of Existing Code; Addison-Wesley: Boston, MA, USA, 1999. [Google Scholar]
- Lanza, M.; Marinescu, R. Object-Oriented Metrics in Practice: Using Software Metrics to Characterize, Evaluate, And Improve The Design Of Object-Oriented Systems; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2007. [Google Scholar]
- Brown, W.J.; Malveau, R.C.; McCormick III, H.W.; Mowbray, T.J. AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 1998. [Google Scholar]
- Izurieta, C.; Reimanis, D.; Griffith, I.; Schanz, T. Structural and Behavioral Taxonomies of Design Pattern Grime. In Proceedings of the 12th Seminar on Advanced Techniques & Tools for Software Evolution, SATToSE, Bolzano, Italy, 8–10 July 2019; pp. 8–10. [Google Scholar]
- Griffith, I.; Izurieta, C. Design pattern decay: An extended taxonomy and empirical study of grime and its impact on design pattern evolution. In Proceedings of the 11th ACM/IEEE International Doctoral Symposium on Empirical Software Engineering and Measurements, Baltimore, MD, USA, 10–11 October 2013. [Google Scholar]
- Reimanis, D.; Izurieta, C. Towards Assessing the Technical Debt of Undesired Software Behaviors in Design Patterns. In Proceedings of the 2016 IEEE 8th International Workshop on Managing Technical Debt (MTD), Raleigh, NC, USA, 4 October 2016; pp. 24–27. [Google Scholar] [CrossRef]
- Whiting, E.; Andrews, S. Drift and Erosion in Software Architecture: Summary and Prevention Strategies. In Proceedings of the 2020 the 4th International Conference on Information System and Data Mining, Hilo, HI, USA, 15–17 May 2020; pp. 132–138. [Google Scholar]
- Moreno, M.N.; Segrera, S.; López, V.F. Association Rules: Problems, solutions and new applications. In Actas del III Taller Nacional de Minería de Datos y Aprendizaje; 2005; pp. 317–323. Available online: http://www.lsi.us.es/redmidas/CEDI/papers/892.pdf (accessed on 1 September 2021).
- dos Reis, J.P.; e Abreu, F.B.; de Figueiredo Carneiro, G.; Anslow, C. Code Smells Detection and Visualization: A Systematic Literature Review. In Archives of Computational Methods in Engineering; Springer: Berlin/Heidelberg, Germany, 2021; pp. 1–48. [Google Scholar]
- Mathuria, M. Decision tree analysis on j48 algorithm for data mining. Int. J. Adv. Res. Comput. Sci. Softw. Eng. 2013, 3, 1114–1119. [Google Scholar]
- Zanoni, M.; Fontana, F.A.; Stella, F. On applying machine learning techniques for design pattern detection. J. Syst. Softw. 2015, 103, 102–117. [Google Scholar] [CrossRef]
- Yu, D.; Zhang, P.; Yang, J.; Chen, Z.; Liu, C.; Chen, J. Efficiently detecting structural design pattern instances based on ordered sequences. J. Syst. Softw. 2018, 142, 35–56. [Google Scholar] [CrossRef]
- Izurieta, C.; Bieman, J.M. Testing Consequences of Grime Buildup in Object Oriented Design Patterns. In Proceedings of the 2008 International Conference on Software Testing, Verification, and Validation, Lillehammer, Norway, 9–11 April 2008; Institute of Electrical and Electronics Engineers (IEEE): Los Alamitos, CA, USA, 2008; pp. 171–179. [Google Scholar]
- Khomh, F.; Gueheneuc, Y.-G.; Antoniol, G. Playing roles in design patterns: An empirical descriptive and analytic study. In Proceedings of the 2009 IEEE International Conference on Software Maintenance, Edmonton, UK, 20–26 September 2009; Institute of Electrical and Electronics Engineers (IEEE): Los Alamitos, CA, USA, 2009; pp. 83–92. [Google Scholar]
- Posnett, D.; Bird, C.; Dévanbu, P. An empirical study on the influence of pattern roles on change-proneness. Empir. Softw. Eng. 2010, 16, 396–423. [Google Scholar] [CrossRef] [Green Version]
- García-Berna, J.A.; De Gea, J.M.C.; Ros, J.N.; Fernández-Alemán, J.L.; Nicolás, J.; Toval, A. Surveying the Environmental and Technical Dimensions of Sustainability in Software Development Companies. Appl. Sci. 2018, 8, 2312. [Google Scholar] [CrossRef] [Green Version]
- Le, D.M.; Carrillo, C.; Capilla, R.; Medvidovic, N. Relating Architectural Decay and Sustainability of Software Systems. In Proceedings of the 2016 13th Working IEEE/IFIP Conference on Software Architecture (WICSA), Venice, Italy, 5–8 April 2016; IEEE: Piscataway, NJ, USA, 2016; pp. 178–181. [Google Scholar]
- Skalka, J.; Drlik, M.; Benko, L.; Kapusta, J.; Rodríguez del Pino, J.C.; Smyrnova-Trybulska, E.; Stolinska, A.; Svec, P.; Turcinek, P. Conceptual Framework for Programming Skills Development Based on Microlearning and Automated Source Code Evaluation in Virtual Learning Environment. Sustainability 2021, 13, 3293. [Google Scholar] [CrossRef]
- Ahmad, R.; Hussain, A.; Baharom, F. Software sustainability characteristic for software development towards long living software. Environment 2018, 20, 34. [Google Scholar]
- Ampatzoglou, A.; Chatzigeorgiou, A.; Charalampidou, S.; Avgeriou, P. The Effect of GoF Design Patterns on Stability: A Case Study. IEEE Trans. Softw. Eng. 2015, 41, 781–802. [Google Scholar] [CrossRef]
- Olbrich, S.M.; Cruzes, D.S.; Sjoberg, D.I. Are all code smells harmful? A study of God Classes and Brain Classes in the evolution of three open source systems. In Proceedings of the 2010 IEEE International Conference on Software Maintenance, Timisoara, Romania, 12–18 September 2010; IEEE: Piscataway, NJ, USA, 2010; pp. 1–10. [Google Scholar]
- García-Mireles, G.A.; Moraga, M.Á.; García, F.; Calero, C.; Piattini, M. Interactions between environmental sustainability goals and software product quality: A mapping study. Inf. Softw. Technol. 2018, 95, 108–129. [Google Scholar] [CrossRef]
- Reimann, J.; Brylski, M.; Aßmann, U. A tool-supported quality smell catalogue for android developers. In Proceedings of the Conference Modellierung 2014 in the Workshop Modellbasierte und Modellgetriebene Softwaremodernisierung–MMSM, Vienna, Austria, 19–21 March 2014; Available online: https://www.semanticscholar.org/paper/A-Tool-Supported-Quality-Smell-Catalogue-For-Reimann-Brylski/7ce532e0e933037c5f410a9e3cbc07f5513c3078 (accessed on 1 September 2021).
- Johann, T.; Dick, M.; Naumann, S.; Kern, E. How to measure energy-efficiency of software: Metrics and measurement results. In Proceedings of the 2012 First International Workshop on Green and Sustainable Software (GREENS), Zurich, Switzerland, 3 June 2012; pp. 51–54. [Google Scholar]
- Yang, X.; Han, M.; Tang, H.; Li, Q.; Luo, X. Detecting Defects With Support Vector Machine in Logistics Packaging Boxes for Edge Computing. IEEE Access 2020, 8, 64002–64010. [Google Scholar] [CrossRef]
Year | 2010–2020 |
---|---|
Search keywords | (“design pattern” OR “GoF design pattern” OR “object-oriented design pattern” OR “Gang of four design pattern”) AND (“decay” OR “grime” OR “smell” OR “bad smell” OR “code smell” OR “defect” OR “software defect” OR “degenerate” OR “change proneness” OR “violation” OR “anti-pattern”) |
Databases | ScienceDirect, IEEE Xplore, Springer-Link, Web of Science, ACM, Scopus |
Inclusion Criteria (IC) |
---|
IC1: Publication date 2010 to 2020 (both years inclusive). IC2: Conference proceedings AND Peer-reviewed journal articles. IC3: In English & accessible online. IC4: Studies focused on GoF design pattern. IC5: The studies report at least one bad smell each (e.g., code smell, grime). IC6: The studies present experimental research and report the results. |
Exclusion Criteria (EC) |
EC1: The study discusses GoF design patterns and bad smells, but NOT the existence of bad smells within GOF design patterns. EC2: The study mentions bad smells (e.g., code smell, grime) but Not within the GoF design pattern. EC3: Studies focusing on the consequences of applying GoF design patterns, but NOT the consequences of bad smells. EC4: Duplicate studies published in different venues (reporting similar results). EC5: Studies that use design patterns as a solution. EC6: Studies that revolves around software development environments for non-professional programmers. |
Study ID | QA1 | QA2 | QA3 | QA4 | QA5 | Total | Include/Exclude |
---|---|---|---|---|---|---|---|
1 | 1 | 1 | 1 | 1 | 1 | 5 | Include |
2 | 1 | 1 | 1 | 1 | 1 | 5 | Include |
3 | 0.5 | 1 | 0.5 | 0.5 | 0.5 | 3 | Include |
4 | 1 | 1 | 1 | 0.5 | 0.5 | 4 | Include |
5 | 0.5 | 0.5 | 0.5 | 0 | 0 | 1.5 | Exclude |
6 | 1 | 0.5 | 1 | 0 | 1 | 3.5 | Include |
7 | 1 | 1 | 1 | 1 | 0.5 | 4.5 | Include |
Elements | Description |
---|---|
ID | The identifier of the study. |
Reference, year, and Publication venue | Extraction of the authors name, publication year and the venue of the publication. |
Study type | Categorizion of the study (i.e., journal article or conference proceeding). |
Study objectives | Identification of the main aim of the study. |
bad smells type | Identification of the type of the bad smells which are presented in the study (i.e., code smell, grime). |
Design pattern type and category | The type of the pattern discussed in the study (i.e., singleton, adapter, etc.) and the category it belongs to (i.e., creational patterns, structural patterns, or behavioral patterns). |
Granularity level of analysis | The level of design pattern investigated in the study (i.e., Design Level, Category level, Pattern level, and Role level). |
Detection method/tool/approach/strategy | The proposed detection method or the adopted tool and strategy for the detection of bad smells. |
Dataset utilized | The dataset utilized in the study to investigate DBS occurrences. |
context of dataset utilized | To identify the context of the utilized dataset (i.e., educational context, gaming context, etc.) |
ID | Reference | Publication Year | Venue | Title | RQ1 | RQ2 | RQ3 |
---|---|---|---|---|---|---|---|
1 | [17] | 2020 | Journal article | Empirical study of the relationship between design patterns and code smells | ✓ | ✓ | ✓ |
2 | [4] | 2019 | Conference proceeding | An exploratory study on cooccurrence of design patterns and bad smells using software metrics | ✓ | ✓ | ✓ |
3 | [1] | 2019 | Conference proceeding | Behavioral Evolution of Design Patterns: Understanding Software Reuse Through the Evolution of Pattern Behavior | ✓ | ✓ | ✓ |
4 | [23] | 2019 | Journal article | Methodology for the quantification of the effect of patterns and anti-patterns association on the software quality | ✓ | ✓ | |
5 | [24] | 2018 | Journal article | Correlating Pattern Grime and Quality Attributes | ✓ | ✓ | |
6 | [25] | 2017 | Conference proceeding | The Evolution of Design Pattern Grime: An Industrial Case Study | ✓ | ✓ | |
7 | [18] | 2016 | Journal article | The relationship between design patterns and code smells: An exploratory study | ✓ | ✓ | ✓ |
8 | [35] | 2016 | Journal article | Evaluating the impact of design pattern and anti-pattern dependencies on changes and faults | ✓ | ✓ | |
9 | [36] | 2015 | Conference proceeding | Co-Occurrence of Design Patterns and Bad Smells in Software Systems: An Exploratory Study | ✓ | ✓ | ✓ |
10 | [19] | 2014 | Conference proceeding | Design pattern decay: the case for class grime | ✓ | ✓ | ✓ |
11 | [26] | 2014 | Conference proceeding | Impacts of design pattern decay on system quality | ✓ | ✓ | |
12 | [37] | 2013 | Conference proceeding | Code Quality Cultivation | ✓ | ✓ | |
13 | [2] | 2013 | Journal article | A multiple case study of design pattern decay, grime, and rot in evolving software systems | ✓ | ✓ | ✓ |
14 | [27] | 2010 | Conference proceeding | Object oriented design pattern decay: a taxonomy | ✓ | ✓ | ✓ |
15 | [38] | 2017 | Conference proceeding | Evaluating co-occurrence of GOF design patterns with god class and long method bad smells | ✓ | ✓ | ✓ |
16 | [39] | 2018 | Journal article | Detecting Software Bad Smells from Software Design Patterns using Machine Learning Algorithms | ✓ | ✓ | ✓ |
DBS Granularity Level of Analysis | Types of Pattern Categories | Number of Studies | Paper ID |
---|---|---|---|
Design level | Creational patterns | 4 | 1, 4, 7, 14 |
Structural patterns | 3 | 1, 4, 7 | |
Behavioral patterns | 4 | 1, 4, 7, 14 | |
Category level | Creational patterns | 2 | 1, 14 |
Structural patterns | 1 | 1 | |
Behavioral patterns | 2 | 1, 14 | |
Pattern level | Creational patterns | 14 | 1, 2, 4, 5, 6, 7, 8, 10, 11, 13, 14, 15, 16, 3 |
Structural patterns | 13 | 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 15, 16 | |
Behavioral patterns | 16 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,16 | |
Role level | Creational patterns | 5 | 1, 2, 4,15, 13 |
Structural patterns | 7 | 1, 2, 4, 12, 15, 3, 13 | |
Behavioral patterns | 8 | 1, 2, 4, 9, 12, 15, 3, 13 |
DBS Types | Types of Pattern Categories | Design Pattern Types | Number of Studies | Paper ID |
---|---|---|---|---|
Code smell occurrences | Creational pattern | Abstract factory | 1 | 1 |
Builder | 1 | 1 | ||
Factory method | 7 | 1, 2, 4, 6, 7, 8, 15 | ||
Prototype | 5 | 1, 2, 4, 7, 8, | ||
Singleton | 5 | 1, 2, 7, 15, 16 | ||
Structural pattern | Adapter | 5 | 1, 2, 7, 15, 16 | |
Bridge | 4 | 1, 2, 15, 16 | ||
Composite | 6 | 1, 2, 4, 7, 8, 15 | ||
Decorator | 7 | 1, 2, 4, 7, 8, 12, 15 | ||
Façade | 1 | 1 | ||
Flyweight | 1 | 12 | ||
Proxy | 4 | 1, 2, 7, 15 | ||
Behavioral pattern | Command | 7 | 1, 2, 4,7, 8, 9, 15 | |
Interpreter | 1 | 12 | ||
Iterator | 1 | 1 | ||
Mediator | 2 | 1, 12 | ||
Memento | 2 | 1, 12 | ||
Observer | 6 | 1, 2, 4, 7, 8, 15 | ||
State | 5 | 1, 2, 7, 12, 15 | ||
Strategy | 5 | 1, 2,7, 12, 15 | ||
Template method | 6 | 1, 2, 7, 9, 15, 16 | ||
Visitor | 3 | 1, 2, 12 | ||
Chain of Responsibility | 0 | |||
Grime occurrence | Creational pattern | Abstract factory | 1 | 10 |
Builder | 0 | |||
Factory method | 6 | 5, 6, 10, 11, 13, 14 | ||
Prototype | 3 | 5, 6, 10 | ||
Singleton | 7 | 3, 5, 6, 10, 11, 13, 14 | ||
Structural pattern | Adapter | 5 | 3, 5, 6, 10, 13 | |
Bridge | 0 | |||
Composite | 3 | 5, 6, 10 | ||
Decorator | 3 | 5, 6, 10, | ||
Façade | 2 | 1, 10 | ||
Flyweight | 1 | 10 | ||
Proxy | 2 | 10, 13 | ||
Behavioral pattern | Command | 3 | 5, 6, 10 | |
Interpreter | 0 | |||
Iterator | 2 | 1, 13 | ||
Mediator | 2 | 1, 10 | ||
Memento | 0 | |||
Observer | 4 | 5, 6, 10, 13 | ||
State | 5 | 3, 5, 6, 10, 13 | ||
Strategy | 3 | 5, 6, 10 | ||
Template method | 4 | 3, 5, 6,10 | ||
Visitor | 4 | 5, 6, 10, 13 | ||
Chain of Responsibility | 0 |
Approach | Type of Detected DBS | Number of Studies | Paper ID |
---|---|---|---|
Conformance Checking Approach | Grime | 5 | 3, 10, 11, 13, 14 |
Metric-Based Approach | Grime/code smells | 3 | 5, 6, 8 |
Machine Learning Algorithms | Code smells | 1 | 16 |
Association Rule Mining Approach | Code smells | 5 | 1, 2, 7, 9, 15 |
Rule-Based Approach | Code smells | 2 | 4, 12 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Almadi, S.H.S.; Hooshyar, D.; Ahmad, R.B. Bad Smells of Gang of Four Design Patterns: A Decade Systematic Literature Review. Sustainability 2021, 13, 10256. https://doi.org/10.3390/su131810256
Almadi SHS, Hooshyar D, Ahmad RB. Bad Smells of Gang of Four Design Patterns: A Decade Systematic Literature Review. Sustainability. 2021; 13(18):10256. https://doi.org/10.3390/su131810256
Chicago/Turabian StyleAlmadi, Sara H. S., Danial Hooshyar, and Rodina Binti Ahmad. 2021. "Bad Smells of Gang of Four Design Patterns: A Decade Systematic Literature Review" Sustainability 13, no. 18: 10256. https://doi.org/10.3390/su131810256