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 条
  • [31] Source code metrics: A systematic mapping study
    Nunez-Varela, Alberto S.
    Perez-Gonzalez, Hector G.
    Martinez-Perez, Francisco E.
    Soubervielle-Montalvo, Carlos
    JOURNAL OF SYSTEMS AND SOFTWARE, 2017, 128 : 164 - 197
  • [32] A Catalog of Source Code Metrics - A Tertiary Study
    Iftikhar, Umar
    Bin Ali, Nauman
    Borstler, Jurgen
    Usman, Muhammad
    SOFTWARE QUALITY: HIGHER SOFTWARE QUALITY THROUGH ZERO WASTE DEVELOPMENT, SWQD 2023, 2023, 472 : 87 - 106
  • [33] Third-party Source Code Compliance using Early Static Code Analysis
    Takhma, Youness
    Rachid, Tajjeeddine
    Harroud, Hamid
    Abid, Mohamed Riduan
    Assem, Nasser
    PROCEEDINGS OF THE 2015 INTERNATIONAL CONFERENCE ON COLLABORATION TECHNOLOGIES AND SYSTEMS, 2015, : 132 - 139
  • [34] Empirical Study of Transformers for Source Code
    Chirkova, Nadezhda
    Troshin, Sergey
    PROCEEDINGS OF THE 29TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING (ESEC/FSE '21), 2021, : 703 - 715
  • [35] An Empirical Analysis of Bug Reports and Bug Fixing in Open Source Android Apps
    Bhattacharya, Pamela
    Ulanova, Liudmila
    Neamtiu, Iulian
    Koduru, Sai Charan
    PROCEEDINGS OF THE 17TH EUROPEAN CONFERENCE ON SOFTWARE MAINTENANCE AND REENGINEERING (CSMR 2013), 2013, : 133 - 143
  • [36] Research, Implementation and Analysis of Source Code Metrics in Rust-Code-Analysis
    Ardito, Luca
    Ballario, Marco
    Valsesia, Michele
    IEEE International Conference on Software Quality, Reliability and Security, QRS, 2023, : 497 - 506
  • [37] RELATION BETWEEN SOURCE CODE METRICS AND STRUCTURE-ANALYSIS METRICS
    ROZMAN, I
    GYORKOS, J
    DOGSA, T
    LECTURE NOTES IN COMPUTER SCIENCE, 1991, 550 : 332 - 342
  • [38] Source code size prediction using use case metrics: an empirical comparison with use case points
    Badri M.
    Badri L.
    Flageol W.
    Toure F.
    Innovations in Systems and Software Engineering, 2017, 13 (2-3) : 143 - 159
  • [39] Automated Generation of Bug Samples Based on Source Code Analysis
    Zheng, Tianming
    Tong, Zhixin
    Yi, Ping
    Wu, Yue
    2022 29TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE, APSEC, 2022, : 51 - 60
  • [40] Predicting Security Vulnerabilities using Source Code Metrics
    Ganesh, Sundarakrishnan
    Ohlsson, Tobias
    Palma, Francis
    PROCEEDINGS OF THE 2021 SWEDISH WORKSHOP ON DATA SCIENCE (SWEDS), 2021,