EN
TR
A Software Engineering Framework for Intelligent Code Smell Detection with Machine Learning
Abstract
Identifying code smells is a fundamental task in software engineering for improving software quality and ensuring long-term system sustainability. This paper presents an intelligent framework designed to detect Large Class type code smells using a machine learning (ML) model trained on source code metrics. Within this proposed framework, multiple software metrics, including structural metrics, Halstead metrics, and cognitive metrics, are derived from Java source code files to serve as input features for classification. The Extreme Gradient Boosting (XGBoost) algorithm is utilized to identify whether a software contains a code smell or not. Experimental evaluations conducted on a dataset demonstrated that the proposed model reached an accuracy of 93.47%. Furthermore, it achieved an average improvement of 6.33% compared to existing methods evaluated on the same dataset. These findings indicate that our ML-based approach can provide effective and reliable solutions for automating code smell detection in software engineering.
Keywords
References
- M.G. Al-Obeidallah and D. Al-Fraihat. “A systematic review on software code smells,” International Journal of Electrical and Computer Engineering, vol. 15, no. 3, pp. 3010-3027, June 2025. doi: 10.11591/ijece.v15i3
- M. Hadj-Kacem and N. Bouassida, “Application of Deep Learning for Code Smell Detection: Challenges and Opportunities,” SN Computer Sciences, no 5, 614, 2024. doi: 10.1007/s42979-024-02956-5
- F.R. Santos and R. Choren. “Data preprocessing for machine learning based code smell detection: A systematic literature review,” Information and Software Technology, vol. 184, 2025. doi: 10.1016/j.infsof.2025.107752
- P. S. Thakur, S. S. Chouhan, S. S. Rathore and J. Parmar. “Systematic literature review on software code smell detection approaches,” Journal of Systems and Software, vol. 235, 2026, 112784. doi: 10.1016/j.jss.2026.112784
- S. Alodibat and M. Azzeh, “A Systematic Review on Code Smell Detection Approaches in Open Source Projects,” Software: Practice and Experience, vol. 1, pp. 1-30, 2026. doi: 10.1002/spe.70074
- P.S. Yadav, R.S. Rao, A. Mishra, and M. Gupta. “Machine Learning-Based Methods for Code Smell Detection: A Survey,” Applied Sciences, vol. 14, no. 14, 6149, 2024. doi: 10.3390/app14146149
- R. Gupta and S. K. Singh, "Investigating transfer learning for code smell detection on homogeneous data," Innovations in Systems and Software Engineering, vol. 22, no. 3, pp. 1-20, Jan. 2026. doi:10.1007/s11334-025-00624-2
- C. Kumar and S. K. Singh, "CodeSmellSynergy: A Hybrid Ensemble Framework for Python Code Smell Detection," Discover Computing, vol. 29, no. 171, pp. 1-25, 2026. doi:10.1007/s10791-026-10055-7
Details
Primary Language
English
Subjects
Artificial Intelligence (Other)
Journal Section
Research Article
Authors
Publication Date
May 31, 2026
Submission Date
May 9, 2026
Acceptance Date
May 21, 2026
Published in Issue
Year 2026 Volume: 2 Number: 1
APA
Birant, K. U. (2026). A Software Engineering Framework for Intelligent Code Smell Detection with Machine Learning. Innovative Artificial Intelligence, 2(1), 42-48. https://izlik.org/JA62AD22FR
AMA
1.Birant KU. A Software Engineering Framework for Intelligent Code Smell Detection with Machine Learning. INNAI. 2026;2(1):42-48. https://izlik.org/JA62AD22FR
Chicago
Birant, Kökten Ulaş. 2026. “A Software Engineering Framework for Intelligent Code Smell Detection With Machine Learning”. Innovative Artificial Intelligence 2 (1): 42-48. https://izlik.org/JA62AD22FR.
EndNote
Birant KU (May 1, 2026) A Software Engineering Framework for Intelligent Code Smell Detection with Machine Learning. Innovative Artificial Intelligence 2 1 42–48.
IEEE
[1]K. U. Birant, “A Software Engineering Framework for Intelligent Code Smell Detection with Machine Learning”, INNAI, vol. 2, no. 1, pp. 42–48, May 2026, [Online]. Available: https://izlik.org/JA62AD22FR
ISNAD
Birant, Kökten Ulaş. “A Software Engineering Framework for Intelligent Code Smell Detection With Machine Learning”. Innovative Artificial Intelligence 2/1 (May 1, 2026): 42-48. https://izlik.org/JA62AD22FR.
JAMA
1.Birant KU. A Software Engineering Framework for Intelligent Code Smell Detection with Machine Learning. INNAI. 2026;2:42–48.
MLA
Birant, Kökten Ulaş. “A Software Engineering Framework for Intelligent Code Smell Detection With Machine Learning”. Innovative Artificial Intelligence, vol. 2, no. 1, May 2026, pp. 42-48, https://izlik.org/JA62AD22FR.
Vancouver
1.Kökten Ulaş Birant. A Software Engineering Framework for Intelligent Code Smell Detection with Machine Learning. INNAI [Internet]. 2026 May 1;2(1):42-8. Available from: https://izlik.org/JA62AD22FR