Skip to content

squaresLab/TBar

 
 

Repository files navigation

TBar

Template-based automated program repair

I. Requirement

II. Overview of TBar

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

III. Docker (which probably checks out its own D4J)

The docker image of TBar is available: TBar.

IV. Run TBar

Chart_8.zip is included in this repository as a sample D4J bug for testing.


  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.

Docker for TBar

docker run --name=tbar -it
--mount type=bind,src=/home/aidan/TBar,dst=/home
kuiliu/tbar

./installD4J.sh

export PATH=$PATH:/home/D4J/defects4j/framework/bin

D4J_HOME='/home/D4J/defects4j' DEFECTS4J_HOME='/home/D4J/defects4j' export D4J_HOME export DEFECTS4J_HOME

./checkoutD4JBugs.sh

Run Tbar

mvn exec:java -Dexec.mainClass=edu.lu.uni.serval.tbar.main.MainPerfectFL -Dexec.args="/home/TBar/D4J/projects/ Chart_4 /home/defects4j/ false"

compile Tbar

mvn compile -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dhttps.protocols=TLSv1.2

chmod -R a+rw /home

About

Template-based Automated Program Repair

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.6%
  • Other 0.4%