Skip to content
Template-based Automated Program Repair
Java Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
D4J
FailedTestCases Source code and data. May 4, 2019
Results
SuspiciousCodePositions
figure Add algorithm. May 18, 2019
lib Add README.md May 6, 2019
src/main
target/dependency
.gitignore
BugPositions.txt
NormalFLTBarRunner.sh
PerfectFLTBarRunner.sh Source code and data. May 4, 2019
README.md
checkoutD4JBugs.sh
installD4J.sh
pom.xml

README.md

TBar

Template-based automated program repair

I. Requirement

II. Overview of TBar

The overview bug fixing process with TBar.\label{step}

III. Prepare Defects4J Bugs

  1. Download and Install Defects4J.
  • ./installD4J.sh
  1. Check out and compile each bug.
  • ./checkoutD4JBugs.sh

If you fail to install defects4j, checkout or compile defects4j bugs, please reference these introductions.

The docker image of TBar is available: TBar.

IV. Run TBar

  1. Fixing Defects4J bugs with perfect fault localization configuration.
  • ./PerfectFLTBarRunner.sh <Bug_Data_Path> <Bug_ID> <defects4j_Home> <true/false>

    Example: ./PerfectFLTBarRunner.sh D4J/projects/ Chart_8 D4J/defects4j/ false to fix bug Chart_8 with perfect fault localization configuration.

    ./PerfectFLTBarRunner.sh D4J/projects/ Chart_8 D4J/defects4j/ true tries to fix bug Chart_8 with all possible matching fix patterns.

  1. Fixing Defects4J bugs with normal fault localization configuration.
  • ./NormalFLTBarRunner.sh <Bug_Data_Path> <Bug_ID> <defects4j_Home>

    Example: ./NormalFLTBarRunner.sh D4J/projects/ Chart_8 D4J/defects4j/.

If it executes failed because of the paths of <Bug_Data_Path> and <defects4j_Home>, please use their absolute paths.

V. Structure of the Directories

 |--- README.md               :  user guidance
 |--- D4J                     :  Defects4J information
 |--- FailedTestCases         :  Failed test cases of each Defects4J bug
 |--- lib                     :  GZoltar jar files
 |--- Results                 :  Generated patches
 |------ FixPatterns          :  Bugs fixed by each fix pattern
 |------ PerfectFL            :  Bugs fixed with perfect fault localization configuration
 |------ NormalFL             :  Bugs fixed with normal fault localization configuration
 |--- src                     :  source code
 |--- SuspiciousCodePositions :  Bug positions localized with GZoltar
 |--- target                  :  binary code

ALL suggestions are welcomed.

You can’t perform that action at this time.