Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
6a99a9a
validation replication script
pmbittner Jun 22, 2022
c9d0e5d
Merge branch 'main' of github.com:VariantSync/DiffDetective into main
pmbittner Jun 22, 2022
b07d5ae
Merge branch 'main' of github.com:VariantSync/DiffDetective into main
pmbittner Jun 27, 2022
f441374
Revised INSTALL.md of proofs
AlexanderSchultheiss Jul 6, 2022
a785132
Revised STATUS.md
AlexanderSchultheiss Jul 6, 2022
ccfbbf2
set links to now public repository
pmbittner Jul 6, 2022
d4f54d3
Merge remote-tracking branch 'origin/esecfse' into esecfse
pmbittner Jul 6, 2022
f5b6dcb
Set theme jekyll-theme-cayman
pmbittner Jul 6, 2022
9242ad2
Set theme jekyll-theme-cayman
pmbittner Jul 6, 2022
a3e3f97
Create maven.yml
AlexanderSchultheiss Jul 6, 2022
341e9e9
Update maven.yml
AlexanderSchultheiss Jul 6, 2022
b6d2da1
Merge pull request #44 from VariantSync/main
AlexanderSchultheiss Jul 6, 2022
ef566ea
javadoc
pmbittner Jul 6, 2022
a2c01ca
Merge remote-tracking branch 'origin/esecfse' into esecfse
pmbittner Jul 6, 2022
92e2dbd
badges and link updates
pmbittner Jul 6, 2022
44adbb6
Update README.md
AlexanderSchultheiss Jul 6, 2022
9ab5806
Bump zip4j from 2.9.1 to 2.10.0
dependabot[bot] Jul 6, 2022
ad457f9
Merge pull request #45 from VariantSync/dependabot/maven/net.lingala.…
pmbittner Jul 6, 2022
126859e
Merge branch 'main' into esecfse
pmbittner Jul 6, 2022
f89d523
updated links
pmbittner Jul 6, 2022
9617992
Set theme jekyll-theme-cayman
pmbittner Jul 6, 2022
6d4eda8
fix: update run configurations to new default validation output direc…
pmbittner Jul 8, 2022
94d3e4d
fix: better headline for generated tables
pmbittner Jul 8, 2022
ed52299
Merge branch 'main' of github.com:VariantSync/DiffDetective into main
pmbittner Jul 8, 2022
a4a6183
Merge branch 'esecfse22' into main
pmbittner Jul 8, 2022
d2f7689
refactoring: move runValidation.sh
pmbittner Jul 8, 2022
1d56ad8
docs: improved documentation of DiffNode and DiffTree, added interest…
pmbittner Jul 8, 2022
45fcd8d
docs: minor improvements
pmbittner Jul 8, 2022
0f35c0f
docs: implemented feedback by ibbem
pmbittner Jul 11, 2022
9e7e2ae
docs: implemented feedback by chtinnes
pmbittner Jul 11, 2022
6b05b21
docs: refined install instructions
pmbittner Jul 11, 2022
d02f8c0
docs: results update
pmbittner Jul 11, 2022
c35b7c8
docs: appendix update
pmbittner Jul 11, 2022
dec0eb4
docs: minor refinements
pmbittner Jul 11, 2022
c089bfb
docs: added note on custom datasets to STATUS.md
pmbittner Jul 11, 2022
27493a4
docs: minor fixes
pmbittner Jul 11, 2022
8cf85f6
fix: always export path in linegraphs in unix style for OS interopera…
pmbittner Jul 11, 2022
eb0b0c4
ascii characters for showing formulas to support more terminals
pmbittner Jul 11, 2022
6c07d58
add doi
pmbittner Jul 11, 2022
520b790
add badge application badge
pmbittner Jul 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 26 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
9 changes: 0 additions & 9 deletions .run/DiffTreeMiner.run.xml

This file was deleted.

