Skip to content

Commit 913e714

Browse files
authored
Merge pull request #141 from VariantSync/develop
Release 2.2.0
2 parents 0c1d6c9 + 060495f commit 913e714

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2676
-1355
lines changed

README.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ Next, build DiffDetective and install it on your system so that you can access i
4444
mvn install
4545
```
4646

47-
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.
47+
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`
4848

4949
```xml
5050
<dependency>
5151
<groupId>org.variantsync</groupId>
5252
<artifactId>DiffDetective</artifactId>
53-
<version>2.1.0</version>
53+
<version>2.2.0</version>
5454
</dependency>
5555
```
5656

57-
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).
57+
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).
5858
You can (re-)produce this jar file by either running `mvn package` or `mvn install` within you local clone of DiffDetective.
5959

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

7575
## How to Get Started
7676

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

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

8484
## Publications
8585

86+
### Variability-Aware Differencing with DiffDetective (FSE 2024)
87+
88+
[![Preprint](https://img.shields.io/badge/Preprint-Read-purple)](https://github.com/VariantSync/DiffDetective-Demo/blob/raw/Variability-Aware%20Differencing%20with%20DiffDetective.pdf)
89+
[![Screencast](https://img.shields.io/badge/Screencast-Watch-purple)][screencast]
90+
[![Demo Repository](https://img.shields.io/badge/Demo-Try-blue)][demo]
91+
92+
> 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
93+
94+
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).
95+
8696
### Classifying Edits to Variability in Source Code (ESEC/FSE 2022)
8797

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

95105
> 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
@@ -110,7 +120,7 @@ The original replication package can be found on the [esecfse](https://github.co
110120
[![Preprint](https://img.shields.io/badge/Preprint-Read-purple)](https://github.com/SoftVarE-Group/Papers/raw/main/2023/2023-SPLC-Bittner.pdf)
111121
[![Paper](https://img.shields.io/badge/Paper-Read-purple)](https://dl.acm.org/doi/10.1145/3579027.3608985)
112122
[![Original Replication Package](https://img.shields.io/badge/Replication_Package-Original-blue)](https://github.com/VariantSync/DiffDetective/tree/splc23-views/replication/splc23-views)
113-
[![Updated Replication Package](https://img.shields.io/badge/Replication_Package-Updated-blue)](replication/splc23-views/README.md)
123+
[![Updated Replication Package](https://img.shields.io/badge/Replication_Package-Updated-blue)](replication/splc23-views/)
114124
[![Artifact DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8027920.svg)](https://doi.org/10.5281/zenodo.8027920)
115125

116126
> 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
@@ -156,3 +166,5 @@ DiffDetective was extended and used within bachelor's and master's theses:
156166
[documentation]: https://variantsync.github.io/DiffDetective/docs/javadoc
157167
[website]: https://variantsync.github.io/DiffDetective/
158168
[forklg]: https://github.com/guethilu/DiffDetective
169+
[demo]: https://github.com/VariantSync/DiffDetective-Demo
170+
[screencast]: https://www.youtube.com/watch?v=q6ight5EDQY

default.nix

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,27 @@
1010
doCheck ? true,
1111
buildGitHubPages ? true,
1212
}:
13-
pkgs.stdenv.mkDerivation rec {
13+
pkgs.stdenvNoCC.mkDerivation rec {
1414
pname = "DiffDetective";
15-
version = "2.1.0";
15+
# The single source of truth for the version number is stored in `pom.xml`.
16+
# Hence, this XML file needs to be parsed to extract the current version.
17+
version = pkgs.lib.removeSuffix "\n" (pkgs.lib.readFile
18+
(pkgs.runCommandLocal "DiffDetective-version" {}
19+
"${pkgs.xq-xml}/bin/xq -x '/project/version' ${./pom.xml} > $out"));
1620
src = with pkgs.lib.fileset;
1721
toSource {
1822
root = ./.;
19-
# This should be `gitTracked ./.`. However, this currently doesn't accept
20-
# shallow repositories as used in GitHub CI.
21-
fileset =
22-
(import (sources.nixpkgs + "/lib/fileset/internal.nix") {inherit (pkgs) lib;})._fromFetchGit
23-
"gitTracked"
24-
"argument"
25-
./.
26-
{shallow = true;};
23+
fileset = gitTracked ./.;
2724
};
2825

2926
nativeBuildInputs = with pkgs; [
3027
maven
3128
makeWrapper
3229
graphviz
33-
(ruby.withPackages (pkgs: with pkgs; [github-pages jekyll-theme-cayman]))
34-
];
30+
] ++ pkgs.lib.optional buildGitHubPages (ruby.withPackages (pkgs: with pkgs; [
31+
github-pages
32+
jekyll-theme-cayman
33+
]));
3534

3635
mavenRepo = pkgs.stdenv.mkDerivation {
3736
pname = "${pname}-mavenRepo";
@@ -60,6 +59,10 @@ pkgs.stdenv.mkDerivation rec {
6059
outputHash = "sha256-Gimt6L54yyaX3BtdhQlVu1j4c4y++Mip0GzMl/IfzMc=";
6160
};
6261

62+
jre-minimal = pkgs.callPackage (import "${sources.nixpkgs}/pkgs/development/compilers/openjdk/jre.nix") {
63+
modules = ["java.base" "java.desktop"];
64+
};
65+
6366
buildPhase = ''
6467
runHook preBuild
6568
@@ -74,6 +77,7 @@ pkgs.stdenv.mkDerivation rec {
7477
then ''
7578
mvn javadoc:javadoc
7679
JEKYLL_ENV=production PAGES_REPO_NWO=VariantSync/DiffDetective JEKYLL_BUILD_REVISION= github-pages build
80+
rm -rf _site/target
7781
''
7882
else ""
7983
}
@@ -96,8 +100,8 @@ pkgs.stdenv.mkDerivation rec {
96100
97101
local jar="$out/share/java/DiffDetective/DiffDetective.jar"
98102
install -Dm644 "target/diffdetective-${version}-jar-with-dependencies.jar" "$jar"
99-
makeWrapper "${pkgs.jdk}/bin/java" "$out/bin/DiffDetective" --add-flags "-cp \"$jar\"" \
100-
--prefix PATH : "${pkgs.graphviz}"
103+
makeWrapper "${jre-minimal}/bin/java" "$out/bin/DiffDetective" --add-flags "-cp \"$jar\"" \
104+
--prefix PATH : "${pkgs.graphviz}/bin"
101105
102106
${
103107
if buildGitHubPages

nix/sources.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"homepage": null,
66
"owner": "NixOS",
77
"repo": "nixpkgs",
8-
"rev": "a77ab169a83a4175169d78684ddd2e54486ac651",
9-
"sha256": "0r9a87aqhqr7dkhfy5zrx2dgqq11ma2rfvkfwqhz1xqg7y6mcxxg",
8+
"rev": "6832d0d99649db3d65a0e15fa51471537b2c56a6",
9+
"sha256": "1ww2vrgn8xrznssbd05hdlr3d4br6wbjlqprys1al8ahxkyl5syi",
1010
"type": "tarball",
11-
"url": "https://github.com/NixOS/nixpkgs/archive/a77ab169a83a4175169d78684ddd2e54486ac651.tar.gz",
11+
"url": "https://github.com/NixOS/nixpkgs/archive/6832d0d99649db3d65a0e15fa51471537b2c56a6.tar.gz",
1212
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
1313
}
1414
}

pom.xml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66

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

1112
<properties>
1213
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1314
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1415
<maven.compiler.source>17</maven.compiler.source>
1516
<maven.compiler.target>17</maven.compiler.target>
17+
<!-- Override the time stamps of build artifacts to ensure reproducibility -->
18+
<project.build.outputTimestamp>1</project.build.outputTimestamp>
1619
</properties>
1720

1821
<build>
@@ -24,6 +27,7 @@
2427
<configuration>
2528
<reportOutputDirectory>docs</reportOutputDirectory>
2629
<destDir>javadoc</destDir>
30+
<show>private</show>
2731
<quiet>true</quiet>
2832
</configuration>
2933
</plugin>
@@ -94,16 +98,16 @@
9498
<groupId>org.sat4j</groupId>
9599
<artifactId>core</artifactId>
96100
<version>2.3.5</version>
97-
<!-- <scope>system</scope>-->
98-
<!-- <systemPath>${project.basedir}/lib/org.sat4j.core.jar</systemPath>-->
101+
<!-- <scope>system</scope>-->
102+
<!-- <systemPath>${project.basedir}/lib/org.sat4j.core.jar</systemPath>-->
99103
</dependency>
100104

101105
<dependency>
102106
<groupId>de.ovgu</groupId>
103107
<artifactId>featureide.lib.fm</artifactId>
104108
<version>3.8.1</version>
105-
<!-- <scope>system</scope>-->
106-
<!-- <systemPath>${project.basedir}/lib/de.ovgu.featureide.lib.fm-v3.8.1.jar</systemPath>-->
109+
<!-- <scope>system</scope>-->
110+
<!-- <systemPath>${project.basedir}/lib/de.ovgu.featureide.lib.fm-v3.8.1.jar</systemPath>-->
107111
</dependency>
108112

109113
<dependency>

replication/esecfse22/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ WORKDIR /home/sherlock
3232
# Copy the compiled JAR file from the first stage into the second stage
3333
# Syntax: COPY --from=STAGE_ID SOURCE_PATH TARGET_PATH
3434
WORKDIR /home/sherlock/holmes
35-
COPY --from=0 /home/user/target/diffdetective-2.1.0-jar-with-dependencies.jar ./DiffDetective.jar
35+
COPY --from=0 /home/user/target/diffdetective-*-jar-with-dependencies.jar ./DiffDetective.jar
3636
WORKDIR /home/sherlock
3737
RUN mkdir results
3838

replication/splc23-views/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ WORKDIR /home/sherlock
3838
# Copy the compiled JAR file from the first stage into the second stage
3939
# Syntax: COPY --from=STAGE_ID SOURCE_PATH TARGET_PATH
4040
WORKDIR /home/sherlock/holmes
41-
COPY --from=0 /home/user/target/diffdetective-2.1.0-jar-with-dependencies.jar ./DiffDetective.jar
41+
COPY --from=0 /home/user/target/diffdetective-*-jar-with-dependencies.jar ./DiffDetective.jar
4242
WORKDIR /home/sherlock
4343

4444
# Copy the setup

scripts/genUltimateResults.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
resultsdir=$1
1+
#!/usr/bin/env bash
22

3-
java -cp "target/diffdetective-2.1.0-jar-with-dependencies.jar" org.variantsync.diffdetective.tablegen.MiningResultAccumulator $resultsdir $resultsdir
3+
resultsdir="$1"
4+
5+
cd "$(dirname "${BASH_SOURCE[0]}")/.." || exit 1
6+
7+
java -cp "target/diffdetective-$(./scripts/version.sh)-jar-with-dependencies.jar" org.variantsync.diffdetective.tablegen.MiningResultAccumulator "$resultsdir" "$resultsdir" &&
48
echo "genUltimateResults.sh DONE"

scripts/runValidation.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
java -cp "target/diffdetective-2.1.0-jar-with-dependencies.jar" org.variantsync.diffdetective.validation.EditClassValidation
1+
#!/usr/bin/env bash
2+
3+
cd "$(dirname "${BASH_SOURCE[0]}")/.." || exit 1
4+
5+
java -cp "target/diffdetective-$(./scripts/version.sh)-jar-with-dependencies.jar" org.variantsync.diffdetective.validation.EditClassValidation &&
26
echo "runValidation.sh DONE"

scripts/runViewFeasibilityStudy.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
java -cp "target/diffdetective-2.1.0-jar-with-dependencies.jar" org.variantsync.diffdetective.experiments.views.Main "docs/datasets/views.md"
1+
#!/usr/bin/env bash
2+
3+
cd "$(dirname "${BASH_SOURCE[0]}")/.." || exit 1
4+
5+
java -cp "target/diffdetective-$(./scripts/version.sh)-jar-with-dependencies.jar" org.variantsync.diffdetective.experiments.views.Main "docs/datasets/views.md" &&
26
echo "runValidation.sh DONE"

scripts/version.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
cd "$(dirname "${BASH_SOURCE[0]}")/.."
4+
5+
# extracts the first version tag in pom.xml
6+
sed -n '/<version/ {s/.*version>\(.*\)<\/version.*/\1/; p; q}' pom.xml

0 commit comments

Comments
 (0)