Seml: A Semantic LSTM Model for Software Defect Prediction

被引:64
作者
Liang, Hongliang [1 ]
Yu, Yue [1 ]
Jiang, Lin [1 ]
Xie, Zhuosi [1 ]
机构
[1] Beijing Univ Posts & Telecommun, Beijing 100876, Peoples R China
基金
中国国家自然科学基金;
关键词
Defect prediction; Long Short Term Memory Network; word embedding;
D O I
10.1109/ACCESS.2019.2925313
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Software defect prediction can assist developers in finding potential bugs and reducing maintenance cost. Traditional approaches usually utilize software metrics (Lines of Code, Cyclomatic Complexity, etc.) as features to build classifiers and identify defective software modules. However, software metrics often fail to capture programs' syntax and semantic information. In this paper, we propose Seml, a novel framework that combines word embedding and deep learning methods for defect prediction. Specifically, for each program source file, we first extract a token sequence from its abstract syntax tree. Then, we map each token in the sequence to a real-valued vector using a mapping table, which is trained with an unsupervised word embedding model. Finally, we use the vector sequences and their labels (defective or non-defective) to build a Long Short Term Memory (LSTM) network. The LSTM model can automatically learn the semantic information of programs and perform defect prediction. The evaluation results on eight open source projects show that Seml outperforms three state-of-the-art defect prediction approaches on most of the datasets for both within-project defect prediction and cross-project defect prediction.
引用
收藏
页码:83812 / 83824
页数:13
相关论文
共 55 条
[1]   A Bayesian belief network for assessing the likelihood of fault content [J].
Amasaki, S ;
Takagi, Y ;
Mizuno, O ;
Kikuno, T .
ISSRE 2003: 14TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING, PROCEEDINGS, 2003, :215-226
[2]   Combining Deep Learning with Information Retrieval to Localize Buggy Files for Bug Reports [J].
An Ngoc Lam ;
Anh Tuan Nguyen ;
Hoan Anh Nguyen ;
Nguyen, Tien N. .
2015 30TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2015, :476-481
[3]  
Phan AV, 2017, 2017 21ST ASIA PACIFIC SYMPOSIUM ON INTELLIGENT AND EVOLUTIONARY SYSTEMS (IES), P37, DOI 10.1109/IESYS.2017.8233558
[4]  
[Anonymous], PARALLEL DISTRIBUTED
[5]  
[Anonymous], ABS190101726 CORR
[6]  
[Anonymous], 2018, DEEP TREE BASED MODE
[7]  
[Anonymous], 2017, ARXIV PREPRINT ARXIV
[8]  
[Anonymous], 2011, ENCY MACHINE LEARNIN, DOI DOI 10.1007/978-0-387-30164-8_208
[9]  
[Anonymous], 2018, ARXIV180204986
[10]  
[Anonymous], PROC INT CONF SOFTW