Code smell severity classification at class and method level with a single manually labeled imbalanced dataset

Detecting code smells through machine learning (ML) poses challenges due to its unbalanced nature and potential interpretation bias. While previous studies focused on severity tended to categorize code smell’s specific types, this research aims to detect and classify code smell severity in a single dataset containing instances of code smells of four distinct types: God-class, Data-Class, Feature-Envy, and Long-Method. This study also explores the impact of applying data scaling, feature selection techniques, and ensemble methods to enhance ML models for the purpose above. The evaluation of two ensemble models on a combined dataset reveals that using data standardization techniques, ensemble methods, and Chi-square outperforms the result of other ensemble combinations, achieving 81.04% and 81.41% accuracy in the XGBoost and CatBoost models. Additionally, the CatBoost algorithm attains the highest accuracy at 80.67%, even without data preprocessing. Comparatively with the state-of-the-art, the results obtained, an accuracy of 85%, by the proposed approach in detecting the severity of code smells are promising and suggest improvements in approaches and techniques to enhance the effectiveness and reliability of models in real-world scenarios.

Authors

Publication Details

Published
2024-09-30
DOI
https://doi.org/10.5753/sbes.2024.2933
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Code smell severity classification at class and method level with a single manually labeled imbalanced dataset

Ricardo Choren Noya, Júlio César Duarte, Fábio do Rosario Santos
Software Engineering Research
article

Code smell severity classification at class and method level with a single manually labeled imbalanced dataset

Ricardo Choren Noya, Júlio César Duarte, Fábio do Rosario Santos
article en

Abstract

Detecting code smells through machine learning (ML) poses challenges due to its unbalanced nature and potential interpretation bias. While previous studies focused on severity tended to categorize code smell’s specific types, this research aims to detect and classify code smell severity in a single dataset containing instances of code smells of four distinct types: God-class, Data-Class, Feature-Envy, and Long-Method. This study also explores the impact of applying data scaling, feature selection techniques, and ensemble methods to enhance ML models for the purpose above. The evaluation of two ensemble models on a combined dataset reveals that using data standardization techniques, ensemble methods, and Chi-square outperforms the result of other ensemble combinations, achieving 81.04% and 81.41% accuracy in the XGBoost and CatBoost models. Additionally, the CatBoost algorithm attains the highest accuracy at 80.67%, even without data preprocessing. Comparatively with the state-of-the-art, the results obtained, an accuracy of 85%, by the proposed approach in detecting the severity of code smells are promising and suggest improvements in approaches and techniques to enhance the effectiveness and reliability of models in real-world scenarios.

Openalex Percentile: Top 71%
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.