Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into ben-main
Browse files Browse the repository at this point in the history
  • Loading branch information
cactusbranch01 committed May 23, 2024
2 parents 34a89a0 + d30f0ee commit 3f10535
Show file tree
Hide file tree
Showing 2,336 changed files with 30,138 additions and 20,329 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/check-reproducibility-inconsistent-results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Reproducibility Check Inconsistent Results
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
maven: [ '3.9.2' ]
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17.0.7
- run: echo "JAVA17_HOME=$JAVA_HOME" >> $GITHUB_ENV
- run: java -version
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.12
auto-update-conda: true
mamba-version: "*"
channels: conda-forge,defaults
activate-environment: AST
environment-file: environment.yml
- name: Clean caches & workspace
run: make clean
- run: echo "LOGURU_COLORIZE=NO" >> $GITHUB_ENV
- name: Build
run: cd src/scripts/merge_tools/merging && ./gradlew -q shadowJar
- name: make check-merges-reproducibility
run: |
python3 src/python/utils/build_inconsistent_merges.py
head -n 151 results/combined/result.csv > temp.csv && mv temp.csv results/combined/result.csv
make CSV_RESULTS=results/combined/inconsistent_results.csv check-merges-reproducibility
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
1 change: 0 additions & 1 deletion .github/workflows/check-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
Expand Down
15 changes: 6 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
args: ['--maxkb=20000']
Expand Down Expand Up @@ -44,12 +44,9 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- id: text-unicode-replacement-char
- repo: https://github.com/psf/black
rev: 23.11.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
hooks:
- id: black
- repo: https://github.com/PyCQA/pylint
rev: v3.0.1
hooks:
- id: pylint
args: ['--disable=R0801,E0401,W0718,W0719,W1510,C0103,W0621']
- id: ruff
args: [ --fix ]
- id: ruff-format
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ showvars:
@echo "PYTHON_FILES=${PYTHON_FILES}"

python-style:
black ${PYTHON_FILES}
pylint -f parseable --disable=W,invalid-name,c-extension-no-member,duplicate-code ${PYTHON_FILES}
ruff format ${PYTHON_FILES}
ruff check ${PYTHON_FILES} --fix

check-python-style:
black ${PYTHON_FILES} --check
pylint -f parseable --disable=W,invalid-name --disable=W,duplicate-code ${PYTHON_FILES}
ruff format ${PYTHON_FILES} --check
ruff check ${PYTHON_FILES}

# This target deletes files that are not committed to version control.
clean:
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# Evaluation of VCS merging algorithms

