You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-starting.md
+9-23Lines changed: 9 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,7 @@ Pre-requisites:
8
8
* You will need **jdk 8** installed (if you have multiple jdk versions installed you can switched between them using update-alternatives).
9
9
* You will need **maven** installed (possibly with some additional pluggins, so look out for these if error messages come up during compilation).
10
10
11
-
## Option 1: the installation route
12
-
11
+
## Maven installation
13
12
git clone https://github.com/SpoonLabs/astor.git
14
13
cd astor
15
14
mvn install -DskipTests=true
@@ -19,46 +18,33 @@ In any case, most important test cases are always executed on [travis](https://t
19
18
20
19
Warning: Windows is only partially supported.
21
20
22
-
### Creating astor.jar containing dependencies.
23
-
24
21
mvn package -DskipTests=true
25
22
26
-
The following JAR will be created: `target/astor-0.0.2-SNAPSHOT-jar-with-dependencies.jar`
23
+
The following JAR will be created by this command: `target/astor-0.0.2-SNAPSHOT-jar-with-dependencies.jar`
27
24
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.
28
-
29
-
## Option 2: compiling and building class path separately
30
-
31
-
In addition to compiling and building the classpath for astor, the following also gives you the command required to compile an example test.
32
-
33
-
git clone https://github.com/SpoonLabs/astor.git
34
-
cd astor
35
-
mvn clean compile # compiling astor
36
-
cd examples/Math-issue-280
37
-
mvn clean compile test # compiling and running bug example
38
-
cd ../../
39
-
mvn dependency:build-classpath -B | egrep -v "(^\[INFO\]|^\[WARNING\])" | tee /tmp/astor-classpath.txt
40
-
cat /tmp/astor-classpath.txt
41
-
42
-
Note: you will need to rebuild the class path each day if you store it in /tmp/ as suggested, so expect an error if you come back the following day and try to run astor without doing so.
43
25
44
26
## Executing the program
45
27
46
28
The execution of the program will be different depending on the build option you chose previously.
47
29
48
-
### Executing after building with option 2, demonstrated for jGenProg
30
+
### Executing with jGenProg
49
31
50
32
We present a command line with the required arguments for executing jGenProg. Optional arguments found using option -help are also listed further down this document. The arguments can also be changed in "./target/classes/astor.properties".
51
33
52
34
Then the main execution command is as follows (note that the "location" argument is mandatory, and must be an absolute path):
The only part of the above command that you should need to alter is the absolute path that follows the -location argument.
57
42
58
43
Notes:
59
44
60
45
* the default ingredient scope is `package`, to change it do `ConfigurationProperties.properties.setProperty("scope","global")`
61
46
* Always put code in a package, not in the default unnamed package.
47
+
* if the project under repair has dependencies, you must use the `--dependencies` flag, see below.
62
48
63
49
### Output
64
50
@@ -98,7 +84,7 @@ Folder “default” contains the original program, without any modification. It
98
84
99
85
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.
0 commit comments