<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="static/style.xsl"?><OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"><responseDate>2026-12-01T12:30:07Z</responseDate><request verb="GetRecord" identifier="oai:dr.ntu.edu.sg:10356/173910" metadataPrefix="dim">https://dr.ntu.edu.sg/server/oai/request</request><GetRecord><record><header><identifier>oai:dr.ntu.edu.sg:10356/173910</identifier><datestamp>2026-11-29T20:43:16Z</datestamp><setSpec>com_10356_983</setSpec><setSpec>com_10356_19</setSpec><setSpec>com_10356_11</setSpec><setSpec>col_10356_2142</setSpec></header><metadata><dim:dim xmlns:dim="http://www.dspace.org/xmlns/dspace/dim" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:doc="http://www.lyncode.com/xoai" xsi:schemaLocation="http://www.dspace.org/xmlns/dspace/dim http://www.dspace.org/schema/dim.xsd">
   <dim:field mdschema="dc" element="contributor" qualifier="author" lang="en_US">Wang, Weishi</dim:field>
   <dim:field mdschema="dc" element="contributor" qualifier="supervisor" lang="en_US">Joty Shafiq Rayhan</dim:field>
   <dim:field mdschema="dc" element="contributor" qualifier="supervisor" lang="en_US">Luu Anh Tuan</dim:field>
   <dim:field mdschema="dc" element="contributor" qualifier="school" lang="en_US" authority="0064fbb7-8b8b-47d3-a556-4cf196429817" confidence="500">School of Computer Science and Engineering</dim:field>
   <dim:field mdschema="dc" element="contributor" qualifier="organization" lang="en_US" authority="5eeec55f-6622-4e4c-bc9f-75085836538f" confidence="600">Salesforce Research Aisa</dim:field>
   <dim:field mdschema="dc" element="contributor" qualifier="supervisor2" lang="en_US">Steven Hoi</dim:field>
   <dim:field mdschema="dc" element="contributor" qualifier="supervisoremail" lang="en_US">anhtuan.luu@ntu.edu.sg, srjoty@ntu.edu.sg</dim:field>
   <dim:field mdschema="dc" element="date" qualifier="accessioned">2024-03-06T07:35:12Z</dim:field>
   <dim:field mdschema="dc" element="date" qualifier="available">2024-03-06T07:35:12Z</dim:field>
   <dim:field mdschema="dc" element="date" qualifier="issued">2024</dim:field>
   <dim:field mdschema="dc" element="identifier" qualifier="citation" lang="en_US">Wang,  W. (2024). Neural code generation for robust automatic program repair. Doctoral thesis, Nanyang Technological University, Singapore. https://hdl.handle.net/10356/173910</dim:field>
   <dim:field mdschema="dc" element="identifier" qualifier="uri" lang="en">https://hdl.handle.net/10356/173910</dim:field>
   <dim:field mdschema="dc" element="identifier" qualifier="doi">10.32657/10356/173910</dim:field>
   <dim:field mdschema="dc" element="description" qualifier="abstract" lang="en_US">Automatic program repair (APR) is crucial to reduce manual debugging efforts for&#xd;
