Skip to content

Commit

Permalink
Merge pull request #141 from VariantSync/develop
Browse files Browse the repository at this point in the history
Release 2.2.0
  • Loading branch information
pmbittner committed Apr 29, 2024
2 parents 0c1d6c9 + 060495f commit 913e714
Show file tree
Hide file tree
Showing 45 changed files with 2,676 additions and 1,355 deletions.
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ Next, build DiffDetective and install it on your system so that you can access i
mvn install
```

To add DiffDetective as a dependency to your own project, add the following snippet to the pom.xml of your Maven project, but make sure to pick the right version number. You can find the version number of DiffDetective at the top of the pom.xml file of DiffDetective.
To add DiffDetective as a dependency to your own project, add the following snippet to the pom.xml of your Maven project, but make sure to pick the right version number. The current version number can be obtained by running `scripts/version.sh`

```xml
<dependency>
<groupId>org.variantsync</groupId>
<artifactId>DiffDetective</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
</dependency>
```

If you prefer to just use a jar file, you can find a jar file with all dependencies at `DiffDetective/target/diffdetective-2.1.0-jar-with-dependencies.jar` (again, the version number might be different).
If you prefer to just use a jar file, you can find a jar file with all dependencies at `DiffDetective/target/diffdetective-2.2.0-jar-with-dependencies.jar` (again, the version number might be different).
You can (re-)produce this jar file by either running `mvn package` or `mvn install` within you local clone of DiffDetective.

> Disclaimer: Setup tested with maven version 3.6.3.
Expand All @@ -74,7 +74,7 @@ Afterward, the [result](result) symlink points to the [Javadoc](result/share/git

## How to Get Started

For a demonstration on how to get started using the library, we have prepared a demo repository [here](https://github.com/VariantSync/DiffDetective-Demo).
For a demonstration on how to get started using the library, we have prepared a demo repository [here][demo].
You may clone it as a template and example for including the library into your own projects.
Additionally, there is a screencast available on YouTube, guiding you through the demo's setup and source code:

Expand All @@ -83,13 +83,23 @@ Additionally, there is a screencast available on YouTube, guiding you through th

## Publications

### Variability-Aware Differencing with DiffDetective (FSE 2024)

[![Preprint](https://img.shields.io/badge/Preprint-Read-purple)](https://github.com/VariantSync/DiffDetective-Demo/blob/raw/Variability-Aware%20Differencing%20with%20DiffDetective.pdf)
[![Screencast](https://img.shields.io/badge/Screencast-Watch-purple)][screencast]
[![Demo Repository](https://img.shields.io/badge/Demo-Try-blue)][demo]

> P. M. Bittner, A. Schultheiß, B. Moosherr, T. Kehrer, T. Thüm. _Variability-Aware Differencing with DiffDetective_. Demonstrations at International Conference on the Foundations of Software Engineering 2024, ACM, New York, NY, July 2024
This paper gives an overview of DiffDetective, its design, features, use-cases, and past case studies. We recommend reading this paper if you are interested in the design of DiffDetective or if you consider using it for your own projects or research. The paper is accompanied by a [demo project][demo] as well as a [screencast][screencast] (see `How to Get Started` above).

### Classifying Edits to Variability in Source Code (ESEC/FSE 2022)

[![Preprint](https://img.shields.io/badge/Preprint-Read-purple)](https://github.com/SoftVarE-Group/Papers/raw/main/2022/2022-ESECFSE-Bittner.pdf)
[![Paper](https://img.shields.io/badge/Paper-Read-purple)](https://dl.acm.org/doi/10.1145/3540250.3549108)
[![Talk](https://img.shields.io/badge/Talk-Watch-purple)](https://www.youtube.com/watch?v=EnDx1AWxD24)
[![Original Replication Package](https://img.shields.io/badge/Replication_Package-Original-blue)](https://github.com/VariantSync/DiffDetective/tree/esecfse22)
[![Updated Replication Package](https://img.shields.io/badge/Replication_Package-Updated-blue)](replication/esecfse22/README.md)
[![Updated Replication Package](https://img.shields.io/badge/Replication_Package-Updated-blue)](replication/esecfse22/)
[![Artifact DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7110095.svg)](https://doi.org/10.5281/zenodo.7110095)

> P. M. Bittner, C.Tinnes, A. Schultheiß, S. Viegener, T. Kehrer, T. Thüm. _Classifying Edits to Variability in Source Code_. In Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE 2022), ACM, New York, NY, November 2022
Expand All @@ -110,7 +120,7 @@ The original replication package can be found on the [esecfse](https://github.co
[![Preprint](https://img.shields.io/badge/Preprint-Read-purple)](https://github.com/SoftVarE-Group/Papers/raw/main/2023/2023-SPLC-Bittner.pdf)
[![Paper](https://img.shields.io/badge/Paper-Read-purple)](https://dl.acm.org/doi/10.1145/3579027.3608985)
[![Original Replication Package](https://img.shields.io/badge/Replication_Package-Original-blue)](https://github.com/VariantSync/DiffDetective/tree/splc23-views/replication/splc23-views)
[![Updated Replication Package](https://img.shields.io/badge/Replication_Package-Updated-blue)](replication/splc23-views/README.md)
[![Updated Replication Package](https://img.shields.io/badge/Replication_Package-Updated-blue)](replication/splc23-views/)
[![Artifact DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8027920.svg)](https://doi.org/10.5281/zenodo.8027920)

> P. M. Bittner, A. Schultheiß, S. Greiner, B. Moosherr, S. Krieter, C. Tinnes, T. Kehrer, T. Thüm. _Views on Edits to Variational Software_. In Proceedings of the 27th ACM International Systems and Software Product Line Conference (SPLC 2023), ACM, New York, NY, August 2023
Expand Down Expand Up @@ -156,3 +166,5 @@ DiffDetective was extended and used within bachelor's and master's theses:
[documentation]: https://variantsync.github.io/DiffDetective/docs/javadoc
[website]: https://variantsync.github.io/DiffDetective/
[forklg]: https://github.com/guethilu/DiffDetective
[demo]: https://github.com/VariantSync/DiffDetective-Demo
[screencast]: https://www.youtube.com/watch?v=q6ight5EDQY
32 changes: 18 additions & 14 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,27 @@
doCheck ? true,
buildGitHubPages ? true,
}:
pkgs.stdenv.mkDerivation rec {
pkgs.stdenvNoCC.mkDerivation rec {
pname = "DiffDetective";
version = "2.1.0";
# The single source of truth for the version number is stored in `pom.xml`.
# Hence, this XML file needs to be parsed to extract the current version.
version = pkgs.lib.removeSuffix "\n" (pkgs.lib.readFile
(pkgs.runCommandLocal "DiffDetective-version" {}
"${pkgs.xq-xml}/bin/xq -x '/project/version' ${./pom.xml} > $out"));
src = with pkgs.lib.fileset;
toSource {
root = ./.;
# This should be `gitTracked ./.`. However, this currently doesn't accept
# shallow repositories as used in GitHub CI.
fileset =
(import (sources.nixpkgs + "/lib/fileset/internal.nix") {inherit (pkgs) lib;})._fromFetchGit
"gitTracked"
"argument"
./.
{shallow = true;};
fileset = gitTracked ./.;
};

nativeBuildInputs = with pkgs; [
maven
makeWrapper
graphviz
(ruby.withPackages (pkgs: with pkgs; [github-pages jekyll-theme-cayman]))
];
] ++ pkgs.lib.optional buildGitHubPages (ruby.withPackages (pkgs: with pkgs; [
github-pages
jekyll-theme-cayman
]));

mavenRepo = pkgs.stdenv.mkDerivation {
pname = "${pname}-mavenRepo";
Expand Down Expand Up @@ -60,6 +59,10 @@ pkgs.stdenv.mkDerivation rec {
outputHash = "sha256-Gimt6L54yyaX3BtdhQlVu1j4c4y++Mip0GzMl/IfzMc=";
};

jre-minimal = pkgs.callPackage (import "${sources.nixpkgs}/pkgs/development/compilers/openjdk/jre.nix") {
modules = ["java.base" "java.desktop"];
};

buildPhase = ''
runHook preBuild
Expand All @@ -74,6 +77,7 @@ pkgs.stdenv.mkDerivation rec {
then ''
mvn javadoc:javadoc
JEKYLL_ENV=production PAGES_REPO_NWO=VariantSync/DiffDetective JEKYLL_BUILD_REVISION= github-pages build
rm -rf _site/target
''
else ""
}
Expand All @@ -96,8 +100,8 @@ pkgs.stdenv.mkDerivation rec {
local jar="$out/share/java/DiffDetective/DiffDetective.jar"
install -Dm644 "target/diffdetective-${version}-jar-with-dependencies.jar" "$jar"
makeWrapper "${pkgs.jdk}/bin/java" "$out/bin/DiffDetective" --add-flags "-cp \"$jar\"" \
--prefix PATH : "${pkgs.graphviz}"
makeWrapper "${jre-minimal}/bin/java" "$out/bin/DiffDetective" --add-flags "-cp \"$jar\"" \
--prefix PATH : "${pkgs.graphviz}/bin"
${
if buildGitHubPages
Expand Down
6 changes: 3 additions & 3 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"homepage": null,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a77ab169a83a4175169d78684ddd2e54486ac651",
"sha256": "0r9a87aqhqr7dkhfy5zrx2dgqq11ma2rfvkfwqhz1xqg7y6mcxxg",
"rev": "6832d0d99649db3d65a0e15fa51471537b2c56a6",
"sha256": "1ww2vrgn8xrznssbd05hdlr3d4br6wbjlqprys1al8ahxkyl5syi",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/a77ab169a83a4175169d78684ddd2e54486ac651.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/6832d0d99649db3d65a0e15fa51471537b2c56a6.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
14 changes: 9 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@

<groupId>org.variantsync</groupId>
<artifactId>diffdetective</artifactId>
<version>2.1.0</version>
<!-- The DiffDetective version, needs to be the first version tag in this file. -->
<version>2.2.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<!-- Override the time stamps of build artifacts to ensure reproducibility -->
<project.build.outputTimestamp>1</project.build.outputTimestamp>
</properties>

<build>
Expand All @@ -24,6 +27,7 @@
<configuration>
<reportOutputDirectory>docs</reportOutputDirectory>
<destDir>javadoc</destDir>
<show>private</show>
<quiet>true</quiet>
</configuration>
</plugin>
Expand Down Expand Up @@ -94,16 +98,16 @@
<groupId>org.sat4j</groupId>
<artifactId>core</artifactId>
<version>2.3.5</version>
<!-- <scope>system</scope>-->
<!-- <systemPath>${project.basedir}/lib/org.sat4j.core.jar</systemPath>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${project.basedir}/lib/org.sat4j.core.jar</systemPath>-->
</dependency>

<dependency>
<groupId>de.ovgu</groupId>
<artifactId>featureide.lib.fm</artifactId>
<version>3.8.1</version>
<!-- <scope>system</scope>-->
<!-- <systemPath>${project.basedir}/lib/de.ovgu.featureide.lib.fm-v3.8.1.jar</systemPath>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${project.basedir}/lib/de.ovgu.featureide.lib.fm-v3.8.1.jar</systemPath>-->
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion replication/esecfse22/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ WORKDIR /home/sherlock
# Copy the compiled JAR file from the first stage into the second stage
# Syntax: COPY --from=STAGE_ID SOURCE_PATH TARGET_PATH
WORKDIR /home/sherlock/holmes
COPY --from=0 /home/user/target/diffdetective-2.1.0-jar-with-dependencies.jar ./DiffDetective.jar
COPY --from=0 /home/user/target/diffdetective-*-jar-with-dependencies.jar ./DiffDetective.jar
WORKDIR /home/sherlock
RUN mkdir results

Expand Down
2 changes: 1 addition & 1 deletion replication/splc23-views/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ WORKDIR /home/sherlock
# Copy the compiled JAR file from the first stage into the second stage
# Syntax: COPY --from=STAGE_ID SOURCE_PATH TARGET_PATH
WORKDIR /home/sherlock/holmes
COPY --from=0 /home/user/target/diffdetective-2.1.0-jar-with-dependencies.jar ./DiffDetective.jar
COPY --from=0 /home/user/target/diffdetective-*-jar-with-dependencies.jar ./DiffDetective.jar
WORKDIR /home/sherlock

# Copy the setup
Expand Down
8 changes: 6 additions & 2 deletions scripts/genUltimateResults.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
resultsdir=$1
#!/usr/bin/env bash

java -cp "target/diffdetective-2.1.0-jar-with-dependencies.jar" org.variantsync.diffdetective.tablegen.MiningResultAccumulator $resultsdir $resultsdir
resultsdir="$1"

cd "$(dirname "${BASH_SOURCE[0]}")/.." || exit 1

java -cp "target/diffdetective-$(./scripts/version.sh)-jar-with-dependencies.jar" org.variantsync.diffdetective.tablegen.MiningResultAccumulator "$resultsdir" "$resultsdir" &&
echo "genUltimateResults.sh DONE"
6 changes: 5 additions & 1 deletion scripts/runValidation.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
java -cp "target/diffdetective-2.1.0-jar-with-dependencies.jar" org.variantsync.diffdetective.validation.EditClassValidation
#!/usr/bin/env bash

cd "$(dirname "${BASH_SOURCE[0]}")/.." || exit 1

java -cp "target/diffdetective-$(./scripts/version.sh)-jar-with-dependencies.jar" org.variantsync.diffdetective.validation.EditClassValidation &&
echo "runValidation.sh DONE"
6 changes: 5 additions & 1 deletion scripts/runViewFeasibilityStudy.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
java -cp "target/diffdetective-2.1.0-jar-with-dependencies.jar" org.variantsync.diffdetective.experiments.views.Main "docs/datasets/views.md"
#!/usr/bin/env bash

cd "$(dirname "${BASH_SOURCE[0]}")/.." || exit 1

java -cp "target/diffdetective-$(./scripts/version.sh)-jar-with-dependencies.jar" org.variantsync.diffdetective.experiments.views.Main "docs/datasets/views.md" &&
echo "runValidation.sh DONE"
6 changes: 6 additions & 0 deletions scripts/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

cd "$(dirname "${BASH_SOURCE[0]}")/.."

# extracts the first version tag in pom.xml
sed -n '/<version/ {s/.*version>\(.*\)<\/version.*/\1/; p; q}' pom.xml
Loading

0 comments on commit 913e714

Please sign in to comment.