Research on Software Defect Detection Model Based on Neural Network
Xintong Zhou, Xinbo Wang, Jingye Gan, Yiqi Liu, Wenyi Wang · 2024
In this study, a neural network-based software defect detection model is proposed, aiming to address the limitations of traditional methods when facing complex code features and data imbalance problems. The model combines Convolutional Neural Network (CNN) and Attention Mechanism to achieve efficient modelling of code semantic information by extracting local structural features and global dependencies of the code. Meanwhile, the study introduces data enhancement techniques, including SMOTE oversampling and Gaussian noise injection, to improve the model’s detection ability and generalisation performance for minority class defective samples. The experiments are validated on NASA MDP and PROMISE datasets, and the results show that the proposed model significantly outperforms the traditional methods and the underlying neural network model in several metrics, such as precision rate, recall rate, F1 score and AUC value. In addition, the contribution of each component to the model performance is analysed through ablation experiments, demonstrating the effectiveness of the attention mechanism and data enhancement techniques. This study provides an intelligent, efficient solution with good generalisation capability for the software defect detection task, and at the same time provides new ideas and technical references for subsequent research.