developers and improve software reliability. Consequently, it has gained increasing&#xd;
attention as an essential technique in software development to boost developers’&#xd;
productivity. Conventional search-based techniques typically rely on heuristic rules&#xd;
or a redundancy assumption to mine fix patterns, which continuously generate&#xd;
code patches until the resultant program meets the pre-defined test specifications.&#xd;
However, these approaches often yield a substantial amount of low-quality patch&#xd;
candidates, leading to an ineffective APR system. To address these limitations,&#xd;
inspired by the surge of deep learning (DL) based approaches for natural language&#xd;
processing (NLP), we focus on robust APR methods in real-world scenarios via&#xd;
neural code generation. In this thesis, we leverage recent advances in deep learning&#xd;
and deploy novel transformer-based frameworks to automate the program repair&#xd;
process in a data-driven manner. This thesis presents numerous contributions&#xd;
toward the development of robust automatic program repair.&#xd;
First, we propose a novel code-aware, encoder-decoder-based pre-trained programming language model CodeT5 to support both code understanding and generation&#xd;
tasks. To be more specific, we employ a unified encoder-decoder transformer architecture T5 and incorporate code-specific knowledge for better code representation&#xd;
and understanding. Furthermore, we propose a novel identifier-aware pre-training&#xd;
task that enables the model to distinguish which code tokens are identifiers and to&#xd;
recover them when they are masked. Besides, we propose to exploit the user-written&#xd;
code comments with a bimodal dual-generation task for better natural language&#xd;
(NL)-programming language (PL) alignment. Comprehensive experiments show&#xd;
that CodeT5 significantly outperforms prior methods on understanding tasks such&#xd;
as code defect detection and clone detection, and generation tasks across various&#xd;
directions including PL-NL, NL-PL, and PL-PL. Further analysis reveals that our&#xd;
model can better capture semantic information from code.&#xd;
Second, we investigate the effectiveness of leveraging bug-fix patterns for automatic&#xd;
program repair. We propose a novel Retrieval-Augmented Patch Generation&#xd;
framework (RAP-Gen) by explicitly leveraging relevant fix patterns retrieved from&#xd;
a codebase of previous bug-fix pairs. Specifically, we build a hybrid patch retriever&#xd;
to account for both lexical and semantic matching based on the raw source code in a&#xd;
&#xd;
language-agnostic manner, which does not rely on any code-specific features. In addition, we adapt our code-aware language model CodeT5 as the foundation model&#xd;
to facilitate both patch retrieval and generation tasks in a unified manner. Notably,&#xd;
RAP-Gen is a generic APR framework that can flexibly integrate different patch&#xd;
retrievers and generators to repair various types of bugs. We thoroughly evaluate&#xd;
RAP-Gen on three benchmarks in two programming languages, including the TFix&#xd;
benchmark in JavaScript, and Code Refinement and Defects4J benchmarks in Java,&#xd;
where the bug localization information may or may not be provided. Experimental results show that RAP-Gen significantly outperforms previous state-of-the-art&#xd;
(SoTA) approaches on all benchmarks, e.g., boosting the accuracy of T5-large on&#xd;
TFix from 49.70% to 54.15% (repairing 478 more bugs) and repairing 15 more bugs&#xd;
on 818 Defects4J bugs. Further analysis reveals that our patch retriever can search&#xd;
for relevant fix patterns to guide the APR systems.&#xd;
Third, we focus on a novel task of low-resource APR. Recent advances in deep&#xd;
learning (DL) based models have demonstrated promising results by learning from&#xd;
large-scale bug-fix examples in a data-driven manner. However, in practical scenarios, software bugs have an imbalanced distribution, and the fixing knowledge&#xd;
learned by APR models often only captures the patterns of frequent error types,&#xd;
making it inapplicable to handle the rare error types. To address this limitation, we propose Meta-APR, a new meta-learning framework integrated with code&#xd;
pretrained language models to generate fixes for low-resource bugs with limited&#xd;
training samples. Extensive experimental results on three benchmarks in various&#xd;
programming languages verify the superiority of our method over existing DL-based&#xd;
APR approaches.&#xd;
Last but not least, we explore xCodeEval, the largest executable multilingual&#xd;
multitask benchmark to date consisting of 25 M document-level coding examples&#xd;
from about 7.5K unique problems covering up to 17 programming languages with&#xd;
execution-level parallelism. We propose a novel APR task to synthesize a fix for a&#xd;
detected program bug. Specifically, given a bug-specific defect, the objective of this&#xd;
task is to generate a correct fix that passes all the unit tests. Detailed experiments&#xd;
demonstrate that our proposed APR task offers a fresh perspective for examining&#xd;
and analyzing large language model (LLM)-based APR, facilitating comprehensive&#xd;
and to some extent highly interpretable investigations of their repair performance.&#xd;
&#xd;
This thesis strives for a robust neural code generation across multiple languages&#xd;
and tasks, facilitating real-world APR tasks to alleviate manual debugging efforts&#xd;
for everyone regardless of their coding background.</dim:field>
   <dim:field mdschema="dc" element="description" qualifier="degree" lang="en_US">Doctor of Philosophy</dim:field>
   <dim:field mdschema="dc" element="language" qualifier="iso" lang="en_US">en</dim:field>
   <dim:field mdschema="dc" element="publisher" lang="en_US">Nanyang Technological University</dim:field>
   <dim:field mdschema="dc" element="rights" lang="en_US">This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).</dim:field>
   <dim:field mdschema="dc" element="subject" lang="en_US">Computer and Information Science</dim:field>
   <dim:field mdschema="dc" element="title" lang="en_US">Neural code generation for robust automatic program repair</dim:field>
   <dim:field mdschema="dc" element="type" lang="en_US">Thesis-Doctor of Philosophy</dim:field>
   <dim:field mdschema="dc" element="format" qualifier="mimetype">application/pdf</dim:field>
   <dim:field mdschema="dspace" element="entity" qualifier="type">Publication</dim:field>
   <dim:field mdschema="cris" element="lastimport" qualifier="scopus">2026-11-29T20:43:15Z</dim:field>
   <dim:field mdschema="cris" element="lastimport" qualifier="wos">2025-05-29T23:12:41Z</dim:field>
   <dim:field mdschema="datacite" element="rights">open.access</dim:field>open.accessopen.access<dim:field mdschema="cerif" element="openaire" authority="" confidence="-1">&lt;Publication xmlns="https://www.openaire.eu/cerif-profile/1.1/" id="450b96d1-8430-47b4-b108-4f128d15ef35">
	&lt;Type xmlns="https://www.openaire.eu/cerif-profile/vocab/COAR_Publication_Types">http://purl.org/coar/resource_type/c_1843&lt;/Type>
	&lt;Language>en&lt;/Language>
   	&lt;Title>Neural code generation for robust automatic program repair&lt;/Title>
   	&lt;PublishedIn>
    	&lt;Publication>
      	&lt;/Publication>
   	&lt;/PublishedIn>
   	&lt;PublicationDate>2024&lt;/PublicationDate>
   	&lt;DOI>10.32657/10356/173910&lt;/DOI>
   	&lt;Authors&gt;
      	&lt;Author>
        	&lt;DisplayName>Wang, Weishi&lt;/DisplayName>
         	&lt;Affiliation>
         		&lt;OrgUnit>
         		&lt;/OrgUnit>
         	&lt;/Affiliation>
      	&lt;/Author>
	&lt;/Authors>
   	&lt;Editors>
	&lt;/Editors>
    &lt;Publishers>
        &lt;Publisher>
            &lt;DisplayName>Nanyang Technological University&lt;/DisplayName>
            &lt;OrgUnit />
        &lt;/Publisher>
    &lt;/Publishers>
    &lt;Keyword>Computer and Information Science&lt;/Keyword>
   	&lt;Abstract>Automatic program repair (APR) is crucial to reduce manual debugging efforts for&#xd;
