Method-Level Bug Severity Prediction using Source Code Metrics and LLMs

09/06/2023
by   Ehsan Mashhadi, et al.
0

In the past couple of decades, significant research efforts are devoted to the prediction of software bugs. However, most existing work in this domain treats all bugs the same, which is not the case in practice. 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 study, we investigate source code metrics, source code representation using large language models (LLMs), and their combination in predicting bug severity labels of two prominent datasets. We leverage several source metrics at method-level granularity to train eight different machine-learning models. Our results suggest that Decision Tree and Random Forest models outperform other models regarding our several evaluation metrics. We then use the pre-trained CodeBERT LLM to study the source code representations' effectiveness in predicting bug severity. CodeBERT finetuning improves the bug severity prediction results significantly in the range of 29 to the best classic prediction model on source code metric. Finally, we integrate source code metrics into CodeBERT as an additional input, using our two proposed architectures, which both enhance the CodeBERT model effectiveness.

READ FULL TEXT

page 1

page 7

page 10

research
06/26/2022

An Empirical Study on Bug Severity Estimation Using Source Code Metrics and Static Analysis

In the past couple of decades, significant research efforts are devoted ...
research
10/11/2021

Bug Prediction Using Source Code Embedding Based on Doc2Vec

Bug prediction is a resource demanding task that is hard to automate usi...
research
01/19/2023

Source Code Metrics for Software Defects Prediction

In current research, there are contrasting results about the applicabili...
research
11/02/2020

Employing Partial Least Squares Regression with Discriminant Analysis for Bug Prediction

Forecasting defect proneness of source code has long been a major resear...
research
09/20/2021

From None to Severe: Predicting Severity in Movie Scripts

In this paper, we introduce the task of predicting severity of age-restr...
research
06/17/2020

An Automatically Created Novel Bug Dataset and its Validation in Bug Prediction

Bugs are inescapable during software development due to frequent code ch...
research
07/01/2022

Is this bug severe? A text-cum-graph based model for bug severity prediction

Repositories of large software systems have become commonplace. This mas...

Please sign up or login with your details

Forgot password? Click here to reset