Investigating the evolution of code smells in object-oriented systems

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.

[1]  Y H Chan,et al.  Biostatistics 203. Survival analysis. , 2004, Singapore medical journal.

[2]  Oscar Nierstrasz,et al.  Finding refactorings via change metrics , 2000, OOPSLA '00.

[3]  Eleni Stroulia,et al.  Refactoring Detection based on UMLDiff Change-Facts Queries , 2006, 2006 13th Working Conference on Reverse Engineering.

[4]  Daniela Cruzes,et al.  The evolution and impact of code smells: A case study of two open source systems , 2009, 2009 3rd International Symposium on Empirical Software Engineering and Measurement.

[5]  Alexander Chatzigeorgiou,et al.  Investigating the Evolution of Bad Smells in Object-Oriented Code , 2010, 2010 Seventh International Conference on the Quality of Information and Communications Technology.

[6]  Arthur J. Riel,et al.  Object-Oriented Design Heuristics , 1996 .

[7]  Timothy J. Robinson,et al.  Multilevel Analysis: Techniques and Applications , 2002 .

[8]  Radu Marinescu,et al.  Detecting design flaws via metrics in object-oriented systems , 2001, Proceedings 39th International Conference and Exhibition on Technology of Object-Oriented Languages and Systems. TOOLS 39.

[9]  Jörg Sander,et al.  Decomposing object-oriented class modules using an agglomerative clustering technique , 2009, 2009 IEEE International Conference on Software Maintenance.

[10]  Juan Fernández-Ramil,et al.  A model to predict anti-regressive effort in Open Source Software , 2007, 2007 IEEE International Conference on Software Maintenance.

[11]  Lerina Aversano,et al.  The life and death of statically detected vulnerabilities: An empirical study , 2009, Inf. Softw. Technol..

[12]  David W. Binkley,et al.  An empirical study of slice-based cohesion and coupling metrics , 2007, TSEM.

[13]  Stefan Slinger Code Smell Detection in Eclipse , 2005 .

[14]  Foutse Khomh,et al.  An Exploratory Study of the Impact of Code Smells on Software Change-proneness , 2009, 2009 16th Working Conference on Reverse Engineering.

[15]  Zhenchang Xing,et al.  Refactoring Practice: How it is and How it Should be Supported - An Eclipse Case Study , 2006, 2006 22nd IEEE International Conference on Software Maintenance.

[16]  Robert C. Martin Agile Software Development, Principles, Patterns, and Practices , 2002 .

[17]  Andrew P. Black,et al.  How we refactor, and how we know it , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[18]  Alexander Chatzigeorgiou,et al.  Identification of Extract Method Refactoring Opportunities , 2009, 2009 13th European Conference on Software Maintenance and Reengineering.

[19]  Harald C. Gall,et al.  On the relation of refactorings and software defect prediction , 2008, MSR '08.

[20]  Naouel Moha,et al.  Detection and correction of design defects in object-oriented designs , 2007, OOPSLA '07.

[21]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[22]  Alexander Chatzigeorgiou,et al.  Identification of refactoring opportunities introducing polymorphism , 2010, J. Syst. Softw..

[23]  Rupert G. Miller,et al.  Survival Analysis , 2022, The SAGE Encyclopedia of Research Design.

[24]  Meir M. Lehman,et al.  Rules and Tools for Software Evolution Planning and Management , 2001, Ann. Softw. Eng..

[25]  E. Murphy-Hill,et al.  Refactoring Tools: Fitness for Purpose , 2006, IEEE Software.

[26]  Alexander Chatzigeorgiou,et al.  Ranking Refactoring Suggestions Based on Historical Volatility , 2011, 2011 15th European Conference on Software Maintenance and Reengineering.

[27]  Ralph E. Johnson,et al.  Automated Detection of Refactorings in Evolving Components , 2006, ECOOP.

[28]  David Lorge Parnas,et al.  Software aging , 1994, Proceedings of 16th International Conference on Software Engineering.

[29]  Richard Riehle,et al.  Proceedings, 39th International Conference and Exhibition on Technology of Object-oriented Languages and Systems : TOOLS 39, 29 July-3 August, 2001, Santa Barbara, California, USA , 2001 .

[30]  Jonathan I. Maletic,et al.  A survey and taxonomy of approaches for mining software repositories in the context of software evolution , 2007, J. Softw. Maintenance Res. Pract..

[31]  G. A. Marcoulides Multilevel Analysis Techniques and Applications , 2002 .

[32]  Alexander Chatzigeorgiou,et al.  Identification of Move Method Refactoring Opportunities , 2009, IEEE Transactions on Software Engineering.

[33]  Stéphane Ducasse,et al.  Yesterday's Weather: guiding early reverse engineering efforts by summarizing the evolution of changes , 2004, 20th IEEE International Conference on Software Maintenance, 2004. Proceedings..

[34]  Martin Fowler,et al.  Refactoring - Improving the Design of Existing Code , 1999, Addison Wesley object technology series.

[35]  Adrian Trifu,et al.  Diagnosing design problems in object oriented systems , 2005, 12th Working Conference on Reverse Engineering (WCRE'05).

[36]  Yann-Gaël Guéhéneuc,et al.  DECOR: A Method for the Specification and Detection of Code and Design Smells , 2010, IEEE Transactions on Software Engineering.

[37]  Leon Moonen,et al.  Java quality assurance by detecting code smells , 2002, Ninth Working Conference on Reverse Engineering, 2002. Proceedings..

[38]  Thomas J. Mowbray,et al.  AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis , 1998 .