arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2211.14875cs.SEcs.CL
收藏

检测-本地化-修复:学习使用CodeT5进行故障诊断的统一框架

Detect-Localize-Repair: A Unified Framework for Learning to Debug with CodeT5

Salesforce Research Asia(赛富时亚洲研究院)

Nghi D. Q. Bui, Yue Wang, Steven Hoi

摘要:

自动化软件调试是提高软件开发人员生产力的一项重要任务。许多基于神经的技术已经被证明对调试相关的任务有效,例如错误定位和程序修复(或错误修复)。然而,这些技术往往只关注其中之一,或者以阶段性的方式接近它们,忽略了它们之间的相互利益。在这项工作中,我们提出了一种新的统一的\emph{Detect-Localize-Repair}框架的基础上,预先训练的程序设计语言模型CodeT 5无缝地解决这些任务,命名为CodeT 5-DLR。具体来说,我们提出了三个目标,以适应通用CodeT 5调试:一个错误检测目标,以确定是否一个给定的代码片段是错误或没有,一个错误的本地化目标,以确定错误行,和程序修复目标,以翻译错误的代码,其固定的版本。我们在每个任务上评估它,并在Java和Python中的两个新收集的行级调试数据集上进行组合设置。广泛的结果表明,我们的模型显着优于现有的基线从自然语言处理和软件工程域。

英文摘要:

Automated software debugging is a crucial task for improving the productivity of software developers. Many neural-based techniques have been proven effective for debugging-related tasks such as bug localization and program repair (or bug fixing). However, these techniques often focus only on either one of them or approach them in a stage-wise manner, ignoring the mutual benefits between them. In this work, we propose a novel unified \emph{Detect-Localize-Repair} framework based on a pretrained programming language model CodeT5 to seamlessly address these tasks, named CodeT5-DLR. Specifically, we propose three objectives to adapt the generic CodeT5 for debugging: a bug detection objective to determine whether a given code snippet is buggy or not, a bug localization objective to identify the buggy lines, and a program repair objective to translate the buggy code to its fixed version. We evaluate it on each of these tasks and their combined setting on two newly collected line-level debugging datasets in Java and Python. Extensive results show that our model significantly outperforms existing baselines from both NLP and software engineering domains.

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

↑