![small-test](https://github.com/benedikt-schesch/AST-Merging-Evaluation/actions/workflows/small-test.yml/badge.svg)

![check-style](https://github.com/benedikt-schesch/AST-Merging-Evaluation/actions/workflows/check-style.yml/badge.svg)
![check-reproducibility](https://github.com/benedikt-schesch/AST-Merging-Evaluation/actions/workflows/check-reproducibility.yml/badge.svg)

## Requirements

### Python

To install all the python requirements create a conda environment:
To install all the Python requirements, create a conda or mamba environment:

With mamba (faster https://github.com/mamba-org/mamba):
With conda:

```bash
mamba env create -f environment.yml
mamba activate AST
conda env create -f environment.yml
conda activate AST
```

With conda:
With mamba (faster https://github.com/mamba-org/mamba):

```bash
conda env create -f environment.yml
conda activate AST
mamba env create -f environment.yml
mamba activate AST
```

### Maven

Make sure you use maven version 3.9.*.
You must use Maven version 3.9.*.

### Ubuntu

Expand All @@ -50,7 +50,7 @@ brew install gh

### Java

Make sure you install Java 8, 11 and 17. You need to set the `JAVA8_HOME`, `JAVA11_HOME` and `JAVA17_HOME` environment variables to the respective Java installations.
You must install Java 8, 11 and 17. You must set the `JAVA8_HOME`, `JAVA11_HOME` and `JAVA17_HOME` environment variables to the respective Java installations.

---

Expand Down Expand Up @@ -211,10 +211,10 @@ To run style checking run `make style`.

* jars/ -> Location for the IntelliMerge and Spork jars.


## Comparing merge algorithms

To investigate differences between two mergers:
* edit file `src/python/select_from_results.py` to reflect the differences you are interested in.
* run `src/python/select_from_results.py` to create a .csv database containing only the differences.
* run `src/python/replay_merge.py --merges_csv CSV_FILE --idx INDEX` (maybe add `-test`) for the index of the merge you are interested in.

* edit file `src/python/select_from_results.py` to reflect the differences you are interested in.
* run `src/python/select_from_results.py` to create a .csv database containing only the differences.
* run `src/python/replay_merge.py --merges_csv CSV_FILE --idx INDEX` (maybe add `-test`) for the index of the merge you are interested in.
3 changes: 1 addition & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ dependencies:
- matplotlib==3.8.4
- numpy==1.26.4
- pandas==2.2.2
- pylint==3.1.0
- ruff==0.4.4
- GitPython==3.1.43
- prettytable==3.10.0
- seaborn==0.13.2
- rich==13.7.1
- black==24.4.2
- psutil==5.9.8
- termplotlib==0.3.9
- loguru==0.7.2
4 changes: 2 additions & 2 deletions results/combined/defs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
\def\combinedSporkOverOrtIncorrect{487\xspace}
\def\combinedMainBranchMerges{3557\xspace}
\def\combinedMainBranchMergesPercent{59\xspace}
\def\combinedOtherBranceshMerges{2483\xspace}
\def\combinedOtherBranchesMergesPercent{41\xspace}
\def\combinedOtherBranchMerges{2483\xspace}
\def\combinedOtherBranchMergesPercent{41\xspace}
\def\combinedReposJava{42092\xspace}

% Timeout
Expand Down
Binary file modified results/combined/merges_analyzer_histograms.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion results/combined/merges_tested/abel533/echarts.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
idx,branch_name,merge,left,right,notes,test merge,diff contains java file,left_tree_fingerprint,left parent test result,right_tree_fingerprint,right parent test result,parents pass,sampled for testing,gitmerge_ort,gitmerge_ort_merge_fingerprint,gitmerge_ort_ignorespace,gitmerge_ort_ignorespace_merge_fingerprint,gitmerge_recursive_histogram,gitmerge_recursive_histogram_merge_fingerprint,gitmerge_recursive_ignorespace,gitmerge_recursive_ignorespace_merge_fingerprint,gitmerge_recursive_minimal,gitmerge_recursive_minimal_merge_fingerprint,gitmerge_recursive_myers,gitmerge_recursive_myers_merge_fingerprint,gitmerge_recursive_patience,gitmerge_recursive_patience_merge_fingerprint,gitmerge_resolve,gitmerge_resolve_merge_fingerprint,gitmerge_ort_adjacent,gitmerge_ort_adjacent_merge_fingerprint,gitmerge_ort_imports,gitmerge_ort_imports_merge_fingerprint,gitmerge_ort_imports_ignorespace,gitmerge_ort_imports_ignorespace_merge_fingerprint,git_hires_merge,git_hires_merge_merge_fingerprint,spork,spork_merge_fingerprint,intellimerge,intellimerge_merge_fingerprint
9,refs/heads/master,c6ad45b63a9ee7e20b45c4176695a72efa31606a,69757fc487bf247b74339de637cb48ed296e5a67,721cb6fa847595de1b4b58fb80ec6079d15d9a95,,True,True,05376667afdba29e22c97c992edaa40bf1866e03660bb315bdf828004927fae8,Tests_passed,0dd38c0c7dc253f9adc1ed53fbf0e6b43aca5ad15576b740bffdc47c97a43a47,Tests_passed,True,True,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,29326553a8028f23a6604f8ec4736c8e60bfedd7ee241f8f43a324a7a0cdd8e6,Merge_failed,d248842099ea25d2e20f49e617634a46ab4024dfb985523d95bccb6c5ec7b2bb,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,9c57575dab347e2e37bbf92c19a55a137bd5648fe61399131d68744e0801e3b6,Merge_failed,6a56b2c32156b5a3b892638ab2e7654f00fdb4c08c5b25fab88caf1c1db3bc09,Merge_failed,d248842099ea25d2e20f49e617634a46ab4024dfb985523d95bccb6c5ec7b2bb
9,refs/heads/master,c6ad45b63a9ee7e20b45c4176695a72efa31606a,69757fc487bf247b74339de637cb48ed296e5a67,721cb6fa847595de1b4b58fb80ec6079d15d9a95,,True,True,05376667afdba29e22c97c992edaa40bf1866e03660bb315bdf828004927fae8,Tests_passed,0dd38c0c7dc253f9adc1ed53fbf0e6b43aca5ad15576b740bffdc47c97a43a47,Tests_passed,True,True,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,4702ab428931635d20d30f4091e3cce5d36aa4be418344382a53d6c16bb92692,Merge_failed,29326553a8028f23a6604f8ec4736c8e60bfedd7ee241f8f43a324a7a0cdd8e6,Merge_failed,d248842099ea25d2e20f49e617634a46ab4024dfb985523d95bccb6c5ec7b2bb,Merge_failed,f86893cf92b7b9f6bf70f2fd43463f0fb1119e4e2a2f0130001f6f2f823b4e75,Merge_failed,f86893cf92b7b9f6bf70f2fd43463f0fb1119e4e2a2f0130001f6f2f823b4e75,Merge_failed,9c57575dab347e2e37bbf92c19a55a137bd5648fe61399131d68744e0801e3b6,Merge_failed,6a56b2c32156b5a3b892638ab2e7654f00fdb4c08c5b25fab88caf1c1db3bc09,Merge_failed,d248842099ea25d2e20f49e617634a46ab4024dfb985523d95bccb6c5ec7b2bb
2 changes: 1 addition & 1 deletion results/combined/merges_tested/acciente/oacc-core.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
idx,branch_name,merge,left,right,notes,test merge,diff contains java file,left_tree_fingerprint,left parent test result,right_tree_fingerprint,right parent test result,parents pass,sampled for testing,gitmerge_ort,gitmerge_ort_merge_fingerprint,gitmerge_ort_ignorespace,gitmerge_ort_ignorespace_merge_fingerprint,gitmerge_recursive_histogram,gitmerge_recursive_histogram_merge_fingerprint,gitmerge_recursive_ignorespace,gitmerge_recursive_ignorespace_merge_fingerprint,gitmerge_recursive_minimal,gitmerge_recursive_minimal_merge_fingerprint,gitmerge_recursive_myers,gitmerge_recursive_myers_merge_fingerprint,gitmerge_recursive_patience,gitmerge_recursive_patience_merge_fingerprint,gitmerge_resolve,gitmerge_resolve_merge_fingerprint,gitmerge_ort_adjacent,gitmerge_ort_adjacent_merge_fingerprint,gitmerge_ort_imports,gitmerge_ort_imports_merge_fingerprint,gitmerge_ort_imports_ignorespace,gitmerge_ort_imports_ignorespace_merge_fingerprint,git_hires_merge,git_hires_merge_merge_fingerprint,spork,spork_merge_fingerprint,intellimerge,intellimerge_merge_fingerprint
4,refs/heads/master,0ca7e4ea4fd000ca5a3b51bb5e2e2fc27f6217f2,57e7150a72573f547092a0054317ffab8219bc45,c32cb07eda7eae130ce52a9cada989e58a1fbfa3,,True,True,9648b81286e53d474cb0ca01597f0a94b155d0dd8b1bd322a8921c3ec40b15c2,Tests_passed,5137eaf1d40f9a64f41e55dfd63637b140570923d93196f215cb3b23151b0dea,Tests_passed,True,True,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Merge_failed,8b0ba4e09c1fd34c6832eaf52a028c2ca4eec9b3486235de3d536a94cf7b21ff,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Merge_failed,8b0ba4e09c1fd34c6832eaf52a028c2ca4eec9b3486235de3d536a94cf7b21ff,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Merge_failed,0ad53a1530f8a34063dbd30466d149f7910e477ea05235886981b3b336b9fda5,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Tests_passed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Tests_passed,8b0ba4e09c1fd34c6832eaf52a028c2ca4eec9b3486235de3d536a94cf7b21ff,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Merge_failed,30edee8e81f9b0c03e7f51cbed04aa41ef8d692ce6cc6fe40aa9fe8042254ca2,Tests_passed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b
4,refs/heads/master,0ca7e4ea4fd000ca5a3b51bb5e2e2fc27f6217f2,57e7150a72573f547092a0054317ffab8219bc45,c32cb07eda7eae130ce52a9cada989e58a1fbfa3,,True,True,9648b81286e53d474cb0ca01597f0a94b155d0dd8b1bd322a8921c3ec40b15c2,Tests_passed,5137eaf1d40f9a64f41e55dfd63637b140570923d93196f215cb3b23151b0dea,Tests_passed,True,True,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Merge_failed,8b0ba4e09c1fd34c6832eaf52a028c2ca4eec9b3486235de3d536a94cf7b21ff,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Merge_failed,8b0ba4e09c1fd34c6832eaf52a028c2ca4eec9b3486235de3d536a94cf7b21ff,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Merge_failed,0ad53a1530f8a34063dbd30466d149f7910e477ea05235886981b3b336b9fda5,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Merge_failed,8b0ba4e09c1fd34c6832eaf52a028c2ca4eec9b3486235de3d536a94cf7b21ff,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b,Merge_failed,30edee8e81f9b0c03e7f51cbed04aa41ef8d692ce6cc6fe40aa9fe8042254ca2,Merge_failed,44fab8c3a10bf70f3ccfa6e82abed9f89cba67e6824e36f9ad31258cd92af87b
Loading

0 comments on commit 3f10535

Please sign in to comment.