Skip to main navigation Skip to search Skip to main content

A Learning Method Based on Program Semantic Graph for Defect Prediction

  • Dingbang Fang*
  • , Shaoying Liu
  • , Limei Lin
  • , Haiyi Liu
  • , Ai Liu
  • , Xin Du
  • , Youcong Ni
  • *Corresponding author for this work
  • Fujian Normal University
  • Jiangsu Second Normal University
  • Nanjing University of Aeronautics and Astronautics

Research output: Contribution to journal › Article › peer-review

Abstract

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.

Original languageEnglish
JournalIEEE Transactions on Dependable and Secure Computing
DOIs
StateAccepted/In press - 2026

Keywords

  • Graph neural network
  • abstract syntax tree
  • defect prediction
  • structural information

Fingerprint

Dive into the research topics of 'A Learning Method Based on Program Semantic Graph for Defect Prediction'. Together they form a unique fingerprint.

Cite this