Towards Practical Defect-Focused Automated Code Review
Not on the map. Why?
Abstract (arXiv)
The complexity of code reviews has driven efforts to automate review comments, but prior approaches oversimplify this task by treating it as snippet-level code-to-text generation and relying on text similarity metrics like BLEU for evaluation. These methods overlook repository context, real-world merge request evaluation, and defect detection, limiting their practicality. To address these issues, we explore the full automation pipeline within the online recommendation service of a company with nearly 400 million daily active users, analyzing industry-grade C++ codebases comprising hundreds of thousands of lines of code. We identify four key challenges: 1) capturing relevant context, 2) improving key bug inclusion (KBI), 3) reducing false alarm rates (FAR), and 4) integrating human workflows. To tackle these, we propose 1) code slicing algorithms for context extraction, 2) a multi-role LLM framework for KBI, 3) a filtering mechanism for FAR reduction, and 4) a novel prompt design for better human interaction. Our approach, validated on real-world merge requests from historical fault reports, achieves a 2x improvement over standard LLMs and a 10x gain over previous baselines. While the presented results focus on C++, the underlying framework design leverages language-agnostic principles (e.g., AST-based analysis), suggesting potential for broader applicability.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 27 of its 58 references that are in the map. First posted on arXiv 23 May 2025.
Builds on
27 of 58 references.
References · 27
- 2017Attention Is All You Needcited by 60,361
- 2023GPT-4 Technical Reportcited by 18,396
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2023AWQ: Activation-aware Weight Quantization for LLM Compression and Accelerationcited by 1,298
- 2024Large Language Model based Multi-Agents: A Survey of Progress and Challengescited by 769
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 194
- 2022Automating Code Review Activities by Large-Scale Pre-trainingcited by 98
- 2023ChatUniTest: A Framework for LLM-Based Test Generationcited by 96
- 2018SySeVR: A Framework for Using Deep Learning to Detect Software Vulnerabilitiescited by 92
15 more
- 2022Using Pre-Trained Models to Boost Code Review Automationcited by 63
- 2021Towards Automating Code Review Activitiescited by 54
- 2023LLaMA-Reviewer: Advancing Code Review Automation with Large Language Models through Parameter-Efficient Fine-Tuningcited by 47
- 2024LLMParser: An Exploratory Study on Using Large Language Models for Log Parsingcited by 32
- 2025GraphRAG under Firecited by 24
- 2022AUGER: Automatically Generating Review Comments with Pre-training Modelscited by 23
- 2024RobustKV: Defending Large Language Models against Jailbreak Attacks via KV Evictioncited by 21
- 2023CCT5: A Code-Change-Oriented Pre-Trained Modelcited by 18
- 2019CORE: Automating Review Recommendation for Code Changescited by 14
- 2024How to Refactor this Code? An Exploratory Study on Developer-ChatGPT Refactoring Conversationscited by 12
- 2024DeepCRCEval: Revisiting the Evaluation of Code Review Comment Generationcited by 12
- 2024KADEL: Knowledge-Aware Denoising Learning for Commit Message Generationcited by 10
- 2024Smart-LLaMA: Two-Stage Post-Training of Large Language Models for Smart Contract Vulnerability Detection and Explanationcited by 8
- 2024Improving the Learning of Code Review Successive Tasks with Cross-Task Knowledge Distillationcited by 7
- 2024Deep Learning-based Code Reviews: A Paradigm Shift or a Double-Edged Sword?cited by 5
Built on by
Citing papers per year: 2025: 2; 2026: 1.
3 papers.