Skip to content

Commit bece920

Browse files
committed
merge
2 parents a51723f + 4d0b383 commit bece920

561 files changed

Lines changed: 8124 additions & 4313 deletions

File tree

Some content is hidden

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

INSTALL.md

Lines changed: 101 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Installation
22
## Installation Instructions
3-
In the following, we describe how to build the Docker image and run the experiments in Docker containers.
3+
In the following, we describe how to replicate the validation from our paper (Section 5) step-by-step.
4+
The instructions explain how to build the Docker image and run the validation in a Docker container.
45

5-
### Install Docker (if required)
6-
How to install Docker depends on your operating system.
6+
### 1. Install Docker (if required)
7+
How to install Docker depends on your operating system:
78

8-
#### Windows or Mac
9-
You can find download and installation instructions [here](https://www.docker.com/get-started).
10-
11-
#### Linux Distributions
12-
How to install Docker on your system, depends on your distribution. However, the chances are high that Docker is part of your distributions package database.
9+
- _Windows or Mac_: You can find download and installation instructions [here](https://www.docker.com/get-started).
10+
- _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.
1311
Docker's [documentation](https://docs.docker.com/engine/install/) contains instructions for common distributions.
1412

15-
### Open a Suitable Terminal
13+
Then, start the docker deamon.
14+
15+
### 2. Open a Suitable Terminal
1616
```
1717
# Windows Command Prompt:
1818
- Press 'Windows Key + R' on your keyboard
@@ -27,92 +27,133 @@ Docker's [documentation](https://docs.docker.com/engine/install/) contains instr
2727
- Press 'ctrl + alt + T' on your keyboard
2828
```
2929

30-
### Build the Docker Container
31-
To build the Docker container you can run the build script corresponding to your OS
30+
Clone this repository to a directory of your choice using git:
31+
```shell
32+
git clone https://github.com/VariantSync/DiffDetective.git
33+
```
34+
Then, navigate to the root of your local clone of this repository:
35+
```shell
36+
cd DiffDetective
37+
```
38+
39+
### 3. Build the Docker Container
40+
To build the Docker container you can run the `build` script corresponding to your operating system:
3241
```
3342
# Windows:
3443
.\build.bat
3544
# Linux/Mac (bash):
3645
./build.sh
3746
```
3847

39-
## Verification & Expected Output
48+
## 4. Verification & Replication
49+
50+
### Running the Replication or Verification
51+
To execute the replication you can run the `execute` script corresponding to your operating system with `replication` as first argument.
52+
53+
#### Windows:
54+
`.\execute.bat replication`
55+
#### Linux/Mac (bash):
56+
`./execute.sh replication`
57+
58+
> WARNING!
59+
> The replication will at least require an hour and might require up to a day depending on your system.
60+
> Therefore, we offer a short verification (5-10 minutes) which runs DiffDetective on only four of the datasets.
61+
> You can run it by providing "verification" as argument instead of "replication" (i.e., `.\execute.bat verification`, `./execute.sh verification`).
62+
> If you want to stop the execution, you can call the provided script for stopping the container in a separate terminal.
63+
> When restarted, the execution will continue processing by restarting at the last unfinished repository.
64+
> #### Windows:
65+
> `.\stop-execution.bat`
66+
> #### Linux/Mac (bash):
67+
> `./stop-execution.sh`
68+
69+
You might see warnings or errors reported from SLF4J like `Failed to load class "org.slf4j.impl.StaticLoggerBinder"` which you can safely ignore.
70+
Further troubleshooting advice can be found at the bottom of this file.
4071

41-
### Running the Verification
42-
To run the verification you can run the script corresponding to your OS with `verification` as first argument. The verification should take about 10-20 minutes depending on your hardware.
43-
```
44-
# Windows:
45-
.\execute.bat verification
46-
# Linux/Mac (bash):
47-
./execute.sh verification
48-
```
4972
The results of the verification will be stored in the [results](results) directory.
5073

5174
### Expected Output of the Verification
52-
The aggregated results of the verification can be found in the following files.
75+
The aggregated results of the verification/replication can be found in the following files.
76+
The example file content shown below should match your results when running the _verification_.
77+
(Note that the links below only have a target _after_ running the replication or verification.)
5378

54-
- The [speed statistics](results/validation/speedstatistics.txt) contain information about the total runtime, median runtime, mean runtime, and more:
79+
- The [speed statistics](results/validation/current/speedstatistics.txt) contain information about the total runtime, median runtime, mean runtime, and more:
5580
```
56-
#Commits: 14527
57-
Total commit process time is: 12.427866666666667min
58-
Fastest commit process time is: df4a1fa9c5cc5d54a9347a2bf4843cae87a942f1___xorg-server___0ms
59-
Slowest commit process time is: 9838b7032ea9792bec21af424c53c07078636d21___xorg-server___14578ms
60-
Median commit process time is: 6dc71f6b2c7ff49adb504426b4cd206e4745e1e3___xorg-server___19ms
61-
Average commit process time is: 51.330075032697735ms
81+
#Commits: 24701
82+
Total commit process time is: 14.065916666666668min
83+
Fastest commit process time is: d86e352859e797f6792d6013054435ae0538ef6d___xfig___0ms
84+
Slowest commit process time is: 9838b7032ea9792bec21af424c53c07078636d21___xorg-server___7996ms
85+
Median commit process time is: f77ffeb9b26f49ef66f77929848f2ac9486f1081___tcl___13ms
86+
Average commit process time is: 34.166835350795516ms
6287
```
63-
- The [classification results](results/validation/ultimateresult.metadata.txt) contain information about how often each pattern was found, and more.
88+
- The [classification results](results/validation/current/ultimateresult.metadata.txt) contain information about how often each pattern was matched, and more.
6489
```
6590
repository: <NONE>
66-
total commits: 18046
67-
filtered commits: 593
91+
total commits: 42323
92+
filtered commits: 7425
6893
failed commits: 0
69-
empty commits: 2926
70-
processed commits: 14527
71-
tree diffs: 55008
72-
fastestCommit: df4a1fa9c5cc5d54a9347a2bf4843cae87a942f1___xorg-server___0ms
73-
slowestCommit: 9838b7032ea9792bec21af424c53c07078636d21___xorg-server___14578ms
74-
runtime in seconds: 747.5400000000001
75-
runtime with multithreading in seconds: 137.22
76-
treeformat: diff.difftree.serialize.treeformat.CommitDiffDiffTreeLabelFormat
77-
nodeformat: mining.formats.ReleaseMiningDiffNodeFormat
78-
edgeformat: mining.formats.DirectedEdgeLabelFormat with mining.formats.ReleaseMiningDiffNodeFormat
79-
analysis: mining.strategies.PatternValidation
94+
empty commits: 10197
95+
processed commits: 24701
96+
tree diffs: 80751
97+
fastestCommit: 518e205b06d0dc7a0cd35fbc2c6a4376f2959020___xorg-server___0ms
98+
slowestCommit: 9838b7032ea9792bec21af424c53c07078636d21___xorg-server___7996ms
99+
runtime in seconds: 853.9739999999999
100+
runtime with multithreading in seconds: 144.549
101+
treeformat: org.variantsync.diffdetective.diff.difftree.serialize.treeformat.CommitDiffDiffTreeLabelFormat
102+
nodeformat: org.variantsync.diffdetective.mining.formats.ReleaseMiningDiffNodeFormat
103+
edgeformat: org.variantsync.diffdetective.mining.formats.DirectedEdgeLabelFormat with org.variantsync.diffdetective.mining.formats.ReleaseMiningDiffNodeFormat
104+
analysis: org.variantsync.diffdetective.validation.PatternValidationTask
80105
#NON nodes: 0
81106
#ADD nodes: 0
82107
#REM nodes: 0
83-
filtered because not (is not empty): 132
84-
AddToPC: { total = 260536; commits = 12703 }
85-
AddWithMapping: { total = 27720; commits = 1447 }
86-
RemFromPC: { total = 235017; commits = 11830 }
87-
RemWithMapping: { total = 15381; commits = 1361 }
88-
Specialization: { total = 4662; commits = 624 }
89-
Generalization: { total = 7397; commits = 564 }
90-
Reconfiguration: { total = 2231; commits = 258 }
91-
Refactoring: { total = 5769; commits = 921 }
108+
filtered because not (is not empty): 212
109+
AddToPC: { total = 443451; commits = 22470 }
110+
AddWithMapping: { total = 51036; commits = 2971 }
111+
RemFromPC: { total = 406809; commits = 21384 }
112+
RemWithMapping: { total = 36622; commits = 2373 }
113+
Specialization: { total = 7949; commits = 1251 }
114+
Generalization: { total = 11057; commits = 955 }
115+
Reconfiguration: { total = 3186; commits = 381 }
116+
Refactoring: { total = 4862; commits = 504 }
92117
Untouched: { total = 0; commits = 0 }
118+
#Error[conditional macro without expression]: 2
93119
#Error[#else after #else]: 2
94-
#Error[#endif without #if]: 8
95-
#Error[#else or #elif without #if]: 9
96-
#Error[not all annotations closed]: 6
120+
#Error[#else or #elif without #if]: 11
121+
#Error[#endif without #if]: 12
122+
#Error[not all annotations closed]: 8
97123
```
98-
99-
(Note that the above links only have a target after running the verification.)
100-
The processing times might deviate.
124+
125+
Moreover, the results comprise the (LaTeX) tables that are part of our paper and appendix.
126+
The processing times might deviate because performance depends on your hardware.
127+
128+
### (Optional) Running DiffDetective on Custom Datasets
129+
You can also run DiffDetective on other datasets by providing the path to the dataset file as first argument to the execution script:
130+
131+
#### Windows:
132+
`.\execute.bat path\to\custom\dataset.md`
133+
#### Linux/Mac (bash):
134+
`./execute.sh path/to/custom/dataset.md`
135+
136+
The input file must have the same format as the other dataset files (i.e., repositories are listed in a Markdown table). You can find [dataset files](docs/datasets.md) in the [docs](docs) folder.
101137

102138
## Troubleshooting
103139

104140
### 'Got permission denied while trying to connect to the Docker daemon socket'
105141
`Problem:` This is a common problem under Linux, if the user trying to execute Docker commands does not have the permissions to do so.
106142

107-
`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`)
143+
`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`).
108144

109145
### 'Unable to find image 'replication-package:latest' locally'
110146
`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.
111147

112148
`Fix:` Follow the instructions described above in the section `Build the Docker Container`.
113149

114-
### No results after verification, or 'cannot create directory '../results/difftrees': Permission denied'
150+
### No results after verification, or 'cannot create directory '../results/validation/current': Permission denied'
115151
`Problem:` This problem can occur due to how permissions are managed inside the Docker container. More specifically, it will appear, if Docker is executed with elevated permissions (i.e., `sudo`) and if there is no [results](results) directory because it was deleted manually. In this case, Docker will create the directory with elevated permissions, and the Docker user has no permissions to access the directory.
116152

117-
`Fix:` If there is a _results_ directory delete it with elevated permission (e.g., `sudo rm -r results`).
153+
`Fix:` If there is a _results_ directory, delete it with elevated permission (e.g., `sudo rm -r results`).
118154
Then, create a new _results_ directory without elevated permissions, or execute `git restore .` to restore the deleted directory.
155+
156+
### Failed to load class "org.slf4j.impl.StaticLoggerBinder"
157+
`Problem:` An operation within the initialization phase of the logger library we use (tinylog) failed.
158+
159+
`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.

0 commit comments

Comments
 (0)