Sabaragamuwa University of Sri Lanka

Generating natural language explanations for automated program repair generated patches

Show simple item record

dc.contributor.author Sankaja, H.L.S.
dc.contributor.author Sandeeptha, R.P.G.
dc.contributor.author Ranasingha, R.M.R.U.
dc.contributor.author Wickramanayake, S
dc.contributor.author De Silva, N.
dc.date.accessioned 2026-01-17T08:31:50Z
dc.date.available 2026-01-17T08:31:50Z
dc.date.issued 2025-12-03
dc.identifier.issn 2815-0341
dc.identifier.uri http://repo.lib.sab.ac.lk:8080/xmlui/handle/susl/5189
dc.description.abstract Automated Program Repair (APR) has emerged as a transformative technology in software engineering, promising to reduce debugging time and improve software reliability through automatic bug fixing. However, developers remain hesitant to adopt APR tools due to a lack of transparency in generated patches, creating a critical gap between technical capability and practical adoption. This study aimed to develop FIXPLAIN, an explainable APR framework that simultaneously generates code patches and human-readable natural language explanations using intermediate decoder embeddings. A dataset of 34,640 Java bug-fix pairs was curated from the MegaDiff corpus, and explanations were generated using GPT-4o and Claude with consensusbased filtering for quality assurance. FIXPLAIN employs a lightweight adapter mechanism with cross-attention and gating to integrate APR model embeddings into explanation generation, using LoRA-based fine-tuning while preserving repair model quality. Three evaluation approaches were used for validation: automated metrics (BLEU, ROUGE, METEOR), comparison with baseline models (CodeT5, LLaMA-Instruct), and human evaluation with professional Java developers. The framework significantly outperformed baseline models across all automated metrics, achieving BLEU scores of 17.98 compared to 3.33 for LLaMA-Instruct and METEOR scores of 0.36. Human evaluation with ten professional Java developers confirmed that FIXPLAIN explanations substantially improve developer trust, perceived patch correctness, and understanding of automated fixes. The explanations effectively clarify bug root causes and repair logic, with particular effectiveness for complex logic errors where traditional code comparison provides insufficient insight. FIXPLAIN successfully bridges the gap between automated program repair capabilities and developer acceptance through transparent, trustworthy explanations. The parameter-efficient design enables practical deployment while maintaining repair quality, opening new avenues for multi-task APR systems and developer-centric tooling that could transform automated program repair integration in software development workflows. en_US
dc.language.iso en en_US
dc.publisher Sabaragamuwa University of Sri Lanka en_US
dc.subject Automated program repair en_US
dc.subject Bug fixing en_US
dc.subject Code explanation en_US
dc.subject Developer trust en_US
dc.subject Explainable AI en_US
dc.title Generating natural language explanations for automated program repair generated patches en_US
dc.type Article en_US


Files in this item

This item appears in the following Collection(s)

Show simple item record

Search DSpace


Advanced Search

Browse

My Account