Reasoning-Guided Cross-Lingual Patch Transfer: Bridging High-Resource Python Fixes to Memory-Safe Systems Languages

Code language models pick up repair patterns fromtraining corpora that are heavily skewed toward a few languages.Python dominates many code-generation benchmarks and trainingcollections, whereas repairs in systems languages often hingeon ownership, lifetimes, concurrency, interfaces, and invariantsthat the compiler enforces. We ask whether structured repairknowledge distilled from Python issue–patch pairs can help zero-shot patch synthesis for Rust and Go. Each Python exampleis compressed into a five-field root-cause schema: the observedsymptom, the suspected root cause, the violated invariant, therepair operator, and the validation obligation. A target-languageanalysis then adds constraints specific to the Rust or Go issuebefore the patch is generated, and the target issue and sourcecontext are kept throughout. The pilot takes its targets fromSWE-bench Multilingual and its Python exemplars from the SWE-bench dev split, since the multilingual dataset contains no Pythonrows. It uses Qwen2.5-Coder-7B-Instruct in four-bit mode andreports patch similarity, exact match, and unified-diff structuralvalidity. Schema-conditioned generation moved similarity slightlyup in Go (0.373 to 0.381) and slightly down in Rust (0.281to 0.263), and no arm produced an exact match. Diff validitydropped under transfer in both languages, and a large share ofthe failed outputs hit a 520-token ceiling. Type/Interface targetsshowed a positive mean gain (N = 3) and Memory/Ownershiptargets a negative one (N = 4), although these heuristic stratahave not been checked by hand. The analysis-token count wasweakly and negatively associated with similarity gain (Spearmanρ = −0.176). Repository tests were not run, so these metricsdescribe the generated patches without establishing functionalcorrectness. Under these conditions the pilot shows no transferbenefit, and it makes clear that output budgets must be controlledbefore a transfer effect can be measured.Index Terms—Automated program repair, cross-lingual transfer,code language models, Rust, Go, root-cause analysis, patchgeneration.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-21
DOI
https://doi.org/10.5281/zenodo.24408259
Primary Topic
Software Engineering Research
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Reasoning-Guided Cross-Lingual Patch Transfer: Bridging High-Resource Python Fixes to Memory-Safe Systems Languages

Fardin Evne Ayub
1 links
Zenodo (CERN European Organization for Nuclear Research)
Software Engineering Research
preprint

Reasoning-Guided Cross-Lingual Patch Transfer: Bridging High-Resource Python Fixes to Memory-Safe Systems Languages

Fardin Evne Ayub
preprint en

Abstract

Code language models pick up repair patterns fromtraining corpora that are heavily skewed toward a few languages.Python dominates many code-generation benchmarks and trainingcollections, whereas repairs in systems languages often hingeon ownership, lifetimes, concurrency, interfaces, and invariantsthat the compiler enforces. We ask whether structured repairknowledge distilled from Python issue–patch pairs can help zero-shot patch synthesis for Rust and Go. Each Python exampleis compressed into a five-field root-cause schema: the observedsymptom, the suspected root cause, the violated invariant, therepair operator, and the validation obligation. A target-languageanalysis then adds constraints specific to the Rust or Go issuebefore the patch is generated, and the target issue and sourcecontext are kept throughout. The pilot takes its targets fromSWE-bench Multilingual and its Python exemplars from the SWE-bench dev split, since the multilingual dataset contains no Pythonrows. It uses Qwen2.5-Coder-7B-Instruct in four-bit mode andreports patch similarity, exact match, and unified-diff structuralvalidity. Schema-conditioned generation moved similarity slightlyup in Go (0.373 to 0.381) and slightly down in Rust (0.281to 0.263), and no arm produced an exact match. Diff validitydropped under transfer in both languages, and a large share ofthe failed outputs hit a 520-token ceiling. Type/Interface targetsshowed a positive mean gain (N = 3) and Memory/Ownershiptargets a negative one (N = 4), although these heuristic stratahave not been checked by hand. The analysis-token count wasweakly and negatively associated with similarity gain (Spearmanρ = −0.176). Repository tests were not run, so these metricsdescribe the generated patches without establishing functionalcorrectness. Under these conditions the pilot shows no transferbenefit, and it makes clear that output budgets must be controlledbefore a transfer effect can be measured.Index Terms—Automated program repair, cross-lingual transfer,code language models, Rust, Go, root-cause analysis, patchgeneration.

Zenodo (CERN European Organization for Nuclear Research)
Daffodil International University (BD)
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
Reasoning-Guided Cross-Lingual Patch Transfer: Bridging High-Resource Python Fixes to Memory-Safe Systems Languages — Fardin Evne Ayub · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS