1. Automatic Human-Like Detection of Code Smells
- Author
-
Jan N. van Rijn, Chitsutha Soomlek, and Marcello M. Bonsangue
- Subjects
Java ,business.industry ,Computer science ,Code smell ,Machine learning ,computer.software_genre ,Software quality ,Software metric ,Set (abstract data type) ,Metric (mathematics) ,Classifier (linguistics) ,Artificial intelligence ,business ,Heuristics ,computer ,computer.programming_language - Abstract
Many code smell detection techniques and tools have been proposed, mainly aiming to eliminate design flaws and improve software quality. Most of them are based on heuristics which rely on a set of software metrics and corresponding threshold values. Those techniques and tools suffer from subjectivity issues, discordant results among the tools, and the reliability of the thresholds. To mitigate these problems, we used machine learning to automate developers’ perception in code smells detection. Different from other existing machine learning used in code smell detection we trained our models with an extensive dataset based on more than 3000 professional reviews on 518 open source projects. We conclude by an empirical evaluation of the performance of the machine learning approach against PMD, a widely used metric-based code smell detection tool for Java. The experimental results show that the machine learning approach outperforms the PMD classifier in all evaluations.
- Published
- 2021
- Full Text
- View/download PDF