Analyzing Code Evolution to Uncover Relations between Bad Smells

This paper reports on evidence found of five possible relations (Plain Support, Mutual Support, Rejection, Common Refactoring, and Inclusion) among four bad smells (God Class, Long Method, Feature Envy, and Type Checking). We analyzed several releases of three open-source applications (16 for Log4j, 34 for Jmol, and 45 for JFreeChart) using four direct and two indirect metrics. This analysis uncovered correlations between three of these bad smells, namely, Feature Envy, Long Method, and God Class. The strongest correlation discovered was between Feature Envy and Long Method, followed by a mild correlation between Long Method and God Class, and between Feature Envy and God Class. These findings seem to provide initial evidence of the co-existence of bad smells and therefore, the need for bad smell removal plans to take into account these correlations in order to minimize code improvement efforts.

[1]  Alexander Chatzigeorgiou,et al.  Investigating the evolution of code smells in object-oriented systems , 2014, Innovations in Systems and Software Engineering.

[2]  A. Yamashita,et al.  Exploring the impact of inter-smell relations on software maintainability: An empirical study , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[3]  Sousuke Amasaki,et al.  Empirical Analysis of Fault-Proneness in Methods by Focusing on their Comment Lines , 2014, 2014 21st Asia-Pacific Software Engineering Conference.

[4]  Foutse Khomh,et al.  An exploratory study of the impact of antipatterns on class change- and fault-proneness , 2011, Empirical Software Engineering.

[5]  Zhendong Niu,et al.  Schedule of Bad Smell Detection and Resolution: A New Way to Save Effort , 2012, IEEE Transactions on Software Engineering.

[6]  Eleni Stroulia,et al.  JDeodorant: identification and application of extract class refactorings , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[7]  Andy Zaidman,et al.  Evaluating the Lifespan of Code Smells using Software Repository Mining , 2012, 2012 16th European Conference on Software Maintenance and Reengineering.

[8]  Bartosz Walter,et al.  Leveraging Code Smell Detection with Inter-smell Relations , 2006, XP.

[9]  Alexander Chatzigeorgiou,et al.  JDeodorant: Identification and Removal of Feature Envy Bad Smells , 2007, ICSM.

[10]  Yuanfang Cai,et al.  Comparing four approaches for technical debt identification , 2014, Software Quality Journal.

[11]  Alexander Chatzigeorgiou,et al.  JDeodorant: Identification and Removal of Type-Checking Bad Smells , 2008, 2008 12th European Conference on Software Maintenance and Reengineering.

[12]  Foutse Khomh,et al.  An Empirical Study of the Impact of Two Antipatterns, Blob and Spaghetti Code, on Program Comprehension , 2011, 2011 15th European Conference on Software Maintenance and Reengineering.

[13]  Forrest Shull,et al.  Investigating Automatic Static Analysis Results to Identify Quality Problems: An Inductive Study , 2012, 2012 35th Annual IEEE Software Engineering Workshop.