首页> 外文期刊>ACM transactions on software engineering and methodology >An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation
【24h】

An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation

机译:通过神经机器翻译学习野外错误修复补丁的实证研究

获取原文
获取原文并翻译 | 示例

摘要

Millions of open source projects with numerous bug fixes are available in code repositories. This proliferation of software development histories can be leveraged to learn how to fix common programming bugs. To explore such a potential, we perform an empirical study to assess the feasibility of using Neural Machine Translation techniques for learning bug-fixing patches for real defects. First, we mine millions of bug-fixes from the change histories of projects hosted on GitHub in order to extract meaningful examples of such bug-fixes. Next, we abstract the buggy and corresponding fixed code, and use them to train an Encoder-Decoder model able to translate buggy code into its fixed version. In our empirical investigation, we found that such a model is able to fix thousands of unique buggy methods in the wild. Overall, this model is capable of predicting fixed patches generated by developers in 9-50% of the cases, depending on the number of candidate patches we allow it to generate. Also, the model is able to emulate a variety of different Abstract Syntax Tree operations and generate candidate patches in a split second.
机译:代码存储库中提供了数百万个具有大量错误修复的开源项目。可以利用软件开发历史的激增来学习如何修复常见的编程错误。为了探索这种潜力,我们进行了一项实证研究,以评估使用神经机器翻译技术学习针对实际缺陷的错误修复补丁的可行性。首先,我们从GitHub上托管的项目的变更历史中挖掘了数百万个错误修复程序,以提取此类错误修复程序的有意义示例。接下来,我们将错误代码和相应的固定代码抽象化,并使用它们来训练能够将错误代码转换为其固定版本的Encoder-Decoder模型。在我们的实证研究中,我们发现这种模型能够在野外修复数千种独特的越野车方法。总体而言,此模型能够在9-50%的情况下预测开发人员生成的固定补丁,具体取决于我们允许其生成的候选补丁的数量。此外,该模型还可以模拟各种不同的抽象语法树操作,并在一瞬间生成候选补丁。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号