--- license: apache-2.0 task_categories: - text-generation language: - en tags: - rl-environment - code-review - software-engineering - pull-requests - benchmark pretty_name: LegoReview-Task size_categories: - 100K LegoReview-Task

Paper Blog Code Data & Models Citation

**LegoReview-Task** contains **167,960 review tasks** from 12,891 repositories across eight programming languages. Each task pairs PR context and code snapshots with history-supported reference findings for generating and verifying teacher reviews.

LegoReview overview: verification from PR histories, review data at scale, and training gains for review and coding.

| Split | Tasks | Review snapshot | |---|---:|---| | `defect` | 140,859 | First reviewed snapshot, with PR-history-supported reference findings | | `clean` | 27,101 | Approved final head, with no unresolved review findings | ## Load ```python from datasets import load_dataset repo = "Lego-X/LegoReview-Task" defect = load_dataset(repo, split="defect") clean = load_dataset(repo, split="clean") ``` ## Format | Fields | Contents | |---|---| | `instance_id`, `repo`, `pr_number`, `task_type` | Task identity; `instance_id` joins to [LegoReview-Traj](https://huggingface.co/datasets/Lego-X/LegoReview-Traj) | | `base_commit`, `review_commit`, `patch` | Merge base, reviewed snapshot, and change diff | | `title`, `body` | PR context | | `defects` | JSON-encoded findings, with claim, priority (P0–P3), verdict, and snapshot scope | | `n_defects`, `n_supported`, `n_major` | Defect classification and counts | | `certifier_count` | Non-author reviewers endorsing the final head of a clean task | Finding verdicts (`supported`, `opposed`, `uncertain`) record developer and reviewer responses in the PR history. Check out `base_commit` and apply `patch` to review a task. [Code and task construction](https://github.com/LegoX/LegoReview/blob/main/docs/pipeline.md). ## License Dataset annotations and project-owned files: [Apache-2.0](LICENSE). Upstream code and PR text retain their respective licenses. ## 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} } ```