The Community for Technology Leaders
RSS Icon
Subscribe
Issue No.08 - Aug. (2013 vol.39)
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
ABSTRACT
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
REFERENCES
[1] M. Abbes, F. Khomh, Y-C. Gueheneuc, and G. Antoniol, "An Empirical Study of the Impact of Two Antipatterns Blob and Spaghetti Code on Program Comprehension," Proc. European Conf. Software Maintenance and Reeng., pp. 181-190, 2011.
[2] B. Anda, "Assessing Software System Maintainability Using Structural Measures and Expert Assessments," Proc IEEE Int'l Conf. Software Maintenance, pp. 204-213, 2007.
[3] B. Anda, D.I.K. Sjøberg, and A. Mockus, "Variability and Reproducibility in Software Engineering: A Study of Four Companies That Developed the Same System," IEEE Trans. Software Eng., vol. 35, no. 3, pp. 407-429, May/June 2009.
[4] E. Arisholm and D.I.K. Sjøberg, "Towards a Framework for Empirical Assessment of Changeability Decay," J. Systems Software, vol. 53, no. 1, pp. 3-14, 2000.
[5] E. Arisholm and D.I.K. Sjøberg, "Evaluating the Effect of a Delegated versus Centralized Control Style on the Maintainability of Object-Oriented Software," IEEE Trans. Software Eng., vol. 30, no. 8, pp. 521-534, Aug. 2004.
[6] G.R. Bergersen and J.E. Gustafsson, "Programming Skill, Knowledge and Working Memory among Professional Software Developers from an Investment Theory Perspective," J. Individual Differences, vol. 32, no. 4, pp. 201-209, 2011.
[7] G.R. Bergersen, J.E. Hannay, D.I.K. Sjøberg, T. Dybå, and A. Karahasanovic, "Inferring Skill from Tests of Programming Performance: Combining Time and Quality," Proc. Int'l Symp. Empirical Software Eng. and Measurement, pp. 305-314, 2011.
[8] Borland Together, http://www.borland.com/us/products together , 2008.
[9] M. D'Ambros, A. Bacchelli, and M. Lanza, "On the Impact of Design Flaws on Software Defects," Proc. Int'l Conf. Quality Software, pp. 23-31, 2010.
[10] I. Deligiannis, M. Shepperd, M. Roumeliotis, and I. Stamelos, "An Empirical Investigation of an Object-Oriented Design Heuristic for Maintainability," J. Systems Software, vol. 65, no. 2, pp. 127-139, 2003.
[11] I. Deligiannis, I. Stamelos, L. Angelis, M. Roumeliotis, and M. Shepperd, "A Controlled Experiment Investigation of an Object-Oriented Design Heuristic for Maintainability," J. Systems Software, vol. 72, no. 2, pp. 129-143, 2004.
[12] T. Dybå, D.I.K. Sjøberg, and D.S. Cruzes, "What Works for Whom, Where, When, and Why? On the Role of Context and Contextualization in Empirical Software Engineering," Proc. ACM/IEEE Int'l Symp. Empirical Software Eng. and Measurement, 2012.
[13] S.G. Eick, T.L. Graves, A.F. Karr, J.S. Marron, and A. Mockus, "Does Code Decay? Assessing the Evidence from Change Management Data," IEEE Trans. Software Eng., vol. 27, no. 7, pp. 1-12, Jan. 2001.
[14] K. El Emam, "A Methodology for Validating Software Product Metrics," Technical Report NRC 44142, Nat'l Research Council of Canada, June 2000.
[15] K. El Emam, S. Benlarbi, N. Goel, and S.N. Rai, "The Confounding Effect of Class Size on the Validity of Object-Oriented Metrics," IEEE Trans. Software Eng., vol. 27, no. 7, pp. 630-650, July 2001.
[16] M. Fowler, Refactoring: Improving the Design of Existing Code. Addison-Wesley, 1999.
[17] T. Hall, S. Beecham, D. Bowes, D. Gray, and S. Counsell, "A Systematic Literature Review of Fault Prediction Performance in Software Engineering," IEEE Trans. Software Eng., vol. 38, no. 6, pp. 1276-1304, Nov./Dec. 2012.
[18] Intooitus, "InCode 2.0.7" http://www.intooitus.com inCode.html, 2009.
[19] E. Jürgens, F. Deissenboeck, B. Hummel, and S. Wagner, "Do Code Clones Matter?" Proc. Int'l Conf. Software Eng., pp. 485-495, 2009.
[20] V.B. Kampenes, T. Dybå, J.E. Hannay, and D.I.K. Sjøberg, "A Systematic Review of Quasi-Experiments in Software Engineering," Information and Software Technology, vol. 51, pp. 71-82, 2009.
[21] C. Kapser and M. Godfrey, ""Cloning Considered Harmful" Considered Harmful: Patterns of Cloning in Software," Empirical Software Eng., vol. 13, no. 6, pp. 645-692, 2008.
[22] M. Kim, V. Sazawal, D. Notkin, and G. Murphy, "An Empirical Study of Code Clone Genealogies," Proc. European Conf. Software Eng., pp. 187-196, 2005.
[23] B.A. Kitchenham, "What's up with Software Metrics?—A Preliminary Mapping Study," J. Systems and Software, vol. 83, no. 1, pp. 37-51, 2010.
[24] M. Lanza and R. Marinescu, Object-Oriented Metrics in Practice: Using Software Metrics to Characterize, Evaluate and Improve the Design of Object-Oriented Systems. Springer, 2006.
[25] L.M. Layman, L.A. Williams, and R.S. Amant, "MimEc: Intelligent User Notification of Faults in the Eclipse IDE," Proc. Int'l Workshop Cooperative and Human Aspects of Software Eng., pp. 73-76, 2008.
[26] W. Li and R. Shatnawi, "An Empirical Study of the Bad Smells and Class Error Probability in the Post-Release Object-Oriented System Evolution," J. Systems Software, vol. 80, no. 7, pp. 1120-1128, 2007.
[27] A. Lozano and M. Wermelinger, "Assessing the Effect of Clones of Changeability," Proc. Int'l Conf. Software Maintenance, pp. 227-236, 2008.
[28] R. Marinescu, "Measurement and Quality in Object-Oriented Design," PhD dissertation, Politehnica Univ. of Timisoara, June 2002.
[29] T. Mens and T. Tourwé, "A Survey of Software Refactoring," IEEE Trans. Software Eng., vol. 30, no. 2, pp. 126-139, Feb. 2004.
[30] A. Mockus and L.G. Votta, "Identifying Reasons for Software Change Using Historic Databases," Proc. Int'l Conf. Software Maintenance, pp. 120-130, 2000.
[31] N. Moha, Y-G. Gueheneuc, L. Duchien, and A-F. Le Meur, "DECOR: A Method for the Specification and Detection of Code and Design Smells," IEEE Trans. Software Eng., vol. 36, no. 1, pp. 20-36, Jan./Feb. 2010.
[32] A. Monden, D. Nakae, T. Kamiya, S. Sato, and K. Matsumoto, "Software Quality Analysis by Code Clones in Industrial Legacy Software," Proc. Int'l Symp. Software Metrics, pp. 87-94, 2002.
[33] N. Nagappan and T. Ball, "Using Software Dependencies and Churn Metrics to Predict Field Failures: An Empirical Case Study," Proc. Int'l Symp. Empirical Software Eng. and Measurement, pp. 364-373, 2007.
[34] S. Olbrich, D.S. Cruzes, V. Basili, and N. Zazworka, "The Evolution and Impact of Code Smells: A Case Study of Two Open Source Systems," Proc. Int'l Symp. Empirical Software Eng. and Measurement, pp. 390-400, 2009.
[35] S. Olbrich, D.S. Cruzes, and D.I.K. Sjøberg, "Are All Code Smells Harmful? A Study of God Classes and Brain Classes in the Evolution of Three Open Source Systems," Proc. IEEE Int'l Conf. Software Maintenance, pp. 1-10, 2010.
[36] F. Rahman, C. Bird, and P. Devanbu, "Clones: What Is that Smell?" Proc. Seventh IEEE Working Conf. Mining Software Repositories, pp. 72-81, 2010.
[37] M. Riaz, M. Mendes, and E.D. Tempero, "A Systematic Review of Software Maintainability Prediction and Metrics," Proc Third Int'l Symp. Empirical Software Eng. and Measurement, pp. 367-377, 2009.
[38] A.J. Riel, Object-Oriented Design Heuristics. Addison-Wesley, 1996.
[39] J. Rosenberg, "Some Misconceptions about Lines of Code," Proc. Int'l Symp. Software Metrics, pp. 137-142, 1997.
[40] "Simian," http://www.harukizaemon.com/simianindex.html , 2013.
[41] D.I.K. Sjøberg, B. Anda, and A. Mockus, "Questioning Software Maintenance Metrics: A Comparative Case Study," Proc. Int'l Symp. Empirical Software Eng. and Measurement, pp. 107-110, 2012.
[42] D.I.K. Sjøberg, T. Dybå, and M. Jørgensen, "The Future of Empirical Methods in Software Engineering Research," Proc. Future of Software Eng., pp. 358-378, 2007.
[43] The-R-Foundation, "The R Project for Statistical Computing," http://www.r-project.orgindex.html, 2011.
[44] TMate-Sofware, "SVNKit—Subversioning for Java," http:/svnkit.com/, 2010.
[45] A. Yamashita and L. Moonen, "Do Code Smells Reflect Important Maintainability Aspects?" Proc. IEEE Int'l Conf. Software Maintenance, pp. 306-315, 2012.
[46] M. Zhang, T. Hall, and N. Baddoo, "Code Bad Smells: A Review of Current Knowledge," J. Software Maintenance, vol. 23, no. 3, pp. 179-202, 2011.
46 ms
(Ver 2.0)

Marketing Automation Platform Marketing Automation Tool