LLM-Based Repair of Static Nullability Errors
Nima Karimipour, Pascal Joos, Michael Pradel, Martin Kellogg, Manu Sridharan

TL;DR
NullRepair is a system that uses structured workflows and large language models to automatically fix residual nullability errors in Java code, improving correctness and reducing manual effort.
Contribution
It introduces a novel workflow integrating static analysis and LLMs for precise nullability error repair in real-world Java projects.
Findings
Resolves 63% of residual nullability errors after static analysis.
Maintains program semantics with 98%+ test pass rate after repairs.
Outperforms baseline prompt strategies in accuracy and safety.
Abstract
Modern Java projects increasingly adopt static analysis tools that prevent null-pointer exceptions by treating nullness as a type property. However, integrating such tools into large, existing codebases remains a significant challenge. While annotation inference can eliminate many errors automatically, a subset of residual errors -- typically a mix of real bugs and false positives -- often persist and can only be resolved via code changes. Manually addressing these errors is tedious and error-prone. Large language models (LLMs) offer a promising path toward automating these repairs, but naively-prompted LLMs often generate incorrect, contextually-inappropriate edits. We present NullRepair, a system that integrates LLMs into a structured workflow for resolving the errors from a nullability checker. NullRepair's decision process follows a flowchart derived from manual analysis of 200…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
