An empirical study on bug severity estimation using source code metrics and static analysis

被引:0
|
作者
Mashhadi, Ehsan [1 ]
Chowdhury, Shaiful [2 ]
Modaberi, Somayeh [1 ]
Hemmati, Hadi [1 ,3 ]
Uddin, Gias [1 ]
机构
[1] Univ Calgary, Calgary, AB, Canada
[2] Univ Manitoba, Winnipeg, MB, Canada
[3] York Univ, Toronto, ON, Canada
基金
加拿大自然科学与工程研究理事会;
关键词
Bug severity; Defect prediction; Code complexity metrics; Static analysis tools; SOFTWARE; COMPLEXITY; MAINTENANCE; PREDICTION; SMELLS;
D O I
10.1016/j.jss.2024.112179
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
In the past couple of decades, significant research efforts have been devoted to the prediction of software bugs (i.e., defects). In general, these works leverage a diverse set of metrics, tools, and techniques to predict which classes, methods, lines, or commits are buggy. However, most existing work in this domain treats all bugs the same, which is not the case in practice. The more severe the bugs the higher their consequences. Therefore, it is important for a defect prediction method to estimate the severity of the identified bugs, so that the higher severity ones get immediate attention. In this paper, we provide a quantitative and qualitative study on two popular datasets (Defects4J and Bugs.jar), using 10 common source code metrics, and two popular static analysis tools (SpotBugs and Infer) for analyzing their capability to predict defects and their severity. We studied 3,358 buggy methods with different severity labels from 19 Java open-source projects. Results show that although code metrics are useful in predicting buggy code (Lines of the Code, Maintainable Index, FanOut, and Effort metrics are the best), they cannot estimate the severity level of the bugs. In addition, we observed that static analysis tools have weak performance in both predicting bugs (F1 score range of 3.1%-7.1%) and their severity label (F1 score under 2%). We also manually studied the characteristics of the severe bugs to identify possible reasons behind the weak performance of code metrics and static analysis tools in estimating their severity. Also, our categorization shows that Security bugs have high severity in most cases while Edge/Boundary faults have low severity. Finally, we discuss the practical implications of the results and propose new directions for future research.
引用
收藏
页数:23
相关论文
共 50 条
  • [41] Code churn estimation using organisational and code metrics: An experimental comparison
    Karus, Slim
    Dumas, Marlon
    INFORMATION AND SOFTWARE TECHNOLOGY, 2012, 54 (02) : 203 - 211
  • [42] An empirical study of the textual similarity between source code and source code summaries
    Paul W. McBurney
    Collin McMillan
    Empirical Software Engineering, 2016, 21 : 17 - 42
  • [43] An empirical study of the textual similarity between source code and source code summaries
    McBurney, Paul W.
    McMillan, Collin
    EMPIRICAL SOFTWARE ENGINEERING, 2016, 21 (01) : 17 - 42
  • [44] Empirical Evaluation of Fault Localisation Using Code and Change Metrics
    Sohn, Jeongju
    Yoo, Shin
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 47 (08) : 1605 - 1625
  • [45] Empirical analysis of the bug fixing process in open source projects
    Francalanci, Chiara
    Merlo, Francesco
    COMPUTER SYSTEMS SCIENCE AND ENGINEERING, 2010, 25 (04): : 305 - 317
  • [46] Empirical analysis of the bug fixing process in Open Source projects
    Francalanci, Chiara
    Merlo, Francesco
    OPEN SOURCE DEVELOPMENT, COMMUNITIES AND QUALITY, 2008, 275 : 187 - 196
  • [47] An empirical study on the maintenance of source code clones
    Suresh Thummalapenta
    Luigi Cerulo
    Lerina Aversano
    Massimiliano Di Penta
    Empirical Software Engineering, 2010, 15 : 1 - 34
  • [48] An empirical study on the maintenance of source code clones
    Thummalapenta, Suresh
    Cerulo, Luigi
    Aversano, Lerina
    Di Penta, Massimiliano
    EMPIRICAL SOFTWARE ENGINEERING, 2010, 15 (01) : 1 - 34
  • [49] Analyzing False Positive Source Code Vulnerabilities Using Static Analysis Tools
    Cheirdari, Foteini
    Karabatis, George
    2018 IEEE INTERNATIONAL CONFERENCE ON BIG DATA (BIG DATA), 2018, : 4782 - 4788
  • [50] Measuring and Evaluating Source Code Logs Using Static Code Analyzer
    Shen, Gang
    Luo, Fan
    Hong, Gang
    TRANSDISCIPLINARY LIFECYCLE ANALYSIS OF SYSTEMS, 2015, 2 : 214 - 223