Enhancing Software Quality with AI: A Transformer-Based Approach for Code Smell Detection

被引:0
作者
Ali, Israr [1 ,2 ]
Rizvi, Syed Sajjad Hussain [3 ]
Adil, Syed Hasan [4 ]
机构
[1] Iqra Univ, Dept Software Engn, Karachi 75500, Pakistan
[2] SZABIST Univ, Dept Comp Sci, Karachi 75600, Pakistan
[3] SZABIST Univ, Dept Robot & Artificial Intelligence, Karachi 75600, Pakistan
[4] SEC, AI Solut Dev Dept, Riyadh 22955, Saudi Arabia
来源
APPLIED SCIENCES-BASEL | 2025年 / 15卷 / 08期
关键词
code smell detection; software quality; AI-driven software engineering; Transformers; deep learning; relation-aware embeddings; automated code analysis;
D O I
10.3390/app15084559
中图分类号
O6 [化学];
学科分类号
0703 ;
摘要
Software quality assurance is a critical aspect of software engineering, directly impacting maintainability, extensibility, and overall system performance. Traditional machine-learning techniques, such as gradient boosting and support vector machines (SVM), have demonstrated effectiveness in code smell detection but require extensive feature engineering and struggle to capture intricate semantic dependencies in software structures. In this study, we introduce Relation-Aware BERT (RABERT), a novel transformer-based model that integrates relational embeddings to enhance automated code smell detection. By modeling interdependencies among software complexity metrics, RABERT surpasses classical machine-learning methods, achieving an accuracy of 90.0% and a precision of 91.0%. However, challenges such as low recall (53.0%) and computational overhead indicate the need for further optimization. We present a comprehensive comparative analysis between classical machine-learning models and transformer-based architectures, evaluating their computational efficiency and predictive capabilities. Our findings contribute to the advancement of AI-driven software quality assurance, offering insights into optimizing transformer-based models for practical deployment in software development workflows. Future research will focus on lightweight transformer variants, cost-sensitive learning techniques, and cross-language generalizability to enhance real-world applicability.
引用
收藏
页数:24
相关论文
共 45 条
[1]  
Ahmed A., 2021, J. Softw. Eng. Res. Dev, V10, P45
[2]  
Alazba M., 2022, J. Softw. Evol. Process, V36, pe2387
[3]  
[Anonymous], About us
[4]  
Baker T., 2022, Softw. Test. Verif. Reliab, V34, P301
[5]  
Bakhshandeh A., 2021, J. Syst. Softw, V182, P111
[6]  
Breiman L., 1984, Classification and Regression Trees
[7]  
Brown E., 2023, Empir. Softw. Eng, V28, P197
[8]  
Brown J., 2022, P 2022 IEEE INT C SO, P151
[9]  
Brown S., 2023, J. Syst. Softw, V190, P111214
[10]  
Devlin J, 2019, Arxiv, DOI arXiv:1810.04805