arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2008.10707cs.SEcs.LGcs.PL
收藏

修补即翻译:数据与隐喻

Patching as Translation: the Data and the Metaphor

Columbia University(哥伦比亚大学);University of California, Davis(加利福尼亚大学戴维斯分校)

Yangruibo Ding, Baishakhi Ray, Premkumar Devanbu, Vincent J. Hellendoorn

摘要:

来自其他领域的机器学习模型,如计算语言学,已经被移植到软件工程任务中,通常非常成功。然而,一个移植模型在特定任务上的初步成功并不一定意味着它非常适合该任务。在这项工作中,我们研究了这种现象的一个常见的例子:“软件修补就像语言翻译”的自负。我们的经验表明,序列到序列模型和翻译模型之间有微妙的,但关键的区别:虽然程序修复大大受益于前者,一般的建模架构,它实际上受到设计决策内置到后者,无论是在翻译的准确性和多样性。鉴于这些发现,我们展示了如何更原则的方法来模型设计,基于我们的实证研究结果和软件开发的一般知识,可以导致更好的解决方案。我们的研究结果也提供了强有力的支持,最近的趋势,合成编辑的代码有条件的错误的上下文,以修复错误。我们自己实现这样的模型作为“概念验证”工具,并根据经验证实,它们的行为在根本上不同的,更有效的方式比研究的预防为基础的架构。总的来说,我们的研究结果证明了在软件工程中研究机器学习模型的复杂性的优点:这不仅可以帮助阐明可能被准确性提高所掩盖的潜在问题;它还可以帮助在这些模型上进行创新,以进一步提高最先进的水平。我们将在https://github.com/ARiSE-Lab/Patch-as-translation上公开发布我们的复制数据和材料。

英文摘要:

Machine Learning models from other fields, like Computational Linguistics, have been transplanted to Software Engineering tasks, often quite successfully. Yet a transplanted model's initial success at a given task does not necessarily mean it is well-suited for the task. In this work, we examine a common example of this phenomenon: the conceit that "software patching is like language translation". We demonstrate empirically that there are subtle, but critical distinctions between sequence-to-sequence models and translation model: while program repair benefits greatly from the former, general modeling architecture, it actually suffers from design decisions built into the latter, both in terms of translation accuracy and diversity. Given these findings, we demonstrate how a more principled approach to model design, based on our empirical findings and general knowledge of software development, can lead to better solutions. Our findings also lend strong support to the recent trend towards synthesizing edits of code conditional on the buggy context, to repair bugs. We implement such models ourselves as "proof-of-concept" tools and empirically confirm that they behave in a fundamentally different, more effective way than the studied translation-based architectures. Overall, our results demonstrate the merit of studying the intricacies of machine learned models in software engineering: not only can this help elucidate potential issues that may be overshadowed by increases in accuracy; it can also help innovate on these models to raise the state-of-the-art further. We will publicly release our replication data and materials at https://github.com/ARiSE-Lab/Patch-as-translation.

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

↑