Skip to main content
Log in

Investigating the evolution of code smells in object-oriented systems

  • SI: QUATIC 2010
  • Published:
Innovations in Systems and Software Engineering Aims and scope Submit manuscript

Abstract

Software design problems are known and perceived under many different terms, such as code smells, flaws, non-compliance to design principles, violation of heuristics, excessive metric values and anti-patterns, signifying the importance of handling them in the construction and maintenance of software. Once a design problem is identified, it can be removed by applying an appropriate refactoring, improving in most cases several aspects of quality such as maintainability, comprehensibility and reusability. This paper, taking advantage of recent advances and tools in the identification of non-trivial code smells, explores the presence and evolution of such problems by analyzing past versions of code. Several interesting questions can be investigated such as whether the number of problems increases with the passage of software generations, whether problems vanish by time or only by targeted human intervention, whether code smells occur in the course of evolution of a module or exist right from the beginning and whether refactorings targeting at smell removal are frequent. In contrast to previous studies that investigate the application of refactorings in the history of a software project, we attempt to analyze the evolution from the point of view of the problems themselves. To this end, we classify smell evolution patterns distinguishing deliberate maintenance activities from the removal of design problems as a side effect of software evolution. Results are discussed for two open-source systems and four code smells.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

References

  1. Bad Smell Evolution Results (2011) http://eos.uom.gr/~achat/SmellResults.rar. Accessed 23 June 2011

  2. Borland Together (2011) http://www.borland.com/us/products/together/. Accessed 23 June 2011

  3. Brown WH, Malveau RC, McCormick HW, Mowbray TJ (1998) AntiPatterns: refactoring software, architectures, and projects in crisis. Wiley, New York

  4. Capiluppi A, Fernández-Ramil J (2007) A model to predict anti-regressive effort in Open Source Software. In: Proceedings of 23rd international conference on software maintenance (ICSM’2007), Paris, France, pp 194–203

  5. Chan YH (2004) Biostatistics 203. Survival analysis. Singap Med J 45:249–256

    Google Scholar 

  6. Chatzigeorgiou A, Manakos A (2010) Investigating the evolution of bad smells in object-oriented code. In: Proceedings of 7th international conference on the quality of information and communications technology (QUATIC’2010), Porto, Portugal, pp 106–115

  7. Demeyer S, Ducasse S, Nierstrasz O (2000) Finding refactorings via change metrics. In: Proceedings of 15th ACM SIGPLAN conference on object-oriented programming, systems, languages, and applications (OOPSLA’2000), Minneapolis, USA, pp 166–177

  8. Dig D, Comertoglu C, Marinov D, Johnson R (2006) Automated detection of refactorings in evolving components. In: Proceedings of 20th European conference on object-oriented programming (ECOOP’06), Nantes, France, pp 404–428

  9. Di Penta M, Cerulo L, Aversano L (2009) The life and death of statically detected vulnerabilities: an empirical study. Inf Softw Technol 51:1469–1484

    Article  Google Scholar 

  10. Fokaefs M, Tsantalis N, Chatzigeorgiou A, Sander J (2009) Decomposing object-oriented class modules using an agglomerative clustering technique. In: Proceedings of 25th IEEE international conference on software maintenance (ICSM’2009), Edmonton, Alberta, Canada, pp 93–101

  11. Fowler M (1999) Refactoring: improving the design of existing code. Addison Wesley, Boston

  12. Gamma E, Helm R, Johnson R, Vlissides J (1995) Design patterns: elements of reusable object-oriented software. Addison Wesley, Boston

  13. Gîrba T, Ducasse S, Lanza M (2004) Yesterday’s weather: guiding early reverse engineering efforts by summarizing the evolution of changes. In: Proceedings of 20th IEEE international conference on software maintenance (ICSM’04), Chicago, USA, pp 40–49

  14. Hox JJ (2002) Multilevel analysis: techniques and applications. Routledge Academic, London

  15. JDeodorant Eclipse plug-in (2011) http://jdeodorant.com/ Accessed 23 June 2011

  16. Kagdi H, Collard ML, Maletic JI (2007) A survey and taxonomy of approaches for mining software repositories in the context of software evolution. J Softw Main Evol R 19:77–131

    Article  Google Scholar 

  17. Khomh F, Di Penta M, Guéhéneuc YG (2009) An exploratory study of the impact of code smells on software change-proneness. In: Proceedings of 16th working conference on reverse engineering (WCRE’09), Lille, France, pp 75–84

  18. Lehman MM, Ramil JF (2001) Rules and tools for software evolution planning and management. Ann Softw Eng 11:15–44

    Article  MATH  Google Scholar 

  19. Marinescu R (2001) Detecting design flaws via metrics in object-oriented systems. In: Proceedings of 39th international conference and exhibition on technology of object-oriented languages and systems (TOOLS’01), Santa Barbara, USA

  20. Martin RC (2003) Agile software development: principles, patterns and practices. Prentice Hall, New Jersey

    Google Scholar 

  21. Meyers TM, Binkley D (2007) An empirical study of slice-based cohesion and coupling metrics. ACM Trans Softw Eng Methodol 17:1–27

    Article  Google Scholar 

  22. Moha N (2007) Detection and correction of design defects in object-oriented designs. In: Proceedings of 22nd ACM SIGPLAN conference on object-oriented programming systems, languages and applications (OOPSLA’07), Doctoral Symposiums, Montreal, Canada, pp 949–950

  23. 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. IEEE Trans Softw Eng 36:20–36

    Article  Google Scholar 

  24. Murphy-Hill E, Black AP (2008) Refactoring tools: fitness for purpose. IEEE Softw 25:38–44

    Article  Google Scholar 

  25. Murphy-Hill E, Parnin C, Black AP (2009) How we refactor, and how we know it. In: Proceedings of 31st IEEE international conference on software engineering (ICSE’09), Vancouver, Canada, pp 287–297

  26. 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 3rd international symposium on empirical software engineering and measurement (ESEM’09), Florida, USA, pp 390–400

  27. Parnas DL (1994) Software aging. In: Proceedings of 16th international conference on software engineering (ICSE’94), Sorrento, Italy, pp 279–287

  28. Ratzinger J, Sigmund T, Gall HC (2008) On the relation of refactorings and software defect prediction. In: Proceedings of 5th working conference on mining software repositories (MSR’2008), Leipzig, Germany, pp 35–38

  29. Riel AJ (1996) Object-oriented design heuristics. Addison-Wesley, Boston

  30. Slinger S (2005) Code smell detection in eclipse. Dissertation, Delft University of Technology

  31. Trifu A, Marinescu R (2005) Diagnosing design problems in object oriented systems. In: Proceedings of 12th working conference on reverse engineering (WCRE’05), Pittsburgh, PA, pp 155–164

  32. Tsantalis N, Chatzigeorgiou A (2009) Identification of extract method refactoring opportunities. In: Proceedings of 13th European conference on software maintenance and reengineering (CSMR’09), Kaiserslautern, Germany, pp 119–128

  33. Tsantalis N, Chatzigeorgiou A (2009) Identification of move method refactoring opportunities. IEEE Trans Softw Eng 35: 347–367

    Article  Google Scholar 

  34. Tsantalis N, Chatzigeorgiou A (2010) Identification of refactoring opportunities introducing polymorphism. J Syst Softw 83:391–404

    Google Scholar 

  35. Tsantalis N, Chatzigeorgiou A (2011) Ranking refactoring suggestions based on historical volatility. In: Proceedings of 15th European conference on software maintenance and reengineering (CSMR’2011), Oldenburg, Germany, pp 25–34

  36. Van Emden E, Moonen L (2002) Java quality assurance by detecting code smells. In: Proceedings of 9th working conference on reverse engineering (WCRE’02), Richmond, VA, pp 97–106

  37. Xing Z, Stroulia E (2006) Refactoring practice: how it is and how it should be supported—an eclipse case study. In: Proceedings of 22nd IEEE international conference on software maintenance (ICSM’06), Philadelphia, PA, pp 458–468

  38. Xing Z, Stroulia E (2006) Refactoring detection based on UMLDiff change-facts queries. In: Proceedings of 13th working conference on reverse engineering (WCRE’06), Benevento, Italy, pp 263–274

Download references

Acknowledgments

This work has been partially funded by the Research Committee of the University of Macedonia, Greece. We would also like to thank the anonymous reviewers of QUATIC’2010 for their constructive comments on the manuscript.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Alexander Chatzigeorgiou.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Chatzigeorgiou, A., Manakos, A. Investigating the evolution of code smells in object-oriented systems. Innovations Syst Softw Eng 10, 3–18 (2014). https://doi.org/10.1007/s11334-013-0205-z

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11334-013-0205-z

Keywords

Navigation