|
1 | | -# TODOs |
2 | | -- [ ] Overview |
3 | | -- [ ] Short Setup |
4 | | -- [ ] Short Verification instructions |
5 | | -- [ ] Full Replication instructions |
6 | | -- [ ] Documentation overview |
7 | | -- [ ] Dataset overview |
8 | | -- [ ] Custom patcher integration |
9 | | -- [ ] REQUIREMENTS.md |
10 | | -- [ ] INSTALL.md |
11 | | -- [ ] STATUS.md |
12 | | -- [ ] Integrate result analysis in Docker |
13 | | -- [ ] Unpacking of dataset by Docker |
14 | | - |
15 | 1 | # Decades of GNU Patch and Git Cherry-Pick: Can We Do Better? |
16 | 2 |
|
17 | 3 | This is the reproduction package for our paper _Decades of GNU Patch and Git Cherry-Pick: Can We Do Better?_ which has been accepted to the 48th International Conference on Software Engineering (ICSE 2026). |
18 | 4 |
|
19 | | -The reproduction package consists of three parts: |
| 5 | +## Content |
| 6 | +The reproduction package consists of three main parts: |
20 | 7 |
|
21 | 8 | 1. [__mpatch__](/mpatch/README.md): The implementation of our novel match-based patcher, written in Rust. |
22 | | -2. [__Mined cherries__](evaluation-workdir/data): Our large dataset of cherry picks mined from 5,000 GitHub repositories. |
| 9 | +2. [__Mined cherries__](dataset/): Our dataset of cherry picks mined from 5,000 GitHub repositories. |
23 | 10 | 3. [__Empirical evaluation__](src/main/kotlin/org/variantsync/evaluation/PatcherEvaluationMain.kt): Our empirical evaluation of different language-agnostic patchers. |
24 | 11 |
|
25 | | -## Content |
26 | | -Our sample of GitHub repositories and our dataset of mined patch scenarios is located in the _evaluation-workdir/data_ directory of the evaluation's working directory. |
27 | | -The sample and dataset are compressed as zip archives that have to be unpacked before they can be used. |
| 12 | +## Requirements |
| 13 | +Software Requirements |
| 14 | +- [Docker](https://www.docker.com/) |
| 15 | + |
| 16 | +Hardware Requirements |
| 17 | +- We recommend running the evaluation on a system with at least __64GB__ of primary memory (RAM). |
| 18 | +- 100GB—2TB of free drive space, depending on the configuration of the Docker image. |
| 19 | + |
| 20 | +> [!WARNING] |
| 21 | +> The used storage medium should be very fast, e.g., M.2 NVMe SSD with 5000 MB/s, otherwise the evaluation may take an extremely long time. |
| 22 | +
|
| 23 | +Other Requirements |
| 24 | +- A stable internet connection. |
| 25 | + |
| 26 | + |
| 27 | +## Installation |
| 28 | + |
| 29 | +### [Optional] Configuration |
| 30 | +Before building the Docker image, you may __optionally__ configure how the evaluation is executed. |
| 31 | +To this end, we provide two configuration files: [config-reproduction.properties](docker/config-reproduction.properties) for the configuration of the reproduction of the entire evaluation, and [config-verification.properties](docker/config-verification) for the verification of the correct installation of the reproduction package. |
| 32 | + |
| 33 | +Depending on the available hardware, you may need to adjust the following settings: |
| 34 | + |
| 35 | +- The number of threads used (i.e., how many repositories are processed in parallel). Please note that each thread requires an additional `40GB` of free space on your drive. |
| 36 | +- Whether all repositories should be cloned before the evaluation. This eliminates the need for a stable internet connection once all repositories have been cloned. |
| 37 | +- Whether repositories should be deleted after they have been evaluated. This significantly reduces the amount of required free space on your drive (around 100GB should be enough). |
| 38 | + |
| 39 | +> [!WARNING] |
| 40 | +> The entire set of repositories considered by our evaluation requires about 600 GBs of free space on our drive, if `clean-repositories` is set to `false`. |
| 41 | +
|
| 42 | +> [!NOTE] |
| 43 | +> Every change in the configuration must be followed by rebuilding the Docker image. |
| 44 | +
|
| 45 | + |
| 46 | +### Building the Docker image |
| 47 | +The reproduction package is meant to be run in the Docker image that can be built using the provided Dockerfile. |
| 48 | + |
| 49 | +#### Linux |
| 50 | +On Linux, you can execute the provided `build.sh` script to build the Docker image. |
| 51 | + |
| 52 | +> **Note:** The build process may take a while. (~5 minutes) |
| 53 | +
|
| 54 | +> **Note:** The build process may require sudo privileges. |
| 55 | +
|
| 56 | +```shell |
| 57 | +./build.sh |
| 58 | +``` |
| 59 | + |
| 60 | +#### Other OS |
| 61 | +On other machines, you may call Docker directly. |
| 62 | +In this case, you have to provide a USER_ID and GROUP_ID for the user in the Docker container: |
| 63 | +```bash |
| 64 | +# For example, under Linux, both variables are set as follows: |
| 65 | +# USER_ID=$(id -u ${SUDO_USER:-$(whoami)}) |
| 66 | +# GROUP_ID=$(id -g ${SUDO_USER:-$(whoami)}) |
| 67 | + |
| 68 | +docker build --network=host --build-arg USER_ID=$USER_ID --build-arg GROUP_ID=$GROUP_ID -t mpatch-reproduction . |
| 69 | +``` |
| 70 | +Ideally, the `USER_ID` and `GROUP_ID` match the ids of the user running the command (not root!). |
| 71 | +Under Windows, you may provide any suitable id (e.g., `1000` for both) |
| 72 | + |
| 73 | +```shell |
| 74 | +docker build --network=host --build-arg USER_ID=1000 --build-arg GROUP_ID=1000 -t mpatch-reproduction . |
| 75 | +``` |
| 76 | + |
| 77 | + |
| 78 | +### Verifying the correct installation |
| 79 | +Once the building of the Docker image has completed, you can verify its correct installation. |
| 80 | +By default, the verification will be executed within the [evaluation-workdir](evaluation-workdir) directory. |
| 81 | + |
| 82 | +#### Starting the verification |
| 83 | +On Linux, you can execute the provided `execute.sh` script with the `verification` argument: |
| 84 | +```shell |
| 85 | +./execute.sh verification |
| 86 | +``` |
| 87 | + |
| 88 | +On other machines, you may start a Docker container from the Docker image with the following command: |
| 89 | +```bash |
| 90 | +# Depending on your OS, you may have to change how the first path to evaluation-workdir is defined |
| 91 | +docker run --rm -v "./evaluation-workdir/":"/home/user/evaluation-workdir" mpatch-reproduction verification |
| 92 | +``` |
| 93 | + |
| 94 | +> [!NOTE] |
| 95 | +> Depending on your hardware, the verification should require 5-30 minutes. |
| 96 | +
|
| 97 | +#### Verification in a custom directory |
| 98 | +> [!NOTE] |
| 99 | +> You may provide any directory as first argument for `-v`, either by altering the `execute.sh` script or changing the command above. |
| 100 | +> The `evaluation-workdir` is where the evaluation stores all its data while processing the repositories and evaluating patchers. |
| 101 | +> The results will also be saved to this directory, once the evaluation or verification finishes. |
| 102 | + |
| 103 | + For example, your may start the evaluation with |
| 104 | +```shell |
| 105 | + docker run --rm -v "/home/YOUR_USERNAME/ICSE-reproduction/":"/home/user/evaluation-workdir" mpatch-reproduction verification |
| 106 | +``` |
| 107 | + |
| 108 | +#### Expected outcome |
| 109 | + |
| 110 | +TODO TODO TODO |
| 111 | + |
| 112 | + |
| 113 | +# Starting the reproduction |
| 114 | +Once you have verified the correct installation, you can start the reproduction similar to how you started the verification. |
| 115 | +You may also change the working directory to a custom directory as described for the verification. |
| 116 | + |
| 117 | +On Linux, you can execute the provided `execute.sh` script with the `reproduction` argument: |
| 118 | +```shell |
| 119 | +./execute.sh reproduction |
| 120 | +``` |
| 121 | + |
| 122 | +On other machines, you may start a Docker container from the Docker image with the following command: |
| 123 | +```bash |
| 124 | +# Depending on your OS, you may have to change how the first path to evaluation-workdir is defined |
| 125 | +docker run --rm -v "./evaluation-workdir/":"/home/user/evaluation-workdir" mpatch-reproduction reproduction |
| 126 | +``` |
28 | 127 |
|
29 | | -Our implementation of mpatch was written in Rust and can be found under _mpatch_. In its _mpatch/README.md_, you can also find instructions on |
30 | | -how to generate the documentation for mpatch. |
31 | 128 |
|
32 | | -The implementation of our evaluation setup can be found in the Java and Kotlin sources in the _src/main_ folder. |
33 | | -The main file of the evaluation is _src/main/kotlin/org/anon/evaluation/PatcherEvaluationMain.kt_. |
34 | 129 |
|
35 | | -Our scripts for applying the various metrics to the different patchers and analyzing the statistics can be found under _src/main/python/result_analysis_. |
36 | | -The raw results of our evaluation are archived under _evaluation-workdir/results_ |
| 130 | +> [!NOTE] |
| 131 | +> Our evaluation processes large amounts of data. |
| 132 | +> The main bottleneck is not the available CPU but the speed of the drive in which the `evaluation-workdir` is located. |
| 133 | +> Depending on your hardware, the full reproduction may require a very long time. The expected runtime are 5-10 days, but the reproduction may also require several weeks if the drive is too slow. |
37 | 134 |
|
38 | 135 |
|
39 | | -### Local dataset setup |
| 136 | +## Local dataset setup |
40 | 137 | - The `repo-sample.zip` file in `evaluation-workdir/data/` contains a single yaml file which enumerates the metadata for all sampled repositories. |
41 | 138 | - To unpack the dataset of cherry picks, you may need to perform the following command on a Linux console first. Thereafter, you can extract all the mined cherry picks from the created `unsplit-mined-cherries.zip` file. |
42 | 139 | ```shell |
|
0 commit comments