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.
翻译:识别缺陷引入提交是理解软件缺陷及实现缺陷预测与自动程序修复等下游任务的基础。然而,现有基于SZZ的方法受限于对git blame的依赖,其搜索范围被约束为直接修改修复行的提交。我们对2,102个已验证缺陷修复提交的初步研究表明,这一限制具有显著影响:超过40%的案例无法仅通过blame解决,其中28%的缺陷引入提交需要遍历blame结果之外的提交历史,另有14%属于无归咎提交。本文提出AgenticSZZ,这是首个将时序知识图谱应用于软件演化分析的方法。AgenticSZZ将缺陷引入提交识别问题,从对归咎提交的排序问题重构为图搜索问题,其中时序顺序是缺陷引入因果推理的基础。该方法分两个阶段运行:(1)构建编码了提交间时序与结构关系的时序知识图谱,通过从两个参考点(归咎提交与缺陷修复提交)向后遍历文件历史来扩展搜索空间;(2)利用大型语言模型智能体,通过专用于候选探索与因果分析的工具在图中进行导航。在三个数据集上的评估表明,AgenticSZZ的F1分数达到0.48至0.74,较现有最优方法取得高达27%的统计显著提升。消融研究证实两个组件均不可或缺,体现了经典的探索-利用权衡:时序知识图谱扩展搜索空间,而智能体提供智能选择。通过将缺陷引入提交识别转化为图搜索问题,我们为软件演化分析中的时序与因果推理开辟了新的研究方向。