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 条
  • [1] An Empirical Study on Bug Severity Estimation using Source Code Metrics and Static Analysis
    Mashhadi, Ehsan
    Chowdhury, Shaiful
    Modaberi, Somayeh
    Hemmati, Hadi
    Uddin, Gias
    arXiv, 2022,
  • [2] An Empirical Study on Bug Severity Estimation Using Source Code Metrics and Static Analysis
    Mashhadi, Ehsan
    Chowdhury, Shaiful
    Modaberi, Somayeh
    Ahmadvand, Hossein
    Hemmati, Hadi
    Uddin, Gias
    SSRN, 2023,
  • [3] Method-Level Bug Severity Prediction using Source Code Metrics and LLMs
    Mashhadi, Ehsan
    Ahmadvand, Hossein
    Hemmati, Hadi
    2023 IEEE 34TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING, ISSRE, 2023, : 635 - 646
  • [4] Analysing Bug Prediction Capabilities of Static Code Metrics in Open Source Software
    Ferzund, Javed
    Ahsan, Syed Nadeem
    Wotawa, Franz
    SOFTWARE PROCESS AND PRODUCT MEASUREMENT, 2008, 5338 : 331 - 343
  • [5] User-Perceived Source Code Quality Estimation based on Static Analysis Metrics
    Papamichail, Michail
    Diamantopoulos, Themistoklis
    Symeonidis, Andreas
    2016 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY (QRS 2016), 2016, : 100 - 107
  • [6] Assessing the User-Perceived Quality of Source Code Components Using Static Analysis Metrics
    Dimaridou, Valasia
    Kyprianidis, Alexandros-Charalampos
    Papamichail, Michail
    Diamantopoulos, Themistoklis
    Symeonidis, Andreas
    SOFTWARE TECHNOLOGIES ( ICSOFT 2017), 2018, 868 : 3 - 27
  • [7] Towards Modeling the User-perceived Quality of Source Code using Static Analysis Metrics
    Dimaridou, Valasia
    Kyprianidis, Alexandros-Charalampos
    Papamichail, Michail
    Diamantopoulos, Themistoklis
    Symeonidis, Andreas
    ICSOFT: PROCEEDINGS OF THE 12TH INTERNATIONAL CONFERENCE ON SOFTWARE TECHNOLOGIES, 2017, : 73 - 84
  • [8] An empirical analysis of source code metrics and smart contract resource consumption
    Ajienka, Nemitari
    Vangorp, Peter
    Capiluppi, Andrea
    JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2020, 32 (10)
  • [9] Source Code Retrieval for Bug Localization using Bug Report
    Swe, Kyaw Ei Ei
    Oo, Hnin Min
    2019 IEEE 15TH INTERNATIONAL CONFERENCE ON INTELLIGENT COMPUTER COMMUNICATION AND PROCESSING (ICCP 2019), 2019, : 241 - 247
  • [10] Bug Replication in Code Clones: An Empirical Study
    Islam, Judith F.
    Mondal, Manishankar
    Roy, Chanchal K.
    2016 IEEE 23RD INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), VOL 1, 2016, : 68 - 78