z-logo
open-access-imgOpen Access
Improving Software Defect Detection with LSTM-Based Semantic Modeling and Class Imbalance Handling
Author(s) -
Hiro Andrade,
Nuno Pombo,
Sebastiao Pais
Publication year - 2025
Publication title -
ieee open journal of the computer society
Language(s) - English
Resource type - Magazines
eISSN - 2644-1268
DOI - 10.1109/ojcs.2025.3613134
Subject(s) - computing and processing
Software Defect Prediction (SDP) plays a vital role in maintaining software quality, especially as modern systems grow in size and complexity. Traditional SDP models that rely on static code metrics often fail to capture the semantic and contextual relationships inherent in source code, limiting their prediction accuracy and ability to generalize across projects. In this study, we propose a Deep Learning (DL)-based approach that combines Long Short-Term Memory (LSTM) networks with semantic feature extraction to improve the effectiveness of defect prediction. Our method utilizes representations derived from Abstract Syntax Trees (ASTs) to capture structural and contextual information from the code. To address the challenge of class imbalance-common in SDP datasets-we apply the Synthetic Minority Oversampling Technique (SMOTE) and cost-sensitive learning, enhancing the model's sensitivity to defective code components. Experiments on the PROMISE dataset, covering multiple versions of Java projects, show that our approach significantly outperforms models based solely on static metrics. Comparative analysis with recent studies further highlights the strengths of our method in capturing long-range code dependencies and improving defect detection accuracy. These results support the potential of integrating LSTM-based semantic modeling and class imbalance handling to advance the state of SDP.

The content you want is available to Zendy users.

Already have an account? Click here to sign in.
Having issues? You can contact us here
Accelerating Research

Address

John Eccles House
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom