We note that a recent work from NTU also focuses on pre-trained models for code change. Since these works are conducted at similar time, we missed to discuss this paper in our Related Work part. We are sorry for that and we hope readers could also pay attention to this paper.
The released checkpoint may performs better than stated in the paper.
If the evaluation during fine-tuning takes too long, you can adjust the “–evaluate_sample_size” parameter. This parameter refers to the number of cases in the validation set during evaluation.
To evaluate the performance of a specific checkpoint, add the flag “-e” followed by the checkpoint path:
Note that if [path_to_model] is blank, this script will automatically evaluate our released checkpoint.
Task 2: Just-in-Time Comment Update
bash scripts/finetune_cup.sh -g [GPU_ID]
To evaluate a specific checkpoint like in Task 1, add the flag “-e” followed by the checkpoint path.
Additionally, we have released the the output result of CCT5 and baselines, which is stored at results/CommentUpdate. Execute the following script and assign the path_to_result_file to evaluate its effectiveness:
@inproceedings{lin2023cct5,
title={CCT5: A Code-Change-Oriented Pre-Trained Model},
author={Lin, Bo and Wang, Shangwen and Liu, Zhongxin and Liu, Yepang and Xia, Xin and Mao, Xiaoguang},
booktitle={Proceedings of the 31th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering},
year={2023}
}
关于
ESEC/FSE 2023会议CCT5: A Code-Change-Oriented Pre-Trained Model开源仓库
CCT5: A Code-Change-Oriented Pre-Trained Model
We note that a recent work from NTU also focuses on pre-trained models for code change. Since these works are conducted at similar time, we missed to discuss this paper in our Related Work part. We are sorry for that and we hope readers could also pay attention to this paper.
Getting Started
Requirements
Install the above requirements manully or execute the following script:
Download and preprocess
Pretrain the model[optional]
Task 1: Commit Message Generation
The released checkpoint may performs better than stated in the paper. If the evaluation during fine-tuning takes too long, you can adjust the “–evaluate_sample_size” parameter. This parameter refers to the number of cases in the validation set during evaluation.
To evaluate the performance of a specific checkpoint, add the flag “-e” followed by the checkpoint path:
Note that if [path_to_model] is blank, this script will automatically evaluate our released checkpoint.
Task 2: Just-in-Time Comment Update
To evaluate a specific checkpoint like in Task 1, add the flag “-e” followed by the checkpoint path.
Additionally, we have released the the output result of CCT5 and baselines, which is stored at
results/CommentUpdate. Execute the following script and assign thepath_to_result_fileto evaluate its effectiveness:Task 3: Just-in-Time Defect Prediction
Only semantic features:
Fine-tune:
Evaluate:
Semantic features + expert features:
Fine-tune:
Evaluate:
Task 4: Code Change Quality Estimation
Fine-tune:
Evaluate:
Task 5: Review Generation
Fine-tune:
Evaluate:
Credit
We reused some code from open-source repositories. We would like to extend our gratitude to the following repositories:
Citation