An Empirical Investigation on the Performance of Domain Adaptation for T5 Code Completion
An Empirical Investigation on the Performance of Domain Adaptation for T5 Code Completion
复制标题
DOI:
10.1109/saner56733.2023.00073
复制
发表时间:
2023-03
期刊:
影响因子:
--
通讯作者:
Daisuke Fukumoto;Yutaro Kashiwa;Toshiki Hirao;Kenji Fujiwara;Hajimu Iida
中科院分区:
文献类型:
--
作者:
Daisuke Fukumoto;Yutaro Kashiwa;Toshiki Hirao;Kenji Fujiwara;Hajimu Iida
Code completion has the benefit of improving coding speed and reducing the chance of inducing bugs. In recent years, DL-based code completion techniques have been proposed. In particular, pre-trained models have shown outstanding performance because they can complete code by considering the context before and after it is completed. While the model can generate the set of candidate codes, some of those might need to be modified by developers because projects can have different coding rules.In this study, to complete code that fits a specific project appropriately, we train the CodeT5 model with additional data from the target project. This fine-tuning approach is called do-main adaptation, and is often used in neural machine translation. Our preliminary experiment observes that our domain-adapted model improves 5.3% of the perfect prediction rate and, 3.4% of the edit distance rate, compared to the fine-tuned model with the out-of-domain dataset. Furthermore, we discover that the improvement is greater with a larger repository size. The model that is trained with a small dataset, however, hardly improves or performs worse.