6 changes: 4 additions & 2 deletions .run/GenAutomationResults.run.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="GenAutomationResults" type="Application" factoryName="Application">
<option name="ALTERNATIVE_JRE_PATH" value="openjdk-16" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="MAIN_CLASS_NAME" value="org.variantsync.diffdetective.validation.FindMedianCommitTime" />
<module name="DiffDetective" />
<option name="PROGRAM_PARAMETERS" value="results/difftrees" />
<module name="diffdetective" />
<option name="PROGRAM_PARAMETERS" value="results/validation/current" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="mining.*" />
Expand Down
6 changes: 4 additions & 2 deletions .run/GenUltimateResults.run.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="GenUltimateResults" type="Application" factoryName="Application">
<option name="ALTERNATIVE_JRE_PATH" value="openjdk-16" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="MAIN_CLASS_NAME" value="org.variantsync.diffdetective.tablegen.MiningResultAccumulator" />
<module name="DiffDetective" />
<option name="PROGRAM_PARAMETERS" value="results/difftrees results/difftrees/" />
<module name="diffdetective" />
<option name="PROGRAM_PARAMETERS" value="results/validation/current results/validation/current" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="mining.*" />
Expand Down
2 changes: 1 addition & 1 deletion .run/Validation.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Validation" type="Application" factoryName="Application" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="org.variantsync.diffdetective.validation.Validation" />
<module name="DiffDetective" />
<module name="diffdetective" />
<method v="2">
<option name="Make" enabled="true" />
</method>
Expand Down
153 changes: 93 additions & 60 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Installation
## Installation Instructions
In the following, we describe how to build the Docker image and run the experiments in Docker containers.
In the following, we describe how to replicate the validation from our paper (Section 5) step-by-step.
The instructions explain how to build the Docker image and run the validation in a Docker container.

### Install Docker (if required)
How to install Docker depends on your operating system.
### 1. Install Docker (if required)
How to install Docker depends on your operating system:

