<?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-01T10:55:58Z</responseDate><request verb="GetRecord" identifier="oai:dr.ntu.edu.sg:10356/224277" metadataPrefix="dim">https://dr.ntu.edu.sg/server/oai/request</request><GetRecord><record><header><identifier>oai:dr.ntu.edu.sg:10356/224277</identifier><datestamp>2026-11-27T20:46:14Z</datestamp><setSpec>com_10356_176076</setSpec><setSpec>com_10356_11</setSpec><setSpec>col_10356_176124</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" authority="will be referenced::ORCID::0009-0008-2263-7383" confidence="-1">Li, Yanzhou</dim:field>
   <dim:field mdschema="dc" element="contributor" qualifier="supervisor">Liu Yang</dim:field>
   <dim:field mdschema="dc" element="contributor" qualifier="school" authority="abac3a75-4713-490b-a4cd-ee7242ae14cd" confidence="600">College of Computing and Data Science</dim:field>
   <dim:field mdschema="dc" element="contributor" qualifier="supervisoremail">yangliu@ntu.edu.sg</dim:field>
   <dim:field mdschema="dc" element="date" qualifier="accessioned">2026-09-14T13:30:50Z</dim:field>
   <dim:field mdschema="dc" element="date" qualifier="available">2026-09-14T13:30:50Z</dim:field>
   <dim:field mdschema="dc" element="date" qualifier="issued">2026</dim:field>
   <dim:field mdschema="dc" element="identifier" qualifier="uri">https://hdl.handle.net/10356/224277</dim:field>
   <dim:field mdschema="dc" element="identifier" qualifier="doi">10.32657/10356/224277</dim:field>
   <dim:field mdschema="dc" element="description" qualifier="abstract">Code language models have become an important foundation for a wide range of software engineering tasks, including code understanding, generation, and completion. By learning from large-scale code corpora, these models have demonstrated strong potential in assisting developers and automating parts of the software development workflow. However, advancing code language models for practical software engineering requires more than scaling model size or training on static source code alone. It also calls for stronger pre-training strategies, a better understanding of model reliability under realistic threats, and more effective ways to support downstream coding tasks.

This thesis presents a systematic study of code language models from three complementary perspectives: strengthening code models through change-aware pre-training, analyzing their security boundaries, and enhancing their effectiveness in downstream software engineering tasks. Together, these studies aim to improve both the capability and the understanding of code language models in realistic software engineering settings.

First, this thesis investigates how code language models can be strengthened through change-aware pre-training. Software development is not only reflected in static source code, but also in code changes and their accompanying natural language descriptions. To better exploit such signals, we construct a large-scale benchmark of GitHub commits and propose a pre-training framework that jointly models code changes and commit messages. The resulting model, CommitBART, improves the modeling of software evolution and demonstrates strong performance on commit-related understanding and generation tasks, showing that change-aware pre-training is an effective way to build stronger code models.

Second, this thesis examines the security boundaries of code language models under realistic attack surfaces. As pre-trained code models are increasingly reused across downstream applications, it is critical to understand how they may be compromised. We study this problem from two complementary angles. The first explores training-time poisoning attacks, showing that backdoors can be implanted into code pre-trained models and later activated across multiple downstream tasks. The second investigates weight-level attacks through model editing, demonstrating that large language models can be efficiently backdoored by lightweight parameter modifications without full retraining. Together, these studies reveal important vulnerabilities in both the training pipeline and the post-training deployment stage of code language models.

Third, this thesis investigates how code models can be further enhanced in downstream software engineering tasks. In practical code completion scenarios, model performance depends not only on the pretrained model itself but also on how contextual information is provided and utilized. We first study repository-level retrieval-augmented code completion and show that retrieved cross-file context is not always beneficial. Based on this insight, we propose REPOFILTER, a framework that identifies and retains only helpful retrieved context for completion. We then study function-level code completion and show that successful completion often depends on correctly interpreting implicit intent hidden in surrounding context. To address this, we develop an intention-augmented completion framework that explicitly infers coding intent before generation. These approaches demonstrate that downstream effectiveness can be substantially improved by selecting and interpreting context more carefully.

