CodeSmellSynergy hybrid ensemble learning framework for detecting python code smells

Read full text
Authors: Chandan Kumar, Varshini Chaganti, Umashankar Samal, Sunil Kumar Singh
Cited by: 2
References: 42

Abstract

Abstract Code smells are symptoms of poor design and implementation in the code, which do not directly affect the functionality, but affect various aspects of the software such as readability, maintainability, and quality. Early identification is key in avoiding technical debt and in maintaining sustainable codebases. However, traditional heuristic and machine learning (ML)-based techniques tend to have low precision, scalability problems, and are not effective in dealing with class imbalance. In this paper, we propose CodeSmellSynergy , a novel hybrid approach for the detection of design smells in Python that applies heuristic pre-filtering and feature engineering, balances classes, and combines heterogeneous ML and deep learning (DL) classifiers through stacking and voting. The framework is tested on a publicly available dataset of 1000 labeled samples for the Long Method and Large Class smells. The proposed method obtains 97.08% accuracy and a Matthews Correlation Coefficient (MCC) of 0.9427 for Long Method detection, and 93.75% accuracy with an MCC of 0.8752 for Large Class detection using stratified five-fold cross-validation. The paired Wilcoxon signed-rank test is used to verify the statistical significance of improvements over the strong baseline models. The results demonstrate that learning an ensemble with heuristic transparency enhances robustness and interpretability in detecting code smells.

Fields of Study & Subjects

Software Engineering Research Software Testing and Debugging Techniques Advanced Malware Detection Techniques

Publication details

Journal / source
Discover Computing
Publisher
Springer Science and Business Media LLC
Volume
29
Issue
1
Publication date
24 March 2026
Language
EN