paperbot · PL 论文追踪

全部论文 待读 收藏

P2 NPEX

NPEX:无需测试的 Java 空指针异常修复技术
ICSE Proceedings of the 44th International Conference on Software Engineering2022匹配度 3/10 · 论文关注使用统计模型与符号执行进行 Java NPE 自动修复,属于机器学习与程序修复的交叉,但既不是针对 ML/Agentic 程序的静态分析,也不是用 LLM/Agent 改进静态分析或形式化验证,且与浮点程序分析、贝叶斯程序分析无关,因此与当前研究画像核心方向匹配度较低。引用 20 inbox
Junhee Lee, Seongjoon Hong, Hakjoo Oh
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 NPEX,无需测试用例,通过挖掘空值处理模式推断修复规约来修复 Java NPE。

现有 Java 空指针异常(NPE)自动修复技术通常依赖开发者编写的测试套件来验证补丁,但 bug 报告时这些测试往往尚未存在,或者不足以识别正确补丁。NPEX 不需要测试用例,而是自动推断 buggy 程序的修复规约,并用该规约验证候选补丁。其核心思想是从现有代码库中挖掘空值处理模式,学习一个预测开发者如何处理 NPE 的统计模型,并使用符号执行变体结合该模型从 buggy 程序中推断修复规约。作者在多个开源项目中收集的真实 NPE 上评估 NPEX,结果表明其显著优于当前最先进技术。

问题
现有 NPE 自动修复技术依赖测试套件验证补丁,而 bug 报告时测试通常不可用或不足以选出正确补丁。
方法
NPEX 从现有代码库挖掘空值处理模式学习统计模型,并用符号执行变体结合该模型自动推断修复规约,从而无需测试用例即可验证候选补丁。
评估
在多个开源项目的真实 NPE 上评测,NPEX 显著优于当前最先进技术。
原文摘要(Abstract)

We present NPEX, a new technique for repairing Java null pointer exceptions (NPEs) without tests. State-of-the-art NPE repair techniques rely on test suites written by developers for patch validation. Unfortunately, however, those are typically future test cases that are unavailable at the time bugs are reported or insufficient to identify correct patches. Unlike existing techniques, NPEX does not require test cases; instead, NPEX automatically infers the repair specification of the buggy program and uses the inferred specification to validate patches. The key idea is to learn a statistical model that predicts how developers would handle NPEs by mining null-handling patterns from existing codebases, and to use a variant of symbolic execution that can infer the repair specification from the buggy program using the model. We evaluated NPEX on real-world NPEs collected from diverse open-source projects. The results show that NPEX significantly outperforms the current state-of-the-art.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{LeeHO22,
  title = {NPEX},
  author = {Junhee Lee and Seongjoon Hong and Hakjoo Oh},
  booktitle = {ICSE},
  year = {2022},
  doi = {10.1145/3510003.3510186}
}