arrow
Return

CodeSmellSynergy hybrid ensemble learning framework for detecting python code smells

delete2026-03-24
delete0
PRE
AI
C
Chandan Kumar *
C
Chaganti, Varshini
S
Samal, Umashankar
S
Singh, Sunil Kumar *
DOI:10.1007/s10791-026-10055-7delete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

En 中文
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.
Keywords:
Code smell detection
Software maintainability
ML
DL
Heuristics
Ensemble learning
Feature engineering
Code source analysis
Software metrics
Automatic detection of Feature Envy and Data Class code smells using machine learning
err2024-06-01
err1
errOAAI
errSkipina, Milica; Slivka, Jelena; Luburic, Nikola; Kovacevic, Aleksandar
errShare
errSave
Understanding metric-based detectable smells in Python software: A comparative study
err2018-02-01
err29
PREAI
errChen Zhifei; Chen Lin; Ma Wanwangying; Zhou Xiaoyu; Zhou Yuming; Xu Baowen
errShare
errSave
Automatic detection of Long Method and God Class code smells through neural source code embeddings
err2022-10-01
err25
errOAAI
errKovacevic, Aleksandar; Slivka, Jelena; Vidakovic, Dragan; Grujic, Katarina-Glorija; Luburic, Nikola; Prokic, Simona; Sladic, Goran
errShare
errSave
Automatic detection of code smells using metrics and CodeT5 embeddings: a case study in C#
err2024-02-24
err0
PREAI
errAleksandar Kovačević; Nikola Luburić; Jelena Slivka; Simona Prokić; Katarina-Glorija Grujić; Dragan Vidaković; Goran Sladić
errShare
errSave
A Severity Assessment of Python Code Smells
err2023-01-01
err0
errOAAI
errGupta, Aakanshi; Gandhi, Rashmi; Jatana, Nishtha; Jatain, Divya; Panda, Sandeep Kumar; Ramesh, Janjhyam Venkata Naga
errShare
errSave
ENSESMELLS : Deep ensemble and programming language models for automated code smells detection
err2025-06-01
err0
errOAAI
errHo, Anh; Bui, Anh M. T.; Nguyen, Phuong T.; Di Salle, Amleto; Le, Bach
errShare
errSave
COSTAR: Software Code Smell Detection Through Tree-Based Abstract Representation
err2026-01-01
err0
PREAI
errPraveen Singh Thakur; Mahipal Jadeja; Satyendra Singh Chouhan; Santosh Singh Rathore
errShare
errSave

Journal

D
Discover Computing
IF:
0
Papers:
447
Citations:
197

Organization

G
GLA University
Scholars:
188
Papers: 150
Citations: 1.7K
A
amrita vishwa vidyapeetham
Scholars:
688
Papers: 266
Citations: 2.1K
M
manipal academy of higher education (mahe)
Scholars:
2.3K
Papers: 850
Citations: 129
researcher View more organizations
Cited Papers

Cited Papers

No cited papers available