Evaluates the effectiveness of template-based automated program repair systems by applying fix patterns to buggy Java programs. It probes the system's ability to localize faults, generate syntactically valid patches, and pass test suites without breaking existing tests. Use when the user wants to benchmark on Defects4J, or asks about evaluating this task. Reports plausible_patch.
Scanned 9/11/2026
Install to Claude Code
npx -y skills add qhjqhj00/research-skills-pool --skill tbar-eval --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Tbar Eval?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/qhjqhj00-tbar-eval)More formats (shields.io, HTML) on the badges page.
---
name: tbar-eval
description: Evaluates the effectiveness of template-based automated program repair systems by applying fix patterns to buggy Java programs. It probes the system's ability to localize faults, generate syntactically valid patches, and pass test suites without breaking existing tests. Use when the user wants to benchmark on Defects4J, or asks about evaluating this task. Reports plausible_patch.
metadata:
skill_kind: dataset_eval
source_arxiv: 1903.08409
bibtex_key: liu2019tbar
confidence: high
---
# tbar-eval
> TBar: Revisiting Template-based Automated Program Repair — Liu et al. (2019) (arXiv:1903.08409, 2019)
## What this evaluates
Evaluates the effectiveness of template-based automated program repair systems by applying fix patterns to buggy Java programs. It probes the system's ability to localize faults, generate syntactically valid patches, and pass test suites without breaking existing tests.
## Datasets
- **Defects4J** — total 395; splits: test (395)
## Metrics
- `plausible_patch` **(primary)** — range: [0, 1]
- A patch is considered plausible if the patched program passes all previously failing test cases without failing any previously passing test cases. The metric reports the fraction of bugs for which at least one plausible patch is generated.
- `correct_patch` — range: [0, 1]
- A plausible patch is considered correct if it is manually verified to be semantically equivalent to the developer-provided ground-truth patch.
## Input / output format
**Input**: Buggy Java program, associated test suite (categorized as passing or failing), and developer-provided ground-truth patch (used only for evaluation).
**Output**: A patched Java source file, or null if no plausible patch is generated within the time limit.
## Scoring recipe
```python
def evaluate_patch(prediction, test_suite, gold_patch):
if prediction is None:
return {"plausible": False, "correct": False}
if passes_all_tests(prediction, test_suite):
plausible = True
correct = is_semantically_equivalent(prediction, gold_patch)
return {"plausible": plausible, "correct": correct}
return {"plausible": False, "correct": False}
```
## Common pitfalls
- Confusing 'plausible' (passes tests) with 'correct' (semantically equivalent to developer fix).
- TBar stops generating patches after finding the first plausible patch per bug, unlike systems that enumerate all plausible patches.
- Evaluation is subject to a strict 3-hour timeout per bug, which caps the maximum achievable fix rate.
## Evidence (verbatim from paper)
> If the patched program passes all tests successfully, the patch candidate is considered as a plausible patch. Once such a plausible patch is identified, TBar stops generating other patch candidates for this bug to fix bugs in a standard and practical program repair workflow... If a plausible patch is generated, we further manually check the equivalence between this patch and the ground-truth patch provided by developers and available in the Defects4J benchmark. If the plausible patch is semantically equivalent to the ground-truth patch, the plausible patch is considered as correct.
## Citation
```bibtex
@misc{liu2019tbar,
title={TBar: Revisiting Template-based Automated Program Repair},
author={Liu et al. (2019)},
year={2019},
note={arXiv:1903.08409}
}
```
- arXiv: 1903.08409
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!