Skip to content

FeldiPat/Nopol-Defects4J-Repair

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nopol-Defects4J-Repair

This repository contains the source code and the experimental results of the repair of Nopol on a subset of the Defects4J dataset. The subset consists of four open-source projects: Apache Commons Math 1 (106 bugs), Apache Commons Lang 2 (65 bugs), Jfreechart 3 (26 bugs) and Joda-time 4 (27 bugs).

The experiment is an adaption of the analysis done by Matias Martinez, Thomas Durieux, Romain Sommerard, Jifeng Xuan and Martin Monperrus (Automatic Repair of Real Bugs in Java: A Large-Scale Experiment on the Defects4J Dataset).

Getting Started

  1. Download the Defects4J dataset.
  2. Follow the Defects4J Getting Started.
  3. Export Defects4J into your PATH: PATH=$PATH:~/<defects4j_path>/framework/bin
  4. Checkout all bugs
for bug in $(seq 1 26); do defects4j checkout -p Chart -v ${bug}b -w libs/projects/chart/chart_${bug}; done
for bug in $(seq 1 65); do defects4j checkout -p Lang -v ${bug}b -w libs/projects/lang/lang_${bug}; done
for bug in $(seq 1 106); do defects4j checkout -p Math -v ${bug}b -w libs/projects/math/math_${bug}; done
for bug in $(seq 1 27); do defects4j checkout -p Time -v ${bug}b -w libs/projects/time/time_${bug}; done
  1. Edit the Defects4J-repair config: src/python/core/Config.py
  2. Run src/python/repair.py
  3. To process results run src/python/processResults.py

Repair Arguments

usage: src/python/repair.py [-h] -project PROJECT -tool MODE -id ID

arguments:
  -h, --help        shows help message
  -project PROJECT  Which project (math, lang, time, chart, all)
  -mode MODE        Which repair mode (ranking, conditional, precondition)
  -id ID            Bug id

About

Nopol repair on a subset of the Defects4j benchmark

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published