Papers › Patching as Translation: the Data and the Metaphor

Patching as Translation: the Data and the Metaphor

24 Aug 2020arXiv:2008.10707archive 2025-07-28

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

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2008.10707")

Code

Syntology Ran 1 of 8 code samples harvested from 1 repository linked to this paper; 7 have no recorded run. Of those that ran: 1 ran · violated contract.

By repository: official repository: 8 samples from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

ARiSE-Lab/Patch-as-translation officialmentioned in papermentioned on GitHubtfMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

8 samples harvested; 1 ran; 0 honoured the contract we drafted; 7 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · violated contract
7unverified

Licence: 0 of the 8 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from ARiSE-Lab/Patch-as-translation. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

intersection ARiSE-Lab/Patch-as-translation/Analysis/code/filter_consecutive_identical.py official repository ran · violated contract fingerprinted MIT (permissive) · cf83a84f693a8da2 · report
calcNSim ARiSE-Lab/Patch-as-translation/Analysis/code/real-fix-analysis.py official repository unverified MIT (permissive) · 8ff84c3a3d60b0d0 · report
calculate_edit_distance ARiSE-Lab/Patch-as-translation/Analysis/code/util.py official repository unverified MIT (permissive) · e0071ec52c871687 · report
get_jaccard_sim ARiSE-Lab/Patch-as-translation/Analysis/code/util.py official repository unverified MIT (permissive) · 6b27265d93ca83ff · report
jaccard_ngram ARiSE-Lab/Patch-as-translation/Analysis/code/util.py official repository unverified MIT (permissive) · 21d04e83d6baca2d · report
masked_ce_loss ARiSE-Lab/Patch-as-translation/Model/train_model.py official repository unverified MIT (permissive) · 5bb713ec36ef65f8 · report
positional_encoding ARiSE-Lab/Patch-as-translation/Model/transformer.py official repository unverified MIT (permissive) · 5027eaa2ad899e58 · report
processContextLine ARiSE-Lab/Patch-as-translation/Analysis/code/real-fix-analysis.py official repository unverified MIT (permissive) · d07266ae4f7879a4 · report

Tasks

General KnowledgeProgram RepairTranslation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Repair

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections