Advertisement

Empirical Software Engineering

, Volume 17, Issue 3, pp 243–275 | Cite as

An exploratory study of the impact of antipatterns on class change- and fault-proneness

  • Foutse Khomh
  • Massimiliano Di Penta
  • Yann-Gaël Guéhéneuc
  • Giuliano Antoniol
Article

Abstract

Antipatterns are poor design choices that are conjectured to make object-oriented systems harder to maintain. We investigate the impact of antipatterns on classes in object-oriented systems by studying the relation between the presence of antipatterns and the change- and fault-proneness of the classes. We detect 13 antipatterns in 54 releases of ArgoUML, Eclipse, Mylyn, and Rhino, and analyse (1) to what extent classes participating in antipatterns have higher odds to change or to be subject to fault-fixing than other classes, (2) to what extent these odds (if higher) are due to the sizes of the classes or to the presence of antipatterns, and (3) what kinds of changes affect classes participating in antipatterns. We show that, in almost all releases of the four systems, classes participating in antipatterns are more change-and fault-prone than others. We also show that size alone cannot explain the higher odds of classes with antipatterns to underwent a (fault-fixing) change than other classes. Finally, we show that structural changes affect more classes with antipatterns than others. We provide qualitative explanations of the increase of change- and fault-proneness in classes participating in antipatterns using release notes and bug reports. The obtained results justify a posteriori previous work on the specification and detection of antipatterns and could help to better focus quality assurance and testing activities.

Keywords

Antipatterns Mining software repositories Empirical software engineering 

