Skip to content

Commit c434db8

Browse files
authored
Merge pull request #3 from secure-software-engineering/develop
Develop
2 parents 097a603 + 6554f49 commit c434db8

39 files changed

+2328
-2151
lines changed

.github/workflows/maven-deploy.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Publish package to GitHub Packages
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
packages: write
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-java@v3
14+
with:
15+
java-version: '11'
16+
distribution: 'adopt'
17+
- name: Publish package
18+
run: mvn --batch-mode deploy
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/maven.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Java CI with Maven
10+
11+
on:
12+
push:
13+
branches: [ main ]
14+
pull_request:
15+
branches: [ main ]
16+
17+
jobs:
18+
build:
19+
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Set up JDK 11
25+
uses: actions/setup-java@v3
26+
with:
27+
java-version: '11'
28+
distribution: 'adopt'
29+
cache: maven
30+
- name: Build with Maven
31+
run: mvn -B package --file pom.xml
32+
33+
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
34+
# - name: Update dependency graph
35+
# uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -194,4 +194,7 @@ buildNumber.properties
194194

195195
### allow the ecj and jdt core jar ###
196196
!src/test/resources/ecj-3.15.1.jar
197-
!src/test/resources/org.eclipse.jdt.core-3.15.0.jar
197+
!src/test/resources/org.eclipse.jdt.core-3.15.0.jar
198+
/sootdiff.iml
199+
**/sootOutput
200+
.idea

README.md

