Table of Contents
Fetching ...

Beyond Blame: Rethinking SZZ with Knowledge Graph Search

Yu Shi, Hao Li, Bram Adams, Ahmed E. Hassan

TL;DR

The paper tackles the fundamental problem of Bug-Inducing Commit (BIC) identification and the shortcomings of traditional SZZ blame-based methods. It introduces AgenticSZZ, which reframes BIC search as a traversal over a Temporal Knowledge Graph (TKG) of commit history and leverages an LLM agent to reason over this graph with specialized tools for candidate enumeration, traversal, and causal analysis. Across three diverse datasets, AgenticSZZ achieves F1 scores from 0.48 to 0.74 and outperforms state-of-the-art baselines by up to 27%, with ablation experiments demonstrating that both the TKG expansion and intelligent agent navigation are essential for best performance. This work enables principled temporal and causal reasoning in software evolution analysis and has practical implications for defect prediction and temporally aware automated repair pipelines.

Abstract

Identifying Bug-Inducing Commits (BICs) is fundamental for understanding software defects and enabling downstream tasks such as defect prediction and automated program repair. Yet existing SZZ-based approaches are limited by their reliance on git blame, which restricts the search space to commits that directly modified the fixed lines. Our preliminary study on 2,102 validated bug-fixing commits reveals that this limitation is significant: over 40% of cases cannot be solved by blame alone, as 28% of BICs require traversing commit history beyond blame results and 14% are blameless. We present AgenticSZZ, the first approach to apply Temporal Knowledge Graphs (TKGs) to software evolution analysis. AgenticSZZ reframes BIC identification from a ranking problem over blame commits into a graph search problem, where temporal ordering is fundamental to causal reasoning about bug introduction. The approach operates in two phases: (1) constructing a TKG that encodes commits with temporal and structural relationships, expanding the search space by traversing file history backward from two reference points (blame commits and the BFC); and (2) leveraging an LLM agent to navigate the graph using specialized tools for candidate exploration and causal analysis. Evaluation on three datasets shows that AgenticSZZ achieves F1-scores of 0.48 to 0.74, with statistically significant improvements over state-of-the-art by up to 27%. Our ablation study confirms that both components are essential, reflecting a classic exploration-exploitation trade-off: the TKG expands the search space while the agent provides intelligent selection. By transforming BIC identification into a graph search problem, we open a new research direction for temporal and causal reasoning in software evolution analysis.

Beyond Blame: Rethinking SZZ with Knowledge Graph Search

TL;DR

The paper tackles the fundamental problem of Bug-Inducing Commit (BIC) identification and the shortcomings of traditional SZZ blame-based methods. It introduces AgenticSZZ, which reframes BIC search as a traversal over a Temporal Knowledge Graph (TKG) of commit history and leverages an LLM agent to reason over this graph with specialized tools for candidate enumeration, traversal, and causal analysis. Across three diverse datasets, AgenticSZZ achieves F1 scores from 0.48 to 0.74 and outperforms state-of-the-art baselines by up to 27%, with ablation experiments demonstrating that both the TKG expansion and intelligent agent navigation are essential for best performance. This work enables principled temporal and causal reasoning in software evolution analysis and has practical implications for defect prediction and temporally aware automated repair pipelines.

Abstract

Identifying Bug-Inducing Commits (BICs) is fundamental for understanding software defects and enabling downstream tasks such as defect prediction and automated program repair. Yet existing SZZ-based approaches are limited by their reliance on git blame, which restricts the search space to commits that directly modified the fixed lines. Our preliminary study on 2,102 validated bug-fixing commits reveals that this limitation is significant: over 40% of cases cannot be solved by blame alone, as 28% of BICs require traversing commit history beyond blame results and 14% are blameless. We present AgenticSZZ, the first approach to apply Temporal Knowledge Graphs (TKGs) to software evolution analysis. AgenticSZZ reframes BIC identification from a ranking problem over blame commits into a graph search problem, where temporal ordering is fundamental to causal reasoning about bug introduction. The approach operates in two phases: (1) constructing a TKG that encodes commits with temporal and structural relationships, expanding the search space by traversing file history backward from two reference points (blame commits and the BFC); and (2) leveraging an LLM agent to navigate the graph using specialized tools for candidate exploration and causal analysis. Evaluation on three datasets shows that AgenticSZZ achieves F1-scores of 0.48 to 0.74, with statistically significant improvements over state-of-the-art by up to 27%. Our ablation study confirms that both components are essential, reflecting a classic exploration-exploitation trade-off: the TKG expands the search space while the agent provides intelligent selection. By transforming BIC identification into a graph search problem, we open a new research direction for temporal and causal reasoning in software evolution analysis.
Paper Structure (36 sections, 1 equation, 6 figures, 6 tables, 1 algorithm)

This paper contains 36 sections, 1 equation, 6 figures, 6 tables, 1 algorithm.

Figures (6)

  • Figure 1: Categorization of bug-inducing commits (BICs) relative to blame commits. The Blame category (green) contains BICs that appear in blame commits; the Blame Ancestor category (blue) requires backward search from blame; the BFC Ancestor category (orange) requires backward search from the BFC toward blame.
  • Figure 2: Distribution of blame complexity for Blame category cases. Each cell shows the number of cases with a given combination of deleted lines and blame commits.
  • Figure 3: File-history traversal depth required to reach BICs. (a) 28% of cases require traversal beyond blame (Blame Ancestor and BFC Ancestor categories). (b) The 14.1% Blameless cases have no deleted lines.
  • Figure 4: AgenticSZZ architecture. Given a Bug-Fixing Commit (BFC) and its repository, TKG Construction identifies blame commits and expands the search space by traversing file history backward from two starting points (Blame Ancestor and BFC Ancestor). Agentic BIC Search then navigates the resulting graph using four specialized tools to identify the Bug-Inducing Commit (BIC).
  • Figure 5: True positives overlap by BIC category. Green: AgenticSZZ only; Orange: LLM4SZZ only.
  • ...and 1 more figures