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 .
翻译:高质量的评估基准对于在自动代码评审(ACR)中部署大语言模型(LLMs)至关重要。然而,现有基准存在两个关键局限:首先,缺乏仓库级上下文下的多语言支持,这限制了评估结果的普适性;其次,依赖于从原始拉取请求(PR)评论中提取的嘈杂且不完整的真实标签,这制约了问题检测的范围。为应对这些挑战,我们引入了AACR-Bench——一个提供跨编程语言完整跨文件上下文的综合性基准。与传统数据集不同,AACR-Bench采用“AI辅助、专家验证”的标注流程,以揭示原始PR中常被忽略的潜在缺陷,从而使缺陷覆盖率提升了285%。在AACR-Bench上对主流LLMs进行的广泛评估表明,由于数据限制,以往的评估可能误判或仅部分捕捉了模型能力。我们的工作为ACR评估建立了更严格的标准,并为基于LLM的ACR提供了新的见解,即:上下文的粒度/层级以及检索方法的选择会显著影响ACR性能,且这种影响因LLM、编程语言以及LLM使用范式(例如,是否采用智能体架构)而异。我们的评估集的代码、数据及其他相关资源可在 https://github.com/alibaba/aacr-bench 获取。