Skip to content

Commit 649ad17

Browse files
committed
feat: migrate from Rectify to Repilot
1 parent 10555a1 commit 649ad17

File tree

3 files changed

+36
-37
lines changed

3 files changed

+36
-37
lines changed

README.md

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
1-
# ⚙️$`\mathbb{R}\mathrm{ectify}`$🛠️
1+
# ⚙️$`\mathbb{R}\mathrm{e}\mathbf{pilot}`$🛠️
22

33
> [!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!
55
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"!
77

88
<picture>
9-
<source media="(prefers-color-scheme: light)" srcset="/assets/Rectify-Demo-Light.svg">
10-
<source media="(prefers-color-scheme: dark)" srcset="/assets/Rectify-Demo-Dark.svg">
11-
<img alt="Rectify Demo" src="/assets/Rectify-Demo-Light.svg">
9+
<source media="(prefers-color-scheme: light)" srcset="/assets/Repilot-Demo-Light.svg">
10+
<source media="(prefers-color-scheme: dark)" srcset="/assets/Repilot-Demo-Dark.svg">
11+
<img alt="Repilot Demo" src="/assets/Repilot-Demo-Light.svg">
1212
</picture>
1313

14-
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.
1515

1616
> [!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**.
1818
19-
## 🚀 Quick start with Rectify's Docker image
19+
## 🚀 Quick start with Repilot's Docker image
2020

2121
```bash
2222
# Pull the image and run a container.
2323
# This may take some time...
24-
docker run -it --name rectify universefly/rectify-fse23
24+
docker run -it --name repilot universefly/repilot-fse23
2525
# 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
2929
cat meta_config.json
30-
# Generate patches with the full Rectify approach using CodeT5
31-
ACTIVE=1 python -m rectify.cli.main repair -b "Chart-9" --method pruned-mem -d chart-9-rectify -n 5
30+
# Generate patches with the full Repilot approach using CodeT5
31+
ACTIVE=1 python -m repilot.cli.main repair -b "Chart-9" --method pruned-mem -d chart-9-repilot -n 5
3232
# You will see logs about the patch generation and which tokens are accepted/rejected.
3333

3434
# Validate the patch generation
35-
python -m rectify.cli.main validate -d chart-9-rectify
35+
python -m repilot.cli.main validate -d chart-9-repilot
3636

3737
# Print a table of the evaluation results
38-
python -m rectify.cli.main evaluate -d chart-9-rectify
38+
python -m repilot.cli.main evaluate -d chart-9-repilot
3939
# You'll see something like this:
40-
# Rectify Evaluation Results
40+
# Repilot Evaluation Results
4141
# ┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
4242
# ┃ Tag ┃ Average Gen Time ┃ %Compilable Patches ┃ %Plausible Patches ┃ #Plausible Fixes ┃ #Correct Fixes ┃
4343
# ┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
44-
# │ chart-9-rectify │ 1.33s │ 100.0% │ 0.000% │ 0 │ - │
44+
# │ chart-9-repilot │ 1.33s │ 100.0% │ 0.000% │ 0 │ - │
4545
# └─────────────────┴──────────────────┴─────────────────────┴────────────────────┴──────────────────┴────────────────┘
4646
```
4747

4848
## ️⭐️ Artifact️
4949

50-
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.
5151

5252

53-
## ⚠️ How to build and use Rectify from source?
53+
## ⚠️ How to build and use Repilot from source?
5454

5555
> [!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.
5757
5858
> [!IMPORTANT]
5959
> **Environment requirements**
6060
>
6161
> - Python 3.10 and [Git LFS](https://git-lfs.com) are required.
6262
> - **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.
6464
6565
<details><summary>Download and build the modified Eclipse JDT Language Server</summary>
6666

@@ -93,20 +93,20 @@ java \
9393
If everything goes well, you can move on to the next step.
9494
</details>
9595

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>
9797

9898
```bash
99-
git clone https://github.com/UniverseFly/Rectify && cd Rectify
99+
git clone https://github.com/UniverseFly/Repilot && cd Repilot
100100
# Do an editable install
101101
pip install -e .
102102
# 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
104104
```
105105
</details>
106106

107-
<details><summary>Prepare the runtime environment of Rectify</summary>
107+
<details><summary>Prepare the runtime environment of Repilot</summary>
108108

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:
110110

111111
```json
112112
{
@@ -139,17 +139,17 @@ We need to prepare a `meta_config.json` file for Rectify to work properly. The f
139139

140140
<details><summary>Install the Defects4j datasets</summary>
141141

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.
143143

144144
> [!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.
146146
147147
You can check the installation by running `/path/to/defects4j info -p Chart`.
148148

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:
150150

151151
```bash
152-
python -m rectify.cli.init
152+
python -m repilot.cli.init
153153
```
154154

155155
</details>
@@ -158,9 +158,8 @@ python -m rectify.cli.init
158158
<details><summary>Do an example run</summary>
159159

160160
```bash
161-
# Generate patches with the full Rectify approach using CodeT5
162-
ACTIVE=1 python -m repilot.cli.main repair -b "Chart-9" --method pruned-mem -d chart-9-repilot -n 5
163-
# 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.
164163

165164
# Validate the patch generation
166165
python -m repilot.cli.main validate -d chart-9-repilot
@@ -174,7 +173,7 @@ You will see a table of evaluation results if everything goes well.
174173

175174
<details><summary>(Optional) Unpack the pre-generated patches</summary>
176175

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:
178177

179178
```bash
180179
tar -xvf ./data/large.tar.xz
@@ -184,4 +183,4 @@ Then you will see the `data/large` directory is populated with the pre-generated
184183

185184
</details>
186185

187-
**🔥🔥Congratulations! You have successfully built and used Rectify from source!🔥🔥**
186+
**🔥🔥Congratulations! You have successfully built and used Repilot from source!🔥🔥**
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)