Skip to content

Commit

Permalink
Merge 4043093 into 9412809
Browse files Browse the repository at this point in the history
  • Loading branch information
pasquy73 committed Jul 22, 2019
2 parents 9412809 + 4043093 commit 2d1efc9
Show file tree
Hide file tree
Showing 26 changed files with 712 additions and 329 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ public void testMultipleEntryWithJars() throws IOException {
List<String> entries = Lists.newArrayList(tmpFolder.newFolder("oneentry").getAbsolutePath(),
tmpFolder.newFile("twoentry.jar").getAbsolutePath(),
tmpFolder.newFolder("threeentry").getAbsolutePath());
entries.set(1, entries.get(1).replace("/twoentry.jar", "")); // remove jar file from the name
entries.set(1, entries.get(1).replace(File.separator + "twoentry.jar", "")); // remove jar file from the name
String rawEntry = String.join(File.pathSeparator, entries);
entries.add(entries.get(1) + "/twoentry.jar"); //Correct oracle
//Correct oracle
entries.add(entries.get(1) + File.separator + "twoentry.jar"); // remove jar file from the name
List<String> classPathEntries = ClassPaths.getClassPathEntries(rawEntry);
assertThat(classPathEntries, containsInAnyOrder(entries.toArray(new String[entries.size()])));
}
Expand Down
1 change: 0 additions & 1 deletion botsing-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<version>1.0.7-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>botsing-examples</artifactId>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion botsing-examples/src/main/resources/Fraction.log
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
java.lang.ArithmeticException: / by zero
java.lang.ArithmeticException: / by zero
at eu.stamp.botsing.Fraction.getShiftedValue(Fraction.java:24)
1 change: 1 addition & 0 deletions botsing-maven/LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,4 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

44 changes: 44 additions & 0 deletions botsing-maven/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,50 @@ The target_frame lets you specify how many rows of the stacktrace Botsing has to
1. specifying the maximum value (e.g. `-Dmax_target_frame=2`), in this case it will start from the maximum value provided and decrease it until a reproduction test have been found
1. reading it from the maximum rows of the stacktrace, no parameter for the target frame should be provided

## How to run common behavior maven plugin

### Configuration

Before to run the plugin, we need to download and install the use case [AuthZforce](https://authzforce.ow2.org/) following the documentation provided at this [link](https://github.com/STAMP-project/evosuite-model-seeding-tutorial).

Please note that you need also to add [EvoSuite-client](https://github.com/STAMP-project/botsing/tree/maven-common-behavior-integration#building-botsing)

```
mvn install:install-file -Dfile=botsing-reproduction/evosuite-client-botsing-1.0.7.jar -DgroupId=org.evosuite -DartifactId=evosuite-client-botsing -Dversion=1.0.7 -Dpackaging=jar
mvn package
```

Download and install botsing project from git:

```
git clone https://github.com/STAMP-project/botsing.git
mvn clean install
```

Note you need also to download and install in maven repo the 'evosuite-master-1.0.7-SNAPSHOT.jar' from this [link](https://github.com/STAMP-project/evosuite-model-seeding-tutorial.git):

```
git clone https://github.com/STAMP-project/evosuite-model-seeding-tutorial.git
cd evosuite-model-seeding-tutorial
mvn install:install-file -Dfile=bin/evosuite-master-1.0.7-SNAPSHOT.jar -DgroupId=org.evosuite -DartifactId=evosuite-master -Dversion=1.0.7 -Dpackaging=jar
```

### Run plugin

To run the maven plugin, go in the botsing-maven folder and type this command:

```
cd botsing/botsing-maven/
mvn eu.stamp-project:botsing-maven:1.0.6-SNAPSHOT:common-behavior -Dproject_cp=/home/ubuntu/authzforce-core/pdp-engine/target/classes -Dproject_prefix=org.ow2.authzforce -Dout_dir=results/authzforce -Dclass=org.ow2.authzforce.core.pdp.impl.PdpBean -Dsearch_budget=50
```


## Help

To view a list of all the parameters that can be set use this command:
Expand Down
9 changes: 5 additions & 4 deletions botsing-maven/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>botsing</artifactId>
<groupId>eu.stamp-project</groupId>
Expand Down Expand Up @@ -58,9 +59,9 @@
</dependency>

<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
</dependency>

<!-- test dependencies -->
Expand Down
186 changes: 0 additions & 186 deletions botsing-maven/src/main/java/eu/stamp/botsing/BotsingConfiguration.java

This file was deleted.

3 changes: 3 additions & 0 deletions botsing-maven/src/main/java/eu/stamp/botsing/BotsingMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
import org.eclipse.aether.resolution.VersionRangeResolutionException;
import org.eclipse.aether.resolution.VersionRangeResult;

import eu.stamp.botsing.setup.BotsingConfiguration;
import eu.stamp.botsing.setup.FileUtility;

/**
* Mojo class to run Botsing
*
Expand Down

0 comments on commit 2d1efc9

Please sign in to comment.