Table of Contents
Fetching ...

Evaluating SZZ Implementations: An Empirical Study on the Linux Kernel

Yunbo Lyu, Hong Jin Kang, Ratnadira Widyasari, Julia Lawall, David Lo

TL;DR

This work conducts a comprehensive large-scale evaluation of SZZ variants on a developer-annotated Linux kernel dataset (KFC), revealing recall challenges and the significant presence of ghost commits. It introduces TC-SZZ, which traces line-change histories to recover additional bug-inducing commits, identifying 17.7% of previously missed failure cases, and analyzes three failure patterns beyond ghost commits. The study also explores ChatGPT-based augmentation (GPT-4) for locating bug-inducing commits, showing potential but with current limitations, especially in cross-file and function-level detections. By releasing the KFC dataset and TC-SZZ implementation, the paper provides a valuable resource for advancing SZZ research and investigating downstream impacts on software engineering tasks.

Abstract

The SZZ algorithm is used to connect bug-fixing commits to the earlier commits that introduced bugs. This algorithm has many applications and many variants have been devised. However, there are some types of commits that cannot be traced by the SZZ algorithm, referred to as "ghost commits". The evaluation of how these ghost commits impact the SZZ algorithm remains limited. Moreover, these algorithms have been evaluated on datasets created by software engineering researchers from information in bug trackers and version controlled histories. Since Oct 2013, the Linux kernel developers have started labelling bug-fixing patches with the commit identifiers of the corresponding bug-inducing commit(s) as a standard practice. As of v6.1-rc5, 76,046 pairs of bug-fixing patches and bug-inducing commits are available. This provides a unique opportunity to evaluate the SZZ algorithm on a large dataset that has been created and reviewed by project developers, entirely independently of the biases of software engineering researchers. In this paper, we apply six SZZ algorithms to 76,046 pairs of bug-fixing patches and bug-introducing commits from the Linux kernel. Our findings reveal that SZZ algorithms experience a more significant decline in recall on our dataset (13.8%) as compared to prior findings reported by Rosa et al., and the disparities between the individual SZZ algorithms diminish. Moreover, we find that 17.47% of bug-fixing commits are ghost commits. Finally, we propose Tracing-Commit SZZ (TC-SZZ), that traces all commits in the change history of lines modified or deleted in bug-fixing commits. Applying TC-SZZ to all failure cases, excluding ghost commits, we found that TC-SZZ could identify 17.7% of them. Our further analysis found that 34.6% of bug-inducing commits were in the function history, 27.5% in the file history (but not in the function history), and...

Evaluating SZZ Implementations: An Empirical Study on the Linux Kernel

TL;DR

This work conducts a comprehensive large-scale evaluation of SZZ variants on a developer-annotated Linux kernel dataset (KFC), revealing recall challenges and the significant presence of ghost commits. It introduces TC-SZZ, which traces line-change histories to recover additional bug-inducing commits, identifying 17.7% of previously missed failure cases, and analyzes three failure patterns beyond ghost commits. The study also explores ChatGPT-based augmentation (GPT-4) for locating bug-inducing commits, showing potential but with current limitations, especially in cross-file and function-level detections. By releasing the KFC dataset and TC-SZZ implementation, the paper provides a valuable resource for advancing SZZ research and investigating downstream impacts on software engineering tasks.

Abstract

The SZZ algorithm is used to connect bug-fixing commits to the earlier commits that introduced bugs. This algorithm has many applications and many variants have been devised. However, there are some types of commits that cannot be traced by the SZZ algorithm, referred to as "ghost commits". The evaluation of how these ghost commits impact the SZZ algorithm remains limited. Moreover, these algorithms have been evaluated on datasets created by software engineering researchers from information in bug trackers and version controlled histories. Since Oct 2013, the Linux kernel developers have started labelling bug-fixing patches with the commit identifiers of the corresponding bug-inducing commit(s) as a standard practice. As of v6.1-rc5, 76,046 pairs of bug-fixing patches and bug-inducing commits are available. This provides a unique opportunity to evaluate the SZZ algorithm on a large dataset that has been created and reviewed by project developers, entirely independently of the biases of software engineering researchers. In this paper, we apply six SZZ algorithms to 76,046 pairs of bug-fixing patches and bug-introducing commits from the Linux kernel. Our findings reveal that SZZ algorithms experience a more significant decline in recall on our dataset (13.8%) as compared to prior findings reported by Rosa et al., and the disparities between the individual SZZ algorithms diminish. Moreover, we find that 17.47% of bug-fixing commits are ghost commits. Finally, we propose Tracing-Commit SZZ (TC-SZZ), that traces all commits in the change history of lines modified or deleted in bug-fixing commits. Applying TC-SZZ to all failure cases, excluding ghost commits, we found that TC-SZZ could identify 17.7% of them. Our further analysis found that 34.6% of bug-inducing commits were in the function history, 27.5% in the file history (but not in the function history), and...
Paper Structure (30 sections, 5 equations, 9 figures, 11 tables)

This paper contains 30 sections, 5 equations, 9 figures, 11 tables.

Figures (9)

  • Figure 1: The motivating example of Tracing-Commit SZZ
  • Figure 2: A Remove Mapping Ghost (bug-fixing commit 7fdbc5f).
  • Figure 3: An Add Mapping Ghost (bug-inducing commit 5a858e7).
  • Figure 4: Overlap between SZZ variants on KFC dataset and $\text{dataset}_{\text{Rosa}}$
  • Figure 5: The Pipeline of the ChatGPT Experiment.
  • ...and 4 more figures