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
+36-37Lines changed: 36 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,66 +1,66 @@
1
-
# ⚙️$`\mathbb{R}\mathrm{ectify}`$🛠️
1
+
# ⚙️$`\mathbb{R}\mathrm{e}\mathbf{pilot}`$🛠️
2
2
3
3
> [!WARNING]
4
-
> Rectify is being changed to **Repilot**! The patch will come soon. Stay tuned.
4
+
> **Repilot** was originally named **Rectify**. There are still some inconsistencies in the documentation. We will patch them soon. Stay tuned!
5
5
6
-
Welcome to the source code repo of **Rectify**, a patch generation tool introduced in our ESEC/FSE'23 paper "Copiloting the Copilot: Fusing Large Language Models with Completion Engines for Automated Program Repair"!
6
+
Welcome to the source code repo of **Repilot**, a patch generation tool introduced in our ESEC/FSE'23 paper "Copiloting the Copilot: Fusing Large Language Models with Completion Engines for Automated Program Repair"!
Rectify leverages the synergy between a semantics-based code completion engine and an auto-regressive large language model for more efficient valid patch generation.
14
+
Repilot leverages the synergy between a semantics-based code completion engine and an auto-regressive large language model for more efficient valid patch generation.
15
15
16
16
> [!IMPORTANT]
17
-
> Rectify is implemented for Java patch generation as a complex hybrid system combining a [Modified Eclipse JDT Language Server](https://github.com/UniverseFly/eclipse.jdt.ls) and Python's [huggingface/transformers](https://github.com/huggingface/transformers) interface for manipulating large language models. Correctly setting up the dependencies and configurations of Rectify can be non-trivial. Therefore, **we highly recommend directly using our out-of-the-box Docker image**.
17
+
> Repilot is implemented for Java patch generation as a complex hybrid system combining a [Modified Eclipse JDT Language Server](https://github.com/UniverseFly/eclipse.jdt.ls) and Python's [huggingface/transformers](https://github.com/huggingface/transformers) interface for manipulating large language models. Correctly setting up the dependencies and configurations of Repilot can be non-trivial. Therefore, **we highly recommend directly using our out-of-the-box Docker image**.
18
18
19
-
## 🚀 Quick start with Rectify's Docker image
19
+
## 🚀 Quick start with Repilot's Docker image
20
20
21
21
```bash
22
22
# Pull the image and run a container.
23
23
# This may take some time...
24
-
docker run -it --name rectify universefly/rectify-fse23
24
+
docker run -it --name repilot universefly/repilot-fse23
25
25
# Now you will get into a "virtual environment" provided by Docker
26
-
# Enter the `rectify` directory
27
-
cd /rectify
28
-
# This is important because Rectify relies on a `meta_config.json` file to work properly
26
+
# Enter the `repilot` directory
27
+
cd /root/repilot
28
+
# This is important because Repilot relies on a `meta_config.json` file to work properly
29
29
cat meta_config.json
30
-
# Generate patches with the full Rectify approach using CodeT5
For a more comprehensive guidance on how to use Rectify and how to reproduce the results in our paper, we greatly encourage you to check our artifact at https://github.com/UniverseFly/Rectify-Artifact.
50
+
For a more comprehensive guidance on how to use Repilot and how to reproduce the results in our paper, we greatly encourage you to check our artifact at https://github.com/UniverseFly/Repilot-Artifact.
51
51
52
52
53
-
## ⚠️ How to build and use Rectify from source?
53
+
## ⚠️ How to build and use Repilot from source?
54
54
55
55
> [!WARNING]
56
-
> Building Rectify from source is **NOT** recommended since there are many complex dependencies and configurations to handle. It is only for advanced users who want to extend Rectify.
56
+
> Building Repilot from source is **NOT** recommended since there are many complex dependencies and configurations to handle. It is only for advanced users who want to extend Repilot.
57
57
58
58
> [!IMPORTANT]
59
59
> **Environment requirements**
60
60
>
61
61
> - Python 3.10 and [Git LFS](https://git-lfs.com) are required.
62
62
> -**All three versions of Java 8, 11, and 18** are required. For convenient management of multiple Java versions, we recommend [coursier](https://get-coursier.io/docs/cli-java).
63
-
> - (Optional) It's recommended to have an NVIDIA GPU with >6G memory for running Rectify with CodeT5 and >30G memory for Incoder-6.7B.
63
+
> - (Optional) It's recommended to have an NVIDIA GPU with >6G memory for running Repilot with CodeT5 and >30G memory for Incoder-6.7B.
64
64
65
65
<details><summary>Download and build the modified Eclipse JDT Language Server</summary>
66
66
@@ -93,20 +93,20 @@ java \
93
93
If everything goes well, you can move on to the next step.
94
94
</details>
95
95
96
-
<details><summary>Download and install Rectify as a Python package including its dependencies</summary>
96
+
<details><summary>Download and install Repilot as a Python package including its dependencies</summary>
# Consider upgrading pip if you encounter any errors, also make sure you are using Python 3.10
103
-
# This command should also install all the dependencies of Rectify
103
+
# This command should also install all the dependencies of Repilot
104
104
```
105
105
</details>
106
106
107
-
<details><summary>Prepare the runtime environment of Rectify</summary>
107
+
<details><summary>Prepare the runtime environment of Repilot</summary>
108
108
109
-
We need to prepare a `meta_config.json` file for Rectify to work properly. The file should be placed in the root directory of Rectify. Please **modify** the following template according to your environment and save the file in the root directory of Rectify:
109
+
We need to prepare a `meta_config.json` file for Repilot to work properly. The file should be placed in the root directory of Repilot. Please **modify** the following template according to your environment and save the file in the root directory of Repilot:
110
110
111
111
```json
112
112
{
@@ -139,17 +139,17 @@ We need to prepare a `meta_config.json` file for Rectify to work properly. The f
139
139
140
140
<details><summary>Install the Defects4j datasets</summary>
141
141
142
-
Rectify evaluates on the [Defects4j](https://github.com/rjust/defects4j) dataset. Please checkout to its [v2.0.0 release](https://github.com/rjust/defects4j/releases/tag/v2.0.0) and follow its instructions to install the dataset.
142
+
Repilot evaluates on the [Defects4j](https://github.com/rjust/defects4j) dataset. Please checkout to its [v2.0.0 release](https://github.com/rjust/defects4j/releases/tag/v2.0.0) and follow its instructions to install the dataset.
143
143
144
144
> [!WARNING]
145
-
> If you directly download the release instead of doing a checkout you may encounter errors when running Rectify, as Rectify will dump the metadata by collecting the meta information of these projects as Git repos. If they are not Git repos, Rectify may fail.
145
+
> If you directly download the release instead of doing a checkout you may encounter errors when running Repilot, as Repilot will dump the metadata by collecting the meta information of these projects as Git repos. If they are not Git repos, Repilot may fail.
146
146
147
147
You can check the installation by running `/path/to/defects4j info -p Chart`.
148
148
149
-
Now let's `cd` back to the root directory of Rectify, and run the following command to checkout all the bugs:
149
+
Now let's `cd` back to the root directory of Repilot, and run the following command to checkout all the bugs:
150
150
151
151
```bash
152
-
python -m rectify.cli.init
152
+
python -m repilot.cli.init
153
153
```
154
154
155
155
</details>
@@ -158,9 +158,8 @@ python -m rectify.cli.init
158
158
<details><summary>Do an example run</summary>
159
159
160
160
```bash
161
-
# Generate patches with the full Rectify approach using CodeT5
# You will see logs about the patch generation and which tokens are accepted/rejected.
161
+
# Generate patches with the full Repilot approach using CodeT5
162
+
ACTIVE=1 python -m repilot.cli.main repair -b "Chart-9" --method pruned-mem -d chart-9-repilot -n 5 # You will see logs about the patch generation and which tokens are accepted/rejected.
@@ -174,7 +173,7 @@ You will see a table of evaluation results if everything goes well.
174
173
175
174
<details><summary>(Optional) Unpack the pre-generated patches</summary>
176
175
177
-
The GitHub repo also contains pre-generated patches the experiments in our paper. You can unpack if you would like to check them. First make sure you `cd` to the root directory of Rectify. Then run the following command:
176
+
The GitHub repo also contains pre-generated patches the experiments in our paper. You can unpack if you would like to check them. First make sure you `cd` to the root directory of Repilot. Then run the following command:
178
177
179
178
```bash
180
179
tar -xvf ./data/large.tar.xz
@@ -184,4 +183,4 @@ Then you will see the `data/large` directory is populated with the pre-generated
184
183
185
184
</details>
186
185
187
-
**🔥🔥Congratulations! You have successfully built and used Rectify from source!🔥🔥**
186
+
**🔥🔥Congratulations! You have successfully built and used Repilot from source!🔥🔥**
0 commit comments