mlsanityData to 14 Oct 2026

GAMMA: Revisiting Template-based Automated Program Repair via Mask Prediction

arXiv 2309.09308 ↗First posted 17 Sep 2023cs.SEcited by 23

Not on the map. Why?

Abstract (arXiv)

Automated program repair (APR) aims to fix software bugs without human intervention and template-based APR has been widely investigated with promising results. However, it is challenging for template-based APR to select the appropriate donor code, which is an important repair ingredient for generating candidate patches. Inappropriate donor code may cause plausible but incorrect patch generation even with correct fix patterns, limiting the repair performance. In this paper, we aim to revisit template-based APR, and propose GAMMA, to directly leverage large pre-trained language models for donor code generation. Our main insight is that instead of retrieving donor code in the local buggy file, we can directly predict the correct code tokens based on the context code snippets and repair patterns by a cloze task. Specifically, (1) GAMMA revises a variety of fix templates from state-of-the-art template-based APR techniques (i.e., TBar) and transforms them into mask patterns. (2) GAMMA adopts a pre-trained language model to predict the correct code for masked code as a fill-in-the-blank task. The experimental results demonstrate that GAMMA correctly repairs 82 bugs on Defects4J-v1.2, which achieves 20.59% (14 bugs) and 26.15% (17 bugs) improvement over the previous state-of-the-art template-based approach TBar and learning-based one Recoder. Furthermore, GAMMA repairs 45 bugs and 22 bugs from the additional Defects4J-v2.0 and QuixBugs, indicating the generalizability of GAMMA in addressing the dataset overfitting issue. We also prove that adopting other pre-trained language models can provide substantial advancement, e.g., CodeBERT-based and ChatGPT-based GAMMA is able to fix 80 and 67 bugs on Defects4J-v1.2, indicating the scalability of GAMMA. Overall, our study highlights the promising future of adopting pre-trained models to generate correct patches on top of fix patterns.

Key facts. Cited by 23 papers in the map (data through 14 Oct 2026). First posted on arXiv 17 Sep 2023.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 8; 2025: 8; 2026: 7.

23 papers.

Sort:

By area:

  1. 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
  2. 2024How secure is AI-generated Code: A Large-Scale Comparison of Large Language Modelscited by 24
  3. 2024RePair: Automated Program Repair with Process-based Feedbackcited by 16
  4. 2024CigaR: Cost-efficient Program Repair with LLMscited by 15
  5. 2026SGAgent: Suggestion-Guided LLM-Based Multi-Agent Framework for Repository-Level Software Repaircited by 9
  6. 2024Can GPT-O1 Kill All Bugs? An Evaluation of GPT-Family LLMs on QuixBugscited by 7
  7. 2024TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution Alignmentcited by 7
  8. 2025Repair-R1: Better Test Before Repaircited by 6
  9. 2024Memory-Efficient Large Language Models for Program Repair with Semantic-Guided Patch Generationcited by 5
  10. 2024Integrating Various Software Artifacts for Better LLM-based Bug Localization and Program Repaircited by 4
  11. 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Modelscited by 4
  12. 2025Evaluating the Generalizability of LLMs in Automated Program Repaircited by 3
11 more
  1. 2025DynaFix: Iterative Automated Program Repair Driven by Execution-Level Dynamic Informationcited by 3
  2. 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Trainingcited by 2
  3. 2026FailureMem: A Failure-Aware Multimodal Framework for Autonomous Software Repaircited by 2
  4. 2025Accelerating Automatic Program Repair with Dual Retrieval-Augmented Fine-Tuning and Patch Generation on Large Language Modelscited by 1
  5. 2025Empirical Study of Code Large Language Models for Binary Security Patch Detectioncited by 1
  6. 2026ReProAgent: Tool-Augmented Multi-Stage Agentic Generation of Bug Reproduction Tests from Issue Reportscited by 1
  7. 2026Multi-Perspective Agentic Program Repair via Code Property Graphs and Temporal Execution Graphscited by 1
  8. 2025T3: Multi-level Tree-based Automatic Program Repair with Large Language Modelscited by 0
  9. 2026Securing Code Understanding: Detecting Natural Backdoor Vulnerability in Code Language Modelscited by 0
  10. 2026Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflowscited by 0
  11. 2026MultiFixer: A Coordinator-Proposer Based Multi-Agent Framework For Fixing Multi-Hunk Bugscited by 0