NPEX: Repairing Java Null Pointer Exceptions without Tests
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 10 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- CoCoNuT: combining context-aware neural translation models using ensemble for program repair 引用了 DLFix: context-based code transformation learning for automated program repair
- What IF Is Not Enough? Fixing Null Pointer Dereference With Contextual Check 引用了 SAVER: scalable, precise, and safe memory-error repair
- Program Repair Guided by Datalog-Defined Static Analysis 引用了 SAVER: scalable, precise, and safe memory-error repair
- From Leaks to Fixes: Automated Repairs for Resource Leak Warnings 引用了 SAVER: scalable, precise, and safe memory-error repair
- From Leaks to Fixes: Automated Repairs for Resource Leak Warnings 引用了 DLFix: context-based code transformation learning for automated program repair
引用它的顶会 Paper10
- Program Repair Guided by Datalog-Defined Static AnalysisYu Liu, Sergey Mechtaev, Pavle Subotic, Abhik RoychoudhuryFSE 2023 · 14 次引用
- What IF Is Not Enough? Fixing Null Pointer Dereference With Contextual CheckYunlong Xing, Shu Wang, Shiyu Sun, Xu He 等USENIX Security 2024 · 8 次引用
- From Leaks to Fixes: Automated Repairs for Resource Leak WarningsAkshay Utture, Jens PalsbergFSE 2023 · 5 次引用
- BERT-Based Code Learning for Exception Localization and Type PredictionChongyu Zhang, Qiping Tao, Liangyu Chen, Min ZhangAAAI 2025 · 1 次引用
- Effective Unit Test Generation for Java Null Pointer ExceptionsMyungho Lee, Jiseong Bak, Seokhyeon Moon, Yoonchan Jhi 等ASE 2024 · 1 次引用
它引用的 Paper5
- CoCoNuT: combining context-aware neural translation models using ensemble for program repairThibaud Lutellier, Hung Viet Pham, Lawrence Pang, Yitong Li 等ISSTA 2020 · 325 次引用
- Hoppity: Learning Graph Transformations to Detect and Fix Bugs in ProgramsElizabeth Dinella, Hanjun Dai, Ziyang Li, Mayur Naik 等ICLR 2020 · 212 次引用
- DLFix: context-based code transformation learning for automated program repairYi Li, Shaohua Wang, Tien N. NguyenICSE 2020 · 201 次引用
- Using Safety Properties to Generate Vulnerability PatchesZhen Huang, David Lie, Gang Tan, Trent JaegerS&P 2019 · 91 次引用
- SAVER: scalable, precise, and safe memory-error repairSeongjoon Hong, Junhee Lee, Jeongsoo Lee, Hakjoo OhICSE 2020 · 28 次引用
相关 Paper
- UnitCon: Synthesizing Targeted Unit Tests for Java Runtime ExceptionsSujin Jang, Yeonhee Ryou, Heewon Lee, Kihong HeoFSE 2025
- LLM-Based Repair of Static Nullability ErrorsNima Karimipour, Pascal Joos, Michael Pradel, Martin Kellogg 等ISSTA 2026
- Automated Repair of Programs from Large Language ModelsZhiyu Fan, Xiang Gao, Martin Mirchev, Abhik Roychoudhury 等ICSE 2023 · 213 次引用
- Domain-Specific Fixes for Flaky Tests with Wrong Assumptions on Underdetermined SpecificationsPeilun Zhang, Yanjie Jiang, Anjiang Wei, Victoria Stodden 等ICSE 2021 · 26 次引用
- Can automated program repair refine fault localization? a unified debugging approachYiling Lou, Ali Ghanbari, Xia Li, Lingming Zhang 等ISSTA 2020 · 99 次引用
