Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
monperrus authored Aug 6, 2024
2 parents 28b01a2 + 2bc900b commit bf73288
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 33 deletions.
24 changes: 13 additions & 11 deletions docs/getting-starting.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In any case, most important test cases are always executed on [travis](https://t
Warning: Windows is only partially supported.

mvn package -DskipTests=true

The following JAR will be created by this command: `target/astor-0.0.2-SNAPSHOT-jar-with-dependencies.jar`
This will referenced as `astor.jar` for the rest of this guide but you will need to replace it with the full line when inserting commands.

Expand Down Expand Up @@ -80,6 +80,8 @@ Additionally, Astor writes a JSON file ('astor_output.json') which summarizes th

Inside the folder "/src/" Astor stores the source code of the solutions that it found.

If there is no solution found (i.e. the list `patch` is empty in "astor_output.json"), no source code would be generated in the folder "/src/".

Folder “default” contains the original program, without any modification. It's a sanity check, containing the output of spoon without applying any processor over the spoon model of the application under repair.

Each folder "variant-x" is a valid solution to the repair problem (passes all tests). The "x" corresponds to the id (unique identifier) assigned to a variant. There is an command line argument `saveall` that allows you to save all variants that Astor generates, even if they are not a solution.
Expand All @@ -101,11 +103,11 @@ For executing Astor in jMutRepair mode:
# Command line arguments

-mode jgenprog|jkali|jMutRepair|...

-location "absolute location of the project to repair" (**MANDATORY**)

-dependencies "folder with the dependencies of the application to repair"

-failing "canonical names of classes with failing test cases" (if there are several classes with failing test cases, give them separated by the classpath separator (: in linux/mac and ; in windows)
-package "package to manipulate" (only the statements from this package are manipulated to find a patch)
Expand All @@ -125,14 +127,15 @@ For executing Astor in jMutRepair mode:
-binjavafolder "class folder"

-bintestfolder "test class folder"





### Command line arguments example Math-70 from Defects4J:

-location <PATH_TO_ASTOR_FOLDER>/examples/math_70
-mode statement

-mode statement

-package org.apache.commons

Expand Down Expand Up @@ -171,7 +174,7 @@ Astor needs to be executed over a JVM 8+. By default, Astor uses the JVM specifi
For example, running bug Math-70 from Defects4J on a JVM 8 could produce two failing/errored test cases:

testMath280(org.apache.commons.math.distribution.NormalDistributionTest)
testMinpackMeyer(org.apache.commons.math.estimation.MinpackTest)
testMinpackMeyer(org.apache.commons.math.estimation.MinpackTest)

The first one (`testMath280`) is the test that expose the bug Math-70. It's correct that it fails. However, the second one (`testMinpackMeyer`) fails due to the JVM and it must not fail. It's a platform-related error.
As conclusion, using a java VM 8+ could produce that Astor does not find patches for bugs that must be repaired by the tool.
Expand Down Expand Up @@ -209,4 +212,3 @@ A. Run the install command under the folder "/astor/lib/gzoltar", which is `mvn




18 changes: 1 addition & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<dependency>
<groupId>com.github.spoonlabs</groupId>
<artifactId>flacoco</artifactId>
<version>1.0.5</version>
<version>1.0.6</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -167,16 +167,6 @@
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots />
</repository>
<repository>
<id>inria</id>
<url>https://spoon.gforge.inria.fr/repositories/releases/</url>
</repository>
<repository>
<id>spoon-snapshot</id>
<name>maven repository for spoon snapshots</name>
<url>https://repository.ow2.org/nexus/content/repositories/snapshots/</url>
<snapshots />
</repository>
<repository>
<id>EvoSuite</id>
<name>EvoSuite Repository</name>
Expand All @@ -196,12 +186,6 @@
<url>https://tdurieux.github.io/maven-repository/snapshots/</url>
</repository>

<repository>
<id>maven.inria.fr-snapshot</id>
<name>Maven Repository for Spoon Artifac Snapshot</name>
<url>https://maven.inria.fr/artifactory/spoon-public-snapshot/</url>
<snapshots />
</repository>
</repositories>

<build>
Expand Down
11 changes: 6 additions & 5 deletions src/test/java/fr/inria/astor/test/D4JWorkflowTestSingle.java
Original file line number Diff line number Diff line change
Expand Up @@ -484,10 +484,11 @@ public void testChart25JKali() throws Exception {
runComplete("Chart25", "", "jKali", TIMEOUTMIN);
}

@Test
public void testChart26JKali() throws Exception {
runComplete("Chart26", "", "jKali", TIMEOUTMIN);
}
// removed on August 24 by Martin, flaky
// @Test
// public void testChart26JKali() throws Exception {
// runComplete("Chart26", "", "jKali", TIMEOUTMIN);
// }

public static void runCompleteJGenProg(String bug_id, String mvn_option) throws Exception {

Expand Down Expand Up @@ -830,4 +831,4 @@ public void testSynthesisjKaliIssueMath78PatchNopol() throws Exception {

}

}
}

0 comments on commit bf73288

Please sign in to comment.