共同学习修复代码和生成提交消息
Jointly Learning to Repair Code and Generate Commit Message
摘要:
我们提出了一个新的任务,共同修复程序代码和生成提交消息。代码修复和提交消息生成是软件开发中两个基本且相互关联的任务。然而,现有的工作通常独立地执行这两个任务。我们构建了一个多语言的三元数据集,包括错误代码,固定的代码,并提交这个新的任务的消息。我们提供级联模型作为基线,这些模型通过不同的训练方法进行增强,包括师生法,多任务法和反向翻译法。针对级联方法的错误传播问题,提出了一种联合模型,在统一的框架下实现了代码修复和提交消息的生成。实验结果表明,采用师生法和多任务学习法的级联模型在不同的自动代码修复指标上都取得了最好的成绩,联合模型在提交消息生成方面优于级联模型.
英文摘要:
We propose a novel task of jointly repairing program codes and generating commit messages. Code repair and commit message generation are two essential and related tasks for software development. However, existing work usually performs the two tasks independently. We construct a multilingual triple dataset including buggy code, fixed code, and commit messages for this novel task. We provide the cascaded models as baseline, which are enhanced with different training approaches, including the teacher-student method, the multi-task method, and the back-translation method. To deal with the error propagation problem of the cascaded method, the joint model is proposed that can both repair the code and generate the commit message in a unified framework. Experimental results show that the enhanced cascaded model with teacher-student method and multitask-learning method achieves the best score on different metrics of automated code repair, and the joint model behaves better than the cascaded model on commit message generation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。