#### Windows or Mac
You can find download and installation instructions [here](https://www.docker.com/get-started).

#### Linux Distributions
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.
- _Windows or Mac_: You can find download and installation instructions [here](https://www.docker.com/get-started).
- _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.
Docker's [documentation](https://docs.docker.com/engine/install/) contains instructions for common distributions.

### Open a Suitable Terminal
Then, start the docker deamon.

### 2. Open a Suitable Terminal
```
# Windows Command Prompt:
- Press 'Windows Key + R' on your keyboard
Expand All @@ -27,92 +27,125 @@ Docker's [documentation](https://docs.docker.com/engine/install/) contains instr
- Press 'ctrl + alt + T' on your keyboard
```

### Build the Docker Container
To build the Docker container you can run the build script corresponding to your OS
Clone this repository to a directory of your choice using git:
```shell
git clone https://github.com/VariantSync/DiffDetective.git
```
Then, navigate to the root of your local clone of this repository:
```shell
cd DiffDetective
```

### 3. Build the Docker Container
To build the Docker container you can run the `build` script corresponding to your operating system:
```
# Windows:
.\build.bat
# Linux/Mac (bash):
./build.sh
```

## Verification & Expected Output
## 4. Verification & Replication

### Running the Replication or Verification
To execute the replication you can run the `execute` script corresponding to your operating system with `replication` as first argument.

#### Windows:
`.\execute.bat replication`
#### Linux/Mac (bash):
`./execute.sh replication`

> WARNING!
> The replication will at least require an hour and might require up to a day depending on your system.
> Therefore, we offer a short verification (5-10 minutes) which runs DiffDetective on only four of the datasets.
> You can run it by providing "verification" as argument instead of "replication" (i.e., `.\execute.bat verification`, `./execute.sh verification`).
> If you want to stop the execution, you can call the provided script for stopping the container in a separate terminal.
> When restarted, the execution will continue processing by restarting at the last unfinished repository.
> #### Windows:
> `.\stop-execution.bat`
> #### Linux/Mac (bash):
> `./stop-execution.sh`

### Running the Verification
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.
```
# Windows:
.\execute.bat verification
# Linux/Mac (bash):
./execute.sh verification
```
The results of the verification will be stored in the [results](results) directory.

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

- The [speed statistics](results/validation/speedstatistics.txt) contain information about the total runtime, median runtime, mean runtime, and more:
- The [speed statistics](results/validation/current/speedstatistics.txt) contain information about the total runtime, median runtime, mean runtime, and more:
```
#Commits: 14527
Total commit process time is: 12.427866666666667min
Fastest commit process time is: df4a1fa9c5cc5d54a9347a2bf4843cae87a942f1___xorg-server___0ms
Slowest commit process time is: 9838b7032ea9792bec21af424c53c07078636d21___xorg-server___14578ms
Median commit process time is: 6dc71f6b2c7ff49adb504426b4cd206e4745e1e3___xorg-server___19ms
Average commit process time is: 51.330075032697735ms
#Commits: 24701
Total commit process time is: 14.065916666666668min
Fastest commit process time is: d86e352859e797f6792d6013054435ae0538ef6d___xfig___0ms
Slowest commit process time is: 9838b7032ea9792bec21af424c53c07078636d21___xorg-server___7996ms
Median commit process time is: f77ffeb9b26f49ef66f77929848f2ac9486f1081___tcl___13ms
Average commit process time is: 34.166835350795516ms
```
- The [classification results](results/validation/ultimateresult.metadata.txt) contain information about how often each pattern was found, and more.
- The [classification results](results/validation/current/ultimateresult.metadata.txt) contain information about how often each pattern was matched, and more.
```
repository: <NONE>
total commits: 18046
filtered commits: 593
total commits: 42323
filtered commits: 7425
failed commits: 0
empty commits: 2926
processed commits: 14527
tree diffs: 55008
fastestCommit: df4a1fa9c5cc5d54a9347a2bf4843cae87a942f1___xorg-server___0ms
slowestCommit: 9838b7032ea9792bec21af424c53c07078636d21___xorg-server___14578ms
runtime in seconds: 747.5400000000001
runtime with multithreading in seconds: 137.22
treeformat: diff.difftree.serialize.treeformat.CommitDiffDiffTreeLabelFormat
nodeformat: mining.formats.ReleaseMiningDiffNodeFormat
edgeformat: mining.formats.DirectedEdgeLabelFormat with mining.formats.ReleaseMiningDiffNodeFormat
analysis: mining.strategies.PatternValidation
empty commits: 10197
processed commits: 24701
tree diffs: 80751
fastestCommit: 518e205b06d0dc7a0cd35fbc2c6a4376f2959020___xorg-server___0ms
slowestCommit: 9838b7032ea9792bec21af424c53c07078636d21___xorg-server___7996ms
runtime in seconds: 853.9739999999999
runtime with multithreading in seconds: 144.549
treeformat: org.variantsync.diffdetective.diff.difftree.serialize.treeformat.CommitDiffDiffTreeLabelFormat
nodeformat: org.variantsync.diffdetective.mining.formats.ReleaseMiningDiffNodeFormat
edgeformat: org.variantsync.diffdetective.mining.formats.DirectedEdgeLabelFormat with org.variantsync.diffdetective.mining.formats.ReleaseMiningDiffNodeFormat
analysis: org.variantsync.diffdetective.validation.PatternValidationTask
#NON nodes: 0
#ADD nodes: 0
#REM nodes: 0
filtered because not (is not empty): 132
AddToPC: { total = 260536; commits = 12703 }
AddWithMapping: { total = 27720; commits = 1447 }
RemFromPC: { total = 235017; commits = 11830 }
RemWithMapping: { total = 15381; commits = 1361 }
Specialization: { total = 4662; commits = 624 }
Generalization: { total = 7397; commits = 564 }
Reconfiguration: { total = 2231; commits = 258 }
Refactoring: { total = 5769; commits = 921 }
filtered because not (is not empty): 212
AddToPC: { total = 443451; commits = 22470 }
AddWithMapping: { total = 51036; commits = 2971 }
RemFromPC: { total = 406809; commits = 21384 }
RemWithMapping: { total = 36622; commits = 2373 }
Specialization: { total = 7949; commits = 1251 }
Generalization: { total = 11057; commits = 955 }
Reconfiguration: { total = 3186; commits = 381 }
Refactoring: { total = 4862; commits = 504 }
Untouched: { total = 0; commits = 0 }
#Error[conditional macro without expression]: 2
#Error[#else after #else]: 2
#Error[#endif without #if]: 8
#Error[#else or #elif without #if]: 9
#Error[not all annotations closed]: 6
#Error[#else or #elif without #if]: 11
#Error[#endif without #if]: 12
#Error[not all annotations closed]: 8
```

(Note that the above links only have a target after running the verification.)
The processing times might deviate.

Moreover, the results comprise the (LaTeX) tables that are part of our paper and appendix.
The processing times might deviate because performance depends on your hardware.

### (Optional) Running DiffDetective on Custom Datasets
You can also run DiffDetective on other datasets by providing the path to the dataset file as first argument to the execution script:

#### Windows:
`.\execute.bat path\to\custom\dataset.md`
#### Linux/Mac (bash):
`./execute.sh path/to/custom/dataset.md`

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.

## Troubleshooting

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

`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`)
`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`).

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

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

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

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