developers and improve software reliability. Consequently, it has gained increasing&#xd;
attention as an essential technique in software development to boost developers’&#xd;
productivity. Conventional search-based techniques typically rely on heuristic rules&#xd;
or a redundancy assumption to mine fix patterns, which continuously generate&#xd;
code patches until the resultant program meets the pre-defined test specifications.&#xd;
However, these approaches often yield a substantial amount of low-quality patch&#xd;
candidates, leading to an ineffective APR system. To address these limitations,&#xd;
inspired by the surge of deep learning (DL) based approaches for natural language&#xd;
processing (NLP), we focus on robust APR methods in real-world scenarios via&#xd;
neural code generation. In this thesis, we leverage recent advances in deep learning&#xd;
and deploy novel transformer-based frameworks to automate the program repair&#xd;
process in a data-driven manner. This thesis presents numerous contributions&#xd;
toward the development of robust automatic program repair.&#xd;
First, we propose a novel code-aware, encoder-decoder-based pre-trained programming language model CodeT5 to support both code understanding and generation&#xd;
tasks. To be more specific, we employ a unified encoder-decoder transformer architecture T5 and incorporate code-specific knowledge for better code representation&#xd;
and understanding. Furthermore, we propose a novel identifier-aware pre-training&#xd;
task that enables the model to distinguish which code tokens are identifiers and to&#xd;
recover them when they are masked. Besides, we propose to exploit the user-written&#xd;
code comments with a bimodal dual-generation task for better natural language&#xd;
(NL)-programming language (PL) alignment. Comprehensive experiments show&#xd;
that CodeT5 significantly outperforms prior methods on understanding tasks such&#xd;
as code defect detection and clone detection, and generation tasks across various&#xd;
directions including PL-NL, NL-PL, and PL-PL. Further analysis reveals that our&#xd;
model can better capture semantic information from code.&#xd;
Second, we investigate the effectiveness of leveraging bug-fix patterns for automatic&#xd;
program repair. We propose a novel Retrieval-Augmented Patch Generation&#xd;
framework (RAP-Gen) by explicitly leveraging relevant fix patterns retrieved from&#xd;
a codebase of previous bug-fix pairs. Specifically, we build a hybrid patch retriever&#xd;
to account for both lexical and semantic matching based on the raw source code in a&#xd;
&#xd;
language-agnostic manner, which does not rely on any code-specific features. In addition, we adapt our code-aware language model CodeT5 as the foundation model&#xd;
to facilitate both patch retrieval and generation tasks in a unified manner. Notably,&#xd;
RAP-Gen is a generic APR framework that can flexibly integrate different patch&#xd;
retrievers and generators to repair various types of bugs. We thoroughly evaluate&#xd;
RAP-Gen on three benchmarks in two programming languages, including the TFix&#xd;
benchmark in JavaScript, and Code Refinement and Defects4J benchmarks in Java,&#xd;
where the bug localization information may or may not be provided. Experimental results show that RAP-Gen significantly outperforms previous state-of-the-art&#xd;
(SoTA) approaches on all benchmarks, e.g., boosting the accuracy of T5-large on&#xd;
TFix from 49.70% to 54.15% (repairing 478 more bugs) and repairing 15 more bugs&#xd;
on 818 Defects4J bugs. Further analysis reveals that our patch retriever can search&#xd;
for relevant fix patterns to guide the APR systems.&#xd;
Third, we focus on a novel task of low-resource APR. Recent advances in deep&#xd;
learning (DL) based models have demonstrated promising results by learning from&#xd;
large-scale bug-fix examples in a data-driven manner. However, in practical scenarios, software bugs have an imbalanced distribution, and the fixing knowledge&#xd;
learned by APR models often only captures the patterns of frequent error types,&#xd;
making it inapplicable to handle the rare error types. To address this limitation, we propose Meta-APR, a new meta-learning framework integrated with code&#xd;
pretrained language models to generate fixes for low-resource bugs with limited&#xd;
training samples. Extensive experimental results on three benchmarks in various&#xd;
programming languages verify the superiority of our method over existing DL-based&#xd;
APR approaches.&#xd;
Last but not least, we explore xCodeEval, the largest executable multilingual&#xd;
multitask benchmark to date consisting of 25 M document-level coding examples&#xd;
from about 7.5K unique problems covering up to 17 programming languages with&#xd;
execution-level parallelism. We propose a novel APR task to synthesize a fix for a&#xd;
detected program bug. Specifically, given a bug-specific defect, the objective of this&#xd;
task is to generate a correct fix that passes all the unit tests. Detailed experiments&#xd;
demonstrate that our proposed APR task offers a fresh perspective for examining&#xd;
and analyzing large language model (LLM)-based APR, facilitating comprehensive&#xd;
and to some extent highly interpretable investigations of their repair performance.&#xd;
&#xd;
This thesis strives for a robust neural code generation across multiple languages&#xd;
and tasks, facilitating real-world APR tasks to alleviate manual debugging efforts&#xd;
for everyone regardless of their coding background.&lt;/Abstract>
	&lt;Access xmlns="http://purl.org/coar/access_right" 
    >
    &lt;/Access>
&lt;/Publication>
</dim:field>
</dim:dim></metadata></record></GetRecord></OAI-PMH>