PredicateFix: Repairing Static Analysis Alerts with Bridging Predicates
Yuan-An Xiao, Weixuan Wang, Dong Liu, Junwei Zhou, Shengyu Cheng, Yingfei Xiong
Abstract
Fixing static analysis alerts in source code with Large Language Models (LLMs) is becoming increasingly popular. However, LLMs often hallucinate and perform poorly for complex and less common alerts. Retrieval-augmented generation (RAG) techniques aim to solve this problem by providing the model with a relevant example, but existing approaches face the challenge of unsatisfactory quality of such examples.
To address this challenge, we utilize the predicates in the analysis rule, which serve as a bridge between the alert and relevant code snippets within a clean code corpus, called key examples. Based on this insight, we propose an algorithm to retrieve key examples for an alert automatically, and build PredicateFix as a RAG pipeline to fix alerts from two static code analyzers: CodeQL and GoInsight. Evaluation with multiple LLMs shows that PredicateFix increases the number of correct repairs by 27.1% ∼ 69.3%, significantly outperforming other baseline RAG approaches.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
1 top-tier paper has cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Repair Is Nearly Generation: Multilingual Program Repair with LLMs cites Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
- A syntax-guided edit decoder for neural program repair cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- A syntax-guided edit decoder for neural program repair cites Graph-based, Self-Supervised Program Repair from Diagnostic Feedback
- Seeing is Fixing: Cross-Modal Reasoning with Multimodal LLMs for Visual Software Issue Repair cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- Seeing is Fixing: Cross-Modal Reasoning with Multimodal LLMs for Visual Software Issue Repair cites A syntax-guided edit decoder for neural program repair
- Seeing is Fixing: Cross-Modal Reasoning with Multimodal LLMs for Visual Software Issue Repair cites Automated Program Repair in the Era of Large Pre-trained Language Models
- Automated Program Repair in the Era of Large Pre-trained Language Models cites CoCoNuT: combining context-aware neural translation models using ensemble for program repair
- Automated Program Repair in the Era of Large Pre-trained Language Models cites A syntax-guided edit decoder for neural program repair
Cited by top-tier papers1
Builds on20
- CoCoNuT: combining context-aware neural translation models using ensemble for program repairThibaud Lutellier, Hung Viet Pham, Lawrence Pang, Yitong Li et al.ISSTA 2020 · 325 citations
- Automated Program Repair in the Era of Large Pre-trained Language ModelsChunqiu Steven Xia, Yuxiang Wei, Lingming ZhangICSE 2023 · 321 citations
- A syntax-guided edit decoder for neural program repairQihao Zhu, Zeyu Sun, Yuan-an Xiao, Wenjie Zhang et al.FSE 2021 · 214 citations
- Graph-based, Self-Supervised Program Repair from Diagnostic FeedbackMichihiro Yasunaga, Percy LiangICML 2020 · 198 citations
- Repair Is Nearly Generation: Multilingual Program Repair with LLMsHarshit Joshi, José Pablo Cambronero Sánchez, Sumit Gulwani, Vu Le et al.AAAI 2023 · 182 citations
Related papers
- RTLFixer: Automatically Fixing RTL Syntax Errors with Large Language ModelYunda Tsai, Mingjie Liu, Haoxing RenDAC 2024 · 95 citations
- SRACG: A Code Generation Framework with Selective Retrieval AugmentationMengzhen Wang, Shukai Ma, Songwen Gong, Jiexin Wang et al.AAAI 2026
- Example Quality Matters: Multi-Aspects Example Augmentation for Private Library ProgrammingYuhao Li, Haifeng Sun, Xuesong Zhang, Shu Yao et al.ACL 2026
- CODEPROMPTZIP: Code-specific Prompt Compression for Retrieval-Augmented Generation in Coding Tasks with LMsPengfei He, Shaowei Wang, Tse-Hsun ChenACL Findings 2026 · 1 citation
- CORE: Resolving Code Quality Issues using LLMsNalin Wadhwa, Jui Pradhan, Atharv Sonwane, Surya Prakash Sahu et al.FSE 2024 · 32 citations
