Patching as Translation: the Data and the Metaphor

08/24/2020
by   Yangruibo Ding, et al.
0

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.

READ FULL TEXT

page 6

page 8

11/24/2018

How to Design a Program Repair Bot? Insights from the Repairnator Project

Program repair research has made tremendous progress over the last few y...
10/11/2019

Repairnator patches programs automatically

Repairnator is a bot. It constantly monitors software bugs discovered du...
02/13/2018

Replication studies considered harmful

CONTEXT: There is growing interest in establishing software engineering ...
04/06/2021

CodeTrans: Towards Cracking the Language of Silicon's Code Through Self-Supervised Deep Learning and High Performance Computing

Currently, a growing number of mature natural language processing applic...
08/03/2021

Tutorials on Testing Neural Networks

Deep learning achieves remarkable performance on pattern recognition, bu...
03/30/2022

Does Configuration Encoding Matter in Learning Software Performance? An Empirical Study on Encoding Schemes

Learning and predicting the performance of a configurable software syste...