Software Defect Prediction Model Based on Syntactic Semantics and Flow Information Features

Chongyang Huang, Yi Qing Zhu, Qiao Yu, Yi Ding, Guosheng Hao · 2024

Using deep learning to determine whether a source code file contains defects has become an important research topic. In the past, many researchers have tended to convert code into Abstract Syntax Tree and use deep neural networks to learn the underlying syntactic and semantic information. However, this approach often overlooks the rich flow information embedded in the code, such as control flow. To address this issue, this paper proposes a RGCN_CNN model and applies it to software defect prediction. Specifically, we convert the source code into an Abstract Syntax Tree and a Code Property Graph. Then, we use Convolutional Neural Networks and Relational Graph Convolutional Networks to learn syntactic-semantic features and flow information features from the AST and CPG, respectively. Finally, the two learned features are concatenated and used to train a defect classifier. Experimental results show that the RGCN_CNN model can effectively identify defect files in software projects.

Read the paper · More papers on PaperTik