Skip to content

Commit f16bfe2

Browse files
committed
merge main into develop
2 parents 59f2e8e + 08ec795 commit f16bfe2

532 files changed

Lines changed: 1256 additions & 1256 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: 93 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,125 @@ 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`
4068
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-
```
4969
The results of the verification will be stored in the [results](results) directory.
5070

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

54-
- The [speed statistics](results/validation/speedstatistics.txt) contain information about the total runtime, median runtime, mean runtime, and more:
76+
- The [speed statistics](results/validation/current/speedstatistics.txt) contain information about the total runtime, median runtime, mean runtime, and more:
5577
```
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
78+
#Commits: 24701
79+
Total commit process time is: 14.065916666666668min
80+
Fastest commit process time is: d86e352859e797f6792d6013054435ae0538ef6d___xfig___0ms
81+
Slowest commit process time is: 9838b7032ea9792bec21af424c53c07078636d21___xorg-server___7996ms
82+
Median commit process time is: f77ffeb9b26f49ef66f77929848f2ac9486f1081___tcl___13ms
83+
Average commit process time is: 34.166835350795516ms
6284
```
63-
- The [classification results](results/validation/ultimateresult.metadata.txt) contain information about how often each pattern was found, and more.
85+
- The [classification results](results/validation/current/ultimateresult.metadata.txt) contain information about how often each pattern was matched, and more.
6486
```
6587
repository: <NONE>
66-
total commits: 18046
67-
filtered commits: 593
88+
total commits: 42323
89+
filtered commits: 7425
6890
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
91+
empty commits: 10197
92+
processed commits: 24701
93+
tree diffs: 80751
94+
fastestCommit: 518e205b06d0dc7a0cd35fbc2c6a4376f2959020___xorg-server___0ms
95+
slowestCommit: 9838b7032ea9792bec21af424c53c07078636d21___xorg-server___7996ms
96+
runtime in seconds: 853.9739999999999
97+
runtime with multithreading in seconds: 144.549
98+
treeformat: org.variantsync.diffdetective.diff.difftree.serialize.treeformat.CommitDiffDiffTreeLabelFormat
99+
nodeformat: org.variantsync.diffdetective.mining.formats.ReleaseMiningDiffNodeFormat
100+
edgeformat: org.variantsync.diffdetective.mining.formats.DirectedEdgeLabelFormat with org.variantsync.diffdetective.mining.formats.ReleaseMiningDiffNodeFormat
101+
analysis: org.variantsync.diffdetective.validation.PatternValidationTask
80102
#NON nodes: 0
81103
#ADD nodes: 0
82104
#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 }
105+
filtered because not (is not empty): 212
106+
AddToPC: { total = 443451; commits = 22470 }
107+
AddWithMapping: { total = 51036; commits = 2971 }
108+
RemFromPC: { total = 406809; commits = 21384 }
109+
RemWithMapping: { total = 36622; commits = 2373 }
110+
Specialization: { total = 7949; commits = 1251 }
111+
Generalization: { total = 11057; commits = 955 }
112+
Reconfiguration: { total = 3186; commits = 381 }
113+
Refactoring: { total = 4862; commits = 504 }
92114
Untouched: { total = 0; commits = 0 }
115+
#Error[conditional macro without expression]: 2
93116
#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
117+
#Error[#else or #elif without #if]: 11
118+
#Error[#endif without #if]: 12
119+
#Error[not all annotations closed]: 8
97120
```
98-
99-
(Note that the above links only have a target after running the verification.)
100-
The processing times might deviate.
121+
122+
Moreover, the results comprise the (LaTeX) tables that are part of our paper and appendix.
123+
The processing times might deviate because performance depends on your hardware.
124+
125+
### (Optional) Running DiffDetective on Custom Datasets
126+
You can also run DiffDetective on other datasets by providing the path to the dataset file as first argument to the execution script:
127+
128+
#### Windows:
129+
`.\execute.bat path\to\custom\dataset.md`
130+
#### Linux/Mac (bash):
131+
`./execute.sh path/to/custom/dataset.md`
132+
133+
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.
101134

102135
## Troubleshooting
103136

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

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`)
140+
`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`).
108141

109142
### 'Unable to find image 'replication-package:latest' locally'
110143
`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.
111144

112145
`Fix:` Follow the instructions described above in the section `Build the Docker Container`.
113146

114-
### No results after verification, or 'cannot create directory '../results/difftrees': Permission denied'
147+
### No results after verification, or 'cannot create directory '../results/validation/current': Permission denied'
115148
`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.
116149

117-
`Fix:` If there is a _results_ directory delete it with elevated permission (e.g., `sudo rm -r results`).
150+
`Fix:` If there is a _results_ directory, delete it with elevated permission (e.g., `sudo rm -r results`).
118151
Then, create a new _results_ directory without elevated permissions, or execute `git restore .` to restore the deleted directory.

0 commit comments

Comments
 (0)