Dataset Viewer
Auto-converted to Parquet Duplicate
record_id
string
messages
list
metadata
dict
neg-0001
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "IdentityServer4", "difficulty": "medium", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purp...
neg-0002
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "IdentityServer4", "difficulty": "medium", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purp...
neg-0003
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "IdentityServer4", "difficulty": "medium", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purp...
neg-0004
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "Nancy", "difficulty": "medium", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"re...
neg-0005
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "Nancy", "difficulty": "medium", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"re...
neg-0006
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "Orleans", "difficulty": "hard", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"re...
neg-0007
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "Orleans", "difficulty": "hard", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"re...
neg-0008
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "Nancy", "difficulty": "medium", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"re...
neg-0009
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "Nancy", "difficulty": "medium", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"re...
neg-0010
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "Nancy", "difficulty": "hard", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"repl...
neg-0011
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "IdentityServer4", "difficulty": "hard", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpos...
neg-0012
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "Orleans", "difficulty": "hard", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"re...
neg-0013
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "garnet", "difficulty": "hard", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"rep...
neg-0014
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "garnet", "difficulty": "medium", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"r...
neg-0015
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "garnet", "difficulty": "hard", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"rep...
neg-0016
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "garnet", "difficulty": "medium", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"r...
neg-0017
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "garnet", "difficulty": "medium", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"r...
neg-0018
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "garnet", "difficulty": "medium", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"r...
neg-0019
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "garnet", "difficulty": "medium", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"r...
neg-0020
[ { "role": "system", "content": "You are an expert C# and .NET code reviewer. Analyze the supplied code carefully, trace concrete execution paths and state changes, challenge plausible hypotheses, and report only substantive issues supported by the supplied code." }, { "role": "user", "content": ...
{ "polarity": "negative", "generation_strategy": "post_fix", "source_repository": "garnet", "difficulty": "medium", "case_type": "negative", "additional_json": "{\"cleanup_revision\":{\"assistant_trace_rewritten\":true,\"basis\":\"reviewer-visible code only; provenance retained as metadata\",\"purpose\":\"r...
End of preview. Expand in Data Studio

C#/.NET Code Review Reasoning Traces

A curated dataset of 273 high-quality C#/.NET code-review examples with explicit reasoning traces, focused on grounded defect detection, execution/state tracing, falsification, and reduction of false-positive bug reports.

The final corpus contains:

  • 200 positive examples
  • 73 negative examples
  • 73.26% positive / 26.74% negative

The dataset is derived from real open-source C#/.NET projects and includes historical bugs, controlled semantic mutations, post-fix hard negatives, and other carefully verified review cases.

The primary objective is not simply to make models find more bugs. It is to teach a reviewer to distinguish a demonstrable defect from a plausible but unsupported concern.

Dataset Details

Dataset Description

This dataset was created for supervised fine-tuning and evaluation of language models for C#/.NET code review.

The examples emphasize:

  • grounded reasoning from reviewer-visible code
  • execution and state tracing
  • real bug discrimination
  • falsification of plausible hypotheses
  • reduction of false positives
  • avoidance of fabricated causal explanations
  • concise findings backed by concrete execution paths
  • willingness to conclude that no substantive issue is demonstrated

Every example contains an explicit reasoning trace inside <think>...</think> followed by the final code-review response.

The curation process applies strict acceptance criteria. In particular, accepted examples should not rely on hidden implementation details, unseen framework behavior, or information about the original bug or fix that would not be available to an independent reviewer.

Dataset Composition

Polarity

The dataset uses a normalized binary polarity field:

  • positive: a substantive issue is demonstrated from reviewer-visible code
  • negative: no substantive correctness issue is demonstrated

Final distribution:

Polarity Count Share
Positive 200 73.26%
Negative 73 26.74%
Total 273 100%

The relatively large negative portion is intentional. A central goal of the dataset is to reduce the tendency of code-review models to assume that every prompt must contain a bug.

Many negatives are hard negatives derived from corrected/post-fix source corresponding to positive historical examples. These paired examples preserve very similar code structure while changing the relevant semantic behavior, providing a strong contrast between genuine defects and superficially suspicious but correct code.

Repository Counts

The corpus draws from multiple open-source C#/.NET repositories, including:

  • Orleans
  • InferredBugs
  • ShareX
  • IdentityServer4
  • Garnet
  • Nancy
  • eShopOnWeb
  • Lean
  • NETworkManager

The exact repository distribution is stored in the dataset metadata and may evolve between dataset versions.

Difficulty

Examples include easy, medium, and hard cases, with the corpus intentionally biased toward medium and hard reviews involving execution paths, state transitions, concurrency, lifecycle, persistence, and framework behavior.

Dataset Sources

Examples are derived from open-source C#/.NET repositories.

Repositories represented in the source corpus include:

Repository Upstream License
Garnet MIT
IdentityServer4 Apache-2.0
Nancy MIT
Orleans MIT
ShareX GPL
eShopOnWeb MIT
InferredBugs MIT
Lean Apache-2.0
NETworkManager GPL

Uses

Direct Use

The dataset is intended for:

  • supervised fine-tuning of code-review models
  • C#/.NET code-review specialization
  • reasoning-oriented fine-tuning
  • research into code-review false positives
  • research into grounded defect detection
  • evaluation of code-review reasoning
  • studying execution and state tracing
  • training models to reject unsupported bug hypotheses
  • training models to recognize when no substantive issue is demonstrated

Out-of-Scope Use

The dataset should not be treated as:

  • an authoritative static-analysis benchmark
  • a comprehensive representation of all C#/.NET defect classes
  • a substitute for human review
  • a source of guaranteed-correct security findings
  • a complete benchmark of general C# programming ability

The presence of a reasoning trace does not guarantee that every statement is universally applicable outside the supplied context.

Metadata containing provenance, historical evidence, or ground truth should generally not be exposed to the model during training if doing so would reveal the expected review outcome.

Dataset Structure

The dataset is distributed as a single canonical set rather than predefined train, validation, and test splits.

Users are expected to construct splits appropriate for their own experiments.

Each record contains:

  • record_id
  • messages
  • metadata

The messages field is a structured conversation with:

  • system
  • user
  • assistant

The assistant response contains:

<think>...</think>

followed by the final review.

The metadata includes normalized fields such as:

  • polarity
  • generation_strategy
  • source_repository
  • difficulty
  • provenance information
  • generation information
  • quality / reviewer-validation information

The final dataset separates polarity from generation strategy. Earlier generation batches used inconsistent values such as positive, existing_bug, mutated_positive, and controlled-mutation in overlapping roles. The final dataset normalizes the review outcome to:

  • positive
  • negative

while retaining generation methodology independently under generation_strategy.

Metadata is intended for:

  • filtering
  • provenance
  • auditing
  • analysis
  • evaluation

and is not necessarily intended as model input.

For evaluation-oriented splits, grouping related examples by provenance is recommended rather than performing a purely random row-level split.

Dataset Creation

Curation Rationale

Many code-review datasets primarily reward models for identifying defects.

This can teach a model an undesirable prior:

if code is presented for review, there must be something wrong with it.

That behavior encourages plausible-sounding but unsupported findings.

This dataset was built with a different objective.

The central goal is to improve the model's ability to determine whether a claimed defect is actually supported by the supplied evidence.

The primary curation rules are:

  1. A materially false factual statement in the reasoning is unacceptable.
  2. A claimed bug must be demonstrable from reviewer-visible code and context.
  3. A correct final conclusion reached through materially false intermediate reasoning is not considered a valid training example.
  4. Hidden information about the original bug, mutation, fix, or expected answer must not leak into reviewer-visible context.

Exact severity or difficulty classification is considered less important than groundedness.

Source Data

The source material consists primarily of C#/.NET code from public open-source repositories.

The corpus includes:

  • historical bugs reconstructed from pre-fix source
  • genuine positive defect examples
  • controlled semantic mutations
  • clean negative examples
  • hard negatives
  • post-fix paired negatives
  • adversarial / falsification-oriented examples

Historical Bug Examples

For historical bugs, the general process is:

  1. identify a real bug through a bug-related issue, pull request, regression test, or fix
  2. use that evidence as hidden ground truth
  3. reconstruct the relevant pre-fix source
  4. determine the minimum code/state neighborhood needed to demonstrate the defect
  5. provide only neutral pre-fix reviewer-visible context
  6. generate a blind code review
  7. verify the review against the historical evidence
  8. reject or regenerate unsupported reasoning
  9. retain only accepted examples

Human evidence such as:

  • issue descriptions
  • PR titles
  • commit messages
  • fix descriptions
  • regression-test expectations
  • post-fix source

is intentionally hidden from the reviewing model.

Hard Negative Construction

A substantial portion of the negative corpus was created from post-fix versions of historical positive examples.

This allows creation of closely paired examples:

  • pre-fix code → positive
  • corrected/post-fix code → negative

The reviewer is not told that the code is corrected.

For accepted hard negatives, the reasoning must independently examine plausible failure hypotheses and explain why the reviewer-visible code does not support them.

This pairing is particularly useful for reducing false positives because the difference between positive and negative examples may be only a small but semantically important change.

Semantic Deduplication

Because multiple generation passes independently explored some of the same repositories, the corpus was audited for semantic overlap.

Deduplication considered:

  • repository
  • source file / code neighborhood
  • historical provenance
  • ground-truth finding
  • primary concepts
  • reviewer-visible code overlap

High-confidence semantic duplicates were removed.

Similar examples were retained where they represented:

  • distinct defects
  • distinct state transitions
  • controlled mutations
  • intentional positive/negative pairs

The final dataset intentionally preserves contrastive positive/post-fix-negative pairs even where most of the surrounding source is shared.

Annotations

Annotation Process

The dataset was produced through a multi-stage model-assisted generation and verification process.

Candidate examples were subjected to additional review and criticism.

Verification focuses on:

  • whether the claimed defect is visible in the supplied code
  • whether framework/runtime behavior was invented
  • whether a concrete failure sequence is demonstrated
  • whether resource-lifetime claims have a concrete consequence
  • whether hidden ground truth leaked into reviewer-visible context
  • whether the final finding matches the reasoning
  • whether negative examples correctly reject plausible but unsupported concerns

Lower-confidence output was treated as candidate-generation material rather than automatically accepted into the final SFT corpus.

Higher-reasoning verification and regeneration was used where appropriate.

Who are the annotators?

Reasoning traces, reviews, labels, and verification decisions were generated using language models under curator-defined review and acceptance criteria.

Historical bug evidence produced by the original project developers was used as hidden verification material but was not shown to the model performing the blind review.

The final selection, filtering, deduplication, and dataset design were curator-controlled.

Personal and Sensitive Information

The dataset is based on publicly available open-source repositories.

It is not intentionally designed to contain personal, medical, financial, demographic, or other sensitive information.

Source files and comments may contain names, usernames, copyright notices, email addresses, or other identifiers that were already present in the public upstream source repositories.

No specific anonymization of upstream source code is claimed.

Bias, Risks, and Limitations

The dataset is small and highly specialized.

Important limitations include:

  • repository selection bias
  • overrepresentation of certain bug classes and frameworks
  • limited total number of examples
  • model-generated reasoning
  • possible residual reasoning errors despite verification
  • dependence on the selected reviewer-visible context
  • historical examples may reflect older framework behavior
  • some framework semantics may require external knowledge
  • synthetic mutations may differ from naturally occurring production defects
  • post-fix hard negatives may overrepresent "fixed version" patterns compared with arbitrary clean production code

The dataset is explicitly designed to discourage false positives, but fine-tuning on it does not guarantee that a model will stop hallucinating defects.

Models may also learn stylistic properties of the reasoning traces or final review format.

The class distribution is intentionally not 50/50. Users should consider both true-bug recall and false-positive rate when evaluating fine-tuned models.

Recommendations

For training:

  • preserve both positive and negative examples
  • do not assume every review contains a defect
  • keep metadata/ground truth out of model-visible training text unless explicitly required
  • preserve the <think>...</think> trace if reasoning behavior is a training objective
  • use provenance-aware splitting for evaluation
  • avoid placing paired or semantically related examples across train/evaluation boundaries
  • evaluate false-positive rate independently from bug-detection recall
  • evaluate reasoning correctness, not only final classification

Citation

There is currently no associated academic publication.

If you use this dataset in published work, please reference the Hugging Face dataset repository and the exact dataset version or commit used.

Glossary

  • Positive example: An example where a substantive defect can be demonstrated from reviewer-visible code and context.
  • Negative example: An example where no substantive defect is demonstrated.
  • Hard negative: Code that plausibly appears problematic but where careful reasoning shows that no substantive issue is supported.
  • Historical bug: A defect derived from a real upstream bug/fix and reconstructed from pre-fix source.
  • Post-fix negative: A negative example derived from corrected source corresponding to a historical positive example.
  • Controlled semantic mutation: A deliberate behavioral modification used to create a known review condition.
  • Reviewer-visible context: All information supplied to the model performing the review.
  • Hidden evidence: Original issues, PRs, fixes, tests, or expected findings used for verification but withheld from the reviewer.
  • Groundedness: The requirement that factual and causal claims are supported by reviewer-visible evidence.
  • Polarity: Canonical binary review outcome: positive or negative.
  • Generation strategy: How an example was produced, independently of polarity.

Dataset Card Authors

Kevin Drapel

Dataset Card Contact

Please use the Hugging Face dataset repository's discussion or community features for questions and issues.

Licensing

Original dataset-specific material may be distributed under Apache-2.0, including:

  • dataset organization
  • original metadata
  • generated annotations
  • generated reasoning traces
  • processing scripts
  • documentation

However, source-code excerpts derived from upstream repositories remain subject to their respective upstream licenses. Some upstream repositories are GPL-licensed. Users redistributing or reusing those portions of the dataset are responsible for complying with the applicable upstream license terms.

This dataset card is not legal advice. Users redistributing the dataset or substantial portions of embedded source code should independently review the applicable upstream licenses.

Downloads last month
47