SWR-Bench: Assessing LLM Performance in Real-World Code Review Comment Generation
Automated Code Review (ACR) is crucial for software quality, yet existing benchmarks often fail to reflect real-world complexities, hindering the evaluation of modern Large Language Models (LLMs). Current benchmarks frequently focus on fine-grained code units, lack complete project context, and use inadequate evaluation metrics. To address these limitations, we introduce SWR-Bench, a new benchmark comprising 1000 manually verified Pull Requests (PRs) from GitHub, offering PR-centric review with full project context. SWR-Bench employs an objective LLM-based evaluation method that aligns strongly with human judgment (∼90% agreement) by verifying if issues from a structured ground truth are covered in generated reviews. Our systematic evaluation of mainstream ACR tools and LLMs on SWR-Bench reveals that current systems underperform, and ACR tools are more adept at detecting functional errors. Subsequently, we propose and validate a simple multi-review aggregation strategy that significantly boosts ACR performance, increasing F1 scores by up to 43.67%. Our contributions include the SWR-Bench benchmark, its objective evaluation method, a comprehensive study of current ACR capabilities, and an effective enhancement approach, offering valuable insights for advancing ACR research.
Authors
- Zhengran Zeng (ORCID: https://orcid.org/0009-0009-8422-4522)
- Zhuohao Yu (ORCID: https://orcid.org/0009-0006-0037-0396)
- Shikun Zhang (ORCID: https://orcid.org/0000-0002-6628-4881)
- Rui Xie (ORCID: https://orcid.org/0000-0002-2857-7480)
- Wei Ye (ORCID: https://orcid.org/0000-0001-8096-0922)
- Yixin Li (ORCID: https://orcid.org/0009-0000-9663-9324)
- Yidong Wang (ORCID: https://orcid.org/0009-0007-9969-8259)
Institutions
- Northwestern Polytechnical University (CN)
- Peking University (CN)
Publication Details
- Journal
- Proceedings of the ACM on software engineering.
- Published
- 2026-06-30
- DOI
- https://doi.org/10.1145/3808144
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 0.00