[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
article

Evaluating the impact of design pattern and anti-pattern dependencies on changes and faults

Published: 01 June 2016 Publication History

Abstract

On the one hand, design patterns are solutions to recurring design problems, aimed at increasing reuse, flexibility, and maintainability. However, much prior work found that some patterns, such as the Observer and Singleton, are correlated with large code structures and argued that they are more likely to be fault prone. On the other hand, anti-patterns describe poor solutions to design and implementation problems that highlight weaknesses in the design of software systems and that may slow down maintenance and increase the risk of faults. They have been found to negatively impact change and fault-proneness. Classes participating in design patterns and anti-patterns have dependencies with other classes, e.g., static and co-change dependencies, that may propagate problems to other classes. We investigate the impact of such dependencies in object-oriented systems by studying the relations between the presence of static and co-change dependencies and (1) the fault-proneness, (2) the types of changes, and (3) the types of faults that these classes exhibit. We analyze six design patterns and 10 anti-patterns in 39 releases of ArgoUML, JFreeChart, and XercesJ, and investigate to what extent classes having dependencies with design patterns or anti-patterns have higher odds of faults than other classes. We show that in almost all releases of the three systems, classes having dependencies with anti-patterns are more fault-prone than others while this is not always true for classes with dependencies with design patterns. We also observe that structural changes are the most common changes impacting classes having dependencies with anti-patterns. Software developers could use this knowledge about the impact of design pattern and anti-pattern dependencies to better focus their testing and reviewing activities towards the most risky classes and to propagate changes adequately.

References

[1]
Alencar PSC, Cowan DD, Morales-Germán D, Lichtner KJ, Pereira de Lucena CJ, Nova LC (1995) A formal approach to design pattern definition and application. Tech Rep CS-95-29, Computer Systems Group, University of Waterloo.
[2]
Antoniol G, Fiutem R, Cristoforetti L (1998) Design pattern recovery in object-oriented software. In: Tilley S, Visaggio G (eds) Proceedings of the 6th International Workshop on Program Comprehension, pp 153-160. IEEE Computer Society Press.
[3]
Aversano L, Canfora G, Cerulo L, Del Grosso C, Di Penta M (2007) An empirical study on the evolution of design patterns. In: Foundations of Software Engineering. ACM Press, New York, NY, pp 385-394.
[4]
Aversano L, Cerulo L, Di Penta M (2009) Relationship between design patterns defects and crosscutting concern scattering degree: an empirical study. Institu Eng Technol 3(5):395-409.
[5]
Basili VR, Briand LC, Melo WL (1996) A validation of object-oriented design metrics as quality indicators. IEEE Trans Soft Eng 22(10):751-761.
[6]
Bernstein A, Ekanayake J, Pinzger M (2007) Improving defect prediction using temporal features and non linear models, In: Ninth International Workshop on Principles of Software Evolution, pp 11-18. ACM.
[7]
Binkley D, Gold N, Harman M, Li Z, Mahdavi K, Wegener J (2008) Dependence anti patterns. In: 4th International ERCIM Workshop on Software Evolution and Evolvability, pp 25-34.
[8]
Bouktif S, Antoniol G, Merlo E, Neteler M (2006) A plugin based architecture for software maintenance. Tech. Rep. EPM-RT-2006-03, Department of Computer Science École Polytechnique de Montréal.
[9]
Brown K (1996) Design reverse-engineering and automated design pattern detection in Smalltalk. Tech. Rep. TR-96-07, Department of Computer Science, University of Illinois at Urbana-Champaign.
[10]
Brown WJ, Malveau RC, Brown WH, McCormick III H. W., Mowbray TJ (1998) Anti Patterns: Refactoring Software, Architectures, and Projects in Crisis, 1st edn. Wiley.
[11]
Chidamber SR, Kemerer CF (1994) A metrics suite for object oriented design. IEEE Trans Softw Eng 20(6):476-493.
[12]
D'Ambros M, Lanza M, Robbes R (2009) On the relationship between change coupling and software defects In: Proceedings of the 16th Working Conference on Reverse Engineering. IEEE Computer Society, Washington, DC, pp 135-144.
[13]
Dasarathy B (1991) Nearest Neighbor ({NN}) Norms:{NN} Pattern Classification Techniques. IEEE Computer Society Press, Washington, DC.
[14]
Gall H, Hajek K, Jazayeri M (1998) Detection of logical coupling based on product release history In: The International Conference on Software Maintenance. IEEE Computer Society, Washington, DC, pp 190-200.
[15]
Gamma E, Helm R, Johnson R, Vlissides J (1994) Design Patterns - Elements of Reusable Object-Oriented Software, 1st edn. Addison-Wesley.
[16]
Gatrell M, Counsell S (2011) Design patterns and fault-proneness a study of commercial C# software. In: Research Challenges in Information Science (RCIS) pp 1-8. IEEE.
[17]
Gerlec C, Hericko M (2012) Analyzing structural software changes: A case study. In: The 5th Balkan Conference in Informatics, pp 117-120.
[18]
Gîrba T, Ducasse S, Kuhn A, Marinescu R, Daniel R (2007) Using concept analysis to detect co-change patterns In: International Workshop on Principles of Software Evolution. ACM, New York, NY, pp 83-89.
[19]
Guéhéneuc YG, Albin-Amiot H (2004) Recovering binary class relationships: Putting icing on the UML cake. In: Schmidt DC (ed) Proceedings of the 19th Conference on Object-Oriented Programming, Systems, Languages, and Applications pp 301-314. ACM Press.
[20]
Guéhéneuc YG, Antoniol G (2008) DeMIMA: A multi-layered framework for design pattern identification. IEEE Trans Softw Eng 34(5):667-684.
[21]
Guéhéneuc YG, Sahraoui H, Zaidi F (2004) Fingerprinting design patterns In: Proceedings of the 11th Working Conference on Reverse Engineering. IEEE Computer Society, Washington, DC, pp 172-181.
[22]
Halstead MH (1977) Elements of Software Science (Operating and Programming Systems Series). Elsevier Science Inc., New York, NY.
[23]
Hassan AE (2009) Predicting faults using the complexity of code changes In: Proceedings of the 31st International Conference on Software Engineering. IEEE Computer Society, Washington, DC, pp 78-88.
[24]
Hassan AE, Holt RC (2005) The top ten list: Dynamic fault prediction In: Proceedings of the 21st IEEE International Conference on Software Maintenance, pp 263-272. IEEE Computer Society.
[25]
Hosmer DW, Lemeshow S (2000) Applied logistic regression (Wiley Series in probability and statistics) Wiley-Interscience Publication.
[26]
Iacob C. (2011) A design pattern mining method for interaction design. In: The 3rd ACM SIGCHI Symposium on Engineering Interactive Computing Systems, pp 217-222. ACM.
[27]
Jaafar F, Guéhéneuc YG, Hamel S, Antoniol G (2011) An exploratory study of macro co-changes. In: Proceedings of the 18th Working Conference on Reverse Engineering, pp 325-334.
[28]
Jaafar F, Guéhéneuc YG, Hamel S, Khomh F (2013) Analysing anti-patterns static relationships with design patterns. Electronic Communications of the European Association of Software Science and Technology 59:1-26.
[29]
Jaafar F., Guéhéneuc YG, Hamel S, Khomh F (2013) Mining the relationship between anti-patterns dependencies and fault-proneness. In: Proceedings of the 20th Working Conference on Reverse Engineering: 351-360.
[30]
Jahnke JH, Schäfer W, Zündorf A (1997) Generic fuzzy reasoning nets as a basis for reverse engineering relational database applications. In: Jazayeri M (ed) Proceedings of the 6th European Software Engineering Conference pp 193-210. ACM Press.
[31]
Khomh F, Penta MD, Guéhéneuc YG, Antoniol G (2012) An exploratory study of the impact of antipatterns on class change - and fault-proneness. Empirical Software Engineering, pp 243-275.
[32]
Krämer C, Prechelt L (1996) Design recovery by automated search for structural design patterns in object-oriented software. In: Wills LM, Baxter I (eds) Proceedings of the 3rd Working Conference on Reverse Engineering. IEEE Computer Society Press, pp 208-215.
[33]
Kullbach B, Winter A (1999) Querying as an enabling technology in software reengineering. In: Nesi P, Verhoef C (eds) Proceedings of the 3rd Conference on Software Maintenance and Reengineering. IEEE Computer Society Press, pp 42-50.
[34]
Lanza M, Marinescu R (2006) Object-Oriented Metrics in Practice. Springer-Verlag.
[35]
Lethbridge NAT (1998) Extracting concepts from file names; a new file clustering criterion In: Proceedings of the International Conference on Software Engineering, pp 84-93.
[36]
Marcus A, Poshyvanyk D, Ferenc R (2008) Using the conceptual cohesion of classes for fault prediction in object-oriented systems. IEEE Transactions On Software Engineering, pp 287-300.
[37]
Marinescu R, Marinescu C (2011) Are the clients of flawed classes (also) defect prone? In: Proceedings of the IEEE 11th International Working Conference on Source Code Analysis and Manipulation. IEEE Computer Society, Washington, DC, pp 65-74.
[38]
McCabe TJ (1976) A complexity measure In: Proceedings of the 2Nd International Conference on Software Engineering. IEEE Computer Society Press, Los Alamitos, CA, pp 407-417.
[39]
Moha N, Guéhéneuc YG, Duchien L, Le Meur AF (2010) DECOR: A method for the specification and detection of code and design smells. Trans Softw Eng:20-36.
[40]
Moser R, Pedrycz W, Succi G (2008) A comparative analysis of the efficiency of change metrics and static code attributes for defect prediction In: The 30th International Conference on Software Engineering. ACM, New York, NY, pp 181-190.
[41]
Nagappan N, Ball T (2005) Use of relative code churn measures to predict system defect density In: The 27th International Conference on Software Engineering, ACM.
[42]
Neuhaus S, Zimmermann T, Holler C, Zeller A (2007) Predicting vulnerable software components. In: The 14th Conference on Computer and Communications Security. ACM, pp 529-540.
[43]
Oliveto R, Gethers M, Bavota G, Poshyvanyk D, De Lucia A (2011) Identifying method friendships to remove the feature envy bad smell (nier track) In: Proceedings of the 33rd International Conference on Software Engineering. ACM, New York, NY, pp 820-823.
[44]
Ostrand T, Weyuker E, Bell R (2005) Predicting the location and number of faults in large software systems. IEEE Transactions on Software Engineering, pp 340-355.
[45]
Pedersen T (1996) Fishing for exactness In: Proceedings of the South-Central SAS Users Group Conference cmp-lg/9608010, pp 188-200.
[46]
Pietrzak B, Walter B (2006) Leveraging code smell detection with inter-smell relations. Extreme Programming and Agile Processes in Software Engineering, pp 75-84.
[47]
Quilici A, Yang Q, Woods S (1997) Applying plan recognition algorithms to program understanding. J Autom Softw Eng 5(3):347-372.
[48]
Ratiu D, Ducasse S, Gîrba T, Marinescu R (2004) Using history information to improve design flaws detection. In: Proceedings of the Eighth Euromicro Working Conference on Software Maintenance and Reengineering. IEEE Computer Society, pp 223-233.
[49]
Romano D, Raila P, Pinzger M, Khomh F (2012) Analyzing the impact of antipatterns on change-proneness using fine-grained source code changes Working Conference on Reverse Engineering, pp 437-446.
[50]
Rothman KJ, Lanes S, Sacks ST (2004) The reporting odds ratio and its advantages over the proportional reporting ratio. Pharmacoepidemiol Drug Safety 13(8):519-523.
[51]
Settas D, Cerone A, Fenz S (2012) Enhancing ontology-based antipattern detection using bayesian networks. Expert Syst Appl 39(10):9041-9053.
[52]
Sheskin DJ (2007) Handbook of Parametric and Nonparametric Statistical Procedures. Chapman & Hall/CRC.
[53]
Sliwerski J, Zimmermann T, Zeller A (2005) When do changes induce fixes? SIGSOFT Softw Eng Notes 30(4):1-5.
[54]
Subramanyam R, Krishnan MS (2003) Empirical analysis of ck metrics for object-oriented design complexity: Implications for software defects. IEEE Trans Softw Eng 29(4):297-310.
[55]
Tatsubori M, Chiba S (1998) Programming support of design patterns with compile-time reflection. In: Fabre JC, Chiba S (eds) Proceedings of the 1st OOPSLA workshop on Reflective Programming in C++ and Java. Center for Computational Physics, University of Tsukuba, pp 56-60. UTCCP Report 98-4.
[56]
Tsantalis N, Chatzigeorgiou A, Stephanides G, Halkidis S (2006) Design pattern detection using similarity scoring. IEEE Trans Softw Eng 32(11):896-909.
[57]
Van Emden E, Moonen L (2002) Java quality assurance by detecting code smells In: The 9th Working Conference on Reverse Engineering IEEE Computer, pp 97-107. Society Press.
[58]
Vokac M (2004) Defect frequency and design patterns: An empirical study of industrial code. IEEE Transaction on Software Engineering, pp 904-917.
[59]
Webster BF (1995) Pitfalls of Object Oriented Development, 1st edn. M & T Books.
[60]
Wuyts R (1998) Declarative reasoning about the structure of object-oriented systems. Proceedings of Technology of Object-Oriented Systems (TOOLS'98), pp 112-124.
[61]
Yamashita A, Moonen L (2012) Do code smells reflect important maintainability aspects? In: Software Maintenance (ICSM), 2012 28th IEEE International Conference on. IEEE, pp 306-315.
[62]
Yamashita A, Moonen L (2013) To what extent can maintenance problems be predicted by code smell detection? - an empirical study. Info Softw Technol 55(12):2223-2242.
[63]
Yin RK (2002) Case Study Research: Design and Methods - Third Edition. SAGE Publications, London.
[64]
Ying ATT, Murphy GC, Ng R, Chu-Carroll MC (2004) Predicting source code changes by mining change history, vol 30, pp 574-586.
[65]
Yinn RK (2002) Case study research: design and methods. SAGE, London, England.
[66]
Zimmermann T, Nagappan N (2008) Predicting defects using network analysis on dependency graphs. In: Proceedings of the 30th International Conference on Software Engineering, pp 531-540. ACM.
[67]
Zimmermann T, Premraj R, Zeller A (2007) Predicting defects for eclipse In: Proceedings of the Third International Workshop on Predictor Models in Software Engineering. IEEE Computer Society, Washington, DC, pp 9-16.
[68]
Zimmermann T, Weisgerber P, Diehl S, Zeller A (2004) Mining version histories to guide software changes. In: Proceedings of the 26th International Conference on Software Engineering, pp 563-572. IEEE Computer Society.

Cited By

View all
  • (2023)A Comparative Analysis on the Detection of Web Service Anti-Patterns Using Various MetricsProceedings of the 16th Innovations in Software Engineering Conference10.1145/3578527.3578534(1-7)Online publication date: 23-Feb-2023
  • (2022)Role of WSDL Metrics in the Detection of Web Service Anti-PatternsProceedings of the 15th Innovations in Software Engineering Conference10.1145/3511430.3511459(1-4)Online publication date: 24-Feb-2022
  • (2022)Can Clean New Code Reduce Technical Debt Density?IEEE Transactions on Software Engineering10.1109/TSE.2020.303255748:5(1705-1721)Online publication date: 1-May-2022
  • Show More Cited By
  1. Evaluating the impact of design pattern and anti-pattern dependencies on changes and faults

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image Empirical Software Engineering
    Empirical Software Engineering  Volume 21, Issue 3
    June 2016
    688 pages

    Publisher

    Kluwer Academic Publishers

    United States

    Publication History

    Published: 01 June 2016

    Author Tags

    1. Anti-patterns
    2. Change proneness
    3. Co-change
    4. Design patterns
    5. Faults proneness
    6. Static relationships

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 23 Dec 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)A Comparative Analysis on the Detection of Web Service Anti-Patterns Using Various MetricsProceedings of the 16th Innovations in Software Engineering Conference10.1145/3578527.3578534(1-7)Online publication date: 23-Feb-2023
    • (2022)Role of WSDL Metrics in the Detection of Web Service Anti-PatternsProceedings of the 15th Innovations in Software Engineering Conference10.1145/3511430.3511459(1-4)Online publication date: 24-Feb-2022
    • (2022)Can Clean New Code Reduce Technical Debt Density?IEEE Transactions on Software Engineering10.1109/TSE.2020.303255748:5(1705-1721)Online publication date: 1-May-2022
    • (2022)On the relation between architectural smells and source code changesJournal of Software: Evolution and Process10.1002/smr.239834:1Online publication date: 18-Jan-2022
    • (2021)An Empirical Analysis on the Prediction of Web Service Anti-patterns Using Source Code Metrics and Ensemble TechniquesComputational Science and Its Applications – ICCSA 202110.1007/978-3-030-87007-2_19(263-276)Online publication date: 13-Sep-2021
    • (2021)A Novel Approach for the Detection of Web Service Anti-Patterns Using Word Embedding TechniquesComputational Science and Its Applications – ICCSA 202110.1007/978-3-030-87007-2_16(217-230)Online publication date: 13-Sep-2021
    • (2020)Mining Design Pattern Use Scenarios and Related Design Pattern Pairs: A Case Study on Online PostsJournal of Computer Science and Technology10.1007/s11390-020-0407-435:5(963-978)Online publication date: 1-Oct-2020
    • (2019)How practitioners perceive coding proficiencyProceedings of the 41st International Conference on Software Engineering10.1109/ICSE.2019.00098(924-935)Online publication date: 25-May-2019
    • (2018)A systematic literature mapping on the relationship between design patterns and bad smellsProceedings of the 33rd Annual ACM Symposium on Applied Computing10.1145/3167132.3167295(1528-1535)Online publication date: 9-Apr-2018
    • (2018)Understanding semantic style by analysing student codeProceedings of the 20th Australasian Computing Education Conference10.1145/3160489.3160500(73-82)Online publication date: 30-Jan-2018
    • Show More Cited By

    View Options

    View options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media