[Paper Review] Issues with SZZ: An empirical assessment of the state of practice of defect prediction data collection.
This paper empirically evaluates the SZZ algorithm—the standard method for labeling defect-inducing commits in defect prediction research—and finds significant inaccuracies: only 50% of SZZ-identified bug-fixing commits are actually fixing bugs, and false positives in release-level defect labeling are nearly as common as true positives. The study improves defect labeling through manual validation and enhanced heuristics, revealing critical flaws in widely used defect prediction datasets.
Defect prediction research has a strong reliance on published data sets that are shared between researchers. The SZZ algorithm is the de facto standard for collecting defect labels for this kind of data and is used by most public data sets. Thus, problems with the SZZ algorithm may have a strong indirect impact on almost the complete state of the art of defect prediction. Recent research uncovered potential problems in different parts of the SZZ algorithm. Within this article, we provide an extensive empirical analysis of the defect labels created with the SZZ algorithm. We used a combination of manual validation and adopted or improved heuristics for the collection of defect data to establish ground truth data for bug fixing commits, improved the heuristic for the identification of inducing changes for defects, as well as the assignment of bugs to releases. We conducted an empirical study on 398 releases of 38 Apache projects and found that only half of the bug fixing commits determined by SZZ are actually bug fixing. Moreover, if a six month time frame is used in combination with SZZ to determine which bugs affect a release, one file is incorrectly labeled as defective for every file that is correctly labeled as defective. In addition, two defective files are missed. We also explored the impact of the relatively small set of features that are available in most defect prediction data sets, as there are multiple publications that indicate that, e.g., churn related features are important for defect prediction. We found that the difference of using more features is negligible.
Motivation & Objective
- To assess the accuracy of defect labels generated by the SZZ algorithm, the de facto standard in defect prediction research.
- To identify and correct flaws in SZZ's methodology for labeling defect-inducing commits and assigning bugs to releases.
- To evaluate the impact of limited feature sets in existing defect prediction datasets, particularly regarding churn-related features.
- To establish a more reliable ground truth for defect prediction data using manual validation and improved heuristics.
Proposed method
- Conducted an empirical study across 398 releases of 38 Apache projects to evaluate SZZ's defect labeling accuracy.
- Used manual validation to establish ground truth for bug-fixing commits, correcting SZZ's mislabelings.
- Improved heuristics for identifying inducing changes and assigning bugs to releases using time-based and change-based criteria.
- Applied a six-month time window to assess which defects affect a given release, comparing SZZ's output to ground truth.
- Evaluated the impact of feature set size on prediction performance, particularly focusing on churn-related features.
- Quantified false positive and false negative rates in SZZ-labeled data to measure reliability.
Experimental results
Research questions
- RQ1How accurate are SZZ-identified bug-fixing commits in practice, and what proportion are actually fixing defects?
- RQ2What is the rate of false positives and false negatives when using SZZ to label files as defective in a given release?
- RQ3How do different heuristics for assigning bugs to releases affect labeling accuracy?
- RQ4To what extent do limited feature sets in existing defect prediction datasets affect prediction performance?
- RQ5How significant is the impact of churn-related features on defect prediction when compared to other features?
Key findings
- Only 50% of commits labeled as bug-fixing by SZZ are actually fixing defects, indicating a high rate of false positives.
- When using a six-month window to determine which files are defective in a release, one file is incorrectly labeled as defective for every file that is correctly labeled.
- Two defective files are missed entirely by SZZ in the evaluation, indicating a non-trivial false negative rate.
- The difference in prediction performance between datasets with more features and those with fewer features is negligible, suggesting limited benefit from expanding feature sets.
- The study confirms that SZZ's defect labeling process is fundamentally flawed, undermining the reliability of most existing defect prediction datasets.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.