This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Quantifying the Effect of Code Smells on Maintenance Effort
Aug. 2013 (vol. 39 no. 8)
pp. 1144-1156
Dag I.K. Sjoberg, University of Oslo, Oslo
Aiko Yamashita, University of Oslo, Oslo
Bente C.D. Anda, University of Oslo, Oslo
Audris Mockus, Avaya Labs Research, Basking Ridge
Tore Dyba, University of Oslo, Oslo and SINTEF, Trondheim
Context: Code smells are assumed to indicate bad design that leads to less maintainable code. However, this assumption has not been investigated in controlled studies with professional software developers. Aim: This paper investigates the relationship between code smells and maintenance effort. Method: Six developers were hired to perform three maintenance tasks each on four functionally equivalent Java systems originally implemented by different companies. Each developer spent three to four weeks. In total, they modified 298 Java files in the four systems. An Eclipse IDE plug-in measured the exact amount of time a developer spent maintaining each file. Regression analysis was used to explain the effort using file properties, including the number of smells. Result: None of the 12 investigated smells was significantly associated with increased effort after we adjusted for file size and the number of changes; Refused Bequest was significantly associated with decreased effort. File size and the number of changes explained almost all of the modeled variation in effort. Conclusion: The effects of the 12 smells on maintenance effort were limited. To reduce maintenance effort, a focus on reducing code size and the work practices that limit the number of changes may be more beneficial than refactoring code smells.
Index Terms:
Maintenance engineering,Java,Software,Surgery,Time measurement,Context,Electronic mail,code churn,Maintainability,object-oriented design,product metrics
Citation:
Dag I.K. Sjoberg, Aiko Yamashita, Bente C.D. Anda, Audris Mockus, Tore Dyba, "Quantifying the Effect of Code Smells on Maintenance Effort," IEEE Transactions on Software Engineering, vol. 39, no. 8, pp. 1144-1156, Aug. 2013, doi:10.1109/TSE.2012.89
Usage of this product signifies your acceptance of the Terms of Use.