Evaluating the Accuracy of Machine Learning Algorithms on Detecting Code Smells for Different Developers

Mário Hozano, Nuno Antunes, Baldoino Fonseca, Evandro Costa

2017

Abstract

Code smells indicate poor implementation choices that may hinder the system maintenance. Their detection is important for the software quality improvement, but studies suggest that it should be tailored to the perception of each developer. Therefore, detection techniques must adapt their strategies to the developer’s perception. Machine Learning (ML) algorithms is a promising way to customize the smell detection, but there is a lack of studies on their accuracy in detecting smells for different developers. This paper evaluates the use of ML-algorithms on detecting code smells for different developers, considering their individual perception about code smells. We experimentally compared the accuracy of 6 algorithms in detecting 4 code smell types for 40 different developers. For this, we used a detailed dataset containing instances of 4 code smell types manually validated by 40 developers. The results show that ML-algorithms achieved low accuracies for the developers that participated of our study, showing that are very sensitive to the smell type and the developer. These algorithms are not able to learn with limited training set, an important limitation when dealing with diverse perceptions about code smells.

Download


Paper Citation


in Harvard Style

Hozano M., Antunes N., Fonseca B. and Costa E. (2017). Evaluating the Accuracy of Machine Learning Algorithms on Detecting Code Smells for Different Developers . In Proceedings of the 19th International Conference on Enterprise Information Systems - Volume 2: ICEIS, ISBN 978-989-758-248-6, pages 474-482. DOI: 10.5220/0006338804740482

in Bibtex Style

@conference{iceis17,
author={Mário Hozano and Nuno Antunes and Baldoino Fonseca and Evandro Costa},
title={Evaluating the Accuracy of Machine Learning Algorithms on Detecting Code Smells for Different Developers},
booktitle={Proceedings of the 19th International Conference on Enterprise Information Systems - Volume 2: ICEIS,},
year={2017},
pages={474-482},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0006338804740482},
isbn={978-989-758-248-6},
}


in EndNote Style

TY - CONF
JO - Proceedings of the 19th International Conference on Enterprise Information Systems - Volume 2: ICEIS,
TI - Evaluating the Accuracy of Machine Learning Algorithms on Detecting Code Smells for Different Developers
SN - 978-989-758-248-6
AU - Hozano M.
AU - Antunes N.
AU - Fonseca B.
AU - Costa E.
PY - 2017
SP - 474
EP - 482
DO - 10.5220/0006338804740482