返回
Smell-ML: A Machine Learning Framework for Detecting Rarely Studied Code Smells
DOI:10.1109/ACCESS.2025.3530927.png)
摘要
En 中文
Code smells are design flaws that reduce the software quality and maintainability. Machine learning classification models have been used to detect different code smells. However, such studies targeted code smells in depth, while leaving other under-explored smells; even so, such smells have a significant impact on source code quality. Recent surveys have highlighted a group of code smells that has rarely been studied by researchers. Furthermore, some machine learning classification models were evaluated on a subset of the source code features while ignoring significant features during classification. This paper proposes a novel approach, called Smell-ML, for detecting five rarely studied code smells: Middle Man (MM), Class Data Should Be Private (CDSBP), Inappropriate Intimacy (II), Refused Bequest (RB), and Speculative Generality (SG). The novelty of this approach stems from the improvement in both the data preparation and classification phases. During data preparation, Smell-ML relies on data balancing and an extended source code feature list to improve accuracy. In the classification phase, different classifiers were assessed, including traditional, ensemble, and multi-level classifiers. We evaluated Smell-ML on a dataset composed of 13 open source Java projects with 125 versions per project. The results show that Smell-ML's detection F1-score values surpass those of previous studies with significant improvements across various code smells. The F1-score measure of the 11 machine learning classifiers improved after using the extended feature list. Data balancing and multi-level classification notably boosted accuracy.
Keyword:
Codes
Feature extraction
Accuracy
Data models
Surveys
Software measurement
Ensemble learning
Random forests
Machine learning algorithms
Java
Code smell detection
machine learning
data balancing
ensemble learning
multi-level classification
期刊
IF:
3.6
论文数:
9.8W
被引数:
29.4W
机构
引用论文
A Systematic Literature Review on the Code Smells Datasets and Validation Mechanisms关于Code Smells数据集和验证机制的系统文献综述
China’s Indigenous Peoples? How Global Environmentalism Unintentionally Smuggled the Notion of Indigeneity into China
Humanities
IF0
Comparing and experimenting machine learning techniques for code smell detection比较和实验用于代码气味检测的机器学习技术
Recombination between an expressed immunoglobulin heavy-chain gene and a germline variable gene segment in a Ly 1+ B-cell lymphoma
Nature
IF0

