Table of Contents
Fetching ...

AACR-Bench: Evaluating Automatic Code Review with Holistic Repository-Level Context

Lei Zhang, Yongda Yu, Minghui Yu, Xinxin Guo, Zhengqi Zhuang, Guoping Rong, Dong Shao, Haifeng Shen, Hongyu Kuang, Zhengfeng Li, Boge Wang, Guoan Zhang, Bangyu Xiang, Xiaobing Xu

TL;DR

AACR-Bench introduces the first multilingual, repository-level benchmark for Automated Code Review (ACR), addressing critical gaps in ground-truth completeness and cross-language context. It provides 200 PRs across 10 languages with 1,505 expert-annotated review comments, augmented by AI-generated comments from multiple models to significantly expand defect coverage. The benchmark emphasizes repository-level context and differentiates context granularity (diff, file, repo) and retrieval methods, revealing that performance gains depend on the LLM, programming language, and whether an Agent-based approach is used. By comparing against existing Python-only or file-level benchmarks, AACR-Bench demonstrates realistic evaluation conditions, offering insights that guide the design of future ACR systems toward adaptive context use and integrated local-global reasoning. The work lays a rigorous foundation for evaluating ACR under multilingual, project-wide contexts and highlights the nuanced trade-offs between precision, recall, and coverage across languages and retrieval strategies.

Abstract

High-quality evaluation benchmarks are pivotal for deploying Large Language Models (LLMs) in Automated Code Review (ACR). However, existing benchmarks suffer from two critical limitations: first, the lack of multi-language support in repository-level contexts, which restricts the generalizability of evaluation results; second, the reliance on noisy, incomplete ground truth derived from raw Pull Request (PR) comments, which constrains the scope of issue detection. To address these challenges, we introduce AACR-Bench a comprehensive benchmark that provides full cross-file context across multiple programming languages. Unlike traditional datasets, AACR-Bench employs an "AI-assisted, Expert-verified" annotation pipeline to uncover latent defects often overlooked in original PRs, resulting in a 285\% increase in defect coverage. Extensive evaluations of mainstream LLMs on AACR-Bench reveal that previous assessments may have either misjudged or only partially captured model capabilities due to data limitations. Our work establishes a more rigorous standard for ACR evaluation and offers new insights on LLM based ACR, i.e., the granularity/level of context and the choice of retrieval methods significantly impact ACR performance, and this influence varies depending on the LLM, programming language, and the LLM usage paradigm e.g., whether an Agent architecture is employed. The code, data, and other artifacts of our evaluation set are available at https://github.com/alibaba/aacr-bench .

AACR-Bench: Evaluating Automatic Code Review with Holistic Repository-Level Context

TL;DR

AACR-Bench introduces the first multilingual, repository-level benchmark for Automated Code Review (ACR), addressing critical gaps in ground-truth completeness and cross-language context. It provides 200 PRs across 10 languages with 1,505 expert-annotated review comments, augmented by AI-generated comments from multiple models to significantly expand defect coverage. The benchmark emphasizes repository-level context and differentiates context granularity (diff, file, repo) and retrieval methods, revealing that performance gains depend on the LLM, programming language, and whether an Agent-based approach is used. By comparing against existing Python-only or file-level benchmarks, AACR-Bench demonstrates realistic evaluation conditions, offering insights that guide the design of future ACR systems toward adaptive context use and integrated local-global reasoning. The work lays a rigorous foundation for evaluating ACR under multilingual, project-wide contexts and highlights the nuanced trade-offs between precision, recall, and coverage across languages and retrieval strategies.

Abstract

High-quality evaluation benchmarks are pivotal for deploying Large Language Models (LLMs) in Automated Code Review (ACR). However, existing benchmarks suffer from two critical limitations: first, the lack of multi-language support in repository-level contexts, which restricts the generalizability of evaluation results; second, the reliance on noisy, incomplete ground truth derived from raw Pull Request (PR) comments, which constrains the scope of issue detection. To address these challenges, we introduce AACR-Bench a comprehensive benchmark that provides full cross-file context across multiple programming languages. Unlike traditional datasets, AACR-Bench employs an "AI-assisted, Expert-verified" annotation pipeline to uncover latent defects often overlooked in original PRs, resulting in a 285\% increase in defect coverage. Extensive evaluations of mainstream LLMs on AACR-Bench reveal that previous assessments may have either misjudged or only partially captured model capabilities due to data limitations. Our work establishes a more rigorous standard for ACR evaluation and offers new insights on LLM based ACR, i.e., the granularity/level of context and the choice of retrieval methods significantly impact ACR performance, and this influence varies depending on the LLM, programming language, and the LLM usage paradigm e.g., whether an Agent architecture is employed. The code, data, and other artifacts of our evaluation set are available at https://github.com/alibaba/aacr-bench .
Paper Structure (42 sections, 31 figures, 10 tables)

This paper contains 42 sections, 31 figures, 10 tables.

Figures (31)

  • Figure 1: Overview of AACR-Bench
  • Figure 2: Distribution of Review Comments in AACR-Bench . TS, JS, and Py stand for TypeScript, JavaScript, and Python, respectively. "Aug" denotes comments augmented from original PR reviews, while "Gen" denotes comments generated by LLMs.
  • Figure 3: Language-wise Code Review Performance
  • Figure 4: the Construction Process of AACR-Bench
  • Figure 5: Prompt Used For Classification of PR's Problem Domain
  • ...and 26 more figures