CodeSmellSynergy hybrid ensemble learning framework for detecting python code smells

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.

Institutions

Publication Details

Journal
Discover Computing
Published
2026-03-24
DOI
https://doi.org/10.1007/s10791-026-10055-7
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

CodeSmellSynergy hybrid ensemble learning framework for detecting python code smells

Discover Computing
Software Engineering Research
article

CodeSmellSynergy hybrid ensemble learning framework for detecting python code smells

article en

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.

Discover ComputingVol. 29(1)
Manipal Academy of Higher Education (IN), Jharkhand Rai University (IN), Institute of Forest Productivity (IN), Amrita Vishwa Vidyapeetham (IN), GLA University (IN)
Openalex Percentile: Top 10%
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.

CodeSmellSynergy hybrid ensemble learning framework for detecting python code smells · Discover Computing (2026) | TGRS Research Map | TGRS