The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Code Review Comment Taxonomy — Dataset Collection & Preprocessing
Project Purpose
本项目旨在收集市面上最全的 Code Review Comment 数据样本,应用分类方法,对目前 Code Review 的主要类型进行分类(empirical taxonomy)。
目录结构
├── README.md
├── data/
│ ├── merged.jsonl # 1,142,862 rows (25 个数据集融合后,未去重)
│ ├── final.jsonl # 747,352 rows (精确+语义去重后) ← 最终数据
│ ├── dedup_exact_report.json # 精确去重报告
│ ├── dedup_semantic_report.json # 语义去重报告
│ └── stats.json # 统计信息
├── scripts/
│ ├── schema.py # 统一 schema 定义
│ ├── convert_*.py # 各数据集转换脚本 (25 个)
│ ├── merge_all.py # 数据集融合
│ ├── dedup_exact.py # 精确去重
│ ├── dedup_semantic.py # 语义去重
│ ├── compute_stats.py # 统计计算
│ └── run_pipeline.py # 一键运行
已收集数据集清单
Core Corpus(训练语料,10 个数据集,712,140 条)
| # | 数据集 | 论文/来源 | 原始格式 | 转换后行数 | Split | 关键特点 |
|---|---|---|---|---|---|---|
| 1 | CodeReviewer | Li et al., "Automating Code Review Activities by Large-Scale Pre-Training", FSE 2022 · HF / Zenodo | JSONL (oldf, patch, msg, id, y) | 129,327 | train/valid/test | 事实标准训练 corpus |
| 2 | CuREV | Sghaier et al., "CuREV: Constructing a Benchmark for Evaluating the Quality of Code Review Comments", MSR 2025 · Zenodo | JSONL + quality scores | 5,000 | test | 质量评估标注 (Type/Nature/Civility) |
| 3 | ContextCRBench | 2025 · GitHub | 单 JSON per review (68,938 files) | 58,096 | test | 唯一带完整 code context |
| 4 | Gerrit | Yang et al., "Mining Review Repositories to Evaluate People, Process and Product", MSR 2016 · Website | MySQL dump (t_history, t_revision) | 16,429 | test | OpenStack/LibreOffice/Eclipse/GerritHub |
| 5 | Tufano | Tufano et al., "Using Pre-Trained Models to Automate Code Review Comment Generation", ICSE 2022 · GitHub | TSV (code-to-comment) | 167,797 | train/test/valid | 早期 baseline,Java |
| 6 | ContextualCodeReview | Muttakin, 2024 · HF | JSON (comment, method_body, target_code) | 60,845 | test | Java,带方法级上下文 |
| 7 | CROP | Thongtanunam et al., "Revisiting Code Review Mediation: Is It All About the Reviewer?", MSR 2015 (Zenodo 2020) · Zenodo | discussion.zip (txt files) + metadata.zip (CSV) | 86,737 | test | 11 个 Gerrit 项目,含 inline comment |
| 8 | SAILCRCoverage | McIntosh et al., "The Impact of Code Review Coverage and Code Review Participation on Software Quality", MSR 2014 · GitHub | MySQL dump (Comment/Review/Message 表) | 165,168 | test | Qt/VTK Gerrit,无 diff_hunk |
| 9 | CRC-Py | Icoz, 2025 · GitHub | JSON | 13,726 | train/test | 5 类 13 子类 |
| 10 | CleanCodeReview | Petrova et al., Zenodo 2024 · Zenodo | JSONL (message, group, label) | 10,022 | train/test | 16 类 / 5 超组 |
Benchmark(评测/标注集,15 个数据集,35,212 条)
| # | 数据集 | 论文/来源 | 原始格式 | 转换后行数 | Split | 分类标签 |
|---|---|---|---|---|---|---|
| 11 | CodeReviewQA | HF | JSONL | 899 | test | 无 |
| 12 | CodeFuse-CR-Bench | Yang et al., arXiv 2509.14856 | Parquet | 12,881 | test | 无 |
| 13 | SeRe | Shen et al., "SeRe: A Security-Related Code Review Comment Generation Approach", ICSE 2026 · arXiv 2601.01042 | JSONL | 6,729 | test | Security 相关标注 |
| 14 | CR-ESEM23 | Turzo et al., "Automated Classification of Code Review Comments Using Deep Learning", ESEM 2023 · GitHub | Excel (44 cols, labeled) | 1,694 | test | category + comment_group + usefulness |
| 15 | AACR-Bench | Zhang et al., "AACR-Bench: A Benchmark for Automated AI-Code-Review", ICML 2026 (arXiv 2601.19494) · GitHub | JSON | 2,133 | test | positive/negative |
| 16 | RevHelper | Rahman et al., "RevHelper: A Tool to Support Code Reviewers", MSR 2017 · GitHub | TSV | 363 | test | useful/non-useful |
| 17 | ConfusionCR | Ebert et al., "Confusion in Code Reviews: Reasons, Impacts, and Perceptions", TSE · GitHub | XLS | 2,714 | test | confusion/non-confusion |
| 18 | TooNoisy | Li et al., arXiv 2502.02757 · Zenodo | JSONL | 270 | test | Valid/Noisy |
| 19 | c-CRAB | Rossi et al., "c-CRAB: A Benchmark for Evaluating Automated Code Review Comment Filtering and Resolution", ICSE 2025 · GitHub | JSONL | 595 | test | 无 |
| 20 | SWRench | GitHub | JSONL | 910 | test | change_type (如 F.2 Logic) |
| 21 | EvaCRC | Li et al., "EvaCRC: Evaluating Code Review Comments", ESEC/FSE 2023 · Zenodo | Excel | 2,910 | test | Emotion/Question/Evaluation/Suggestion + Grade |
| 22 | CR Smell | arXiv 2604.23667 · Figshare | CSV | 439 | test | 9 类 (6 smell + 3 intent),有 diff_hunk |
| 23 | TestingMeetsCR | Moritz et al., "When Testing Meets Code Review", ICSE 2018 · Zenodo | Excel (CategorizationOfComments.xlsx) | 581 | test | Code improvement/Defect/Knowledge Transfer/Misc + 细粒度子类 |
| 24 | DesignDiscussions | Uchoa et al., "An Empirical Study of Design Discussions In Code Review", ESEM 2018 · GitHub | XLS | 2,359 | test | is_design + design_label |
| 25 | ArchAwareness | Paixao et al., "Are Developers Aware of the Architectural Impact of Their Changes?", SANER 2017 · Website | CSV + review txt files | 836 | test | 变更类型 + 架构感知 (author_aware/comments_aware/not_aware) |
预处理流程
Step 1: 原始格式 → 统一 JSONL
每个数据集由独立的 scripts/convert_<dataset>.py 转换。统一 Schema:
{
"source_datasets": "list[dict], 每项 {\"dataset\": str, \"split\": str|list[str]},去重合并后该样本的所有来源",
"repo": "str, owner/repo",
"commit_id": "str, commit hash",
"pr_number": "int or null",
"comment_id": "str, 数据集内唯一标识",
"file_path": "str or null",
"diff_hunk": "str, unified diff / patch",
"comment": "str, review comment text",
"lang": "str or null, 标准化后",
"created_at": "str or null",
"extra_fields": "dict, 数据集特有字段",
"in_benchmark": "bool"
}
语言标准化:C# / csharp → c_sharp; C++ → cpp; Golang → go; 其余统一小写。
Split 规则:
- Benchmark 数据集:全部标为
test - Corpus 数据集有原始 split 信息:保留原始 split(train/test/valid)
- Corpus 数据集无 split 信息:全部标为
test
注意:少数行因跨数据集去重合并,split 字段可能为 list(如 ["test", "valid"] 或 ["test", "train"]),共 252 行,使用时需注意潜在的 train/test 泄露。
Step 2: 融合 (merge_all.py)
将 data/raw/*.jsonl (10 corpus) + data/benchmark/*.jsonl (15 benchmark) 纯拼接合并。
- 为每行构建
_unique_key = (repo, commit_id, comment_id)和_content_hash = SHA256(normalized_diff + normalized_comment) - 标记
in_benchmark字段 - 语言名标准化
结果:25 个数据集 → 1,142,862 rows
Step 3: 精确去重 (dedup_exact.py)
- Unique key 去重: 仅对
repo、commit_id、comment_id三字段均存在的行,按(repo, commit_id, comment_id)去重,同 key 只保留一条,来源合并到source_datasets - Content hash 去重:
SHA256(normalized_diff + normalized_comment)相同只保留一条,来源合并到source_datasets;若_content_hash为空则重新计算
结果:1,142,862 → 747,356(移除 395,506 条,其中 key 重复 1,344 条,hash 重复 394,162 条)
Step 4: 语义去重 (dedup_semantic.py)
跨数据集近似重复检测:
- 按
(repo, comment前50字符)分桶 - 仅在跨数据集的桶内做比较
- 计算 Jaccard token 相似度,阈值 comment ≥ 0.85 AND diff ≥ 0.9 → 语义重复
结果:747,356 → 747,352(移除 4 条)
Step 5: 统计 (compute_stats.py)
| 指标 | 值 |
|---|---|
| 总行数 | 747,352 |
| Corpus | 712,140 |
| Benchmark | 35,212 |
| 唯一 repo | 691 |
按数据集分布:
| 数据集 | 行数 | 占比 | 类型 |
|---|---|---|---|
| Tufano | 167,797 | 22.5% | corpus |
| SAILCRCoverage | 165,168 | 22.1% | corpus |
| CodeReviewer | 129,327 | 17.3% | corpus |
| CROP | 86,737 | 11.6% | corpus |
| ContextualCodeReview | 60,845 | 8.2% | corpus |
| ContextCRBench | 58,096 | 7.8% | corpus |
| Gerrit | 16,429 | 2.2% | corpus |
| CRC-Py | 13,726 | 1.8% | corpus |
| CodeFuse-CR-Bench | 12,881 | 1.7% | benchmark |
| CleanCodeReview | 10,022 | 1.3% | corpus |
| SeRe | 6,731 | 0.9% | benchmark |
| CuREV | 5,000 | 0.7% | corpus |
| EvaCRC | 2,910 | 0.4% | benchmark |
| ConfusionCR | 2,714 | 0.4% | benchmark |
| DesignDiscussions | 2,359 | 0.3% | benchmark |
| AACR-Bench | 2,133 | 0.3% | benchmark |
| CR-ESEM23 | 1,694 | 0.2% | benchmark |
| SWRench | 910 | 0.1% | benchmark |
| CodeReviewQA | 899 | 0.1% | benchmark |
| ArchAwareness | 836 | 0.1% | benchmark |
| c-CRAB | 595 | 0.1% | benchmark |
| TestingMeetsCR | 581 | 0.1% | benchmark |
| CRSmell | 439 | 0.1% | benchmark |
| RevHelper | 363 | <0.1% | benchmark |
| TooNoisy | 270 | <0.1% | benchmark |
按 Split 分布:
| Split | 行数 | 占比 |
|---|---|---|
| test | 459,952 | 61.3% |
| train | 262,648 | 35.1% |
| valid | 26,862 | 3.6% |
按语言分布:
| 语言 | 行数 | 占比 |
|---|---|---|
| unknown | 424,263 | 56.9% |
| java | 234,476 | 31.4% |
| python | 37,881 | 5.1% |
| go | 14,490 | 1.9% |
| c_sharp | 10,962 | 1.5% |
| cpp | 7,451 | 1.0% |
| c | 7,166 | 1.0% |
| rust | 4,593 | 0.6% |
| javascript | 2,504 | 0.3% |
| typescript | 2,356 | 0.3% |
| ruby | 1,054 | 0.1% |
| php | 156 | <0.1% |
- Downloads last month
- 30