Software Defect Prediction Model based on AST and Deep Learning
Main Article Content
Abstract
Software reliability prediction (SDP) theory is crucial for balancing software value and assessing efficiency. Traditional defect prediction relies on static code metrics for machine learning, but these handcrafted features fail to capture the code’s syntactic structure and semantic information. In order to further predict the defects of the software, the Abstract Syntax Tree (AST) of the program was parsed on the basis of the metric data, and extracted as feature vectors, and the data was encoded by dictionary mapping and word embedding as the input of Convolutional Neural Network (CNN). On this basis, the Long Short-Term Memory network (LSTM) and Multi-head attention mechanism were used to further optimize the network, and the particle swarm optimization (PSO) was used to select the hyperparameters of the model, and the defects were predicted by using the model. The results show that the model can learn syntax and semantic features well, and the estimation accuracy is higher and the bias is smaller.
Article Details

This work is licensed under a Creative Commons Attribution 4.0 International License.