File size: 7,766 Bytes
c8d40c9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6d736b7
c8d40c9
 
 
 
 
 
 
6b52fcc
c8d40c9
6b52fcc
 
 
c8d40c9
6b52fcc
c8d40c9
 
 
924102b
 
 
 
 
 
c8d40c9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6b52fcc
c8d40c9
 
 
 
 
 
bc2ded8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
---
pretty_name: CRJudgeBenchmark
task_categories:
  - text-classification
size_categories:
  - 1K<n<10K
tags:
  - code-review
  - software-engineering
  - llm-as-a-judge
  - benchmark
  - code
  - datasets
configs:
  - config_name: default
    data_files:
      - split: train
        path: train.jsonl
      - split: validation
        path: validation.jsonl
      - split: test
        path: test.jsonl
---

# CRJudgeBenchmark

CRJudgeBenchmark evaluates whether a model can judge the technical trustworthiness of a code-review comment in its pull-request context. It contains **1,199 labeled examples from 124 pull requests across 9 GitHub repositories**, with fixed train, validation, and test splits.

Each example pairs a pull request with one target review comment. It includes the PR description, a base commit, a review patch, linked issues, and a PR activity timeline. The binary `trustworthy` label applies only to the comment identified by `judged_entry_id`.

The dataset supports training and evaluating code-review judges, including agents that inspect repository code before making a judgment. It contains examples and labels; agent trajectories, teacher guidance, and model weights are not included.

## Task and labels

The task is to determine whether the target code-review comment is **technically trustworthy** in its pull-request and file context:

- **`true`**: the target comment is technically trustworthy in the given context.
- **`false`**: the target comment is technically untrustworthy in the given context.
- General PR comments without a file association are assessed for technical trustworthiness in the overall PR context.

The `trustworthy` label applies to the individual target comment. All released labels are JSON booleans; none are missing.

## Dataset splits

| Split | Examples | `true` | `false` |
| --- | ---: | ---: | ---: |
| Train | 714 | 455 | 259 |
| Validation | 126 | 80 | 46 |
| Test | 359 | 229 | 130 |
| **Total** | **1,199** | **764** | **435** |

Splits are grouped by `(repo, pull_request.pull_number)`. No PR appears in more than one split. Repository identities can recur across splits, so this is a PR-disjoint benchmark rather than an evaluation on entirely unseen repositories.

The original train/test split targeted 70%/30% of examples while preserving PR groups and approximately preserving each label's proportion. Validation was then drawn from 15% of the original training pool, leaving the test split unchanged. Both selections used seed 42 and a subset-sum procedure over shuffled PR groups to reach the label-count targets. The final proportions are approximately 59.55% train, 10.51% validation, and 29.94% test.

## Data format

The release consists of three UTF-8 JSON Lines files: `train.jsonl`, `validation.jsonl`, and `test.jsonl`. Each line is one example.

| Field | Type | Description |
| --- | --- | --- |
| `instance_id` | string | PR-derived identifier; perturbed variants have a `#perturb-…` suffix. Not unique by itself. |
| `judged_entry_id` | integer | ID of the target entry in `code_review`. |
| `judged_user` | string | GitHub login associated with the target comment; inherited from the original comment for perturbations. |
| `repo` | string | GitHub repository in `owner/name` form. |
| `language` | string | Recorded primary language of the repository. |
| `pull_request` | object | `pull_number`, `title`, `body`, `created_at`, `base_commit`, and `patch_to_review`. |
| `resolved_issues` | list of objects | Linked issues with `number`, `title`, and `body`. |
| `code_review` | list of objects | PR activity timeline, including comments, reviews, replies, and commits. |
| `problem_domain` | string | Recorded task category, such as `Bug Fixes` or `New Feature Additions`. |
| `hint_text` | string | Reserved context field; empty in every released example. |
| `trustworthy` | boolean | Gold label for the target comment. |
| `source` | string | Construction provenance; exclude from model inputs. |
| `perturbation_kind` | optional string | `location`, `negation`, or `symbol`; present only for perturbations in the raw JSONL. |

The pair `(instance_id, judged_entry_id)` uniquely identifies all 1,199 examples. Every example has exactly one matching target entry in its timeline.

Timeline entry types are `inline`, `inline_reply`, `pr_comment`, `review`, and `commit`. Comment entries contain `id`, `body`, `user`, and `created_at`; depending on type, they may also contain `review_path`, `diff_hunk`, `in_reply_to_id`, or `review_state`. Commit entries use `sha` and `message`. Optional fields may load as `None` through tabular dataset libraries.

## Loading the dataset

```python
from datasets import load_dataset

dataset = load_dataset("dcloud347/CRJudgeBenchmark")
print({split: len(rows) for split, rows in dataset.items()})
# {'train': 714, 'validation': 126, 'test': 359}

row = dataset["train"][0]
target = next(
    entry for entry in row["code_review"]
    if entry.get("id") == row["judged_entry_id"]
)

# Construct a focused input; keep the gold label outside the model prompt.
judge_input = {
    "repo": row["repo"],
    "pull_request": {
        key: row["pull_request"][key]
        for key in ("title", "body", "base_commit", "patch_to_review")
    },
    "target_comment": {
        key: target.get(key)
        for key in ("type", "body", "review_path", "diff_hunk")
    },
}
gold_label = row["trustworthy"]  # For supervision or scoring only.
```

## Evaluation protocol

1. Evaluate the target comment using the rubric above. A prediction can be represented as `{"prediction": true}` or `{"prediction": false}`.
2. Keep `trustworthy`, `source`, `perturbation_kind`, and original `instance_id` values outside model inputs and agent-accessible files. Perturbation suffixes and source tags reveal labels. Use opaque evaluation IDs if needed.
3. Specify the context policy. The raw timeline can contain later replies or reviews that reveal the answer. The focused input above omits other timeline entries, reviewer identities, and review states. Results using complete timelines should be reported separately.
4. For repository inspection, use the recorded `base_commit` and distinguish base-version evidence from evidence obtained after applying `patch_to_review`. Repository checkouts are not bundled with these files.
5. Use training examples for parameter updates and teacher-generated supervision, validation for model selection, and the fixed test set for final evaluation. Preserve PR groups in any derived data.

Treat `true` as the positive class. Report accuracy, macro-F1, per-class precision and recall, and invalid/missing prediction counts. Source-specific results help distinguish performance on naturally occurring untrustworthy comments from performance on perturbations; include sample counts for each slice.

## License and attribution

No dataset-wide license is specified for this release. This card does not assign a new license to the collected code or discussions. Source repositories are identified in the `repo` field, and PR numbers are available in `pull_request.pull_number`.

When referencing the dataset, link to [dcloud347/CRJudgeBenchmark](https://huggingface.co/datasets/dcloud347/CRJudgeBenchmark) and record the dataset revision used for the experiment.

## Citation

If you use CRJudgeBenchmark in your research, please cite our paper:

```bibtex
@misc{pan2026crjudgebenchaidetectplausible,
      title={CRJudgeBench: Can AI Detect Plausible but Invalid Code Reviews?},
      author={Yue Pan and Jiawei Li and Ziyuan Zhang and Xiangxin Zhao and He Ye},
      year={2026},
      eprint={2609.37216},
      archivePrefix={arXiv},
      primaryClass={cs.SE},
      url={https://arxiv.org/abs/2609.37216},
}
```