References

  1. Antoniol G, Ayari K, Di Penta M, Khomh F, Guéhéneuc Y-G (2008) Is it a bug or an enhancement? A text-based approach to classify change requests. In: Vigder M, Chechik M (eds) Proceedings of the 18th IBM centers for advanced studies conference (CASCON). ACM Press, New York, 15 ppGoogle Scholar
  2. Aversano L, Canfora G, Cerulo L, Del Grosso C, Di Penta M (2007) An empirical study on the evolution of design patterns. In: Proc. of the the 6th European software engineering conf. and symp. on the foundations of software engineering. ACM Press, New York, pp 385–394Google Scholar
  3. Basili VR, Briand LC, Melo WL (1996) A validation of object-oriented design metrics as quality indicators. IEEE Trans Softw Eng 22(10):751–761CrossRefGoogle Scholar
  4. Bieman JM, Straw G, Wang H, Munger PW, Alexander RT (2003) Design patterns and change proneness: an examination of five evolving systems. In: 9th international software metrics symposium (METRICS’03). IEEE Computer Society Press, Piscataway, pp 40–49Google Scholar
  5. Bois BD, Demeyer S, Verelst J, Mens T, Temmerman M (2006) Does god class decomposition affect comprehensibility? In: Proceedings of the IASTED international conference on software engineering. IASTED/ACTA Press, Calgary, pp 346–355Google Scholar
  6. Brown WJ, Malveau RC, Brown WH, McCormick HW III, Mowbray TJ (1998) Anti patterns: refactoring software, architectures, and projects in crisis, 1st edn. Wiley, New YorkGoogle Scholar
  7. Cartwright M, Shepperd M (2000) An empirical investigation of an object-oriented software system. IEEE Trans Softw Eng 26(8):786–796CrossRefGoogle Scholar
  8. Chidamber SR, Kemerer CF (1994) A metrics suite for object oriented design. IEEE Trans Softw Eng 20(6):476–493CrossRefGoogle Scholar
  9. Cohen J (1988) Statistical power analysis for the behavioral sciences. L. Erlbaum Associates, HillsdalezbMATHGoogle Scholar
  10. Conte SD, Campbell RL (1989) A methodology for early software size estimation. Technical Report SERC-TR-33-P, Purdue UniversityGoogle Scholar
  11. Deligiannis IS, Shepperd MJ, Roumeliotis M, Stamelos I (2003) An empirical investigation of an object-oriented design heuristic for maintainability. J Syst Softw 65(2):127–139CrossRefGoogle Scholar
  12. Deligiannis IS, Stamelos I, Angelis L, Roumeliotis M, Shepperd MJ (2004) A controlled experiment investigation of an object-oriented design heuristic for maintainability. J Syst Softw 72(2):129–143CrossRefGoogle Scholar
  13. Dhambri K, Sahraoui H, Poulin P (2008) Visual detection of design anomalies. In: Proceedings of the 12th European conference on software maintenance and reengineering, Tampere, Finland. IEEE Computer Society Press, Piscataway, pp 279–283Google Scholar
  14. Di Penta M, Cerulo L, Guéhéneuc Y-G, Antoniol G (2008) An empirical study of the relationships between design pattern roles and class change proneness. In: Proceedings of the 24th international conference on software maintenance (ICSM). IEEE Computer Society Press, PiscatawayGoogle Scholar
  15. Eaddy M, Zimmermann T, Sherwood KD, Garg V, Murphy GC, Nagappan N, Aho AV (2008) Do crosscutting concerns cause defects? IEEE Trans Softw Eng 34(4):497–515CrossRefGoogle Scholar
  16. El Emam K, Benlarbi S, Goel N, Rai S (2001) The confounding effect of class size on the validity of object-oriented metrics. IEEE Trans Softw Eng 27(7):630–650CrossRefGoogle Scholar
  17. Fischer M, Pinzger M, Gall H (2003) Populating a release history database from version control and bug tracking systems. In: Proceedings of the international conference on software maintenance, Amsterdam, Netherlands. IEEE Computer Society Press, Piscataway, pp 23–32Google Scholar
  18. Fowler M (1999) Refactoring—improving the design of existing code, 1st edn. Addison-Wesley, ReadingGoogle Scholar
  19. Gamma E, Helm R, Johnson R, Vlissides J (1994) Design patterns—elements of reusable object-oriented software, 1st edn. Addison-Wesley, ReadingGoogle Scholar
  20. Gyimóthy T, Ferenc R, Siket I (2005) Empirical validation of object-oriented metrics on open source software for fault prediction. IEEE Trans Softw Eng 31(10):897–910CrossRefGoogle Scholar
  21. Hosmer D, Lemeshow S (2000) Applied logistic regression, 2nd edn. Wiley, New YorkzbMATHCrossRefGoogle Scholar
  22. Khomh F, Guéhéneuc Y-G (2008) Do design patterns impact software quality positively? In: Proceedings of the 12th conference on software maintenance and reengineering (CSMR). IEEE Computer Society Press, PiscatawayGoogle Scholar
  23. Khomh F, Di Penta M, Guéhéneuc Y-G, Antoniol G (2009a) An exploratory study of the impact of antipatterns on class change- and fault-proneness. Technical Report, Ecole Polytechnique de MontrealGoogle Scholar
  24. Khomh F, Di Penta M, Guéhéneuc Y-G (2009b) An exploratory study of the impact of code smells on software change-proneness. In: Proceedings of the 16th working conference on reverse engineering (WCRE). IEEE Computer Society Press, PiscatawayGoogle Scholar
  25. Khomh F, Guéhéneuc Y-G, Antoniol G (2009c) Playing roles in design patterns: an empirical descriptive and analytic study. In: Kontogiannis K, Xie T (eds) Proceedings of the 25th international conference on software maintenance (ICSM). IEEE Computer Society Press, Piscataway, 10 ppGoogle Scholar
  26. Khomh F, Vaucher S, Guéhéneuc Y-G, Sahraoui H (2009d) A bayesian approach for the detection of code and design smells. In: Proceedings of the 9th international conference on quality software (QSIC). IEEE Computer Society Press, Piscataway, 10 ppGoogle Scholar
  27. Langelier G, Sahraoui HA, Poulin P (2005) Visualization-based analysis of quality for large-scale software systems. In: Proceedings of the 20th international conference on automated software engineering. ACM Press, New YorkGoogle Scholar
  28. Lanza M, Marinescu R (2006) Object-oriented metrics in practice. Springer, BerlinzbMATHGoogle Scholar
  29. Mantyla M (2003) Bad smells in software—a taxonomy and an empirical study. PhD thesis, Helsinki University of TechnologyGoogle Scholar
  30. Marinescu R (2004) Detection strategies: metrics-based rules for detecting design flaws. In: Proceedings of the 20th international conference on software maintenance. IEEE Computer Society Press, Piscataway, pp 350–359 (2004)CrossRefGoogle Scholar
  31. Moha N (2008) DECOR: détection et correction des défauts dans les systèmes orientés objet. PhD thesis, Université de Montréal et Université de LilleGoogle Scholar
  32. Moha N, Guéhéneuc Y-G, Meur A-FL, Duchien L (2008a) A domain analysis to specify design defects and generate detection algorithms. In: Proceedings of the 11th international conference on fundamental approaches to software engineering. Springer, New York, pp 276–291Google Scholar
  33. Moha N, Hacene AMR, Valtchev P, Guéhéneuc Y-G (2008b) Refactorings of design defects using relational concept analysis. In: Medina R, Obiedkov S (eds) Proceedings of the 4th international conference on formal concept analysis (ICFCA). Springer, New YorkGoogle Scholar
  34. Moha N, Guéhéneuc YG, Duchien L, Meur AF (2010) DECOR: a method for the specification and detection of code and design smells. IEEE Trans Software Eng 36(1):20–36Google Scholar
  35. Munro MJ (2005) Product metrics for automatic identification of “bad smell” design problems in java source-code. In: Proceedings of the 11th international software metrics symposium. IEEE Computer Society Press, PiscatawayGoogle Scholar
  36. 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: Third international symposium on empirical software engineering and measurementGoogle Scholar
  37. Oliveto R, Khomh F, Antoniol G, Guéhéneuc Y-G (2010) Numerical signatures of antipatterns: an approach based on b-splines. In: Capilla R, Ferenc R, Dueas JC (eds) Proceedings of the 14th conference on software maintenance and reengineering. IEEE Computer Society Press, PiscatawayGoogle Scholar
  38. Riel AJ (1996) Object-oriented design heuristics. Addison-Wesley, ReadingGoogle Scholar
  39. Sheskin DJ (2007) Handbook of parametric and nonparametric statistical procedures, 4th edn. Chapman & Hall, LondonzbMATHGoogle Scholar
  40. Simon F, Steinbrückner F, Lewerentz C (2001) Metrics based refactoring. In: Proceedings of the fifth European conference on software maintenance and reengineering (CSMR’01). IEEE Computer Society Press, Piscataway, p 30CrossRefGoogle Scholar
  41. Travassos G, Shull F, Fredericks M, Basili VR (1999) Detecting defects in object-oriented designs: using reading techniques to increase software quality. In: Proceedings of the 14th conference on object-oriented programming, systems, languages, and applications. ACM Press, New York, pp 47–56CrossRefGoogle Scholar
  42. van Emden E, Moonen L (2002) Java quality assurance by detecting code smells. In: Proceedings of the 9th working conference on reverse engineering (WCRE’02). IEEE Computer Society Press, PiscatawayGoogle Scholar
  43. Vicinanza S, Mukhopadhyay T, Prietula M (1991) Software-effort estimation: an exploratory study of expert performance. Inf Syst Res 2(4):243–262CrossRefGoogle Scholar
  44. Vokác M (2004) Defect frequency and design patterns: an empirical study of industrial code. IEEE Trans Software Eng 30(12):904–917Google Scholar
  45. Wake WC (2003) Refactoring workbook. Addison-Wesley Longman, BostonGoogle Scholar
  46. Webster BF (1995) Pitfalls of object oriented development, 1st edn. M & T Books, Redwood CityGoogle Scholar
  47. Wei L, Shatnawi R (2007) An empirical study of the bad smells and class error probability in the post-release object-oriented system evolution. J Syst Softw 80(7):1120–1128Google Scholar
  48. Yin RK (2002) Case study research: design and methods, 3rd edn. SAGE, London (2002)Google Scholar
  49. 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. IEEE Computer Society Press, Piscataway, pp 563–572CrossRefGoogle Scholar
  50. Zimmermann T, Premraj R, Zeller A (2007) Predicting defects for Eclipse. In: Proceedings of the 3rd ICSE international workshop on predictor models in software engineering. IEEE Computer Society Press, PiscatawayGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC 2011

Authors and Affiliations

  • Foutse Khomh
    • 1
  • Massimiliano Di Penta
    • 2
  • Yann-Gaël Guéhéneuc
    • 3
  • Giuliano Antoniol
    • 3
  1. 1.Department of Electrical and Computer EngineeringQueen’s UniversityKingstonCanada
  2. 2.Department of EngineeringUniversity of SannioBeneventoItaly
  3. 3.SOCCER Lab. and Ptidej Team, Département de Génie Informatique et Génie LogicielÉcole Polytechnique de MontréalMontréalCanada

Personalised recommendations