Source code for the ASE'23 paper EALink: An Efficient and Accurate Pre-trained Framework for Issue-Commit Link Recovery.
Dstillfolder contains the data format used in the distillation stepdataset.py, the configuration filetiny_bert_config.jsonfor student model and the distillation filebertdistill.py.LinkGeneratorfolder contains theparser_langfolder for parsing abstract syntax trees and preprocessing steps for raw data.datais used to store the processed datasets (you can get it in the link below).modelscontains training and testing files.
- python 3.9.7
- pytorch 1.11.0
- pandas 1.3.4
- numpy 1.21.6
- transformers 4.21.0
- cudatoolkit 11.3.1
- torchaudio 1.11.0
- torchvision 1.12.0
- GPU with CUDA 11.3
We have constructed six large-scale project datasets for evaluating issue-commit link recovery. You can download the final dataset (Google Drive or 阿里云盘) described in the paper. To generate the dataset used for EALink in our experiments, please follow the data preprocessing steps.
You can follow the steps in the LinkGenerator folder to generate the dataset used for EALink. Or you can directly download the processed dataset (Google Drive or 阿里云盘) for use.
In the LinkGenerator folder, 0_subdata.py generates issue-code links. You can run the following command:
python 0_subdata.py
python 1_splitword.py
dataset merging
python 2_sub_merge.py
cd Dstill
python bertdistill.py
In the models folder, train.py and test.py enable training and testing of the trained model, respectively.
cd models
python train.py \
--tra_batch_size 16 \
--val_batch_size 16 \
--end_epoch 400 \
--output_model <model_save_path>
python test.py \
--tes_batch_size 16 \
--model_path <model_path>