遇见数据集

An Exploratory Evaluation of Continuous Feedback to Enhance Machine Learning Code Smell Detection

收藏
Zenodo2024-04-08 更新2026-05-26 收录
官方服务:

资源简介:

Context: Code smells are symptoms of bad design choices implemented on the source code. To manage and enhance software quality, it is important to be aware of code smells and refactor them whenever possible. As a result, several code smell detection tools and techniques have been proposed over the years. These tools and techniques present different strategies to detect code smells. More recently, machine learning algorithms have also been proposed to support code smell detection. However, we lack empirical evidence on how expert feedback could improve detection of these machine learning based techniques. Objective: This paper aims to propose and evaluate a machine-learning based strategy to improve detection of code smells by means of continuous feedback provided by the system expert. Method: To evaluate the strategy, we follow an experimental design to compare results of the detection before and after the feedback, both when feedback is provided at once and continuously. We focus on four code smells - God Class, Long Method, Feature Envy, and Refused Bequest - detected in twenty Java systems by using five code smell detection tools. We also extracted class- and method-level metrics from the systems for training the machine learning algorithms. Results: We observed that continuous feedback improves the performance of code smell detection. For the detection of God Class, a code smell with a detection performance initially good, we achieved an average improvement of 0.13 in terms of F1. For Refused Bequest, another class-level code smell, we achieved an average improvement of 0.58 in terms of F1 after all interactions of the strategy. For the method-level code smells, Long Method and Feature Envy, we achieved an average improvement of 0.66 and 0.72 in terms of F1, respectively. Conclusions: Our promising results are a stepping stone towards the development of tools relying on continuous feedback for machine learning detection of code smells.

提供机构:
Zenodo
创建时间:
2024-04-08
二维码
社区交流群
二维码
科研交流群
商业服务