Automatic program repair (APR) is crucial to improve software reliability. Recently, neural machine translation (NMT) techniques have been used to fix software bugs automatically. While promising, these approaches have two major limitations. Their search space often does not contain the correct fix, and their search strategy ignores software knowledge such as strict code syntax. Due to these limitations, existing NMT-based techniques underperform the best template-based approaches. We propose CURE, a new NMT-based APR technique with three major novelties. First, CURE pre-trains a programming language (PL) model on a large software codebase to learn developer-like source code before the APR task. Second, CURE designs a new code-aware search strategy that finds more correct fixes by focusing on compilable patches and patches that are close in length to the buggy code. Finally, CURE uses a subword tokenization technique to generate a smaller search space that contains more correct fixes. Our evaluation on two widely-used benchmarks shows that CURE correctly fixes 57 Defects4J bugs and 26 QuixBugs bugs, outperforming all existing APR techniques on both benchmarks.


翻译:自动程序修理( APR) 是提高软件可靠性的关键。 最近, 神经机翻译( NMT) 技术被自动地用于修复软件错误。 虽然有希望, 但这些方法有两个主要的局限性 。 它们的搜索空间通常不包含正确的修正, 它们的搜索策略忽略了软件知识, 如严格的代码语法。 由于这些限制, 现有的 NMT 技术低于基于最佳模板的方法。 我们提议CURE, 基于 NMT 的新型 NPRA 技术, 有三大新颖之处。 首先, CURE 预对软件代码库的编程语言( PL) 模型进行测试, 以在 RA 任务之前学习开发者相似的源代码。 其次, CURE 设计新的代码识别搜索策略, 以可兼容的补丁码和补丁与错误代码相近的方式找到更正确的修正。 最后, CURE 使用子词代号代号技术来生成一个更小的搜索空间, 其中含有更正确的修正。 我们对两个广泛使用的基准的评估显示 CURE 正确修正了 57 Defectsyts4J 和 QUBUBugs 。

0
下载
关闭预览

相关内容

机器翻译(Machine Translation)涵盖计算语言学和语言工程的所有分支,包含多语言方面。特色论文涵盖理论,描述或计算方面的任何下列主题:双语和多语语料库的编写和使用,计算机辅助语言教学,非罗马字符集的计算含义,连接主义翻译方法,对比语言学等。 官网地址:http://dblp.uni-trier.de/db/journals/mt/
专知会员服务
123+阅读 · 2020年9月8日
【Google】无监督机器翻译,Unsupervised Machine Translation
专知会员服务
35+阅读 · 2020年3月3日
吴恩达新书《Machine Learning Yearning》完整中文版
专知会员服务
144+阅读 · 2019年10月27日
LibRec 精选:AutoML for Contextual Bandits
LibRec智能推荐
7+阅读 · 2019年9月19日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
无监督元学习表示学习
CreateAMind
26+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Disentangled的假设的探讨
CreateAMind
9+阅读 · 2018年12月10日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
自然语言处理(二)机器翻译 篇 (NLP: machine translation)
DeepLearning中文论坛
10+阅读 · 2015年7月1日
Arxiv
0+阅读 · 2021年7月9日
Phrase-Based & Neural Unsupervised Machine Translation
Arxiv
3+阅读 · 2018年6月1日
Arxiv
3+阅读 · 2018年4月18日
Arxiv
3+阅读 · 2018年3月28日
Arxiv
6+阅读 · 2018年2月28日
Arxiv
6+阅读 · 2018年2月26日
VIP会员
相关资讯
LibRec 精选:AutoML for Contextual Bandits
LibRec智能推荐
7+阅读 · 2019年9月19日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
无监督元学习表示学习
CreateAMind
26+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Disentangled的假设的探讨
CreateAMind
9+阅读 · 2018年12月10日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
自然语言处理(二)机器翻译 篇 (NLP: machine translation)
DeepLearning中文论坛
10+阅读 · 2015年7月1日
Top
微信扫码咨询专知VIP会员