You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Decades of GNU Patch and Git Cherry-Pick: Can We Do Better?
1
+
# Decades of GNU Patch and Git Cherry-Pick: Can We Do Better?
2
2
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).
3
+
This artifact contains the reproduction package for our paper [_Decades of GNU Patch and Git Cherry-Pick: Can We Do Better?_](https://lanpirot.github.io/publications/Decades_of_GNU_Patch_and_Git_Cherry-Pick_Can_We_Do_Better.pdf) which has been accepted to the 48th International Conference on Software Engineering (ICSE 2026).
4
+
The artifact is licensed under a dual MIT - Apache 2.0 license.
5
+
6
+
## Purpose
7
+
8
+
The artifact should allow other researchers to reproduce our experiments and confirm the results which reported in our paper.
9
+
We provide instructions that allow reproduction of the evaluation presented in Sections 4 through 6 of our paper.
10
+
The reproduction is executed in a Docker container.
11
+
12
+
We claim the _Artifacts Available_ badge, as we made our artifacts publicly available on [Zenodo](https://doi.org/10.5281/zenodo.16920961}) under an open-source license.
13
+
Our dataset and the repositories from which we mined it are also publicly available.
14
+
15
+
We claim the _Artifacts Evaluated Functional_ and _Artifacts Evaluated Reusable_ badges, as both our evaluation framework and our novel patcher can be reused by other researchers and practitioners.
16
+
Our evaluation can be extended and reused to evaluate and compare additional patchers with those considered in our paper.
17
+
Our novel patcher _mpatch_ is a tool that can be used as an alternative to _git cherry-pick_ or GNU _patch_.
18
+
It can also be integrated into other evaluation setups using its library or its CLI.
19
+
We carefully documented and implemented the artifact in a way that should allow future execution and reuse by other research groups.
20
+
21
+
## Provenance
22
+
23
+
The Preprint of our paper can be found [online](https://lanpirot.github.io/publications/Decades_of_GNU_Patch_and_Git_Cherry-Pick_Can_We_Do_Better.pdf).
24
+
After official publication, it becomes available under [https://doi.org/10.1145/3744916.3764537](https://doi.org/10.1145/3744916.3764537).
25
+
26
+
The artifact itself is available on [Zenodo](https://doi.org/10.5281/zenodo.16920961) and [Github](https://github.com/VariantSync/patching-with-matching-eval).
4
27
5
28
## Content
6
-
The reproduction package consists of three main parts:
7
29
8
-
1.[__mpatch__](/mpatch/README.md): The implementation of our novel match-based patcher, written in Rust.
9
-
2.[__Mined cherries__](dataset/): Our dataset of cherry picks mined from 5,000 GitHub repositories.
10
-
3.[__Empirical evaluation__](src/main/kotlin/org/variantsync/evaluation/PatcherEvaluationMain.kt): Our empirical evaluation of different language-agnostic patchers.
30
+
The reproduction package consists of three main parts:
31
+
32
+
1.[**mpatch**](/mpatch/README.md): The implementation of our novel match-based patcher, written in Rust.
33
+
2.[**Mined cherries**](dataset/): Our dataset of cherry picks mined from 5,000 GitHub repositories.
34
+
3.[**Empirical evaluation**](src/main/kotlin/org/variantsync/evaluation/PatcherEvaluationMain.kt): Our empirical evaluation of various language-agnostic patchers.
11
35
12
36
## Requirements
13
-
Software Requirements
14
-
-[Docker](https://www.docker.com/)
15
37
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.
38
+
### Hardware Requirements
39
+
40
+
There are no special requirements regarding the CPU or GPU.
41
+
42
+
#### Primary Memory
43
+
44
+
We recommend running the evaluation on a system with at least **64GB** of primary memory (RAM).
45
+
46
+
#### Secondary Memory
47
+
48
+
I/O operations have a considerable impact on the total runtime of the evaluation.
49
+
Therefore, we strongly recommend storing the repository on an SSD (M2 technology or better),
50
+
and to configure Docker to store its data (e.g., images and containers) on this SSD as well.
51
+
Using an HDD can lead to severe runtime problems and thereby timeouts that threaten the validity of the results.
52
+
53
+
The evaluation requires about **1TB** of space as it considers hundreds of repositories, which in turn are copied dozens of times for multi-threaded patcher evaluation.
54
+
The space requirement can be considerably reduced by changing the number of used threads in the [reproduction config](docker/config-reproduction.properties) (e.g., to **20GB**), but then the evaluation will require considerably more time as well.
19
55
20
56
> [!WARNING]
21
57
> 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
58
23
-
Other Requirements
24
-
- A stable internet connection.
59
+
### Software Requirements
60
+
61
+
The artifact does not require a certain operating system or prepared environment.
62
+
Our evaluation can be reproduced on any system supporting [Docker](https://docs.docker.com/get-docker/).
63
+
Docker will take care of all requirements and dependencies to reproduce our evaluation.
25
64
65
+
- We recommend running the evaluation on a system with at least **64GB** of primary memory (RAM).
66
+
- 100GB — 2TB of free drive space, depending on the configuration of the Docker image.
26
67
27
68
## Installation
28
69
29
70
### [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
71
33
-
Depending on the available hardware, you may need to adjust the following settings:
72
+
Before building the Docker image, you may **optionally** configure how the evaluation is executed, if you plan on running the full reproduction.
73
+
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.
74
+
75
+
Depending on the available hardware, you may want to adjust the following settings in the [config-reproduction.properties](docker/config-reproduction.properties):
34
76
35
77
- 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
78
- 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
79
- 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
80
39
81
> [!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`.
82
+
> 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
83
42
84
> [!NOTE]
43
85
> Every change in the configuration must be followed by rebuilding the Docker image.
44
86
45
-
46
87
### 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.
88
+
89
+
The reproduction package is meant to be run in the Docker image that can be built using the provided Dockerfile.
48
90
49
91
#### Linux
92
+
50
93
On Linux, you can execute the provided `build.sh` script to build the Docker image.
51
94
52
95
> **Note:** The build process may take a while. (~5 minutes)
53
96
54
97
> **Note:** The build process may require sudo privileges.
55
98
56
-
```shell
99
+
```shell
57
100
./build.sh
58
101
```
59
102
60
103
#### Other OS
61
-
On other machines, you may call Docker directly.
104
+
105
+
On other machines, you may call Docker directly.
62
106
In this case, you have to provide a USER_ID and GROUP_ID for the user in the Docker container:
107
+
63
108
```bash
64
109
# For example, under Linux, both variables are set as follows:
@@ -136,11 +187,13 @@ INFO: Considering a total of 85 cherry-picks for repetition 1
136
187
INFO: cloning https://github.com/tensorflow/serving.git into /home/user/evaluation-workdir/REPOS/tensorflow_serving
137
188
...
138
189
```
139
-
The output shows that the dataset used for verification contains one repository for each project language. The projects are cloned into the `evaluation-workdir`.
190
+
191
+
The output shows that the dataset used for verification contains one repository for each project language. The projects are cloned into the `evaluation-workdir`.
140
192
Once a project has been cloned, the patchers are evaluated on the cherry picks (i.e., patches) that have been found for that repository.
141
193
142
194
The verification should complete with the following output:
143
-
```shell
195
+
196
+
```shell
144
197
Latexmk: All targets (metrics-verification.pdf) are up-to-date
145
198
146
199
++++++++++++++++++++++++++++++++++++
@@ -150,10 +203,8 @@ Latexmk: All targets (metrics-verification.pdf) are up-to-date
150
203
The result table can be found under evaluation-workdir/metrics-verification.pdf
151
204
```
152
205
153
-
After all repositories have been considered, the result analysis is executed.
154
-
The raw results can be found in the `evaluation-workdir/results` directory.
155
-
156
-
206
+
After all repositories have been considered, the result analysis is executed.
207
+
The raw results can be found in the `evaluation-workdir/results` directory.
157
208
158
209
In addition, the script generates a PDF file with a result table similar to the one presented in our paper.
159
210
This table can be found under `evaluation-workdir/metrics-verification.pdf`.
@@ -164,16 +215,19 @@ It should look similar to this:
164
215
> The verification results shown are based on only a tiny portion of our dataset and are therefore not representative.
165
216
166
217
# Starting the reproduction
167
-
Once you have verified the correct installation, you can start the reproduction similar to how you started the verification.
218
+
219
+
Once you have verified the correct installation, you can start the reproduction similar to how you started the verification.
168
220
You may also change the working directory to a custom directory as described for the verification.
169
221
170
-
On Linux, you can execute the provided `execute.sh` script with the `reproduction` argument:
222
+
On Linux, you can execute the provided `execute.sh` script with the `reproduction` argument:
223
+
171
224
```shell
172
225
./execute.sh reproduction
173
226
```
174
227
175
-
On other machines, you may start a Docker container from the Docker image with the following command:
176
-
```bash
228
+
On other machines, you may start a Docker container from the Docker image with the following command:
229
+
230
+
```bash
177
231
# Depending on your OS, you may have to change how the first path to evaluation-workdir is defined
178
232
docker run --rm -v "./evaluation-workdir/":"/home/user/evaluation-workdir" mpatch-reproduction reproduction
179
233
```
@@ -182,26 +236,26 @@ docker run --rm -v "./evaluation-workdir/":"/home/user/evaluation-workdir" mpatc
182
236
> The results of the reproduction will be stored in the same manner as the results of the verification.
183
237
184
238
> [!NOTE]
185
-
> Our evaluation processes large amounts of data.
186
-
> The main bottleneck is not the available CPU but the speed of the drive in which the `evaluation-workdir` is located.
187
-
> 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.
188
-
189
-
239
+
> Our evaluation processes large amounts of data.
240
+
> The main bottleneck is not the available CPU but the speed of the drive in which the `evaluation-workdir` is located.
241
+
> 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.
190
242
191
243
## Troubleshooting
192
244
193
245
### 'Got permission denied while trying to connect to the Docker daemon socket'
246
+
194
247
`Problem:` This is a common problem under Linux, if the user trying to execute Docker commands does not have the permissions to do so.
195
248
196
249
`Fix:` You can fix this problem by either following the [post-installation instructions](https://docs.docker.com/engine/install/linux-postinstall/), or by executing the scripts in the replication package with elevated permissions (i.e., `sudo`).
197
250
198
251
### 'Unable to find image 'mpatch-reproduction:latest' locally'
252
+
199
253
`Problem:` The Docker container could not be found. This either means that the name of the container that was built does not fit the name of the container that is being executed (this only happens if you changed the provided scripts), or that the Docker container was not built yet.
200
254
201
255
`Fix:` Follow the instructions described above in the section `Build the Docker Container`.
202
256
203
257
### Failed to load class "org.slf4j.impl.StaticLoggerBinder"
258
+
204
259
`Problem:` An operation within the initialization phase of the logger library we use (tinylog) failed.
205
260
206
261
`Fix:` Please ignore this warning. Tinylog will fall back onto a default implementation (`Defaulting to no-operation (NOP) logger implementation`) and logging will work as expected.
0 commit comments