arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2103.11626cs.SE
收藏

应用CodeBERT实现Java简单错误的自动程序修复

Applying CodeBERT for Automated Program Repair of Java Simple Bugs

Ehsan Mashhadi, Hadi Hemmati

摘要:

软件调试和程序修复是软件工程中最耗时和劳动密集型的任务之一,自动化将使其受益匪浅。在本文中,我们提出了一种基于CodeBERT的新型自动程序修复方法,CodeBERT是一种基于变换器的神经架构,在大型源代码语料库上进行了预训练。我们在ManySStuBs 4J小型和大型数据集上微调我们的模型,以自动生成修复代码。结果表明,我们的技术在19-72%的情况下准确地预测了开发人员实现的固定代码,具体取决于数据集的类型,每个错误不到一秒。我们还观察到,我们的方法可以生成不同长度的修复(短和长),并可以修复不同类型的错误,即使在训练数据集中只存在这些类型的错误的几个实例。

英文摘要:

Software debugging, and program repair are among the most time-consuming and labor-intensive tasks in software engineering that would benefit a lot from automation. In this paper, we propose a novel automated program repair approach based on CodeBERT, which is a transformer-based neural architecture pre-trained on large corpus of source code. We fine-tune our model on the ManySStuBs4J small and large datasets to automatically generate the fix codes. The results show that our technique accurately predicts the fixed codes implemented by the developers in 19-72% of the cases, depending on the type of datasets, in less than a second per bug. We also observe that our method can generate varied-length fixes (short and long) and can fix different types of bugs, even if only a few instances of those types of bugs exist in the training dataset.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