|
| 1 | +# Installation |
| 2 | +## Installation Instructions |
| 3 | +In the following, we describe how to build the Docker image and run the experiments in Docker containers. |
| 4 | + |
| 5 | +### Install Docker (if required) |
| 6 | +How to install Docker depends on your operating system. |
| 7 | + |
| 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. |
| 13 | +Docker's [documentation](https://docs.docker.com/engine/install/) contains instructions for common distributions. |
| 14 | + |
| 15 | +### Open a Suitable Terminal |
| 16 | +``` |
| 17 | +# Windows Command Prompt: |
| 18 | + - Press 'Windows Key + R' on your keyboard |
| 19 | + - Type in 'cmd' |
| 20 | + - Click 'OK' or press 'Enter' on your keyboard |
| 21 | + |
| 22 | +# Windows PowerShell: |
| 23 | + - Open the search bar (Default: 'Windows Key') and search for 'PowerShell' |
| 24 | + - Start the PowerShell |
| 25 | + |
| 26 | +# Linux: |
| 27 | + - Press 'ctrl + alt + T' on your keyboard |
| 28 | +``` |
| 29 | + |
| 30 | +### Build the Docker Container |
| 31 | +To build the Docker container you can run the build script corresponding to your OS |
| 32 | +``` |
| 33 | +# Windows: |
| 34 | + .\build.bat |
| 35 | +# Linux/Mac (bash): |
| 36 | + ./build.sh |
| 37 | +``` |
| 38 | + |
| 39 | +## Validation & Expected Output |
| 40 | + |
| 41 | +### Running the Validation |
| 42 | +To run the validation you can run the script corresponding to your OS with `validation` as first argument. The validation should take about 10-20 minutes depending on your hardware. |
| 43 | +``` |
| 44 | +# Windows: |
| 45 | + .\execute.bat validation |
| 46 | +# Linux/Mac (bash): |
| 47 | + ./execute.sh validation |
| 48 | +``` |
| 49 | +The results of the validation will be stored in the [results](results) directory. |
| 50 | + |
| 51 | +### Expected Output of the Validation |
| 52 | +The aggregated results of the validation can be found in the following files. |
| 53 | + |
| 54 | +- The [speed statistics](results/difftrees/speedstatistics.txt) contain information about the total runtime, median runtime, mean runtime, and more: |
| 55 | + ``` |
| 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 |
| 62 | + ``` |
| 63 | +- The [classification results](results/difftrees/ultimateresult.metadata.txt) contain information about how often each pattern was found, and more. |
| 64 | + ``` |
| 65 | + repository: <NONE> |
| 66 | + total commits: 18046 |
| 67 | + filtered commits: 593 |
| 68 | + 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 |
| 80 | + #NON nodes: 0 |
| 81 | + #ADD nodes: 0 |
| 82 | + #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 } |
| 92 | + Untouched: { total = 0; commits = 0 } |
| 93 | + #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 |
| 97 | + ``` |
| 98 | + |
| 99 | +(Note that the above links only have a target after running the validation.) |
| 100 | +The processing times might deviate. |
| 101 | + |
| 102 | +## Troubleshooting |
| 103 | + |
| 104 | +### 'Got permission denied while trying to connect to the Docker daemon socket' |
| 105 | +`Problem:` This is a common problem under Linux, if the user trying to execute Docker commands does not have the permissions to do so. |
| 106 | + |
| 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`) |
| 108 | + |
| 109 | +### 'Unable to find image 'replication-package:latest' locally' |
| 110 | +`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. |
| 111 | + |
| 112 | +`Fix:` Follow the instructions described above in the section `Build the Docker Container`. |
| 113 | + |
| 114 | +### No results after validation, or 'cannot create directory '../results/difftrees': Permission denied' |
| 115 | +`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. |
| 116 | + |
| 117 | +`Fix:` If there is a _results_ directory delete it with elevated permission (e.g., `sudo rm -r results`). |
| 118 | +Then, create a new _results_ directory without elevated permissions, or execute `git restore .` to restore the deleted directory. |
0 commit comments