An exploratory study of bug prediction at the method level

被引:15
作者
Mo, Ran [1 ]
Wei, Shaozhi [1 ]
Feng, Qiong [2 ]
Li, Zengyang [1 ]
机构
[1] Cent China Normal Univ, Hubei Prov Key Lab Artificial Intelligence & Smar, Wuhan, Hubei, Peoples R China
[2] Cent China Normal Univ, Sch Comp, Wuhan, Hubei, Peoples R China
基金
中国国家自然科学基金;
关键词
Method-level bug prediction; Code metrics; History measures; QUANTITATIVE-ANALYSIS; EMPIRICAL-ANALYSIS; SOFTWARE; FAULTS; METRICS;
D O I
10.1016/j.infsof.2021.106794
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Context: During the past decades, researchers have proposed numerous studies to predict bugs at different granularity levels, such as the file level, package level, module level, etc. However, the prediction models at the method level are rarely investigated. Objective: In this paper, we investigate to predict bug-prone methods based on method-level code metrics or history measures, and analyze the prediction importance of each metric. Method: To proceed our study, we first propose a series of code metrics and history measures for conducting method-level bug predictions. Next, we compare the performance of different types of prediction models. Finally, we conduct analyses about the prediction power of each metric, based on which, we further analyze whether we can simplify the prediction models. Results: Through our evaluation on eighteen large-scale projects, we have presented: (1) conducting method level bug prediction has potentials of saving a large portion of effort on code reviews and inspections; (2) models using the proposed code metrics or history measures could achieve a good prediction performance; (3) the prediction importance of each metric distributes differently; (4) a highly simplified prediction model could be derived by just using a few important metrics. Conclusion: This study presents how to systematically build models for predicting bug-prone methods, and provides empirical evidence for developers to best select metrics to build method-level bug prediction models.
引用
收藏
页数:12
相关论文
共 49 条
[1]   A replicated quantitative analysis of fault distributions in complex software systems [J].
Andersson, Carina ;
Runeson, Per .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2007, 33 (05) :273-286
[2]   A Validated Set of Smells in Model-View-Controller Architectures [J].
Aniche, Mauricio ;
Bavota, Gabriele ;
Treude, Christoph ;
van Deursen, Arie ;
Gerosa, Marco Aurelio .
32ND IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2016), 2016, :234-244
[3]  
[Anonymous], 2006, P 5 INT S EMP SOFTW, DOI [10.1145/1159733.1159739, DOI 10.1145/1159733.1159739.]
[4]  
[Anonymous], 2008, SIGSOFT
[5]   Random forests [J].
Breiman, L .
MACHINE LEARNING, 2001, 45 (01) :5-32
[6]   Software Dependencies, Work Dependencies, and Their Impact on Failures [J].
Cataldo, Marcelo ;
Mockus, Audris ;
Roberts, Jeffrey A. ;
Herbsleb, James D. .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2009, 35 (06) :864-878
[7]   A METRICS SUITE FOR OBJECT-ORIENTED DESIGN [J].
CHIDAMBER, SR ;
KEMERER, CF .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1994, 20 (06) :476-493
[8]  
Chih-Song Kuo, 2010, 2010 IEEE International Conference on Industrial Engineering & Engineering Management (IE&EM 2010), P611, DOI 10.1109/IEEM.2010.5674517
[9]  
CHINCHOR N, 1992, FOURTH MESSAGE UNDERSTANDING CONFERENCE (MUC-4), P22
[10]   On the Distribution of Bugs in the Eclipse System [J].
Concas, Giulio ;
Marchesi, Michele ;
Murgia, Alessandro ;
Tonelli, Roberto ;
Turnu, Ivana .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2011, 37 (06) :872-877