跳到主要导航 跳到搜索 跳到主要内容

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
  • *此作品的通讯作者
  • Fujian Normal University
  • Jiangsu Second Normal University
  • Nanjing University of Aeronautics and Astronautics

科研成果: 期刊稿件 › 文章 › 同行评审

摘要

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.

学术指纹

探究 'A Learning Method Based on Program Semantic Graph for Defect Prediction' 的科研主题。它们共同构成独一无二的学术指纹。

引用此