A Cross-Project Defect Prediction Model Based on Deep Learning With Self-Attention

被引:5
作者
Wen, Wanzhi [1 ,2 ]
Zhang, Ruinian [1 ]
Wang, Chuyue [1 ]
Shen, Chenqiang [1 ]
Yu, Meng [1 ]
Zhang, Suchuan [1 ]
Gao, Xinxin [1 ]
机构
[1] Nantong Univ, Sch Informat Sci & Technol, Nantong 226019, Peoples R China
[2] Nanjing Univ Aeronaut & Astronaut, Key Lab Safety Crit Software, Minist Ind & Informat Technol, Nanjing 211106, Peoples R China
关键词
Semantics; Codes; Feature extraction; Software; Predictive models; Logic gates; Syntactics; Deep learning; Short long term memory; Defect prediction; deep learning; long and short-term memory; self-attention mechanism; SOFTWARE; ALGORITHM;
D O I
10.1109/ACCESS.2022.3214536
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Cross-project defect prediction technique is a hot topic in the field of software defect research because of the huge difference in data distribution between source project and target project. Software defect prediction technique usually first extracts software project features and then trains prediction models based on various classifiers. However, traditional features lack sufficient semantic information of source code resulting in poor performance of the prediction models. To construct more accurate prediction models based on the semantic information, we propose a cross-project defect prediction framework named BSLDP, which extracts semantic information of source code files through a bidirectional long and short-term memory network with self-attention mechanism. In particular, we provide semantic extractor named ALC to extract source code semantics based on source code files, and propose classification algorithm based on the semantic information of source project and target project, namely BSL, to build a prediction model. Furthermore, we propose an equal meshing mechanism that ALC generates semantic information on small fragments by dividing the numerical token vector to further improve the performance of the proposed model. We evaluated the performance of the proposed model on a publicly available PROMISE dataset. Compared with the four state-of-the-art methods, the experimental results indicate that on average BSLDP improves the performance of cross-project defect prediction in terms of F1 by 14.2%, 34.6%, 32.2% and 23.6%, respectively.
引用
收藏
页码:110385 / 110401
页数:17
相关论文
共 55 条
[11]   A Comparative Study to Benchmark Cross-project Defect Prediction Approaches [J].
Herbold, Steffen ;
Trautsch, Alexander ;
Grabowski, Jens .
PROCEEDINGS 2018 IEEE/ACM 40TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2018, :1063-1063
[12]  
Hindle A, 2012, PROC INT CONF SOFTW, P837, DOI 10.1109/ICSE.2012.6227135
[13]   A fast learning algorithm for deep belief nets [J].
Hinton, Geoffrey E. ;
Osindero, Simon ;
Teh, Yee-Whye .
NEURAL COMPUTATION, 2006, 18 (07) :1527-1554
[14]  
Hoa Khanh Dam, 2019, 2019 IEEE/ACM 16th International Conference on Mining Software Repositories (MSR), P46, DOI 10.1109/MSR.2019.00017
[15]   A Systematic Literature Review and Meta-analysis on Cross Project Defect Prediction [J].
Hosseini, Seyedrebvar ;
Turhan, Burak ;
Gunarathna, Dimuthu .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2019, 45 (02) :111-147
[16]  
Jiang T, 2013, IEEE INT CONF AUTOM, P279, DOI 10.1109/ASE.2013.6693087
[17]   Dictionary Learning Based Software Defect Prediction [J].
Jing, Xiao-Yuan ;
Ying, Shi ;
Zhang, Zhi-Wu ;
Wu, Shan-Shan ;
Liu, Jin .
36TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2014), 2014, :414-423
[18]   Heterogeneous Cross-Company Defect Prediction by Unified Metric Representation and CCA-Based Transfer Learning [J].
Jing, Xiaoyuan ;
Wu, Fei ;
Dong, Xiwei ;
Qi, Fumin ;
Xu, Baowen .
2015 10TH JOINT MEETING OF THE EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND THE ACM SIGSOFT SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING (ESEC/FSE 2015) PROCEEDINGS, 2015, :496-507
[19]   ImageNet Classification with Deep Convolutional Neural Networks [J].
Krizhevsky, Alex ;
Sutskever, Ilya ;
Hinton, Geoffrey E. .
COMMUNICATIONS OF THE ACM, 2017, 60 (06) :84-90
[20]   Developer Micro Interaction Metrics for Software Defect Prediction [J].
Lee, Taek ;
Nam, Jaechang ;
Han, Donggyun ;
Kim, Sunghun ;
In, Hoh Peter .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2016, 42 (11) :1015-1035