An Exploratory Evaluation of Continuous Feedback to Enhance Machine Learning Code Smell Detection - Cruz, Daniel; Santana, Amanda; Figueiredo, Eduardo (Anais do Congresso Ibero-Americano em Engenharia de Software (CIbSE); 2024: Anais do XXVII Congresso Ibero-Americano em Engenharia de SoftwareDO - 10.5753/cibse.2024.28440, 2024)
Code smells are symptoms of bad design choices implemented on the source code. Several code smell detection tools and strategies have been proposed over the years, including the use of machine learning algorithms. However, we lack empirical evidence on how expert feedback could improve machine learning based detection of code smells. This paper aims to propose and evaluate a conceptual strategy to improve machine-learning detection of code smells by means of continuous feedback. To evaluate the strategy, we follow an exploratory evaluation design to compare results of the smell detection before and after feedback provided by a service - acting as a software expert. We focus on four code smells - God Class, Long Method, Feature Envy, and Refused Bequest - detected in 20 Java systems. As results, we observed that continuous feedback improves the performance of code smell detection. For the detection of the class-level code smells, God Class and Refused Bequest, we achieved an average improvement in terms of F1 of 0.13 and 0.58, respectively, after 50 iterations of feedback. For the method-level code smells, Long Method and Feature Envy, the improvements of F1 were 0.66 and 0.72, respectively.