ACS can no longer execute on new bugs. The execution of ACS requires querying of GitHub, but GitHub recently changed its interface and does not allow programmed queries. Therefore, the original code of ACS cannot execute normally and there is no easy way to fix that. ACS can still run on the original Defects4J bugs as the results were cached.
Our new tool L2S-Hanabi is a direct follow-up work of ACS and does not depend on external source. We recommend you to use L2S-Hanabi if you are seeking a tool fixing conditional bugs.
- Ubuntu14.04
- Java 1.7
- Python 2.7(need to install psutil)
- Defects4J
Two optional: A. run the virtual machine; B. Set up the environment. Choose the way you like.
-
If you do not want to set up the environment, please download the virtual machine, unzip and open it by VmWare12.5.2(username: yjxxtd, password: hhxxttxs).
-
There are 23 projects(18 correct and 5 incorrect) in the directory "/home/yjxxtd/software/defects4j-project/", the ACS is in the directory "/home/yjxxtd/software/ACS/ACS-master/".
-
Please run the run.sh in the directory "/home/yjxxtd/software/ACS/ACS-master/" to generate the 23 patches for the 23 projects.
-
If it does not work normaly, please increase the timeout time in the run.sh, for example "java -jar ACS.jar /home/yjxxtd/software/defects4j-project/ Chart_14 timeout:3600".
- Clone the ACS:
git clone https://github.com/Adobee/ACS.git
- Checkout a buggy source code version from Defects4j anc compile it:
defects4j checkout -p Lang -v 1b -w /tmp/Lang_1
cd /tmp/Lang_1
defects4j compile
the forder name of checkout must format as 'ProjectName_buggyID
' because the ACS needs it's project name and buggy id to generate it's classpath, source path etc.
- Run the Jar with the parent path of Defects4j buggy version project forder:
java -jar ACS.jar /tmp/
and ACS will automatically find all formatted folder and run with it.
Or run with specific buggy projects in /tmp/
forder(Note the space between "/tmp/" and "Lang_1"):
java -jar ACS.jar /tmp/ Lang_1
java -jar ACS.jar /tmp/ Lang_1;Lang_2;Lang_3
java -jar ACS.jar /tmp/ ban:Lang_1;Lang2
Or set a custom timeout seconds depends on your computer performance (default as 1800):
java -jar ACS.jar /tmp/ Lang_1 timeout:3600
Althrough there is a pom.xml
in the ACS, actually it's useless because of the difficulty of dependency configuration.
We prefer to use Intellij IDEA to build the ACS automatically.
-
'Open' the ACS project with Intellij IDEA, and ignore all warnings in the bottom right, such as 'Framework detected'.
-
There is a default configuration in the run/debug menu which named
run ACS
in the top right, click it and chooseEdit configurations
, replace the content in several input box according to its tip. -
Click
OK
button, and use shortcutCTRL+F9
to build the project.
-
Tips of Chart19: After checkout from Defects4J, There are two
itext
jar files inChart_19/lib
folder and one of which named "itext-2.0.6.jar" is a broken jar and leads to the error of ACS, delete it and ACS would get back to normal. -
The results are in the dir "ACS/resultMessage", the detailed patch is in the file "ACS/resultMessage/patchSource/Project_BugId_Schema_PatchId.java"(If a bug has n patches, the "PatchId" will range from 0 to n - 1), and is between "patch begin" and "patch end".
-
Please note that the patch file in the directory "ACS/resultMessage/patchSource/" does not mean it passes all the tests. If it fails to pass all the test, the patch file will be deleted if ACS has enough time. So if you want to know whether the patch file pass all the tests, please apply it in the source code, and test it manually by using the command "defects4j test".
-
There are some pictures in the dir "ACS/pictures" to show how to run the ACS.
-
If ACS didn't generate the patch or the patch is incomplete, it maybe cause by the performance of the computer, please increase the timeout time.
ACS generates correct patches for 17 defects. For each defect, we provide the urls that contain the developer patch and we either identify the ACS patch is semantically equivalent to the developer patch and provide a brief analysis for why the ACS patch is correct.
Analysis:The ACS generated patch is identical to the developer patch.
Analysis:The ACS generated patch is identical to the developer patch.
Tips: After checkout from Defects4J, There are two
itext
jar files inChart_19/lib
folder and one of which named "itext-2.0.6.jar" is a broken jar and leads to the error of ACS, delete it and ACS would get back to normal.
Analysis:The ACS generated patch is identical to the developer patch.
Analysis:The ACS generated patch is identical to the developer patch.
Analysis:The ACS generated patch is identical to the developer patch.
Analysis:The ACS generated patch is identical to the developer patch.
Analysis:The ACS generated patch is identical to the developer patch.
Analysis:The ACS generated patch is identical to the developer patch.
Analysis:The ACS generated patch is identical to the developer patch.
Analysis:The ACS generated patch is identical to the developer patch.
Analysis:The ACS generated patch is identical to the developer patch.
Analysis:The ACS generated patch is identical to the developer patch.
Analysis:The developer patch contains three parts, and the last part is not related to the defect. The first and second part are identical to ACS patch. The second part uses n < 21 while ACS patch uses n < 20. However, when n is equal to 20, either the true branch or the false branch produce exactly the same result.
Analysis:The ACS generated patch is identical to the developer patch.
Analysis:The ACS generated patch is identical to the developer patch.
Analysis:The developer patch uses the trim() method, while ACS patch does not. However, the method createBigDecimal() will only be called by createNumber(), which ensures that the parameter "str" does not contain any space. So calling trim() is not necessary and the two patches are identical.
Analysis:The ACS generated patch is identical to the developer patch.
DEPENDENCY-BASED ORDERING PERFORMANCE LEVEL DATA
Format: Easy to understand
DEPENDENCY-BASED ORDERING PERFORMANCE RANK DATA
Format: Variable rank / Total
PREDICATE MINING PERFORMANCE DATA
Format: Easy to understand
DOCUMENT ANALYSIS PERFORMANCE DATA
Format: JavaDoc comment / condition expression / list of variable name