forked from VariantSync/DiffDetective
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from guethilu/splc23-explanations
Merge Dockerization into thesis branch
- Loading branch information
Showing
14 changed files
with
134 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,74 @@ | ||
# Paper Replication Package | ||
# Explaining Edits to Variability Annotations in Evolving Software Product Lines | ||
|
||
This is the replication package for the paper "Explaining Edits to Variability Annotations in Evolving Software Product Lines". | ||
This is the replication package for our paper _Explaining Edits to Variability Annotations in Evolving Software Product Lines_. | ||
|
||
It contains the adapted DiffDetective implementation used for the evaluation in the paper. | ||
The main change is the edge-adding in the `PaperEvaluationTask`, where variation diffs get extended to edge-typed variation diffs with *Implication* and *Alternative* edges. | ||
This replication package consists of two parts: | ||
|
||
1. **DiffDetective**: For our validation, we modified [_DiffDetective_](https://github.com/VariantSync/DiffDetective), a java library and command-line tool to classify edits to variability in git histories of preprocessor-based software product lines, to extend the variation diffs constructed by _DiffDetective_ to edge-typed variation diffs we introduce in the paper. | ||
2. **Dataset Overview**: We provide an overview of the 44 inspected datasets with updated links to their repositories in the file [docs/datasets.md][dataset]. | ||
|
||
## 1. DiffDetective | ||
DiffDetective is a java library and command-line tool to parse and classify edits to variability in git histories of preprocessor-based software product lines by creating [variation diffs][difftree_class] and operating on them. | ||
|
||
We offer a [Docker](https://www.docker.com/) setup to easily __replicate__ the validation performed in our paper. | ||
In the following, we provide a quickstart guide for running the replication. | ||
You can find detailed information on how to install Docker and build the container in the [INSTALL](INSTALL.md) file, including detailed descriptions of each step and troubleshooting advice. | ||
|
||
### 1.1 Build the Docker container | ||
Start the docker deamon. | ||
Clone this repository. | ||
Open a terminal and navigate to the root directory of this repository. | ||
To build the Docker container you can run the `build` script corresponding to your operating system. | ||
#### Windows: | ||
`.\build.bat` | ||
#### Linux/Mac (bash): | ||
`./build.sh` | ||
|
||
### 1.2 Start the replication | ||
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. | ||
> 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. | ||
> If you want to replicate parts of the evaluation on a subset of the datasets, run the replication on a custom dataset (see below for instructions). | ||
> #### Windows: | ||
> `.\stop-execution.bat` | ||
> #### Linux/Mac (bash): | ||
> `./stop-execution.sh` | ||
You might see warnings or errors reported from SLF4J like `Failed to load class "org.slf4j.impl.StaticLoggerBinder"` which you can safely ignore. | ||
Further troubleshooting advice can be found at the bottom of the [Install](INSTALL.md) file. | ||
|
||
### 1.3 View the results in the [results][resultsdir] directory | ||
All raw results are stored in the [results][resultsdir] directory. | ||
The aggregated results can be found in the following files. | ||
(Note that the links to the results only have a target _after_ running the replication or verification.) | ||
The results consist of general information about the analysed repositories as well as CSV files with entries for every patch analysed, i.e., every source code file changed in a commit. | ||
|
||
|
||
|
||
## 2. Dataset Overview | ||
We provide an overview of the used 44 open-source preprocessor-based software product lines in the [docs/datasets.md][dataset] file, taken from the original [_DiffDetective_](https://github.com/VariantSync/DiffDetective) implementation. | ||
|
||
|
||
## 3. 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. | ||
|
||
[dataset]: docs/datasets.md | ||
|
||
|
||
[resultsdir]: results | ||
|
||
To replicate the evaluation, run the `main` method in `relationshipedges/Validation` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@echo off | ||
setlocal | ||
|
||
set "targetSubPath=splc23-explanations" | ||
|
||
rem Get the current directory | ||
for %%A in ("%CD%") do set "currentDir=%%~nxA" | ||
|
||
rem Check if the current directory ends with the target sub-path | ||
if "%currentDir:~-19%"=="%targetSubPath%" ( | ||
cd ..\.. | ||
docker build -t diff-detective -f replication\splc23-explanations\Dockerfile . | ||
@pause | ||
) else ( | ||
echo error: the script must be run from inside the splc23-explanations directory, i.e., DiffDetective\replication\%targetSubPath% | ||
) | ||
endlocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! /bin/bash | ||
# Assure that the script is only called from the splc23-explanations folder | ||
current_dir=$(pwd) | ||
expected_path="/replication/splc23-explanations" | ||
if [[ ! $current_dir =~ $expected_path ]]; then | ||
echo "error: the script must be run from inside the splc23-explanations directory, i.e., DiffDetective$expected_path" | ||
exit 1 | ||
fi | ||
|
||
# We have to switch to the root directory of the project and build the Docker image from there, | ||
# because Docker only allows access to the files in the current file system subtree (i.e., no access to ancestors). | ||
# We have to do this to get access to 'src', 'docker', 'local-maven-repo', etc. | ||
cd ../.. | ||
|
||
docker build -t diff-detective -f replication/splc23-explanations/Dockerfile . |
File renamed without changes.
0
execute.sh → replication/splc23-explanations/execute.sh
100755 → 100644
File renamed without changes.
File renamed without changes.
0
stop-execution.sh → ...ion/splc23-explanations/stop-execution.sh
100755 → 100644
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters