From 786b77fdb9a794c85b701e3609cf1556de2f913c Mon Sep 17 00:00:00 2001 From: Pouryafard75 Date: Sat, 10 Feb 2024 19:59:40 -0500 Subject: [PATCH 1/3] Parameterize project version --- build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d2ecf26c42..4f7ac3e9cd 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,9 @@ plugins { } group = "com.github.tsantalis" -version = "3.0.4" +def version = project.hasProperty('version') ? + project.version + : '3.0.4' applicationName = rootProject.name mainClassName = "org.refactoringminer.RefactoringMiner" From 9537345afa1053f4db59e1e579059eaa0604835d Mon Sep 17 00:00:00 2001 From: pouryafard75 Date: Sat, 10 Feb 2024 21:08:17 -0500 Subject: [PATCH 2/3] Create benchmark workflow --- .github/workflows/benchmark.yml | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/benchmark.yml diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml new file mode 100644 index 0000000000..96afdcee2f --- /dev/null +++ b/.github/workflows/benchmark.yml @@ -0,0 +1,51 @@ +name: Benchmark + +on: + workflow_dispatch: + repository_dispatch: + types: [run-project] + +jobs: + build-and-run-project: + runs-on: ubuntu-latest + + env: + OAuthToken: ${{ secrets.OAUTHTOKEN }} + releaseVersion: CI-benchmark-SNAPSHOT + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Checkout code + uses: actions/checkout@v2 + + # Build the project and publish to Maven local + - name: Publish to Maven local + run: ./gradlew publishToMavenLocal -x test -x javadoc -Pversion=${{ env.releaseVersion }} + + # Clone the DiffBenchmark repository and run benchmarks + - name: Clone DiffBenchmark repository and run benchmarks + run: | + git clone -b automation --depth 1 --single-branch https://github.com/pouryafard75/DiffBenchmark.git && + cd DiffBenchmark && + ./gradlew -b build.gradle clean run \ + -PrefactoringMinerVersion=${{ env.releaseVersion }} \ + -DrefactoringMinerPath=$(pwd)/.. \ + -PmainClass=benchmark.CmdRunner \ + --args="refOracle defects4j" + + - name: Zip directory + run: | + zip -r Stats.zip DiffBenchmark/out/oracle/ + + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: Stats + path: Stats.zip From d03b197be60fbe9ffb6fc3ac19ccb054c8071789 Mon Sep 17 00:00:00 2001 From: Pouryafard75 Date: Tue, 13 Feb 2024 12:23:46 -0500 Subject: [PATCH 3/3] ASTDiff: Move the passing case to perfect diffs --- src/test/resources/astDiff/defects4j/cases-problematic.json | 3 --- src/test/resources/astDiff/defects4j/cases.json | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/resources/astDiff/defects4j/cases-problematic.json b/src/test/resources/astDiff/defects4j/cases-problematic.json index 27dfd6f71a..3fcb54b5b6 100644 --- a/src/test/resources/astDiff/defects4j/cases-problematic.json +++ b/src/test/resources/astDiff/defects4j/cases-problematic.json @@ -310,9 +310,6 @@ }, { "repo" : "JacksonDatabind", "commit" : "22" -}, { - "repo" : "Jsoup", - "commit" : "16" }, { "repo" : "Codec", "commit" : "14" diff --git a/src/test/resources/astDiff/defects4j/cases.json b/src/test/resources/astDiff/defects4j/cases.json index 574e3cd01f..6d4e9781df 100644 --- a/src/test/resources/astDiff/defects4j/cases.json +++ b/src/test/resources/astDiff/defects4j/cases.json @@ -2045,6 +2045,9 @@ "repo" : "Mockito", "commit" : "10" },{ + "repo" : "Jsoup", + "commit" : "16" +}, { "repo" : "Jsoup", "commit" : "3" } ] \ No newline at end of file