Learning Syntactic Program Transformations from Examples
Not on the map. Why?
Abstract (arXiv)
IDEs, such as Visual Studio, automate common transformations, such as Rename and Extract Method refactorings. However, extending these catalogs of transformations is complex and time-consuming. A similar phenomenon appears in intelligent tutoring systems where instructors have to write cumbersome code transformations that describe "common faults" to fix similar student submissions to programming assignments. We present REFAZER, a technique for automatically generating program transformations. REFAZER builds on the observation that code edits performed by developers can be used as examples for learning transformations. Example edits may share the same structure but involve different variables and subexpressions, which must be generalized in a transformation at the right level of abstraction. To learn transformations, REFAZER leverages state-of-the-art programming-by-example methodology using the following key components: (a) a novel domain-specific language (DSL) for describing program transformations, (b) domain-specific deductive algorithms for synthesizing transformations in the DSL, and (c) functions for ranking the synthesized transformations. We instantiate and evaluate REFAZER in two domains. First, given examples of edits used by students to fix incorrect programming assignment submissions, we learn transformations that can fix other students' submissions with similar faults. In our evaluation conducted on 4 programming tasks performed by 720 students, our technique helped to fix incorrect submissions for 87% of the students. In the second domain, we use repetitive edits applied by developers to the same project to synthesize a program transformation that applies these edits to other locations in the code. In our evaluation conducted on 59 scenarios of repetitive edits taken from 3 C# open-source projects, REFAZER learns the intended program transformation in 83% of the cases.
Key facts. Cited by 17 papers in the map (data through 7 Oct 2026). First posted on arXiv 31 Aug 2016.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 2; 2022: 5; 2023: 3; 2024: 3; 2025: 2; 2026: 2.
17 papers.
Sort:
By area:
- 2021A Syntax-Guided Edit Decoder for Neural Program Repaircited by 57
- 2022Repairing Bugs in Python Assignments Using Large Language Modelscited by 28
- 2021On Multi-Modal Learning of Editing Source Codecited by 25
- 2023GrACE: Generation using Associated Code Editscited by 16
- 2023Towards Generating Functionally Correct Code Edits from Natural Language Issue Descriptionscited by 14
- 2022Neurosymbolic Repair for Low-Code Formula Languagescited by 12
- 2022Overwatch: Learning Patterns in Code Edit Sequencescited by 8
- 2024Counterexample Guided Program Repair Using Zero-Shot Learning and MaxSAT-based Fault Localizationcited by 8
- 2024Navigating the Landscape of Hint Generation Research: From the Past to the Futurecited by 6
- 2022C-Pack of IPAs: A C90 Program Benchmark of Introductory Programming Assignmentscited by 5
- 2023MELT: Mining Effective Lightweight Transformations from Pull Requestscited by 2
- 2025MigGPT: Harnessing Large Language Models for Automated Migration of Out-of-Tree Linux Kernel Patches Across Versionscited by 2
5 more
- 2026Evaluating Language Models on Cross-Language Code Functional Equivalencecited by 1
- 2022Example-based Synthesis of Static Analysis Rulescited by 0
- 2024Peer-aided Repairer: Empowering Large Language Models to Repair Advanced Student Assignmentscited by 0
- 2025Designing and Evaluating Chain-of-Hints for Scientific Question Answeringcited by 0
- 2026Agentic Generation of AST Transformation Rules for Fixing Breaking Updatescited by 0
- 2026Evaluating Language Models on Cross-Language Code Functional Equivalence25 Aug 2026
- 2026Agentic Generation of AST Transformation Rules for Fixing Breaking Updates23 Jun 2026
- 2025Designing and Evaluating Chain-of-Hints for Scientific Question Answering24 Oct 2025
- 2025MigGPT: Harnessing Large Language Models for Automated Migration of Out-of-Tree Linux Kernel Patches Across Versions13 Apr 2025
- 2024Counterexample Guided Program Repair Using Zero-Shot Learning and MaxSAT-based Fault Localization19 Dec 2024
- 2024Navigating the Landscape of Hint Generation Research: From the Past to the Future6 Apr 2024
- 2024Peer-aided Repairer: Empowering Large Language Models to Repair Advanced Student Assignments2 Apr 2024
- 2023MELT: Mining Effective Lightweight Transformations from Pull Requests28 Aug 2023
- 2023GrACE: Generation using Associated Code Edits23 May 2023
- 2023Towards Generating Functionally Correct Code Edits from Natural Language Issue Descriptions7 Apr 2023
- 2022Repairing Bugs in Python Assignments Using Large Language Models29 Sep 2022
- 2022Overwatch: Learning Patterns in Code Edit Sequences25 Jul 2022
5 more
- 2022Neurosymbolic Repair for Low-Code Formula Languages24 Jul 2022
- 2022C-Pack of IPAs: A C90 Program Benchmark of Introductory Programming Assignments17 Jun 2022
- 2022Example-based Synthesis of Static Analysis Rules19 Apr 2022
- 2021On Multi-Modal Learning of Editing Source Code15 Aug 2021
- 2021A Syntax-Guided Edit Decoder for Neural Program Repair15 Jun 2021
- 2021A Syntax-Guided Edit Decoder for Neural Program Repaircited by 57
- 2022Repairing Bugs in Python Assignments Using Large Language Modelscited by 28
- 2021On Multi-Modal Learning of Editing Source Codecited by 25
- 2023GrACE: Generation using Associated Code Editscited by 16
- 2023Towards Generating Functionally Correct Code Edits from Natural Language Issue Descriptionscited by 14
- 2022Neurosymbolic Repair for Low-Code Formula Languagescited by 12
- 2022Overwatch: Learning Patterns in Code Edit Sequencescited by 8
- 2024Counterexample Guided Program Repair Using Zero-Shot Learning and MaxSAT-based Fault Localizationcited by 8
- 2024Navigating the Landscape of Hint Generation Research: From the Past to the Futurecited by 6
- 2022C-Pack of IPAs: A C90 Program Benchmark of Introductory Programming Assignmentscited by 5
- 2023MELT: Mining Effective Lightweight Transformations from Pull Requestscited by 2
- 2025MigGPT: Harnessing Large Language Models for Automated Migration of Out-of-Tree Linux Kernel Patches Across Versionscited by 2
12 most cited of 16 All 16 (JSON)
- 2026Evaluating Language Models on Cross-Language Code Functional Equivalence25 Aug 2026
- 2025Designing and Evaluating Chain-of-Hints for Scientific Question Answering24 Oct 2025
- 2025MigGPT: Harnessing Large Language Models for Automated Migration of Out-of-Tree Linux Kernel Patches Across Versions13 Apr 2025
- 2024Counterexample Guided Program Repair Using Zero-Shot Learning and MaxSAT-based Fault Localization19 Dec 2024
- 2024Navigating the Landscape of Hint Generation Research: From the Past to the Future6 Apr 2024
- 2024Peer-aided Repairer: Empowering Large Language Models to Repair Advanced Student Assignments2 Apr 2024
- 2023MELT: Mining Effective Lightweight Transformations from Pull Requests28 Aug 2023
- 2023GrACE: Generation using Associated Code Edits23 May 2023
- 2023Towards Generating Functionally Correct Code Edits from Natural Language Issue Descriptions7 Apr 2023
- 2022Repairing Bugs in Python Assignments Using Large Language Models29 Sep 2022
- 2022Overwatch: Learning Patterns in Code Edit Sequences25 Jul 2022
- 2022Neurosymbolic Repair for Low-Code Formula Languages24 Jul 2022
12 newest of 16 All 16 (JSON)