Skip to content

Commit 0bd5a64

Browse files
committed
docs: add experiment done using sorald
1 parent ef2f687 commit 0bd5a64

File tree

7 files changed

+22170
-0
lines changed

7 files changed

+22170
-0
lines changed

experiments/sorald/App.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
public class App {
2+
private int x;
3+
}

experiments/sorald/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Since I was aware of a jar that was downloaded at runtime for `sorald`, I
2+
passed it while generating the fingerprints.
3+
4+
```shell
5+
mvn clean \
6+
install \
7+
io.github.algomaster99:classfile-fingerprint:0.8.1-SNAPSHOT:generate \
8+
-DexternalJars=$(realpath external-jars.json) \
9+
-DskipUnitTests \
10+
-DskipIntegrationTests
11+
```
12+
13+
Simply run the following command:
14+
15+
```bash
16+
java -javaagent:watchdog-agent-0.8.1-SNAPSHOT.jar=fingerprints=classfile.sha256.jsonl,skipShutdown=true -jar sorald-0.8.5-jar-with-dependencies.jar mine --source App.java
17+
```
18+
19+
### Reproduction details
20+
21+
1. `maven`: Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8)
22+
2. `java`: 17.0.5 oracle
23+
3. `OS`: Ubuntu 22.04
24+
4. `classfile-fingerprint`: `f38a62df1bbee4cb232c4fe4ccdf220e8ec50a60`
25+
5. `watchdog-agent`: `f38a62df1bbee4cb232c4fe4ccdf220e8ec50a60`
26+
6. `sorald/sorald`: `0.8.5`
27+
28+
## Results
29+
30+
After including the external jar while generating the fingerprints, I get the following errors when running the workloads:
31+
32+
```text
33+
[NOT WHITELISTED]: org/sonarsource/sonarlint/shaded/org/springframework/core/$Proxy30
34+
```

experiments/sorald/classfile.sha256.jsonl

Lines changed: 22128 additions & 0 deletions
Large diffs are not rendered by default.

experiments/sorald/external-jars.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[
2+
{
3+
"path": "sonar-java-plugin-7.16.0.30901.jar"
4+
}
5+
]
17 MB
Binary file not shown.
30.1 MB
Binary file not shown.
8.14 MB
Binary file not shown.

0 commit comments

Comments
 (0)