Graph Neural Network for Source Code Defect Prediction

被引:0
|
作者
Sikic, Lucija [1 ]
Kurdija, Adrian Satja [1 ]
Vladimir, Klemo [1 ]
Silic, Marin [1 ]
机构
[1] Univ Zagreb, Fac Elect Engn & Comp, Zagreb 10000, Croatia
来源
IEEE ACCESS | 2022年 / 10卷
关键词
Codes; Software; Predictive models; Feature extraction; Task analysis; Graph neural networks; Data models; Software defect prediction; deep learning; graph neural network; FAULT PREDICTION; METRICS; DESIGN; MODELS;
D O I
10.1109/ACCESS.2022.3144598
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Predicting defective software modules before testing is a useful operation that ensures that the time and cost of software testing can be reduced. In recent years, several models have been proposed for this purpose, most of which are built using deep learning-based methods. However, most of these models do not take full advantage of a source code as they ignore its tree structure or they focus only on a small part of a code. To investigate whether and to what extent information from this structure can be beneficial in predicting defective source code, we developed an end-to-end model based on a convolutional graph neural network (GCNN) for defect prediction, whose architecture can be adapted to the analyzed software, so that projects of different sizes can be processed with the same level of detail. The model processes the information of the nodes and edges from the abstract syntax tree (AST) of the source code of a software module and classifies the module as defective or not defective based on this information. Experiments on open source projects written in Java have shown that the proposed model performs significantly better than traditional defect prediction models in terms of AUC and F-score. Based on the F-scores of the existing state-of-the-art models, the model has shown comparable predictive capabilities for the analyzed projects.
引用
收藏
页码:10402 / 10415
页数:14
相关论文
共 50 条
  • [1] Graph Neural Network for Source Code Defect Prediction
    Sikic, Lucija
    Kurdija, Adrian Satja
    Vladimir, Klemo
    Silic, Marin
    [J]. IEEE Access, 2022, 10 : 10402 - 10415
  • [2] Transformer-XL With Graph Neural Network for Source Code Summarization
    Zhang, Xiaoling
    Yang, Shouguo
    Duan, Luqian
    Lang, Zhe
    Shi, Zhiqiang
    Sun, Limin
    [J]. 2021 IEEE INTERNATIONAL CONFERENCE ON SYSTEMS, MAN, AND CYBERNETICS (SMC), 2021, : 3436 - 3441
  • [3] On the Relevance of Graph2Vec Source Code Embeddings for Software Defect Prediction
    Miholca, Diana-Lucia
    Onet-Marian, Zsuzsanna
    [J]. SOFTWARE TECHNOLOGIES, ICSOFT 2023, 2024, 2104 : 124 - 154
  • [4] Research of Software Defect Prediction Model Based on Complex Network and Graph Neural Network
    Cui, Mengtian
    Long, Songlin
    Jiang, Yue
    Na, Xu
    [J]. ENTROPY, 2022, 24 (10)
  • [5] EPR: a Neural Network for Automatic Feature Learning from Code for Defect Prediction
    Fang, Dingbang
    Liu, Shaoying
    Liu, Ai
    [J]. 2021 IEEE 21ST INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY (QRS 2021), 2021, : 482 - 492
  • [6] A novel vulnerability severity assessment method for source code based on a graph neural network
    Hao, Jingwei
    Luo, Senlin
    Pan, Limin
    [J]. INFORMATION AND SOFTWARE TECHNOLOGY, 2023, 161
  • [7] REPD: Source Code Defect Prediction As Anomaly Detection
    Afric, Petar
    Sikic, Lucija
    Kurdija, Adrian Satja
    Silic, Marin
    [J]. 2019 COMPANION OF THE 19TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY (QRS-C 2019), 2019, : 227 - 234
  • [8] REPD: Source code defect prediction as anomaly detection
    Afric, Petar
    Sikic, Lucija
    Kurdija, Adrian Satja
    Silic, Marin
    [J]. JOURNAL OF SYSTEMS AND SOFTWARE, 2020, 168
  • [9] Tensor-based gated graph neural network for automatic vulnerability detection in source code
    Yang, Jia
    Ruan, Ou
    Zhang, JiXin
    [J]. SOFTWARE TESTING VERIFICATION & RELIABILITY, 2024, 34 (02):
  • [10] Improved Code Summarization via a Graph Neural Network
    LeClair, Alexander
    Haque, Sakib
    Wu, Lingfei
    McMillan, Collin
    [J]. 2020 IEEE/ACM 28TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION, ICPC, 2020, : 184 - 195