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
Copy file name to clipboardExpand all lines: README.md
+63-46Lines changed: 63 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,34 +1,39 @@
1
-
# 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 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).
4
4
5
5
## Content
6
-
The reproduction package consists of three main parts:
7
6
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.
7
+
The reproduction package consists of three main parts:
8
+
9
+
1.[**mpatch**](/mpatch/README.md): The implementation of our novel match-based patcher, written in Rust.
10
+
2.[**Mined cherries**](dataset/): Our dataset of cherry picks mined from 5,000 GitHub repositories.
11
+
3.[**Empirical evaluation**](src/main/kotlin/org/variantsync/evaluation/PatcherEvaluationMain.kt): Our empirical evaluation of different language-agnostic patchers.
11
12
12
13
## Requirements
14
+
13
15
Software Requirements
16
+
14
17
-[Docker](https://www.docker.com/)
15
18
16
19
Hardware Requirements
17
-
- We recommend running the evaluation on a system with at least __64GB__ of primary memory (RAM).
20
+
21
+
- We recommend running the evaluation on a system with at least **64GB** of primary memory (RAM).
18
22
- 100GB—2TB of free drive space, depending on the configuration of the Docker image.
19
23
20
24
> [!WARNING]
21
25
> 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
26
23
27
Other Requirements
24
-
- A stable internet connection.
25
28
29
+
- A stable internet connection.
26
30
27
31
## Installation
28
32
29
33
### [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.
34
+
35
+
Before building the Docker image, you may **optionally** configure how the evaluation is executed.
36
+
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
37
33
38
Depending on the available hardware, you may need to adjust the following settings:
34
39
@@ -37,56 +42,63 @@ Depending on the available hardware, you may need to adjust the following settin
37
42
- 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
43
39
44
> [!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`.
45
+
> 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
46
42
47
> [!NOTE]
43
48
> Every change in the configuration must be followed by rebuilding the Docker image.
44
49
45
-
46
50
### 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.
51
+
52
+
The reproduction package is meant to be run in the Docker image that can be built using the provided Dockerfile.
48
53
49
54
#### Linux
55
+
50
56
On Linux, you can execute the provided `build.sh` script to build the Docker image.
51
57
52
58
> **Note:** The build process may take a while. (~5 minutes)
53
59
54
60
> **Note:** The build process may require sudo privileges.
55
61
56
-
```shell
62
+
```shell
57
63
./build.sh
58
64
```
59
65
60
66
#### Other OS
61
-
On other machines, you may call Docker directly.
67
+
68
+
On other machines, you may call Docker directly.
62
69
In this case, you have to provide a USER_ID and GROUP_ID for the user in the Docker container:
70
+
63
71
```bash
64
72
# For example, under Linux, both variables are set as follows:
@@ -136,11 +150,13 @@ INFO: Considering a total of 85 cherry-picks for repetition 1
136
150
INFO: cloning https://github.com/tensorflow/serving.git into /home/user/evaluation-workdir/REPOS/tensorflow_serving
137
151
...
138
152
```
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`.
153
+
154
+
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
155
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
156
142
157
The verification should complete with the following output:
143
-
```shell
158
+
159
+
```shell
144
160
Latexmk: All targets (metrics-verification.pdf) are up-to-date
145
161
146
162
++++++++++++++++++++++++++++++++++++
@@ -150,10 +166,8 @@ Latexmk: All targets (metrics-verification.pdf) are up-to-date
150
166
The result table can be found under evaluation-workdir/metrics-verification.pdf
151
167
```
152
168
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
-
169
+
After all repositories have been considered, the result analysis is executed.
170
+
The raw results can be found in the `evaluation-workdir/results` directory.
157
171
158
172
In addition, the script generates a PDF file with a result table similar to the one presented in our paper.
159
173
This table can be found under `evaluation-workdir/metrics-verification.pdf`.
@@ -164,16 +178,19 @@ It should look similar to this:
164
178
> The verification results shown are based on only a tiny portion of our dataset and are therefore not representative.
165
179
166
180
# Starting the reproduction
167
-
Once you have verified the correct installation, you can start the reproduction similar to how you started the verification.
181
+
182
+
Once you have verified the correct installation, you can start the reproduction similar to how you started the verification.
168
183
You may also change the working directory to a custom directory as described for the verification.
169
184
170
-
On Linux, you can execute the provided `execute.sh` script with the `reproduction` argument:
185
+
On Linux, you can execute the provided `execute.sh` script with the `reproduction` argument:
186
+
171
187
```shell
172
188
./execute.sh reproduction
173
189
```
174
190
175
-
On other machines, you may start a Docker container from the Docker image with the following command:
176
-
```bash
191
+
On other machines, you may start a Docker container from the Docker image with the following command:
192
+
193
+
```bash
177
194
# Depending on your OS, you may have to change how the first path to evaluation-workdir is defined
178
195
docker run --rm -v "./evaluation-workdir/":"/home/user/evaluation-workdir" mpatch-reproduction reproduction
179
196
```
@@ -182,26 +199,26 @@ docker run --rm -v "./evaluation-workdir/":"/home/user/evaluation-workdir" mpatc
182
199
> The results of the reproduction will be stored in the same manner as the results of the verification.
183
200
184
201
> [!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
-
202
+
> Our evaluation processes large amounts of data.
203
+
> The main bottleneck is not the available CPU but the speed of the drive in which the `evaluation-workdir` is located.
204
+
> 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
205
191
206
## Troubleshooting
192
207
193
208
### 'Got permission denied while trying to connect to the Docker daemon socket'
209
+
194
210
`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
211
196
212
`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
213
198
214
### 'Unable to find image 'mpatch-reproduction:latest' locally'
215
+
199
216
`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
217
201
218
`Fix:` Follow the instructions described above in the section `Build the Docker Container`.
202
219
203
220
### Failed to load class "org.slf4j.impl.StaticLoggerBinder"
221
+
204
222
`Problem:` An operation within the initialization phase of the logger library we use (tinylog) failed.
205
223
206
224
`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