Software defect prediction with semantic and structural information of codes based on Graph Neural Networks

被引:23
|
作者
Zhou, Chunying [1 ]
He, Peng [1 ]
Zeng, Cheng [1 ]
Ma, Ju [1 ]
机构
[1] Hubei Univ, Sch Comp Sci & Informat Engn, Wuhan, Peoples R China
基金
国家重点研发计划;
关键词
Software defect prediction; Class Dependency Network; Convolutional Neural Network; Graph Convolutional Network;
D O I
10.1016/j.infsof.2022.107057
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Context: Most defect prediction methods consider a series of traditional manually designed static code metrics. However, only using these hand-crafted features is impractical. Some researchers use the Convolutional Neural Network (CNN) to capture the potential semantic information based on the program's Syntax Trees (ASTs). In recent years, leveraging the dependency relationships between software modules to construct a software network and using network embedding models to capture the structural information have been helpful in defect prediction. This paper simultaneously takes the semantic and structural information into account and proposes a method called CGCN. Objective: This study aims to validate the feasibility and performance of the proposed method in software defect prediction. Method: Abstract Syntax Trees and a Class Dependency Network (CDN) are first generated based on the source code. For ASTs, symbolic tokens are extracted and encoded into vectors. The numerical vectors are then used as input to the CNN to capture the semantic information. For CDN, a Graph Convolutional Network (GCN) is used to learn the structural information of the network automatically. Afterward, the learned semantic and structural information are combined with different weights. Finally, we concatenate the learned features with traditional hand-crafted features to train a classifier for more accurate defect prediction. Results: The proposed method outperforms the state-of-the-art defect prediction models for both within-project prediction (including within-version and cross-version) and cross-project prediction on 21 open-source projects. In general, within-version prediction achieves better performance in the three prediction tasks.Conclusion: The proposed method of combining semantic and structural information can improve the performance of software defect prediction.
引用
收藏
页数:20
相关论文
共 50 条
  • [21] Graph Neural Network for Source Code Defect Prediction
    Sikic, Lucija
    Kurdija, Adrian Satja
    Vladimir, Klemo
    Silic, Marin
    IEEE ACCESS, 2022, 10 : 10402 - 10415
  • [22] Hybrid Optimization-Based Neural Network Classifier for Software Defect Prediction
    Prashanthi, M.
    Mohan, M. Chandra
    INTERNATIONAL JOURNAL OF IMAGE AND GRAPHICS, 2024, 24 (04)
  • [23] Software defect prediction techniques using metrics based on neural network classifier
    Jayanthi, R.
    Florence, Lilly
    CLUSTER COMPUTING-THE JOURNAL OF NETWORKS SOFTWARE TOOLS AND APPLICATIONS, 2019, 22 (Suppl 1): : 77 - 88
  • [24] Neural Network Parameter Optimization Based on Genetic Algorithm for Software Defect Prediction
    Wahono, Romi Satria
    Herman, Nanna Suryana
    Ahnnad, Sabrina
    ADVANCED SCIENCE LETTERS, 2014, 20 (10-12) : 1951 - 1955
  • [25] Software defect prediction techniques using metrics based on neural network classifier
    R. Jayanthi
    Lilly Florence
    Cluster Computing, 2019, 22 : 77 - 88
  • [26] Software defect prediction based on enhanced metaheuristic feature selection optimization and a hybrid deep neural network
    Zhu, Kun
    Ying, Shi
    Zhang, Nana
    Zhu, Dandan
    JOURNAL OF SYSTEMS AND SOFTWARE, 2021, 180
  • [27] Software Defect Prediction via Convolutional Neural Network
    Li, Jian
    He, Pinjia
    Zhu, Jieming
    Lyu, Michael R.
    2017 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY (QRS), 2017, : 318 - 328
  • [28] Software Defect Prediction using Convolutional Neural Network
    Wongpheng, Kittisak
    Visutsak, Porawat
    35TH INTERNATIONAL TECHNICAL CONFERENCE ON CIRCUITS/SYSTEMS, COMPUTERS AND COMMUNICATIONS (ITC-CSCC 2020), 2020, : 240 - 243
  • [29] A cognitive and neural network approach for software defect prediction
    Rajnish, Kumar
    Bhattacharjee, Vandana
    JOURNAL OF INTELLIGENT & FUZZY SYSTEMS, 2022, 43 (05) : 6477 - 6503
  • [30] Optical Network Traffic Prediction Based on Graph Convolutional Neural Networks
    Gui, Yihan
    Wang, Danshi
    Guan, Luyao
    Zhang, Min
    2020 OPTO-ELECTRONICS AND COMMUNICATIONS CONFERENCE (OECC 2020), 2020,