Software Engineering
Researchers Propose Machine Learning Model to Identify Bug-Causing Code Commits Despite Noisy Training Data
A new approach combines data cleaning with graph analysis to improve detection of defect-introducing commits in software development.
A research team has introduced a machine learning framework designed to pinpoint code commits that introduce software bugs, even when training data contains errors and inconsistencies common in real-world projects.
The Challenge#
Detecting which code changes cause defects is a critical task in software quality assurance, but current methods struggle with two fundamental problems: the labels used to train models often contain mistakes, and traditional approaches fail to capture the deeper semantic relationships between code components. These limitations result in many bug-inducing commits being missed or incorrectly identified.
The BIC-Hunter Solution#
The researchers developed BIC-Hunter (Bug-Inducing Commits Hunter), a two-stage model that tackles these issues head-on. The approach combines data cleaning with graph-based semantic analysis.
The first component focuses on data quality. By identifying and correcting mislabeled training examples, the model improves the reliability of the underlying dataset and strengthens overall robustness. The second component constructs graph representations of code and applies graph convolutional networks to better understand relationships between different parts of the codebase, making it easier to trace defects back to their source.
Performance Gains#
Evaluation on a large merged dataset from three open-source projects showed substantial improvements over existing methods:
- Recall@1, 2, 3: 6.16%, 7.13%, and 5.53% better than prior state-of-the-art
- MFR index: Increased by up to 8.43% to 32.82%
These metrics demonstrate the model's superior ability to correctly identify which commits actually introduced bugs when tested against real development histories.
Context#
The work builds on the SZZ algorithm, a foundational technique for tracing defects back through code repositories. By addressing data quality and semantic understanding simultaneously, BIC-Hunter represents a meaningful step forward in automating defect detection during software development.