Software Defect Prediction Model based on AST and Deep Learning

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.

Authors

Institutions

Publication Details

Journal
Scalable Computing Practice and Experience
Published
2025-07-14
DOI
https://doi.org/10.12694/scpe.v26i5.4910
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Software Defect Prediction Model based on AST and Deep Learning

Zhilong Lu, Chenghai Yu, Zhengfei Ye
Scalable Computing Practice and Experience
Software Engineering Research
article

Software Defect Prediction Model based on AST and Deep Learning

Zhilong Lu, Chenghai Yu, Zhengfei Ye
article en

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.

Scalable Computing Practice and ExperienceVol. 26(5)
Zhejiang Sci-Tech University (CN)
Openalex Percentile: Top 75%
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.