/PreViewer

Pretrained Code Reviewer

Primary LanguagePython

PreViewer: Pre-trained CodeReviewer

[WARNING] This repo will not be maintained. Please refer to CodeReviewer for better documentation

We pre-train a CodeReviewer model to automate three code reivew related tasks: Diff quality estimation, Review generation, Code refinement.

Refer to our paper: CodeReviewer: Pre-Training for Automating Code Review Activities for more details.

CodeReviewer is initialized with CodeT5 and further trained on four designed pre-training tasks:

Training and Evaluation

Scripts are listed in code/sh directory.

# Example:
cd code/sh
bash finetune-cls.sh

Infer a Json file

cd code/sh
bash infer-json.sh

Data preparation

Collecting GitHub repos: TopRepos.

Build pull request database: ETCR.

Build pre-training and benchmark datasets: CodeReviewProcesser.