On the evaluation of code smells and detection tools

Authors

  • Thanis Paiva Department of Computer Science, Federal University of Minas Gerais, Av. Antônio Carlos, 6627, Belo Horizonte, 31270-901, Brazil
  • Amanda Damasceno Department of Computer Science, Federal University of Minas Gerais, Av. Antônio Carlos, 6627, Belo Horizonte, 31270-901, Brazil
  • Eduardo Figueiredo Department of Computer Science, Federal University of Minas Gerais, Av. Antônio Carlos, 6627, Belo Horizonte, 31270-901, Brazil
  • Cláudio Sant’Anna Department of Computer Science, Federal University of Bahia, Ondina, Salvador, 40170-115, Brazil

Keywords:

Code smells, Software metrics, Code smell detection

Abstract

Code smells refer to any symptom in the source code of a program that possibly indicates a deeper problem, hindering software maintenance and evolution. Detection of code smells is challenging for developers and their informal definition leads to the implementation of multiple detection techniques and tools. This paper evaluates and compares four code smell detection tools, namely inFusion, JDeodorant, PMD, and JSpIRIT. These tools were applied to different versions of the same software systems, namely MobileMedia and Health Watcher, to calculate the accuracy and agreement of code smell detection tools. We calculated the accuracy of each tool in the detection of three code smells: God Class, God Method, and Feature Envy. Agreement was calculated among tools and between pairs of tools. One of our main findings is that the evaluated tools present different levels of accuracy in different contexts. For MobileMedia, for instance, the average recall varies from 0 to 58% and the average precision from 0 to 100%, while for Health Watcher the variations are 0 to 100% and 0 to 85%, respectively. Regarding the agreement, we found that the overall agreement between tools varies from 83 to 98% among all tools and from 67 to 100% between pairs of tools. We also conducted a secondary study of the evolution of code smells in both target systems and found that, in general, code smells are present from the moment of creation of a class or method in 74.4% of the cases of MobileMedia and 87.5% of Health Watcher.

;  

Downloads

Download data is not yet available.

Downloads

Published

2017-09-06

How to Cite

Paiva, T., Damasceno, A., Figueiredo, E., & Sant’Anna, C. (2017). On the evaluation of code smells and detection tools. Journal of Software Engineering Research and Development, 5, 7:1 – 7:28. Retrieved from https://journals-sol.sbc.org.br/index.php/jserd/article/view/433

Issue

Section

Research Article

Most read articles by the same author(s)