Skip to content

Commit 216d5b9

Browse files
Merge pull request #7 from VariantSync/develop
First version for CR
2 parents 8c63a63 + d562c34 commit 216d5b9

File tree

125 files changed

+11304
-1924
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+11304
-1924
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ src/main/python/test.pdf
2525
src/main/python/experiment_table.tex
2626
src/main/python/result_analysis/experiment_table.tex
2727
src/main/python/output.txt
28+
kls_database.db
29+
bin
30+
dataset/mined-cherries
31+
dataset/repo-sample.yaml
32+
dataset/unsplit-mined-cherries.zip

Dockerfile

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
FROM openjdk:19-alpine
1+
FROM alpine:latest
22

3+
RUN apk update
4+
RUN apk add --no-cache --upgrade openjdk21
35
# Build the jar files
46
WORKDIR /home/user
57
COPY src ./src
@@ -12,15 +14,30 @@ COPY gradle gradle
1214
WORKDIR /home/user
1315
RUN ./gradlew Cherries || exit
1416

15-
FROM openjdk:19-alpine
17+
FROM alpine:latest
1618

1719
RUN apk update
1820
# Install dependencies for unix patch
19-
RUN apk add --no-cache --upgrade bash diffutils patch git python3 py3-matplotlib unzip
21+
RUN apk add --no-cache --upgrade bash diffutils patch git python3 py3-matplotlib unzip openjdk21
2022

2123
# Install dependencies for patching with matching
2224
RUN apk add --no-cache curl bash gcc musl-dev
2325

26+
RUN apk add --no-cache python3 poetry
27+
28+
RUN apk add --no-cache zip unzip
29+
COPY dataset /home/user/dataset
30+
WORKDIR /home/user/dataset
31+
RUN zip -s 0 mined-cherries.zip --out unsplit-mined-cherries.zip
32+
RUN unzip unsplit-mined-cherries
33+
RUN unzip repo-sample.zip
34+
WORKDIR /home/user
35+
36+
RUN apk add --no-cache texlive-most
37+
38+
COPY src/main/python ./analysis
39+
WORKDIR /home/user/analysis
40+
2441
ARG GROUP_ID
2542
ARG USER_ID
2643

@@ -57,3 +74,8 @@ RUN rustup default stable
5774
# RUN rustup default nightly
5875

5976
RUN cargo install --path /home/user/mpatch
77+
78+
79+
WORKDIR /home/user/analysis
80+
RUN poetry install
81+
WORKDIR /home/user/

INSTALL.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Installation
2+
## Installation Instructions
3+
In the following, we describe how to setup the evaluation of our paper step-by-step.
4+
The instructions explain how to build the Docker image and run the validation in a Docker container.
5+
For __Windows__ users, we recommend the use of WSL2 or a similar Linux environment.
6+
7+
### 1. Install Docker (if required)
8+
How to install Docker depends on your operating system:
9+
10+
- _Windows or Mac_: You can find download and installation instructions [here](https://www.docker.com/get-started).
11+
- _Linux Distributions_: How to install Docker on your system, depends on your distribution. The chances are high that Docker is part of your distributions package database.
12+
Docker's [documentation](https://docs.docker.com/engine/install/) contains instructions for common distributions.
13+
14+
Then, start the docker deamon.
15+
16+
### 2. Open a Suitable Terminal
17+
```
18+
# Windows Command Prompt:
19+
- Press 'Windows Key + R' on your keyboard
20+
- Type in 'cmd'
21+
- Click 'OK' or press 'Enter' on your keyboard
22+
23+
# Windows PowerShell:
24+
- Open the search bar (Default: 'Windows Key') and search for 'PowerShell'
25+
- Start the PowerShell
26+
27+
# Linux:
28+
- Press 'ctrl + alt + T' on your keyboard
29+
```
30+
31+
Clone this repository to a directory of your choice using git:
32+
```shell
33+
git clone https://github.com/VariantSync/patching-with-matching-eval.git
34+
```
35+
36+
### 3. Build the Docker Container
37+
To build the Docker container you can run the `build` script:
38+
```
39+
# Linux/Mac/WSL2 (bash):
40+
./build.sh
41+
```
42+
43+
## 4. Verification & Replication
44+
45+
### Running the Replication or Verification
46+
To execute the replication you can run the `execute` script corresponding to your operating system with `reproduction` as first argument.
47+
48+
`./execute.sh reproduction`
49+
50+
> WARNING!
51+
> TODO: RUNTIME WARNING
52+
> TODO: DISK USAGE WARNING
53+
> Therefore, we offer a short verification (TODO minutes) ...
54+
> You can run it by providing "verification" as argument instead of "reproduction" (i.e., `./execute.sh verification`).
55+
> If you want to stop the execution, you can call the provided script for stopping the container in a separate terminal.
56+
> When restarted, the execution will continue processing by restarting at the last unfinished state.
57+
> `./stop-execution.sh`
58+
59+
You might see warnings or errors reported from SLF4J like `Failed to load class "org.slf4j.impl.StaticLoggerBinder"` which you can safely ignore.
60+
Further troubleshooting advice can be found at the bottom of this file.
61+
62+
The results of the verification will be stored in the [evaluation-workdir](evaluation-workdir) directory.
63+
64+
### Expected Output of the Verification
65+
TODO
66+
67+
## Troubleshooting
68+
69+
### 'Got permission denied while trying to connect to the Docker daemon socket'
70+
`Problem:` This is a common problem under Linux, if the user trying to execute Docker commands does not have the permissions to do so.
71+
72+
`Fix:` You can fix this problem by either following the [post-installation instructions](https://docs.docker.com/engine/install/linux-postinstall/), or by executing the scripts in the replication package with elevated permissions (i.e., `sudo`).
73+
74+
### 'Unable to find image 'mpatch-reproduction:latest' locally'
75+
`Problem:` The Docker container could not be found. This either means that the name of the container that was built does not fit the name of the container that is being executed (this only happens if you changed the provided scripts), or that the Docker container was not built yet.
76+
77+
`Fix:` Follow the instructions described above in the section `Build the Docker Container`.
78+
79+
### Failed to load class "org.slf4j.impl.StaticLoggerBinder"
80+
`Problem:` An operation within the initialization phase of the logger library we use (tinylog) failed.
81+
82+
`Fix:` Please ignore this warning. Tinylog will fall back onto a default implementation (`Defaulting to no-operation (NOP) logger implementation`) and logging will work as expected.

LICENSE.LGPL3

Lines changed: 0 additions & 165 deletions
This file was deleted.

0 commit comments

Comments
 (0)