TY - JOUR
T1 - A Learning Method Based on Program Semantic Graph for Defect Prediction
AU - Fang, Dingbang
AU - Liu, Shaoying
AU - Lin, Limei
AU - Liu, Haiyi
AU - Liu, Ai
AU - Du, Xin
AU - Ni, Youcong
N1 - Publisher Copyright:
© 2004 IEEE.
PY - 2026
Y1 - 2026
N2 - Software defect prediction aims to help save testing resources and costs. Recently, some researchers have leveraged deep learning (DL) to learn semantic features from the abstract syntax tree (AST) to identify potential defects in code. However, this approach directly serializes the nodes in the AST to form a sequence as the DL input, which ignores the structural information of the tree. To solve this problem, we propose a property-enhanced lightweight graph (PLG) based on an AST to provide structural information of the source code. Unlike the original AST, PLG retains only nodes that are closely related to program semantics, thereby reducing structural redundancy and improving representation efficiency. Further, we also develop a learning method based on the semantic graph, called LMSG, which leverages graph neural networks to capture structural, syntactic, and contextual information from the constructed semantic graph. The objective of this work is to investigate whether incorporating lightweight structural modeling can enhance defect prediction performance. Extensive experiments conducted on the Promise and JIRA datasets demonstrate that LMSG achieves significant improvements over reference baseline methods.
AB - Software defect prediction aims to help save testing resources and costs. Recently, some researchers have leveraged deep learning (DL) to learn semantic features from the abstract syntax tree (AST) to identify potential defects in code. However, this approach directly serializes the nodes in the AST to form a sequence as the DL input, which ignores the structural information of the tree. To solve this problem, we propose a property-enhanced lightweight graph (PLG) based on an AST to provide structural information of the source code. Unlike the original AST, PLG retains only nodes that are closely related to program semantics, thereby reducing structural redundancy and improving representation efficiency. Further, we also develop a learning method based on the semantic graph, called LMSG, which leverages graph neural networks to capture structural, syntactic, and contextual information from the constructed semantic graph. The objective of this work is to investigate whether incorporating lightweight structural modeling can enhance defect prediction performance. Extensive experiments conducted on the Promise and JIRA datasets demonstrate that LMSG achieves significant improvements over reference baseline methods.
KW - Graph neural network
KW - abstract syntax tree
KW - defect prediction
KW - structural information
UR - https://www.scopus.com/pages/publications/105052219133
U2 - 10.1109/TDSC.2026.3738065
DO - 10.1109/TDSC.2026.3738065
M3 - 文章
AN - SCOPUS:105052219133
SN - 1545-5971
JO - IEEE Transactions on Dependable and Secure Computing
JF - IEEE Transactions on Dependable and Secure Computing
ER -