paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Let the Code Speak: Incorporating Program Dynamic State for Better Method-Level Fault Localization

让代码说话:融入程序动态状态的方法级缺陷定位
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 5/10 · 该论文属于 LLM/Agent 与程序分析交叉(用打印调试获取动态状态做缺陷定位),问题驱动、有完整工程实现与成本分析,与“AI→PL”方向部分契合;但其核心任务是缺陷定位而非静态分析或形式化验证,且完全未涉及浮点程序分析或贝叶斯程序分析,与画像核心关注点有明显距离。引用 2 inbox
Yihao Qin, Shangwen Wang, Bo Lin, Xin Peng, Sheng Ouyang, Liqian Chen, Xiaoguang Mao
crossref: 2026-09-12

AI 速览

一句话:提出 PingFL,用 LLM 智能体结合打印调试获取动态程序状态,显著提升方法级缺陷定位精度。

缺陷定位是软件调试中关键但耗时的环节。随着大语言模型代码能力增强,基于 LLM 的缺陷定位(LLMFL)研究日益增多,但现有技术大多仅分析静态代码,忽略程序运行时动态状态,导致 LLM 容易产生“幻觉”,把本无缺陷的代码误判为可疑。为此,本文提出 PingFL,一个融入程序动态信息的 LLMFL 系统,由缺陷定位(FL)智能体与打印调试(PD)智能体组成:FL 智能体借助一组可调用工具理解缺陷根因,当其提名某处为可疑位置时,便委托 PD 智能体通过多轮打印调试验证该怀疑;两个智能体通过 LLM 生成的文本思维链高效通信。在 Defects4J 基准的 812 个真实缺陷上评估,PingFL 能在 Top-1 内定位 450 个缺陷,比其它基于 LLM 的方法高出 41% 至 122%。进一步分析表明,即便没有显式指令,PingFL 也自发形成特定的定位策略与工具使用模式。其成本也较优,平均每个缺陷花费 0.23 美元、104.62 秒,其中打印调试机制仅占 0.07 美元与 48.14 秒。

问题
现有基于 LLM 的缺陷定位方法仅依赖静态代码分析,忽视程序动态运行状态,导致 LLM 易产生幻觉、将无缺陷代码误报为可疑位置。
方法
提出 PingFL 系统,由 FL 智能体与 PD 智能体协作:FL 智能体利用可调用工具推断根因并提名可疑位置,PD 智能体通过多轮打印调试验证该位置,二者以 LLM 生成的文本思维进行通信。
评估
在 Defects4J 基准的 812 个真实缺陷上评估,PingFL 在 Top-1 内定位 450 个缺陷,较其它 LLM 方法提升 41%–122%,并分析其定位策略、工具使用模式与开销(平均每缺陷 0.23 美元、104.62 秒)。
原文摘要(Abstract)

Fault localization (FL) is a critical but time-consuming part of software debugging. With the improvement of the Large Language Models (LLMs) in their code capabilities, the increasing demand for automated software development has encouraged more research on building LLM-based Fault Localization (LLMFL) systems. However, existing LLMFL techniques are typically restricted to predicting bug locations by analyzing static code, while overlooking crucial dynamic program state of the software. This lack of context makes LLMs prone to generating "hallucinations", incorrectly identifying bug-free code as suspicious. To address this, this paper introduces PingFL, the LLMFL system that incorporates program dynamic information for more accurate automatic fault localization. PingFL comprises a Fault Localization (FL) agent and a Print Debugging (PD) agent. The FL agent is tasked with understanding the root cause through a set of callable tools. When the FL agent nominates a location as suspicious, it would entrust the PD agent to verify the suspected issue through multiple rounds of print debugging. In particular, these two agents communicate efficiently by conveying the textual thought generated by the LLM. The evaluation on 812 real-world bugs from the Defects4J benchmark shows that PingFL can localize 450 bugs within Top-1, which significantly outperforms other LLM-based approaches by 41% to 122%. A deeper dive into PingFL’s performance reveals that it exhibits specific FL strategies and tool usage patterns even without explicit instructions. Finally, PingFL proves to be cost-effective, spending an average of $0.23 and 104.62 seconds per bug, with the print debugging mechanism accounting for only $0.07 and 48.14 seconds.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9436,
  title = {Let the Code Speak: Incorporating Program Dynamic State for Better Method-Level Fault Localization},
  author = {Yihao Qin and Shangwen Wang and Bo Lin and Xin Peng and Sheng Ouyang and Liqian Chen and Xiaoguang Mao},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00072}
}