The ‘deception’ of code smells: An empirical investigation

Code smells represent code decay and as such should be eradicated from a system to prevent future maintenance problems. A range of twenty smells described by Fowler and Beck each require varying numbers and combinations of refactorings in order to be eradicated - but exactly how many are needed when we consider related, nested refactorings is unclear. In this paper, we enumerate these refactorings when categorised according to Mantyla's smell taxonomy. We then show how, ironically, the ‘smelliest’ of smells (and hence most difficult to eradicate) are actually those best understood by developers. So, code smells are not only unpleasant to have around but are deceptive in their nature and make-up. The study is thus a warning against attempting what are seemingly easily eradicated smells - these are often the smells the developer needs to be most wary of.

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

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

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

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

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

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

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

[8]  Martin Fowler. Refactoring Improving the Design of Existing Code , 1999 .

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

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

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

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

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

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

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