Is a strategy for code smell assessment long overdue?

Code smells reflect code decay and, as such, developers should seek to eradicate such smells through application of 'deodorant' in the form of one or more refactorings. However, a dearth of studies exploring code smells either theoretically or empirically suggests that there are reasons why smell eradication is neither being applied in anger, nor the subject of significant research. In this paper, we present three studies as supporting evidence for this claim. The first is an analysis of a set of five, open-source Java systems, the second an empirical study of a sub-system of a proprietary, C# web-based application and the third, a theoretical enumeration of smell-related refactorings. Key findings of the study were first, that developers seemed to avoid eradicating superficially 'simple' smells in favor of more 'obscure' ones; second, a wide range of conflicts and anomalies soon emerged when trying to identify smelly code. Finally, perceived effort to eradicate a smell may be a key factor. The study highlights the need for a clearer research strategy on the issue of code smells and all aspects of their identification and measurement.

[1]  Tom Mens,et al.  A survey of software refactoring , 2004, IEEE Transactions on Software Engineering.

[2]  Foutse Khomh,et al.  A Bayesian Approach for the Detection of Code and Design Smells , 2009, 2009 Ninth International Conference on Quality Software.

[3]  George Loizou,et al.  The role of constructors in the context of refactoring object-oriented systems , 2003, Seventh European Conference onSoftware Maintenance and Reengineering, 2003. Proceedings..

[4]  Joshua Kerievsky,et al.  Refactoring to Patterns , 2004, XP/Agile Universe.

[5]  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.

[6]  James M. Bieman,et al.  The FreeBSD project: a replication case study of open source development , 2005, IEEE Transactions on Software Engineering.

[7]  George Loizou,et al.  Common refactorings, a dependency graph and some code smells: an empirical study of Java OSS , 2006, ISESE '06.

[8]  George Loizou,et al.  Code smell eradication and associated refactoring , 2008 .

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

[10]  Chris F. Kemerer,et al.  An Empirical Approach to Studying Software Evolution , 1999, IEEE Trans. Software Eng..

[11]  Mika Mäntylä,et al.  Bad smells - humans as code critics , 2004, 20th IEEE International Conference on Software Maintenance, 2004. Proceedings..

[12]  William F. Opdyke,et al.  Refactoring object-oriented frameworks , 1992 .

[13]  Jason Crampton,et al.  The interpretation and utility of three cohesion metrics for object-oriented design , 2006, TSEM.

[14]  Mika Mäntylä,et al.  Drivers for software refactoring decisions , 2006, ISESE '06.

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

[16]  M. Mäntylä,et al.  Subjective evaluation of software evolvability using code smells: An empirical study , 2006, Empirical Software Engineering.

[17]  Arie van Deursen,et al.  Refactoring: Emerging Trends and Open Problems , 2003 .

[18]  Martin Fowler,et al.  Patterns of Enterprise Application Architecture , 2002 .