arrow
Return

Line-Level Defect Prediction by Capturing Code Contexts With Graph Convolutional Networks

delete2025-01-01
delete0
PRE
AI
S
S. Yin
S
Shikai Guo *
H
Hui Li
C
Chenchen Li
R
Rong Chen
X
Xiaochen Li
H
He Jiang
DOI:10.1109/TSE.2024.3503723delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Software defect prediction refers to the systematic analysis and review of software using various approaches and tools to identify potential defects or errors. Software defect prediction aids developers in swiftly identifying defects and optimizing development resource allocation, thus enhancing software quality and reliability. Previous defect prediction approaches still face two main limitations: 1) lacking of contextual semantic information and 2) Ignoring the joint reasoning between different granularities of defect predictions. In response to these challenges, we propose LineDef, a line-level defect prediction approach by capturing code contexts with graph convolutional networks. Specifically, LineDef comprises three components: the token embedding component, the graph extraction component, and the multi-granularity defect prediction component. The token embedding component maps each token to a vector to obtain a high-dimensional semantic feature representation of the token. Subsequently, the graph extraction component utilizes a sliding window to extract line-level and token-level graphs, addressing the challenge of capturing contextual semantic relationships in the code. Finally, the multi-granularity defect prediction component leverages graph convolutional layers and attention mechanisms to acquire prediction labels and risk scores, thereby achieving file-level and line-level defect prediction. Experimental studies on 32 datasets across 9 different software projects show that LineDef exhibits significantly enhanced balanced accuracy, ranging from 15.61% to 45.20%, compared to state-of-the-art file-level defect prediction approaches, and a remarkable cost-effectiveness improvement ranging from 15.32% to 278%, compared to state-of-the-art line-level defect prediction approaches. These results demonstrate that LineDef approach can extract more comprehensive information from lines of code for defect prediction.
Keywords:
Codes
Semantics
Distance measurement
Costs
Reviews
Predictive models
Indexes
Feature extraction
Convolutional codes
Cognition
Line-level defect prediction
software quality assurance
graph convolutional network

Journal

IEEE Transactions on Software Engineering cover
IEEE Transactions on Software Engineering
IF:
5.6
Papers:
2.9K
Citations:
1.1W

Organization

D
Dalian University of Technology
Scholars:
6.0W
Papers: 4.4W
Citations: 5.5W
D
Dalian Maritime University
Scholars:
1.2W
Papers: 7.9K
Citations: 6.3K
Cited Papers

Cited Papers

Crystallization behavior of a confined CuZr metallic liquid film with a sandwich-like structure
err2019-01-01
err0
PREAI
errYunrui Duan; Jie Li; Xingfan Zhang; Tao Li; Hamidreza Arandiyan; Yanyan Jiang; Hui Li
errShare
errSave
Predicting Defective Lines Using a Model-Agnostic Technique
err2022-05-01
err58
errOAAI
errWattanakriengkrai, Supatsara; Thongtanunam, Patanamon; Tantithamthavorn, Chakkrit; Hata, Hideaki; Matsumoto, Kenichi
errShare
errSave
Music and Physical Activity in Psychological Well-Being
err2006-08-01
err0
PREAI
errDamiano Macone; Carlo Baldari; Arnaldo Zelli; Laura Guidetti
errShare
errSave
Impact of Metformin Use on Lactate Kinetics in Patients with Severe Sepsis and Septic Shock
err2017-05-01
err0
PREAI
errJoongmin Park; Sung Yeon Hwang; Ik Joon Jo; Kyeongman Jeon; Gee Young Suh; Tae Rim Lee; Hee Yoon; Won Chul Cha; Min Seob Sim; Keumhee Chough Carriere; Seungmin Yeon; Tae Gun Shin
errShare
errSave
A NEW ABSOLUTE FREQUENCY REFERENCE GRID IN THE 28 THz RANGE
err1981-12-01
err0
PREAI
errA. Clairon; A. Van Lerberghe; Ch. Bréant; Ch. Salomon; G. Camy; Ch. J. Bordé
errShare
errSave
The Role of Minimally Invasive Surgery in Multifocal Renal Cell Carcinoma
err2012-04-27
err0
PREAI
errSerge Ginzburg; Robert G. Uzzo; Alexander Kutikov
errShare
errSave
researcher View more