You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

PDB-Single: Precise Debugging Benchmarking — single-line bug subset

📄 Paper  ·  💻 Code  ·  🌐 Project page  ·  🏆 Leaderboard

PDB-Single is the single-line bug subset of the PDB (Precise Debugging Benchmarking) evaluation suite. Every example pairs a ground-truth program with a synthesized buggy version plus a line-level edit script (gt_diff) that encodes the minimal correct fix.

TL;DR

Unit tests reward brute-force regeneration equally with minimal targeted fixes. PDB instead evaluates debugging with edit-level precision (were unnecessary lines touched?) and bug-level recall (were all faults resolved?). Experiments on PDB-Single show frontier models score above 76% on unit tests but at or below 45% on precision — they over-edit.

Statistics

  • Total examples: 7589
  • Per source dataset:
    • bigcodebench: 3697
    • livecodebench: 3892
  • Bug count distribution:
    • bug_count = 1: 2375
    • bug_count = 2: 2330
    • bug_count = 3: 1894
    • bug_count = 4: 990
  • Source-model mix (bug generator):
    • gpt-5.1-codex: 2656
    • gemini-2.5-pro: 2608
    • claude-sonnet-4.5: 2325

Schema

field type notes
task_id string unique identifier, includes _<idx> suffix per bug variant
source_dataset string bigcodebench or livecodebench
source_model string generator model that produced the bug
task_prompt string natural-language problem statement
gt_solution string verified correct program
buggy_code string program with injected bug(s)
gt_diff string (JSON) {line_no: {type, original, modified}} mapping — the fix
bug_count int number of independent bug blocks (range: {1, 2, 3, 4})
bug_type, bug_subtype string Orthogonal Defect Classification label (populated for bug_count == 1; omitted for composed multi-bug entries)
gt_length int line count of gt_solution
editable_lines, deletable_lines, frozen_lines int handler-derived line counts
is_buggy bool always true in the released splits

Loading

from datasets import load_dataset
ds = load_dataset("Precise-Debugging-Benchmarking/PDB-Single", split="test")
example = ds[0]
print(example["buggy_code"])
print(example["gt_solution"])

gt_diff is a JSON-encoded string; decode with json.loads(example["gt_diff"]).

Debugging with a model

The companion code repo ships a turn-key driver:

git clone https://github.com/Bill1235813/PDB
cd PDB
uv sync
# set your key in keys/<provider>_key.txt, then:
bash scripts/simple_debug_eval.sh single openai/gpt-5.1-codex

This loops your model over both BCB and LCB subsets, writes debug outputs under results/<bench>/debug_results/, and computes Unit / Precision / Recall / F1 per task.

To score a saved debug-results file directly (without rerunning the model):

python src/evaluator.py \
  --dataset_name bigcodebench \
  --eval_model_name my-model \
  --input_file <model>_on_bigcodebench_pdb_single.json \
  --eval_set_name bigcodebench_pdb_single

How PDB works

  1. Bug synthesis. An LLM generator rewrites one line of gt_solution following the Orthogonal Defect Classification (Chillarege et al., 1992). Each candidate is unit-tested: it must fail the tests and every proper-subset partial fix must still fail (the atomicity check, preventing compound-independent bugs).
  2. Composition. Valid single-bug variants are composed into bug_count ∈ {1, 2, 3, 4} programs with a stride constraint between blocks so that bug regions never touch or overlap.
  3. Evaluation. For a model's patch, PDB reports:
    • Unit score — does the patch pass hidden tests?
    • Precision — fraction of edited lines that fall inside the GT edit regions (strict; default tolerance ε=0).
    • Recall — fraction of GT edit blocks that the patch resolves.
    • F1 over the above.

Citation

@article{zhu2026pdb,
  title={Precise Debugging Benchmark: Is Your Model Debugging or Regenerating?},
  author={Zhu, Wang Bill and Chai, Miaosen and Wang, Shangshang and Liu, Yejia and Bian, Song and Dong, Honghua and Neiswanger, Willie and Jia, Robin},
  journal={arXiv preprint arXiv:2604.17338},
  year={2026}
}

License

MIT.

Downloads last month
6

Paper for alucent/mirror-PDB-Single