UPM Institutional Repository

Interpretable deep learning for efficient code smell prioritization in software development


Citation

M. Rashid, Maaeda and Osman, Mohd Hafeez and Sharif, Khaironi Yatim and Zulzalil, Hazura (2025) Interpretable deep learning for efficient code smell prioritization in software development. IEEE Access, 13. pp. 45290-45311. ISSN 2169-3536

Abstract

Code smells indicate potential design flaws in software systems that can impair maintainability and increase technical debt. While existing approaches have advanced code smell priortization, they often lack effective prioritization mechanisms and interpretability, hindering developers’ ability to make informed refactoring decisions. This paper presents a novel approach combining CodeBERT embeddings with Bidirectional Long Short-Term Memory (Bi-LSTM) networks for code smell prioritization, enhanced by Local Interpretable Model-agnostic Explanations (LIME) for model interpretability. The approach introduces specialized preprocessing for large-scale projects and implements a selectivity metric for validating explanation quality. Our comprehensive evaluation demonstrates that the Bi-LSTM approach consistently outperforms traditional architectures across various code smell types, achieving 0.90 across precision, recall, and F1-score metrics for complex class priortization, and precision of 0.88 with recall of 0.87 for feature envy priortization. The model also showed strong performance in identifying God classes, namely, 0.84 for precision, 0.77 for recall, and 0.89 for long methods. The integration of LIME provides developers with clear insights into the model’s decision-making process, enhancing trust and facilitating more effective refactoring decisions. This work contributes a framework that not only accurately detects and prioritizes code smells but also offers transparent, interpretable results applicable in real-world software development.


Download File

[img] Text
121578.pdf - Published Version
Available under License Creative Commons Attribution.

Download (1MB)
Official URL or Download Paper: https://ieeexplore.ieee.org/document/10907894/

Additional Metadata

Item Type: Article
Divisions: Faculty of Computer Science and Information Technology
DOI Number: https://doi.org/10.1109/ACCESS.2025.3543277
Publisher: Institute of Electrical and Electronics Engineers
Keywords: Bidirectional long short-term memory; Code smells; CodeBERT; Deep learning; Feedforward neural networks; Local interpretable model-agnostic explanations; Prioritization
Depositing User: MS. HADIZAH NORDIN
Date Deposited: 06 Nov 2025 04:10
Last Modified: 06 Nov 2025 04:10
Altmetrics: http://www.altmetric.com/details.php?domain=psasir.upm.edu.my&doi=10.1109/ACCESS.2025.3543277
URI: http://psasir.upm.edu.my/id/eprint/121578
Statistic Details: View Download Statistic

Actions (login required)

View Item View Item