论文标题
多模式自动代码评论的对比度学习
Contrastive Learning for Multi-Modal Automatic Code Review
论文作者
论文摘要
旨在减轻手动检查成本的自动代码审查(ACR)是软件工程中必不可少且必不可少的任务。现有作品仅使用源代码片段来预测结果,缺少对开发人员评论的开发。因此,我们为多模式ACR任务提供了一个多模式Apache自动代码评论数据集(MACR)。该数据集的发布将推动该领域的研究。基于它,我们提出了一个基于对比度学习的多模式网络(CLMN)来处理多模式ACR任务。具体而言,我们的模型由编码模块的代码和一个编码模块组成。对于每个模块,我们将辍学操作用作最小数据增强。然后,采用对比度学习方法来预先训练模块参数。最后,我们将两个编码器组合在一起,以微调CLMN,以决定多模式ACR的结果。 MACR数据集的实验结果表明,我们提出的模型优于最新方法。
Automatic code review (ACR), aiming to relieve manual inspection costs, is an indispensable and essential task in software engineering. The existing works only use the source code fragments to predict the results, missing the exploitation of developer's comments. Thus, we present a Multi-Modal Apache Automatic Code Review dataset (MACR) for the Multi-Modal ACR task. The release of this dataset would push forward the research in this field. Based on it, we propose a Contrastive Learning based Multi-Modal Network (CLMN) to deal with the Multi-Modal ACR task. Concretely, our model consists of a code encoding module and a text encoding module. For each module, we use the dropout operation as minimal data augmentation. Then, the contrastive learning method is adopted to pre-train the module parameters. Finally, we combine the two encoders to fine-tune the CLMN to decide the results of Multi-Modal ACR. Experimental results on the MACR dataset illustrate that our proposed model outperforms the state-of-the-art methods.