AST abstract syntax tree GNN graph neural network 1 Introduction Software defect prediction (SDP) aims to predict the defect probability in each module of a software, thereby reducing testing costs and improving software quality [1-3]. Traditional SDP technology mainly relied on the static metrics of code and used traditional machine learning methods [4]. However, most static features are hand-crafted, and different static features may perform well in certain programs but poorly in others.