+28-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
1+
![Maven Build](https://github.com/secure-software-engineering/sootdiff/actions/workflows/maven.yml/badge.svg)
2+
13
# SootDiff - Bytecode Comparison Across Different Java Compilers
24

3-
This repository hosts the SootDiff analysis tool. SootDiff allows the comparison of the Java ByteCode create by different Java compilers.
4-
To do so it uses static analysis and optimizations to unify the generated ByteCode, e.g. Constant Propagation, Dead Code Elimination, String Handling. Its goal is to provide researchers and practitioners with a tool and library on which they can base their own research projects and product implementations.
5+
This repository hosts the SootDiff analysis tool. SootDiff allows the comparison of the Java ByteCode create by
6+
different Java compilers. To do so it uses static analysis and optimizations to unify the generated ByteCode, e.g.
7+
Constant Propagation, Dead Code Elimination, String Handling. Its goal is to provide researchers and practitioners with
8+
a tool and library on which they can base their own research projects and product implementations.
59

610
## Obtaining SootDiff
11+
712
You can either build SootDiff on your own using Maven, or you can download a release from here on Github.
813

914
### Downloading the Release
10-
The Release Page contains all pre-built JAR files for each release that we officially publish. We recommend using the latest and greatest version unless you have a specific issue that prevents you from doing so. In that case, please let us know.
1115

16+
The Release Page contains all pre-built JAR files for each release that we officially publish. We recommend using the
17+
latest and greatest version unless you have a specific issue that prevents you from doing so. In that case, please let
18+
us know.
1219

1320
### Building SootDiff with Maven
21+
1422
To build SootDiff with Maven run
1523
```
1624
mvn install
@@ -21,11 +29,24 @@ or to build a standalone `jar-with-dependencies` run
2129
mvn clean compile assembly:single
2230
```
2331

24-
2532
## Publications
26-
If you want to read the details on how SootDiff works, the published paper [SootDiff @SOAP'19,Phoenix, AZ, USA](https://dl.acm.org/citation.cfm?id=3329966) is a good place to start.
27-
2833

34+
If you want to read the details on how SootDiff works, the published
35+
paper [SootDiff @SOAP'19,Phoenix, AZ, USA](https://dl.acm.org/citation.cfm?id=3329966) is a good place to start.
2936

3037
## License
31-
SootDiff is licensed under the MIT license, see LICENSE file. This basically means that you are free to use the tool (even in commercial, closed-source projects).
38+
39+
SootDiff is licensed under the MIT license, see LICENSE file. This basically means that you are free to use the tool (
40+
even in commercial, closed-source projects).
41+
42+
# Use SootDiff to compare Jars
43+
44+
The class `src/test/java/MainCompareArtifacts.java` can be used to compare multiple jars on the basis of class sha,tlshs
45+
and timestamps and produces a markdown report of that.
46+
47+
Invoke the main method with parameters `-inJars jar1,jar2,jar3 -fileFilter pathToFilterFile.txt`
48+
49+
The filter file can be used to specify classes of interest (e.g. classes fixed in a fixing commit). Make sure to specify
50+
the files as they would be located in the analyzed jar, e.g., in a commit the change might be related
51+
to `src/main/java/pack/a/b.java`, in the jar it would be referenced from the package onwards and in class
52+
format: `pack/a/b.class`.

pom.xml

+86-22
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

77
<groupId>de.upb</groupId>
88
<artifactId>sootdiff</artifactId>
9-
<version>1.0</version>
9+
<version>2.3-SNAPSHOT</version>
10+
1011

1112
<properties>
13+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1214
<maven.compiler.source>1.8</maven.compiler.source>
1315
<maven.compiler.target>1.8</maven.compiler.target>
14-
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
16+
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
1517
</properties>
1618

17-
1819
<build>
1920
<plugins>
20-
21-
2221
<plugin>
2322
<groupId>org.apache.maven.plugins</groupId>
2423
<artifactId>maven-compiler-plugin</artifactId>
@@ -27,9 +26,7 @@
2726
<source>${maven.compiler.source}</source>
2827
<target>${maven.compiler.target}</target>
2928
</configuration>
30-
3129
</plugin>
32-
3330
<plugin>
3431
<artifactId>maven-assembly-plugin</artifactId>
3532
<configuration>
@@ -44,50 +41,117 @@
4441
</configuration>
4542
</plugin>
4643

44+
<plugin>
45+
<groupId>org.apache.maven.plugins</groupId>
46+
<artifactId>maven-release-plugin</artifactId>
47+
<version>2.5.3</version>
48+
</plugin>
49+
50+
51+
<plugin>
52+
<groupId>org.apache.maven.plugins</groupId>
53+
<artifactId>maven-surefire-plugin</artifactId>
54+
<version>3.0.0-M4</version>
55+
<configuration>
56+
<trimStackTrace>false</trimStackTrace>
57+
<reuseForks>false</reuseForks>
58+
<forkCount>1</forkCount>
59+
</configuration>
60+
</plugin>
61+
62+
63+
<plugin>
64+
<artifactId>exec-maven-plugin</artifactId>
65+
<groupId>org.codehaus.mojo</groupId>
66+
<version>1.6.0</version>
67+
<executions>
68+
<execution><!-- Run our version calculation script -->
69+
<id>Compile Test Classes/Resources</id>
70+
<phase>generate-sources</phase>
71+
<goals>
72+
<goal>exec</goal>
73+
</goals>
74+
<configuration>
75+
<executable>${basedir}/src/test/resources/compile.sh</executable>
76+
</configuration>
77+
</execution>
78+
</executions>
79+
</plugin>
80+
4781
</plugins>
4882
</build>
4983

5084

5185
<dependencies>
5286
<dependency>
53-
<groupId>ca.mcgill.sable</groupId>
87+
<groupId>org.soot-oss</groupId>
5488
<artifactId>soot</artifactId>
55-
<version>3.2.0-SNAPSHOT</version>
89+
<version>4.2.1</version>
5690
</dependency>
5791

58-
5992
<dependency>
6093
<groupId>commons-cli</groupId>
6194
<artifactId>commons-cli</artifactId>
6295
<version>1.4</version>
6396
</dependency>
6497

98+
<dependency>
99+
<groupId>io.github.java-diff-utils</groupId>
100+
<artifactId>java-diff-utils</artifactId>
101+
<version>4.5</version>
102+
</dependency>
103+
104+
105+
106+
107+
108+
<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
109+
<dependency>
110+
<groupId>commons-codec</groupId>
111+
<artifactId>commons-codec</artifactId>
112+
<version>1.14</version>
113+
<scope>test</scope>
114+
</dependency>
115+
116+
<dependency>
117+
<groupId>com.google.code.findbugs</groupId>
118+
<artifactId>jsr305</artifactId>
119+
<version>3.0.2</version>
120+
</dependency>
65121

66122
<dependency>
67123
<groupId>org.apache.commons</groupId>
68124
<artifactId>commons-lang3</artifactId>
69-
<version>3.8.1</version>
125+
<version>3.9</version>
70126
</dependency>
71-
72127
<dependency>
73-
<groupId>io.github.java-diff-utils</groupId>
74-
<artifactId>java-diff-utils</artifactId>
75-
<version>4.0</version>
128+
<groupId>com.github.spotbugs</groupId>
129+
<artifactId>spotbugs-annotations</artifactId>
130+
<version>4.0.1</version>
76131
</dependency>
132+
77133
<dependency>
78134
<groupId>junit</groupId>
79135
<artifactId>junit</artifactId>
80-
<version>4.12</version>
136+
<version>4.13</version>
81137
<scope>test</scope>
82138
</dependency>
83-
84139
</dependencies>
140+
85141
<repositories>
86142
<repository>
87-
<id>soot-snapshot</id>
88-
<name>soot snapshots</name>
89-
<url>https://soot-build.cs.uni-paderborn.de/nexus/repository/swt-upb/</url>
143+
<id>jcenter</id>
144+
<url>https://jcenter.bintray.com/</url>
90145
</repository>
91146
</repositories>
92147

148+
149+
<distributionManagement>
150+
<repository>
151+
<id>github</id>
152+
<name>GitHub Packages</name>
153+
<url>https://maven.pkg.github.com/secure-software-engineering/sootdiff</url>
154+
</repository>
155+
</distributionManagement>
156+
93157
</project>

0 commit comments

Comments
 (0)