Software Defect Prediction Based on Deep Representation Learning of Source Code From Contextual Syntax and Semantic Graph

被引:9
作者
Abdu, Ahmed [1 ]
Zhai, Zhengjun [1 ]
Abdo, Hakim A. [2 ]
Algabri, Redhwan [3 ]
机构
[1] Northwestern Polytech Univ, Sch Software, Xian 710072, Peoples R China
[2] Hodeidah Univ, Dept Comp Sci, Al Hudaydah 3114, Yemen
[3] Hanyang Univ, Res Inst Engn & Technol, Ansan 15588, South Korea
关键词
Contextual representations; deep learning; graphical representations; hierarchical convolutional neural network; software defect prediction (SDP); MODEL;
D O I
10.1109/TR.2024.3354965
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Software defect prediction approaches play an essential role in the software development life cycle to help developers predict defects early, thus, preventing wasted time and effort. Defect prediction techniques based on semantic features have recently gained success over approaches based on traditional features. Existing semantic features-based defect prediction approaches use a single source code representation. Most studies focus on contextual syntax represented by abstract syntax trees, and some studies use a control flow graph to represent code graphs. However, a single representation is still limited for predicting defects that call multiple functions and have a high probability of false positives. To close the gap between source code representations on software defect prediction, we propose a defect prediction model based on multiple source code representations. The proposed model is a deep hierarchical convolutional neural network (DH-CNN). The syntax features extracted from abstract syntax trees using Word2vec are fed into syntax-level DH-CNN, and the semantic-graph features extracted from the control flow graph and data dependence graph using Node2vec are fed into semantic-level DH-CNN. In addition, the proposed model includes a gated merging mechanism that combines DH-CNN outputs to estimate the combination ratio of both types of features. Experimental results indicate that DH-CNN outperforms existing methods under cross-project and within-project scenarios.
引用
收藏
页码:820 / 834
页数:15
相关论文
共 45 条
  • [1] Deep Learning-Based Software Defect Prediction via Semantic Key Features of Source Code-Systematic Survey
    Abdu, Ahmed
    Zhai, Zhengjun
    Algabri, Redhwan
    Abdo, Hakim A.
    Hamad, Kotiba
    Al-antari, Mugahed A.
    [J]. MATHEMATICS, 2022, 10 (17)
  • [2] Aho R. Sethi, 2007, COMPILERS PRINCIPLES, V2
  • [3] A Bayesian belief network for assessing the likelihood of fault content
    Amasaki, S
    Takagi, Y
    Mizuno, O
    Kikuno, T
    [J]. ISSRE 2003: 14TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING, PROCEEDINGS, 2003, : 215 - 226
  • [4] Convolutional Neural Networks over Control Flow Graphs for Software Defect Prediction
    Anh Viet Phan
    Minh Le Nguyen
    Lam Thu Bui
    [J]. 2017 IEEE 29TH INTERNATIONAL CONFERENCE ON TOOLS WITH ARTIFICIAL INTELLIGENCE (ICTAI 2017), 2017, : 45 - 52
  • [5] A hierarchical model for object-oriented design quality assessment
    Bansiya, J
    Davis, CG
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2002, 28 (01) : 4 - 17
  • [6] Hellinger Net: A Hybrid Imbalance Learning Model to Improve Software Defect Prediction
    Chakraborty, Tanujit
    Chakraborty, Ashis Kumar
    [J]. IEEE TRANSACTIONS ON RELIABILITY, 2021, 70 (02) : 481 - 494
  • [7] Software Visualization and Deep Transfer Learning for Effective Software Defect Prediction
    Chen, Jinyin
    Hu, Keke
    Yu, Yue
    Chen, Zhuangzhi
    Xuan, Qi
    Liu, Yi
    Filkov, Vladimir
    [J]. 2020 ACM/IEEE 42ND INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2020), 2020, : 578 - 589
  • [8] Path-Sensitive Code Embedding via Contrastive Learning for Software Vulnerability Detection
    Cheng, Xiao
    Zhan, Guanqin
    Wang, Haoyu
    Sui, Yulei
    [J]. PROCEEDINGS OF THE 31ST ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2022, 2022, : 519 - 531
  • [9] DeepWukong: Statically Detecting Software Vulnerabilities Using Deep Graph Neural Network
    Cheng, Xiao
    Wang, Haoyu
    Hua, Jiayi
    Xu, Guoai
    Sui, Yulei
    [J]. ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2021, 30 (03)
  • [10] A METRICS SUITE FOR OBJECT-ORIENTED DESIGN
    CHIDAMBER, SR
    KEMERER, CF
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1994, 20 (06) : 476 - 493