Overall, this thesis shows that advancing code language models for software engineering requires a holistic perspective that spans model construction, security analysis, and downstream enhancement. The results presented in this thesis contribute to a better understanding of how stronger, better analyzed, and more effectively applied code language models can be developed to support realistic software engineering tasks.</dim:field>
   <dim:field mdschema="dc" element="description" qualifier="degree">Doctor of Philosophy</dim:field>
   <dim:field mdschema="dc" element="language" qualifier="iso" lang="en">en</dim:field>
   <dim:field mdschema="dc" element="publisher">Nanyang Technological University</dim:field>
   <dim:field mdschema="dc" element="rights">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">Computer and Information Science</dim:field>
   <dim:field mdschema="dc" element="title">Building, analyzing, and enhancing code language models for software engineering</dim:field>
   <dim:field mdschema="dc" element="type">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="dspace" element="workflow" qualifier="startDateTime">2026-09-11T03:28:58.952Z</dim:field>
   <dim:field mdschema="cris" element="lastimport" qualifier="scopus">2026-11-27T20:46:13Z</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="3d80a9b8-c0da-4afe-80c2-be7a80623b24">
	&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>Building, analyzing, and enhancing code language models for software engineering&lt;/Title>
   	&lt;PublishedIn>
    	&lt;Publication>
      	&lt;/Publication>
   	&lt;/PublishedIn>
   	&lt;PublicationDate>2026&lt;/PublicationDate>
   	&lt;DOI>10.32657/10356/224277&lt;/DOI>
   	&lt;Authors>
      	&lt;Author>
        	&lt;DisplayName>Li, Yanzhou&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>Code language models have become an important foundation for a wide range of software engineering tasks, including code understanding, generation, and completion. By learning from large-scale code corpora, these models have demonstrated strong potential in assisting developers and automating parts of the software development workflow. However, advancing code language models for practical software engineering requires more than scaling model size or training on static source code alone. It also calls for stronger pre-training strategies, a better understanding of model reliability under realistic threats, and more effective ways to support downstream coding tasks.

This thesis presents a systematic study of code language models from three complementary perspectives: strengthening code models through change-aware pre-training, analyzing their security boundaries, and enhancing their effectiveness in downstream software engineering tasks. Together, these studies aim to improve both the capability and the understanding of code language models in realistic software engineering settings.

First, this thesis investigates how code language models can be strengthened through change-aware pre-training. Software development is not only reflected in static source code, but also in code changes and their accompanying natural language descriptions. To better exploit such signals, we construct a large-scale benchmark of GitHub commits and propose a pre-training framework that jointly models code changes and commit messages. The resulting model, CommitBART, improves the modeling of software evolution and demonstrates strong performance on commit-related understanding and generation tasks, showing that change-aware pre-training is an effective way to build stronger code models.

Second, this thesis examines the security boundaries of code language models under realistic attack surfaces. As pre-trained code models are increasingly reused across downstream applications, it is critical to understand how they may be compromised. We study this problem from two complementary angles. The first explores training-time poisoning attacks, showing that backdoors can be implanted into code pre-trained models and later activated across multiple downstream tasks. The second investigates weight-level attacks through model editing, demonstrating that large language models can be efficiently backdoored by lightweight parameter modifications without full retraining. Together, these studies reveal important vulnerabilities in both the training pipeline and the post-training deployment stage of code language models.

Third, this thesis investigates how code models can be further enhanced in downstream software engineering tasks. In practical code completion scenarios, model performance depends not only on the pretrained model itself but also on how contextual information is provided and utilized. We first study repository-level retrieval-augmented code completion and show that retrieved cross-file context is not always beneficial. Based on this insight, we propose REPOFILTER, a framework that identifies and retains only helpful retrieved context for completion. We then study function-level code completion and show that successful completion often depends on correctly interpreting implicit intent hidden in surrounding context. To address this, we develop an intention-augmented completion framework that explicitly infers coding intent before generation. These approaches demonstrate that downstream effectiveness can be substantially improved by selecting and interpreting context more carefully.

Overall, this thesis shows that advancing code language models for software engineering requires a holistic perspective that spans model construction, security analysis, and downstream enhancement. The results presented in this thesis contribute to a better understanding of how stronger, better analyzed, and more effectively applied code language models can be developed to support realistic software engineering tasks.&lt;/Abstract>
	&lt;Access xmlns="http://purl.org/coar/access_right" 
    >
    &lt;/Access>
&lt;/Publication>
</dim:field>
</dim:dim></metadata></record></GetRecord></OAI-PMH>