paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Neurosymbolic Repair of Test Flakiness

测试不稳定的神经符号修复
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 5/10 · 论文结合 LLM 与程序分析做测试不稳定的神经符号修复,属于 AI→PL 的广义程序分析/修复方向,且有真实工业项目评估与已合并 PR,符合部分工程落地偏好;但它聚焦测试 flaky 修复,而非用户核心关注的静态分析、形式化验证、浮点程序分析或贝叶斯程序分析,因此匹配度中等。引用 10 inbox
Yang Chen, Reyhaneh Jabbarvand
crossref: 2026-09-12

AI 速览

一句话:提出神经符号技术 FlakyDoctor,结合 LLM 的泛化性与程序分析的可靠性,自动修复多种类型的测试不稳定。

测试不稳定(flaky test)指与代码变更无关的非确定性构建行为,严重阻碍可靠软件的交付。现有极少数自动修复技术仅针对顺序依赖(OD)或实现依赖(ID)中的单一类型,且全为符号方法,依赖程序分析检测已知的不稳定模式与根因,泛化能力差。为此,作者提出 FlakyDoctor,一种神经符号技术,将 LLM 的泛化能力与程序分析的可靠性相结合,以修复不同类型的不稳定测试。在来自 243 个真实项目的 873 个已确认不稳定测试(332 个 OD、541 个 ID)上评估,OD 与 ID 的修复成功率分别为 57% 和 59%;相比 DexFix 多修复 8% 的 ID 测试,相比 ODRepair 多修复 12% 的 OD 测试,相比 iFixFlakies 多修复 17% 的 OD 测试。非 LLM 组件贡献了总体性能的 12–31%。该技术还修复了 79 个此前未被修复的真实项目不稳定测试,作者为所有案例提交了带补丁的 pull request,其中 19 个已被接受并合并。

问题
现有测试不稳定自动修复技术只能分别处理顺序依赖或实现依赖中的单一类型,且均为符号方法,依赖已知的不稳定模式与根因,难以泛化到真实项目中的多样场景。
方法
FlakyDoctor 采用神经符号方法,将 LLM 的泛化能力与程序分析的可靠性相结合,以检测并修复不同类型、不同根因的测试不稳定问题。
评估
在 243 个真实项目的 873 个已确认不稳定测试(332 个 OD、541 个 ID)上进行评估,OD 与 ID 修复成功率分别为 57% 和 59%,并优于 DexFix、ODRepair、iFixFlakies 三种基线。
原文摘要(Abstract)

Test flakiness, a non-deterministic behavior of builds irrelevant to code changes, is a major and continuing impediment to deliver- ing reliable software. The very few techniques for the automated repair of test flakiness are specifically crafted to repair either Order- Dependent (OD) or Implementation-Dependent (ID) flakiness. They are also all symbolic approaches, i.e., they leverage program analy- sis to detect and repair known test flakiness patterns and root causes, failing to generalize. To bridge the gap, we propose FlakyDoctor, a neuro-symbolic technique that combines the power of LLMs— generalizability—and program analysis—soundness—to fix different types of test flakiness. Our extensive evaluation using 873 confirmed flaky tests (332 OD and 541 ID) from 243 real-world projects demonstrates the ability of FlakyDoctor in repairing flakiness, achieving 57% (OD) and 59% (ID) success rate. Comparing to three alternative flakiness repair approaches, FlakyDoctor can repair 8% more ID tests than DexFix, 12% more OD flaky tests than ODRepair, and 17% more OD flaky tests than iFixFlakies. Regardless of underlying LLM, the non-LLM components of FlakyDoctor contribute to 12–31 % of the overall performance, i.e., while part of the FlakyDoctor power is from using LLMs, they are not good enough to repair flaky tests in real-world projects alone. What makes the proposed technique superior to related research on test flakiness mitigation specifically and program repair, in general, is repairing 79 previously unfixed flaky tests in real-world projects. We opened pull requests for all cases with corresponding patches; 19 of them were accepted and merged at the time of submission.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot8488,
  title = {Neurosymbolic Repair of Test Flakiness},
  author = {Yang Chen and Reyhaneh Jabbarvand},
  booktitle = {ISSTA},
  year = {2024},
  doi = {10.1145/3650212.3680369}
}