智能体
arxiv.org ·
基于 LLM 的静态可空性错误修复
论文提出 NullRepair,将 LLM 集成到结构化工作流中,用于修复 Java 静态可空性检查器在注解推断后残留的错误。其决策流程源自对 200 个真实错误的人工分析,并利用静态分析区分符号的安全/不安全使用区域,以无错误用例作为提示上下文,通过迭代交互生成补丁。在 12 个真实 Java 项目、1119 个残留错误上解决 63%;相比单次提示和 mini-SWE-agent 两个基线,NullRepair 更好地保持程序语义,10/12 项目应用全部编辑后单元测试全部通过,其余两个项目通过率不低于 98%。
AI推荐理由 arXiv 论文(v3,2026-09-22 修订),作者含 Michael Pradel、Manu Sridharan 等知名研究者,事实明确、信息密度高。提出 NullRepair,将 LLM 嵌入结构化工作流修复 Java 静态可空性检查器残留错误:在 12 个真实 Java 项目、1119 个残留错误上解决 63%,且 10/12 项目全部单元测试通过、其余两个通过率≥98%,语义保持优于单次提示和 mini-SWE-agent 两个基线。局限是仅在 Java 可空性场景验证,未提供跨语言或工业规模证据。
78
正文
Computer Science > Software Engineering
arXiv:2507.20674 (cs)
[Submitted on 28 Jul 2025 (v1), last revised 22 Sep 2026 (this version, v3)]
Title:LLM-Based Repair of Static Nullability Errors
Authors:Nima Karimipour, Pascal Joos, Michael Pradel, Martin Kellogg, Manu Sridharan
View a PDF of the paper titled LLM-Based Repair of Static Nullability Errors, by Nima Karimipour and Pascal Joos and Michael Pradel and Martin Kellogg and Manu Sridharan
View PDF
HTML (experimental)
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 persists 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 real-world errors. It leverages static analysis to identify safe and unsafe usage regions of symbols, using error-free usage examples to contextualize model prompts. Patches are generated through an iterative interaction with the LLM that incorporates project-wide context and decision logic. Our evaluation on 12 real-world Java projects shows that NullRepair resolves 63% of the 1,119 nullability errors that remain after applying a state-of-the-art annotation inference technique. Unlike two baselines (single-shot prompt and mini-SWE-agent), NullRepair also largely preserves program semantics, with all unit tests passing in 10/12 projects after applying every edit proposed by NullRepair, and 98% or more tests passing in the remaining two projects.
Subjects:
Software Engineering (cs.SE); Programming Languages (cs.PL)
Cite as:
arXiv:2507.20674 [cs.SE]
(or
arXiv:2507.20674v3 [cs.SE] for this version)
https://doi.org/10.48550/arXiv.2507.20674
Focus to learn more
arXiv-issued DOI via DataCite
Submission history
From: Pascal Joos [view email]
[v1]
Mon, 28 Jul 2025 09:55:04 UTC (113 KB)
[v2]
Fri, 6 Feb 2026 10:34:05 UTC (1,387 KB)
[v3]
Tue, 22 Sep 2026 11:51:48 UTC (863 KB)
Full-text links:
Access Paper:
View a PDF of the paper titled LLM-Based Repair of Static Nullability Errors, by Nima Karimipour and Pascal Joos and Michael Pradel and Martin Kellogg and Manu Sridharan
View PDF
HTML (experimental)
TeX Source
view license
Current browse context:
cs.SE
new
|
recent
| 2025-07
Change to browse by:
cs
cs.PL
References & Citations
NASA ADS
Google Scholar
Semantic Scholar
export BibTeX citation
Loading...
BibTeX formatted citation
×
loading...
Data provided by:
Bookmark
Bibliographic Tools
Bibliographic and Citation Tools
Bibliographic Explorer Toggle
Bibliographic Explorer (What is the Explorer?)
Connected Papers Toggle
Connected Papers (What is Connected Papers?)
Litmaps Toggle
Litmaps (What is Litmaps?)
scite.ai Toggle
scite Smart Citations (What are Smart Citations?)
Code, Data, Media
Code, Data and Media Associated with this Article
alphaXiv Toggle
alphaXiv (What is alphaXiv?)
Links to Code Toggle
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub Toggle
DagsHub (What is DagsHub?)
GotitPub Toggle
Gotit.pub (What is GotitPub?)
Huggingface Toggle
Hugging Face (What is Huggingface?)
ScienceCast Toggle
ScienceCast (What is ScienceCast?)
Demos
Demos
Replicate Toggle
Replicate (What is Replicate?)
Spaces Toggle
Hugging Face Spaces (What is Spaces?)
Spaces Toggle
TXYZ.AI (What is TXYZ.AI?)
Related Papers
Recommenders and Search Tools
Link to Influence Flower
Influence Flower (What are Influence Flowers?)
Core recommender toggle
CORE Recommender (What is CORE?)
Author
Venue
Institution
Topic
About arXivLabs
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.
Which authors of this paper are endorsers? |
Disable MathJax (What is MathJax?)