Conceptio › Archive › arXiv (OAI)
arXiv (OAI) open access

MultiMend: Multilingual Program Repair with Context Augmentation and Multi-Hunk Patch Generation

Gharibi, Reza et al. · 2025 · arxiv_oai
arXiv (OAI) · Papers · 2025
Open Source ↗Direct PDF ↓
software-engineering
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

[2501.16044] MultiMend: Multilingual Program Repair with Context Augmentation and Multi-Hunk Patch Generation Skip to main content Search Submit Donate Log in Search arXiv Press Enter to search · Advanced search Computer Science > Software Engineering arXiv:2501.16044 (cs) [Submitted on 27 Jan 2025 ( v1 ), last revised 27 Dec 2025 (this version, v2)] Title: MultiMend: Multilingual Program Repair with Context Augmentation and Multi-Hunk Patch Generation Authors: Reza Gharibi , Mohammad Hadi Sadreddini , Seyed Mostafa Fakhrahmad View a PDF of the paper titled MultiMend: Multilingual Program Repair with Context Augmentation and Multi-Hunk Patch Generation, by Reza Gharibi and 2 other authors View PDF HTML (experimental) Abstract: Debugging software remains a labor-intensive and time-consuming process despite advances in testing and verification. Learning-based automated program repair (APR) has shown promise in reducing the effort of manually fixing bugs. However, existing techniques face several challenges, including language-dependent strategies, limited bug context utilization, and difficulties in handling bugs that span multiple locations in the code. This paper presents MultiMend, a multilingual learning-based APR approach designed to improve repair performance through language-independent context augmentation and multi-hunk patch generation. MultiMend fine-tunes a pre-trained code language model to generate bug-fixing patches. It embeds source code lines and applies retrieval-augmented generation to augment the usual function-based buggy context with relevant lines during patch generation. The approach also systematically constructs patches for multi-hunk bugs to extend the capabilities of single-hunk models and reduce the needed patch validations. We evaluate MultiMend on six benchmarks with 5,501 bugs covering four programming languages and compare it with state-of-the-art methods. Results show that MultiMend achieves competitive effectiveness and efficiency, fixing 2,227 bugs, of which 1,545 are identical to the developer's patch, and 121 are for multi-hunk bugs. Both context augmentation and multi-hunk patch generation contribute positively to these results. Overall, MultiMend's contributions are promising and offer practical and effective techniques to enhance APR performance for real-world software maintenance. Subjects: Software Engineering (cs.SE) Cite as: arXiv:2501.16044 [cs.SE] (or arXiv:2501.16044v2 [cs.SE] for this version) https://doi.org/10.48550/arXiv.2501.16044 Focus to learn more arXiv-issued DOI via DataCite Journal reference: Autom Softw Eng 33, 69 (2026) Related DOI : https://doi.org/10.1007/s10515-026-00611-2 Focus to learn more DOI(s) linking to related resources Submission history From: Reza Gharibi [ view email ] [v1] Mon, 27 Jan 2025 13:37:43 UTC (565 KB) [v2] Sat, 27 Dec 2025 19:04:46 UTC (327 KB) Full-text links: Access Paper: View a PDF of the paper titled MultiMend: Multilingual Program Repair with Context Augmentation and Multi-Hunk Patch Generation, by Reza Gharibi and 2 other authors View PDF HTML (experimental) TeX Source view license Current browse context: cs.SE < prev | next > new | recent | 2025-01 Change to browse by: cs References & Citations NASA ADS Google Scholar Semantic Scholar export BibTeX citation Loading... BibTeX formatted citation × loading... Data provided by: Bookmark Bibliographic Tools Bibliographic and Citation Tools Bibliographic Explorer Toggle Bibliographic Explorer ( What is the Explorer? ) Connected Papers Toggle Connected Papers ( What is Connected Papers? ) Litmaps Toggle Litmaps ( What is Litmaps? ) scite.ai Toggle scite Smart Citations ( What are Smart Citations? ) Code, Data, Media Code, Data and Media Associated with this Article alphaXiv Toggle alphaXiv ( What is alphaXiv? ) Links to Code Toggle CatalyzeX Code Finder for Papers ( What is CatalyzeX? ) DagsHub Toggle DagsHub ( What is DagsHub? ) GotitPub Toggle Gotit.pub ( What is GotitPub? ) Huggingface Toggle Hugging Face ( What is Huggingface? ) ScienceCast Toggle ScienceCast ( What is ScienceCast? ) Demos Demos Replicate Toggle Replicate ( What is Replicate? ) Spaces Toggle Hugging Face Spaces ( What is Spaces? ) Spaces Toggle TXYZ.AI ( What is TXYZ.AI? ) Related Papers Recommenders and Search Tools Link to Influence Flower Influence Flower ( What are Influence Flowers? ) Core recommender toggle CORE Recommender ( What is CORE? ) Author Venue Institution Topic About arXivLabs arXivLabs: experimental projects with community collaborators arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website. Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them. Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs . Which authors of this paper are endorsers? | Disable MathJax ( What is MathJax? ) We gratefully acknowledge support from our major funders , member institutions , , and all contributors. About · Help · Contact · Subscribe · Copyright · Privacy · Accessibility · Operational Status (opens in new tab) Major funding support from

Related documents

Record · ID 139121 · SHA-256 44c44a64f95a1015
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive