Automatic Repair of Real Bugs: An Experience Report on the Defects4J Dataset

Matias Martinez, Thomas Durieux, Jifeng Xuan, Romain Sommerard, Martin Monperrus
5/26/2015
58 citations
cs.SE
benchmark-dataset

Official code: Spirals-Team/defects4j-repair (38 stars, Python, last commit 2025-11-12).

Abstract

Defects4J is a large, peer-reviewed, structured dataset of real-world Java bugs. Each bug in Defects4J is provided with a test suite and at least one failing test case that triggers the bug.

Show full abstract

In this paper, we report on an experiment to explore the effectiveness of automatic repair on Defects4J. The result of our experiment shows that 47 bugs of the Defects4J dataset can be automatically repaired by state-of- the-art repair. This sets a baseline for future research on automatic repair for Java. We have manually analyzed 84 different patches to assess their real correctness. In total, 9 real Java bugs can be correctly fixed with test-suite based repair. This analysis shows that test-suite based repair suffers from under-specified bugs, for which trivial and incorrect patches still pass the test suite. With respect to practical applicability, it takes in average 14.8 minutes to find a patch. The experiment was done on a scientific grid, totaling 17.6 days of computation time. All their systems and experimental results are publicly available on Github in order to facilitate future research on automatic repair.

View on arXivView PDF

Code Implementations(1)

Open-science repo for our experimental results of automatic software repair on the Defects4J benchmark of Java bugs

3833Python, ShellJan 18, 20151 years ago
inriaopen-science

Similar Papers

Cite this paper

@article{martinez2015automatic,
  title  = {Automatic Repair of Real Bugs: An Experience Report on the Defects4J Dataset},
  author = {Matias Martinez and Thomas Durieux and Jifeng Xuan and Romain Sommerard and Martin Monperrus},
  year   = {2015},
  eprint = {1505.07002},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1505.07002}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1505.07002.svg)](https://codeofpaper.com/paper/1505.07002)

Discussion