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
- Fardin Evne Ayub (ORCID: https://orcid.org/0009-0008-0172-017X)
Institutions
- Daffodil International University (BD)
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