Datasets:
File size: 6,125 Bytes
6afe3c0 0f349f3 6afe3c0 abb5bc5 6afe3c0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | ---
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<n<1M
configs:
- config_name: default
data_files:
- split: defect
path: data/defect/*.parquet
- split: clean
path: data/clean/*.parquet
dataset_info:
features:
- name: instance_id
dtype: string
- name: repo
dtype: string
- name: pr_number
dtype: int64
- name: task_type
dtype: string
- name: base_commit
dtype: string
- name: review_commit
dtype: string
- name: title
dtype: string
- name: body
dtype: string
- name: patch
dtype: string
- name: n_defects
dtype: int64
- name: n_supported
dtype: int64
- name: n_major
dtype: int64
- name: defects
dtype: string
- name: certifier_count
dtype: int64
---
<p align="center">
<img class="mx-auto dark:hidden" src="https://huggingface.co/datasets/Lego-X/LegoReview-Task/resolve/main/assets/logo-wordmark-light.svg?sha=d4a2a0d77737" width="383" alt="LegoReview-Task">
<img class="mx-auto hidden dark:block" src="https://huggingface.co/datasets/Lego-X/LegoReview-Task/resolve/main/assets/logo-wordmark-dark.svg?sha=d6097b3db4e0" width="383" alt="LegoReview-Task">
</p>
<p align="center"><span style="display:inline-block;white-space:nowrap"><a href="https://arxiv.org/abs/2612.00862" style="display:inline-block"><img style="display:inline-block;vertical-align:middle;margin:0" src="https://huggingface.co/datasets/Lego-X/LegoReview-Task/resolve/main/assets/badges/btn-paper.svg?sha=8ffcc6a9e7c9" height="28" alt="Paper"></a> <a href="https://intellegox.net" style="display:inline-block"><img style="display:inline-block;vertical-align:middle;margin:0" src="https://huggingface.co/datasets/Lego-X/LegoReview-Task/resolve/main/assets/badges/btn-blog.svg" height="28" alt="Blog"></a> <a href="https://github.com/LegoX/LegoReview" style="display:inline-block"><img style="display:inline-block;vertical-align:middle;margin:0" src="https://huggingface.co/datasets/Lego-X/LegoReview-Task/resolve/main/assets/badges/btn-code.svg" height="28" alt="Code"></a></span> <span style="display:inline-block;white-space:nowrap"><a href="https://huggingface.co/collections/Lego-X/legoreview-6ae3817be62c45404407dfdb" style="display:inline-block"><img style="display:inline-block;vertical-align:middle;margin:0" src="https://huggingface.co/datasets/Lego-X/LegoReview-Task/resolve/main/assets/badges/btn-data-models.svg" height="28" alt="Data & Models"></a> <a href="#citation" style="display:inline-block"><img style="display:inline-block;vertical-align:middle;margin:0" src="https://huggingface.co/datasets/Lego-X/LegoReview-Task/resolve/main/assets/badges/btn-citation.svg" height="28" alt="Citation"></a></span></p>
**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.
<p align="center">
<img src="https://huggingface.co/datasets/Lego-X/LegoReview-Task/resolve/main/assets/teaser.png" width="1000" alt="LegoReview overview: verification from PR histories, review data at scale, and training gains for review and coding.">
</p>
| 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}
}
``` |