---
license: apache-2.0
pretty_name: LegoReview-Bench
task_categories:
- text-generation
tags:
- code-review
- benchmark
- pull-request
size_categories:
- n<1K
configs:
- config_name: default
data_files:
- split: test
path: data/test.parquet
---

**LegoReview-Bench** contains **75 expert-reviewed tasks** from **46 repositories**, with **430 reference findings** across eight programming languages. Its **64 defect** and **11 clean** tasks evaluate finding recovery and review decisions on repository-level code changes.
## Load
```python
from datasets import load_dataset
bench = load_dataset("Lego-X/LegoReview-Bench", split="test")
```
Each row contains a pull request, its code diff, and the expert findings in `defects`. Clean tasks have an empty findings list. Use `tools/restore_instance.py` to recreate the baseline and reviewed source trees.
## Evaluation
Finding-level precision, recall, and F1 measure reference recovery. Clean Rate is the share of clean-task runs with a valid report and no high-priority finding.
See the [evaluation guide](https://github.com/LegoX/LegoReview/blob/main/docs/evaluation.md), [schema](SCHEMA.md), and [dataset statistics](statistics.json).
## License
Project-owned annotations and tools: [Apache-2.0](LICENSE). Source snapshots: [upstream licenses](LICENSES.md).
## Acknowledgements
Built with [SWE-Review](https://github.com/LegoX/SWE-Review), [OpenHands](https://github.com/OpenHands/OpenHands), [Harbor](https://github.com/LegoX/harbor), [LegoFlow](https://github.com/LegoX/LegoFlow), and [Martian Code Review Benchmark](https://github.com/withmartian/code-review-benchmark).
## Citation
If you use our code, data, or model, please cite the two papers below.
```bibtex
@misc{wang2026legoreviewscalingcodereview,
title={LegoReview: Scaling Code Review Data with Verification from Pull Request Histories},
author={Ruoyu Wang and Jierun Chen and Yuxin Jiang and Chaofan Tao and Shaowei Wang and Sidi Yang and Conghao Xiong and Yiming Du and Tiezheng Yu and Kim-Hui Yap and Lifeng Shang and Xiao-Hui Li and Haoli Bai},
year={2026},
eprint={2612.00862},
archivePrefix={arXiv},
primaryClass={cs.SE},
url={https://arxiv.org/abs/2612.00862},
}
@misc{wang2026swereview,
title = {SWE-Review: Closing the Loop on Issue Resolution with Agentic Code Review},
author = {Ruoyu Wang and Jierun Chen and Shaowei Wang and Chaofan Tao and Sidi Yang and Yuxin Jiang and Kim-Hui Yap and Lifeng Shang and Xiaohui Li and Haoli Bai},
year = {2026},
url = {https://github.com/LegoX/SWE-Review}
}
```