Manuscript Offprint
arXiv:2611.06069SynMOE: A Syntax-Aware MOE-Guided Approach for PEFT-Based Code Intelligence Learning
SHUO LIU*, City University of Hong Kong, China
HAO NING*, Shandong University, China
JACKY KEUNG, City University of Hong Kong, China
ZHEN YANG†, Shandong University, China
XIAO YU, Zhejiang University, China
XING HU, Zhejiang University, China
YICHENG SUN, City University of Hong Kong, China
Parameter-Efficient Fine-Tuning (PEFT) has emerged as an important approach for adapting Language Models (LMs) in downstream tasks. However, in the domain of code intelligence, the performance of most PEFT methods relatively drops compared to Full fine-Tuning (FT), hindering their broader applicability. One of the main reasons is that current PEFT methods are generally based on assumptions about the low-rank nature or sparsity of parameter updates, lacking explicit modeling of code-related information. To tackle this limitation, we propose SynMOE, a syntax-aware MOE-guided approach for PEFT on code intelligence learning. Specifically, SynMOE contains two stages: syntactic information extraction and syntax-aware MOE-guided adaptation. It first obtains the syntactic labels of source code from Abstract Syntax Trees (ASTs), and then aligns the labels with the input tokens of code LMs. In the second stage, syntactic labels are integrated into the MOE module, participating in the routing decision of MOE for a more powerful syntactic-aware token representation. We evaluate the effectiveness of the proposed approach by applying it to two typical PEFT methods, LoRA and (IA)³, across three diverse code intelligence tasks. Experimental results show that SynMOE achieves consistent and significant improvements. Even compared to FT, SynMOE achieves comparable or superior performance while being more computationally efficient. In addition, we also conduct ablation studies, hyperparameter analysis, and evaluation in the low-resource scenario to provide a comprehensive investigation of the proposed approach.
CCS Concepts: • Do Not Use This Code → Generate the Correct Terms for Your Paper; Generate the Correct Terms for Your Paper; Generate the Correct Terms for Your Paper; Generate the Correct Terms for Your Paper.
Additional Key Words and Phrases: Code Language Models, Parameter-Efficient Fine-Tuning, Mixture-of-Experts, Code Intelligence
*Shuo Liu and Hao Ning contributed equally to this work and are co-first authors. †Zhen Yang is the sole corresponding author.
Authors' Contact Information: Shuo Liu, City University of Hong Kong, Hong Kong, China, sliu273-c@my.cityu.edu.hk; Hao Ning, Shandong University, Qingdao, China, hning@mail.sdu.edu.cn; Jacky Keung, City University of Hong Kong, Hong Kong, China, Jacky.Keung@cityu.edu.hk; Zhen Yang, Shandong University, Qingdao, China, zhenyang@sdu.edu.cn; Xiao Yu, Zhejiang University, Hangzhou, China, xiao.yu@zju.edu.cn; Xing Hu, Zhejiang University, Hangzhou, China, xinghu@zju.edu.cn; Yicheng Sun, City University of Hong Kong, Hong Kong, China, yicsun2-c@my.cityu.edu.hk.
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org.
© 2018 Copyright held by the owner/author(s). Publication rights licensed to ACM.
Liu et al.
ACM Reference Format:
Shuo Liu, Hao Ning, Jacky Keung, Zhen Yang, Xiao Yu, Xing Hu, and Yicheng Sun. 2018. SynMOE: A Syntax-Aware MOE-Guided Approach for PEFT-Based Code Intelligence Learning. In Proceedings of Make sure to enter the correct conference title from your rights confirmation email (Conference acronym 'XX). ACM, New York, NY, USA, 24 pages. https://doi.org/XXXXXXX.XXXXXXX
Despite these superiorities, previous studies [32, 34, 36] show that PEFT methods generally exhibit relatively lower performance than FT in the context of code intelligence tasks, such as code translation and commit message generation. We argue that vanilla PEFT methods are generally based on assumptions about the low-rank nature or sparsity of parameter updates, yet they lack explicit modeling of code-related information, making their application to code domains inherently suboptimal. Figure 1 demonstrates a Python code snippet and its Abstract Syntax Tree (AST), which aims to return the maximum value between x and y. Human developers grasp this code effortlessly, largely because they intuitively assign different semantic roles to keywords, operators, and variables rather than viewing them as a flat sequence of text. For instance, x acts as a parameter in the parameter list (Line 1), while serving as a return value under the condition expression and as a comparison operand under the comparison expression (Line 2), which are mainly the observations syntactically elicited from the associated AST. As such, integrating this syntactic information can intuitively enhance the code comprehension capabilities of code LMs, particularly in PEFT settings where only a limited number of parameters are trainable. However, finetuning with vanilla PEFT methods overlooks this information, treating all input tokens uniformly and distinguishing their contextual embeddings via an implicit attention mechanism only.
In this paper, we propose SynMOE, a syntax-aware MOE-guided approach for PEFT-based code intelligence learning, which consists of two stages: (1) Syntactic Information Extraction (SIE) and (2) Syntax-aware MOE-guided Adaptation (SMA). The first stage involves converting source code into ASTs, followed by a systematic extraction of syntactic labels from ASTs, ensuring that each leaf node is associated with a label. However, in current LMs, tokens in code sequences are normally split into diverse sub-tokens according to Byte-Pair Encoding (BPE) [46] or its variants, making their potential inconsistency with AST leaf nodes and associated syntactic labels. Thus, we further design a token-label alignment algorithm to attach AST-based syntactic labels to each input token of code LMs, thereby facilitating the syntactic information integration in the follow-up stage. In the SMA stage, simply adding the embeddings of both code tokens and syntactic labels is a straightforward way for syntactic information integration, but the latter may overwhelm code tokens' original representations. Therefore, we consider introducing an MOE structure and using syntactic information to affect its combinational logic, realizing the syntax awareness of code token representations. To be specific, SMA consists of a set of lightweight experts, typically trainable low-rank matrices or vectors. Syntactic labels are modeled into high-dimensional embeddings to participate in the routing decision of the MOE's gating network.

Fig. 1. A Python code snippet and its corresponding AST.
During the downstream task adaptation, only the parameters of the syntax-aware MOE module are trainable, while the pre-trained parameters of code LMs are frozen, maintaining the parameter efficiency of SynMOE.
We evaluate the effectiveness of SynMOE through a series of experiments on three popular code intelligence tasks: code search, code clone detection, and line-level code completion. Our study spans five code LMs with parameter sizes ranging from millions to billions. We investigate the performance improvements achieved by SynMOE over two representative PEFT methods, LoRA [17] and [31]. In addition, we compare SynMOE with FT as well as several advanced PEFT approaches, such as LoKr [64], LoHa [21], and AdaLoRA [66]. Experimental results demonstrate that SynMOE consistently outperforms LoRA and , with the maximum performance gain of 8.78%. It also achieves superior performance compared to sophisticated PEFT methods. Furthermore, it achieves results comparable to FT while maintaining the efficiency advantages of less training time and memory consumption. We also design evaluations in the low-resource scenario where vanilla PEFT methods typically perform well, and find that SynMOE remains effective under such conditions, achieving comparable or improved performance with limited training data. It is worth noting that SynMOE is orthogonal to specific PEFT methods, allowing it to be seamlessly integrated with advanced PEFT approaches for further performance gains.
The contributions of this paper can be summarized as:
-
We propose a novel SynMOE approach that integrates syntactic code properties via MOE for a more powerful code token modeling, thereby enhancing the performance of code LMs in PEFT settings.
-
We conduct extensive experiments on three code intelligence tasks with five code LMs. Experimental results demonstrate the effectiveness of SynMOE.
-
We open-source all the replication packages at https://github.com/ishuoliu/SynMOE to facilitate future research and applications.
2 Preliminary
Given the broad application and research on LoRA and in both academia and industry [26, 33, 37, 66], we adopt these two PEFT methods in our experiments.
2.1 LoRA
LoRA [17] is the abbreviation for Low-Rank Adaptation. It hypothesizes that updates to weight matrices have a low intrinsic rank; thus, the updates can be learned efficiently through a smaller subspace. For a pre-trained weight
Liu et al.

Fig. 2. The workflow of SynMOE. Bold arrows are used to highlight our proposed approach.
matrix , LoRA constrain its update by decomposing the latter into two low-rank matrices that satisfy , where , , and the rank . Initially, is zero, which is realized by using a random Gaussian initialization for and zero for . During tuning, is frozen while only and are trainable. Because , the trainable parameters of LoRA are far fewer than those for learning the original . The principles of LoRA can be applied to any dense layers in the Transformer architecture, but in this paper, we follow the usual practice that applies LoRA to the query and value projection matrices in the multi-head attention module.
2.2 (IA)
(IA) [31] stands for "Infused Adapter by Inhibiting and Amplifying Inner Activations". Different from LoRA, which focuses on updating the pre-trained weight matrices, (IA) explores the element-wise multiplication of models' activations. Specifically, it introduces three learnable vectors, , , and in each Transformer layer block, rescaling key and value in the attention mechanism, as well as the intermediate activations of feed-forward networks. Formally, (IA) can be represented as:
where , , and are the query, key, and value projection matrices, and is the dimension of key. denotes the element-wise multiplication. and are weight matrices of the feed-forward network, and is the feed-forward network nonlinearity. During tuning, in addition to , , and being trainable, which is an extremely small portion, the others are frozen and do not receive gradient updates.
3 Methodology
Figure 2 illustrates the workflow of SynMOE, consisting of two stages: Syntactic Information Extraction (SIE) and Syntax-aware MOE-guided Adaptation (SMA). In the first stage, every token in the source code sequence is assigned a syntactic Manuscript submitted to ACM label according to its position in the associated AST. As for the second stage, each syntactic label is incorporated into a MOE-based PEFT technique (e.g., LoRA and (IA)³) to participate in the encoding of its corresponding code token. As such, enhancing existing PEFT techniques with code modeling capability. The whole tuning process freezes code LMs' pre-trained weights, and only the parameters of the SynMOE portion are updated. In this section, we provide a comprehensive description of the two-stage workflow.
3.1 Syntactic Information Extraction (SIE)
This stage involves two sequential procedures: (1) Syntactic label assignment and (2) token-label alignment.
Syntactic Label Assignment: This procedure first transforms a code to its corresponding AST . represents the collection of non-leaf nodes, while contains all leaf nodes. Curating leaf nodes according to pre-order traversing can obtain a complete sequence of source code that they are parsed from. is the root Node, and indicates the parent-child relationships within the AST. In this paper, we employ tree-sitter [2] to convert code snippets to ASTs. As shown in Figure 1, each leaf node is associated with a node type, either identifier, which corresponds to user-defined entities, such as variables ( and ), or the node itself, representing pre-defined entities, such as keywords and operators (if and >=). For the former, we assign their syntactic labels as the types of their parent nodes, such as function_definition for max while parameters for and . For the latter, we group them under a unified label, namely <NA>, since their node values already reflect syntactic roles and there is no need to add extra labels for syntactic identification. As a result of this procedure, each leaf node in the AST is assigned a syntactic label.
Token-Label Alignment: Although syntactic labels have been obtained and associated with their leaf nodes in ASTs as aforementioned, they cannot be directly mapped with the input tokens of code LMs, which can be summarized into three main sources: first, special tokens (e.g., beginning-of-sequence and end-of-sequence) inserted by LMs' tokenizers are absent in the ASTs; second, the tokenization rules of code tokens are different between code LMs and ASTs; and third, comments that are aggregated into a single node by AST parsers but split into multiple distinct sub-tokens by code LMs. The objective of this procedure is to align the extracted syntactic labels with the tokenization results of code LMs, ensuring that each input token has a corresponding syntactic label. Formally, given a source code dataset , each code snippet is associated with a joint attribute comprising AST leaf nodes and corresponding syntactic labels . To begin with, we leverage the code LM's tokenizer to convert each source code into input tokens , with denoting the number of input tokens, while initializing two pointers to the initial token and leaf node, respectively, for a left-to-right alignment (Lines 5-6). For each input token to be matched, we first determine whether it is a special token introduced by the tokenizer. If so, a designated label <SP> is assigned (Lines 8-9). Notably, the special tokens vary depending on the specific tokenizer utilized. For instance, the Beginning-Of-Sequence (BOS) and End-Of-Sequence (EOS) tokens are configured as <s> and </s> for CodeBERT, whereas they correspond to <|begin_of_sentence|> and <|end_of_sentence|> for Deepseek-Coder. Alternatively, if the input token is excluded from the aforementioned categories but falls within a previously identified comment region (Lines 1-4), it is directly labeled as <CM> (Lines 10-11). If the input token is neither a special token nor a token that belongs to a comment, it will be enforced an exact match with the AST leaf node , so that to assign 's label to . If the exact matching succeed, the increment of the leaf node pointer will be triggered (Lines 12-14). Otherwise, the th input token will be deemed a subtoken of the th leaf node. In this scenario, a temporary variable is maintained to accumulate incoming tokens until the aggregated content precisely aligns with the target leaf node. Once matched, the syntactic label of the leaf node is propagated to all tokens currently held in , while the leaf node pointer is
Liu et al.
6
Algorithm 1 Token-Label Alignment
Input: Source code dataset , Code LM , Pairs of leaf nodes and syntactic labels .
1: for in do 2: Identify comment regions. 3: Record their start and end positions , where denotes the number of comments. 4: end for 5: Tokenize each source code into input tokens using the tokenizer of code LM . 6: Initialize input token pointer , and AST leaf node pointer . 7: while do 8: if is a special token introduced by the tokenizer then 9: Assign the <TK> label. 10: else if falls within the comments regions then 11: Assign the <CM> label. 12: else if exactly matches the -th AST leaf node then 13: Assign the syntactic label of the leaf node. 14: Update pointer . 15: else 16: Utilize a variable to store the currently unmatched tokens. 17: while do 18: . 19: if exactly matches the -th AST leaf node then 20: Assign all tokens stored in the syntactic label of the -th AST leaf node. 21: Update pointer . 22: break 23: end if 24: end while 25: end if 26: Update pointer to process the next input token. 27: end while 28: return Pairs of tokens and syntactic labels.
simultaneously incremented (Lines 15-25). Finally, since input token pointer has been self-incremented during the above loop, it will simply increment one to point to the next input token (Line 26). A detailed overview of this alignment procedure is formalized in Algorithm 1, which ensures that each input token is ultimately assigned an appropriate syntactic label.
3.2 Syntax-aware MOE-guided Adaptation (SMA)
Although code tokens carry distinctive syntactic roles, existing PEFT methods treat them uniformly, where their differentiated representations are only derived from an implicit attention mechanism and associated non-linear transformations. Given that the previous stage has attached an explicit syntactic label for each code token, the goal of SMA is to effectively incorporate that syntactic information for more efficient learning with PEFT.
Specifically, the SMA module takes a code sequence embedding and its associated syntactic labels as inputs, denoting as and , respectively, where refers to the length of the code sequence, indicates the model's hidden dimension, and represents the number of experts of the MOE structure. Afterward, SMA leverages a set of lightweight PEFT techniques (e.g., LoRA or ) as experts to enhance the modeling capability of a single PEFT module, where each expert is denoted as . To control the incremental scale of trainable parameters between MOE-based PEFT and its single version, the rank of matrices and in LoRA (see Section 2.1) is reduced to of the single version. For each expert, it comprises three learnable vectors: , , and . Since the dimension of these vectors is intrinsically dictated by the hidden dimension of the backbone code LM rather than acting as a flexible hyperparameter, we do not impose additional constraints on the size of individual experts. Subsequently, we combine each expert's representation through the routing weights of a gating network. Recall that each syntactic label was encoded into an -dimension vector; thus, they can also be incorporated into the above routing decision on weight assignment. This procedure can be mathematically expressed as:
where is a trainable weight in the gating network, and represents the resulting routing scores. is a hyperparameter that controls the proportion of and , and refers to the final routing scores that integrate both the syntactic information and the results of the gating network. represents the forward process in expert . The final output is computed as a weighted average of the outputs from all experts. In this way, SMA enables each token to be encoded by multiple PEFT modules, realizing a more powerful and multi-angle modeling. Meanwhile, associated syntactic information is included to guide the combinatorial modeling process, explicitly introducing the syntax awareness capability of SynMOE. It is worth noting that we do not directly add embeddings of syntactic labels to those of code tokens. Instead, we use a gating network to let the syntactic labels influence the expert routing, because a simple summation would obscure the original representation of code tokens acquired from their code context. When fine-tuning code LMs with SynMOE, we keep code LMs' all parameters frozen while only updating parameters in SynMOE. As for inference, syntactic labels are also required for the pre-filling phase in our experimental setting.
4 Experimental Setup
4.1 Tasks and Datasets
To investigate the effectiveness of our proposed SynMOE, we conduct experiments on three typical code tasks from code understanding to generation across diverse PLs, such as Python, Java, and C/C++, thereby ensuring a comprehensive evaluation. Below, we describe the three tasks and associated datasets in detail.
4.1.1 Code Search (CS). In modern software development, code search is one of the most frequent activities [4]. The task aims to retrieve the most relevant code from a large-scale codebase that aligns with the intent of search queries [29]. It measures the semantic relatedness between codes and NL queries within a shared feature space. We conduct experiments on the CosQA dataset [18], which contains 20,604 pairs of NL queries and codes, as well as a codebase of capacity 6,267. It collects real user queries from the Microsoft Bing search engine and takes the CodeSearchNet Corpus [20] as a function-level code base. All functions in this dataset are written in Python. It has been officially divided into training, validation, and test sets in the ratio of 19,604:500:500.
4.1.2 Code Clone Detection (CCD). Code clone indicates two code snippets have the same functional semantics but with literal variations [35]. It may lead to error propagation through similar codes and severely affect maintenance
Liu et al.
costs [9]. Therefore, code clone detection becomes substantial in software engineering, and it is also fundamental in other tasks like code refactoring and defect prediction. Our experiments use the POJ-104 dataset [41], which is collected from a pedagogical programming open judge system, containing 104 problems, with 500 C/C++ programs chosen for each problem. POJ-104 treats all programs solving the same problem as clones, and the objective is to identify whether a given program pair is clone or not. The whole dataset is divided into a training set with 32,000 samples, a validation set with 8,000 samples, and a test set with 12,000 samples.
4.1.3 Line-level Code Completion (LCC). Code completion is regarded as a critical task in promoting efficient software development. It can assist developers in saving time and effort by automatically completing code based on context [13]. Following previous studies [38, 39], the task includes two scenarios: token-level code completion and line-level code completion. The former focuses on predicting the next single token, whereas the latter evaluates the quality of the entire generated line. Consequently, line-level code completion is considered more challenging. We use one of the most influential datasets, JavaCorpus [1], to perform experiments. JavaCorpus collects over 14 thousand Java projects from GitHub. After filtering by Lu et al. [39], the dataset is finally split into 12,934 files for training, 7,189 for validation, and 3,000 for testing.
4.2 Code LMs and Baselines
To thoroughly examine our proposed SynMOE, we use five code LMs with diverse parameter scales, which are widely used and well recognized in the community [36, 45, 67].
• CodeBERT [10] is an encoder-only language model with 125M parameters, pre-trained on a large code corpus. We use it as a base model for code search and code clone detection.
• UniXcoder [12] is a unified cross-modal pre-trained model for programming languages, also containing 125M parameters. Owing to its encoder-decoder structure, it is involved in all three tasks.
• CodeGPT [39] has the same model architecture (decoder-only) and training objectives as GPT-2 [44]. We adopt the 125M-parameter CodeGPT-small-java-adapted for line-level code completion, which uses the GPT-2 as the starting point and is continually trained on 1.6 million Java code.
• Deepseek-Coder [14] and Qwen2.5-Coder [19] are two recently released, well-known large code LMs and have achieved significant advancements. We chose their 1.3B- and 1.5B-parameter models. Owing to their decoder-only structure, they are also applied in the line-level code completion task.
In addition, we also compare SynMOE against the following LoRA-variant methods for a more comprehensive assessment.
• LoKr [64] is an abbreviation for Low-rank adaptation with Kronecker product. It is an extension of the KronA technique [8] and employs Kronecker products for matrix decomposition.
• LoHa [21] stands for Low-rank adaptation with Hadamard product. It finds that decomposing weight updates with the Hadamard product could improve the fine-tuning capability.
• AdaLoRA [66] assumes that different modules have varying importance. It can adaptively allocate the parameter budget among weight matrices to improve the performance.
4.3 Evaluation Metrics
For code search, following previous studies [12, 40, 47], we adopt the Mean Reciprocal Rank (MRR) as the evaluation metric. MRR computes the average of the reciprocal ranks of the correct code snippets across all queries. A higher MRR Manuscript submitted to ACM score indicates better performance, reflecting that the correct code snippet tends to be ranked more highly. The formula for computing MRR is:
In line with prior works [3, 5, 39], we use the Mean Average Precision (MAP) to evaluate performance for code clone detection. MAP is the mean of average precision scores across all queries. For a single query, its average precision takes into account both the number of relevant objects retrieved and their ranks in the retrieved list.
The evaluation metrics for line-level code completion are Exact Match (EM) and Edit Similarity (ES), which have been widely used in prior works [15, 30, 67]. EM evaluates whether the generated output exactly matches the ground truth token-by-token, while ES measures the similarity of the predicted output and the ground truth Y based on the minimum number of edit operations. It is computed as:
where Lev denotes the Levenshtein distance, also known as the edit distance.
4.4 Implementation Details
The experiments are primarily carried out on an Ubuntu-based GPU server equipped with four RTX 3090 24GB GPUs. The fine-tuning of Deepseek-Coder and Qwen2.5-Coder is instead performed on an RTX A6000 GPU with 48GB memory capacity. All code LMs are obtained from Huggingface , and we retain their default hyperparameter settings. The LoRA and methods are implemented using the PEFT library . We perform a grid search over learning rates during fine-tuning. Specifically, we evaluate values in the range of for the FT approach, and for PEFT approaches. In the code search task, following prior work [12], we set a maximum of 10 training epochs, along with input length limits of 256 tokens for code snippets and 128 tokens for natural language descriptions. For code clone detection, the code LMs are fine-tuned for a maximum of 5 epochs, with an input window size of 400 tokens. In the line-level code completion task, we fine-tune the code LMs for up to 5 epochs, with inputs restricted to a maximum length of 512 tokens. The early stopping strategy with a patience of 3 is applied. Moreover, we set the number of experts uniformly to 4 across experiments and adjust the value within the interval of [0, 1] to pursue the best results of SynMOE. Further investigation into the impact of the hyperparameters is detailed in Section 5.4. Each experiment is repeated 5 times with different initialization seeds, and the mean and variance are reported.
5 Experimental Results
In this section, we conduct extensive experiments to answer the following research questions:
RQ1: What is the effectiveness of SynMOE across three code intelligence tasks?
RQ2: How does SynMOE perform when compared with other advanced PEFT methods?
RQ3: What are the contributions of different components in SynMOE to the performance?
RQ4: What is the impact of different hyperparameters?
RQ5: How effective is SynMOE in the low-resource scenario?
https://huggingface.co/docs/peft/index
Liu et al.
Table 1. Evaluation results of SynMOE across three code intelligence tasks. The overall best results (including FT) are indicated in bold, while the best performances among SynMOE and PEFT methods are highlighted with a gray background. The improvement ratios brought by SynMOE to PEFT methods are indicated in parentheses. Upper-right asterisks denote statistically significant improvements of SynMOE over corresponding PEFT methods. Since all experiments are repeated five times, we report their results in the format of mean±std.
| Tasks | Models | Metrics | FT | LoRA | (IA)³ | SynMOE + LoRA | SynMOE + (IA)³ |
|---|---|---|---|---|---|---|---|
| 100% | ~1.84% | ~0.05% | ~1.90% | ~0.41% | |||
| CS | CodeBERT | MRR | 68.10±0.13 | 64.28±0.19* | 61.49±0.19* | 65.78±0.17 (+2.34%) | 65.06±0.12 (+5.80%) |
| UniXcoder | 70.15±0.21 | 67.85±0.26* | 66.17±0.16* | 69.14±0.25 (+1.89%) | 67.90±0.26 (+2.62%) | ||
| CCD | CodeBERT | MAP | 85.57±0.40 | 81.94±0.61* | 80.32±0.16* | 85.91±0.16 (+4.85%) | 82.90±0.40 (+3.22%) |
| UniXcoder | 90.85±0.12 | 90.53±0.14* | 89.91±0.23* | 92.01±0.39 (+1.63%) | 91.29±0.36 (+1.53%) | ||
| LCC | CodeGPT | EM | 30.17±0.22 | 28.61±0.27* | 26.21±0.47* | 29.97±0.18 (+4.74%) | 28.51±0.37 (+8.78%) |
| ES | 62.26±0.27 | 61.37±0.07* | 59.00±0.49* | 62.38±0.19 (+1.65%) | 61.12±0.25 (+3.59%) | ||
| UniXcoder | EM | 31.87±0.14 | 29.53±0.24* | 27.67±0.37* | 30.99±0.16 (+4.93%) | 29.20±0.20 (+5.54%) | |
| ES | 64.82±0.23 | 63.93±0.39* | 61.33±0.23* | 64.85±0.35 (+1.43%) | 62.68±0.41 (+2.19%) | ||
| Deepseek-Coder | EM | 42.51±0.09 | 41.15±0.16* | 41.41±0.12* | 42.34±0.22 (+2.90%) | 42.18±0.07 (+1.85%) | |
| ES | 73.01±0.16 | 72.13±0.10* | 72.28±0.16 | 73.07±0.18 (+1.29%) | 72.44±0.09 (+0.22%) | ||
| Qwen2.5-Coder | EM | 42.87±0.19 | 41.30±0.29* | 43.18±0.10* | 43.62±0.18 (+5.62%) | 43.75±0.14 (+1.31%) | |
| ES | 72.80±0.12 | 72.68±0.20* | 73.22±0.12* | 74.05±0.10 (+1.89%) | 73.96±0.09 (+1.00%) |
5.1 RQ1: Overall Effectiveness
We evaluate the performance of SynMOE in comparison with two representative PEFT methods, LoRA and (IA)³, across three core code intelligence tasks with five representative code LMs. All experiments are repeated five times independently. The full experimental results are summarized in Table 1, where the overall best results (including FT) are indicated in bold, the top-performing values among SynMOE variants and PEFT methods are highlighted with a gray background, and the relative improvement ratios of SynMOE over corresponding vanilla PEFT methods are reported in parentheses. In addition, we analyze the computational efficiency of these methods in Figure 3. Using CodeGPT as the base model on the line-level code completion task, we measure two key metrics: average training duration per epoch and total memory footprint.
In the code search tasks, SynMOE consistently outperforms PEFT methods across all base models with clear performance gains. For CodeBERT, SynMOE achieves a 2.34% improvement over LoRA and a substantial 5.80% gain over (IA)³. For UniXcoder, the gains are 1.89% over LoRA and 2.62% over (IA)³. We observe that SynMOE attains the optimal performance when paired with LoRA. This result is intuitive and consistent with LoRA's superior adaptability, which stems from its greater number of trainable parameters. Additionally, SynMOE yields higher gains on CodeBERT compared to UniXcoder. This disparity can be attributed to the different pre-training paradigms of the base models and the advanced adaptation strategies introduced by SynMOE. CodeBERT, as a pioneer code LM, is primarily pre-trained on Masked Language Modeling (MLM) and Replaced Token Detection (RTD) [10]. In contrast, UniXcoder benefits from its unified pre-training objectives and the explicit incorporation of ASTs [12]. Consequently, since UniXcoder has already internalized the syntactic priors derived from ASTs during its pre-training phase, the performance gains yielded by SynMOE are somewhat attenuated due to this functional overlap. Furthermore, to validate the significance

(a) Comparison of Training Time
(b) Comparison of Memory Consumption
Fig. 3. A comparative analysis of computational overhead for FT, vanilla PEFT methods, and SynMOE.
of the performance difference, we perform Wilcoxon Signed-Rank Tests (WSRT) [54] with a confidence level of 95% between SynMOE and corresponding PEFT methods. The results in the Table 1 specified with upper-right asterisks substantiate that SynMOE statistically significantly outperforms their baselines, e.g., LoRA and .
For code clone detection, SynMOE maintains its superiority across all base models. When evaluated on CodeBERT, SynMOE achieves a 4.85% improvement over LoRA and a 3.22% improvement over . For UniXcoder, SynMOE yields smaller yet notable gains of 1.63% and 1.53% over LoRA and , respectively. Aside from the results consistent with those in the preceding code search task, SynMOE achieves even better performance than FT on the code clone detection task. However, FT involves adapting all parameters, while SynMOE only adapts a small proportion, approximately 1.90% with LoRA and 0.41% with , showing the powerful adaptation efficiency and efficacy of SynMOE.
Regarding line-level code completion, evaluated via Exact Match (EM) and Edit Similarity (ES) across CodeGPT, UniXcoder, Deepseek-Coder, and Qwen2.5-Coder, SynMOE exhibits consistent and considerable gains over PEFT baselines. Across the four base models, SynMOE achieves a maximum improvement of 5.62% on the EM metric and 1.89% on the ES metric relative to LoRA. When integrated with , SynMOE delivers maximum gains of 8.78% on EM and 3.59% on ES, respectively. The findings from the significance test further corroborate that the enhancement brought by SynMOE is statistically significant. Except in the case where SynMOE combined with fails to show significant superiority over vanilla when Deepseek-Coder is used as the base model, SynMOE exhibits significant advantages in the other 15 metric comparisons. Additionally, in terms of the ES metric, the combination of SynMOE and LoRA even outperforms FT, demonstrating its ability to achieve comparable or superior results with notably fewer parameters.
Beyond performance comparisons, the detailed efficiency analysis in Figure 3 reveals that SynMOE strikes a strategic balance in training costs. Although it incurs higher overhead than vanilla PEFT methods, its computational load is lower than that of FT. Given that SynMoE integrates a set of expert modules for syntactic encoding, a marginal increase in training overhead is foreseeable and can be tolerable. Notably, when compared with FT, SynMoE reduces training time by approximately 3-7 minutes per epoch and lowers memory footprint by 600-800 MB. These findings underscore SynMoE's parameter efficiency, demonstrating its ability to deliver robust performance with minimal trainable parameters, thereby making it a highly viable solution for resource-constrained, real-world applications.
Liu et al.
Answer to RQ1: The proposed SynMOE demonstrates consistent performance improvements over LoRA and (IA) across all three code intelligence tasks, with quantified gains ranging from 0.22% to 8.78% over PEFT baselines. Compared to FT, SynMOE achieves comparable or superior performance while drastically reducing trainable parameters and computational overhead, establishing it as a practical and efficient approach.
5.2 RQ2: Comparison with Advanced PEFT Methods
Our proposed SynMOE has consistently demonstrated effectiveness in enhancing vanilla PEFT methods. In this section, we further validate its capability by comparing it with three advanced PEFT baselines: LoKr, LoHa, and AdaLoRA. These methods are specifically designed to address limitations of vanilla LoRA and improve adaptation performance. We evaluate SynMOE integrated with LoRA against these advanced PEFT methods across three code intelligence tasks, and the full experimental results are summarized in Table 2. The optimal performance is highlighted in bold, and statistically significant improvements of SynMOE over these baselines are marked with asterisks.
As shown in Table 2, SynMOE outperforms or matches these advanced PEFT baselines. In code search and code clone detection, SynMOE achieves an average improvement of 3.73% over LoKr, with statistical significance validating the superiority of this gain. In contrast, SynMOE exhibits comparable performance against both LoHa and AdaLoRA. Regarding line-level code completion, SynMOE consistently outperforms LoKr, LoHa, and AdaLoRA across all base models and evaluation metrics. Specifically, SynMOE yields marked increases of 12.14% and 5.11% over LoKr in terms of EM and ES, respectively. Compared to LoHa, it achieves an average gain of 6.29% for EM and 3.17% for ES. Furthermore, it surpasses AdaLoRA by 4.19% in EM while maintaining a 1.63% margin in ES, further consolidating its superiority. It is noteworthy that while SynMOE performs on par with LoHa and AdaLoRA on the code search and code clone detection tasks, it delivers a statistically significant performance leap on the line-level code completion task. We hypothesize that this discrepancy stems from the nature of the tasks. For classification tasks, they present a feature space that methods like LoHa and AdaLoRA can already adequately capture, making further performance improvement challenging. In contrast, the generation task involves a more complex learning process within the feature space. By incorporating syntactic information, SynMOE effectively demonstrates its advantage in boosting performance while maintaining strict parameter efficiency. In addition, SynMOE is orthogonal to specific PEFT approaches, thereby enabling seamless integration with these advanced PEFT methods to pursue further performance improvements.
Answer to RQ2: Our results demonstrate that SynMOE achieves competitive or superior performance compared to state-of-the-art advanced PEFT baselines across all evaluated code intelligence tasks. Critically, because it is orthogonal to specific PEFT methods, SynMOE can be seamlessly integrated with these advanced methods to further boost its effectiveness.
5.3 RQ3: Ablation Study
We conduct ablation studies to quantify the individual contributions of the two core components in SynMOE, i.e., Syntactic Information Extraction (SIE) and Syntax-aware MOE-guided Adaptation (SMA). The experiments adopt a consistent setup across all base models and code intelligence tasks. We evaluate two ablation configurations: (i) w/o SIE, which involves disabling syntactic information extraction by setting the value to 0 and relying solely on the gating network for routing; (ii) w/o SMA, which simplifies the MOE module into a single expert setup. Both configurations are
Table 2. Evaluation results of advanced PEFT methods. The optimal performance is highlighted in bold. Asterisks in the upper right corner denote statistically significant improvements of SynMOE integrated with LoRA over the advanced PEFT methods. Since all experiments are repeated five times, we report their results in the format of mean±std.
| Tasks | Models | Metrics | LoKr | LoHa | AdaLoRA | SynMOE + LoRA |
|---|---|---|---|---|---|---|
| CS | CodeBERT | MRR | ||||
| UniXcoder | ||||||
| CCD | CodeBERT | MAP | ||||
| UniXcoder | ||||||
| LCC | CodeGPT | EM | ||||
| ES | ||||||
| UniXcoder | EM | |||||
| ES | ||||||
| Deepseek-Coder | EM | |||||
| ES | ||||||
| Qwen2.5-Coder | EM | |||||
| ES |
implemented using SynMOE integrated with LoRA and , and the full results are tabulated in Table 3, where the top-performing results are highlighted in bold.
As shown in Table 3, removing either component consistently results in significant performance degradation, demonstrating the essential and synergistic contributions of each component to overall effectiveness. Specifically, for code search and code clone detection, integrating SynMoE with LoRA shows that omitting SIE and SMA reduces average performance by 1.85% and 2.21%, respectively. A similar trend is observed with , where the removal of SIE and SMA incurs a performance drop of 1.37% and 1.46%, respectively. In the line-level code completion task, removing SIE and SMA incurs average losses of 1.12% and 1.85% for LoRA-based SynMOE. The impact persists in -based SynMOE, where disabling SIE and SMA results in decrements of 0.91% and 2.61%, respectively. It is noteworthy that disabling SMA consistently results in more severe performance degradation than disabling SIE, highlighting SMA's critical role in SynMOE. This can be attributed to the fact that the number of experts is not only critical to the capacity of the MOE module itself, but also influences the effective utilization of syntactic labels. If SynMOE degenerates to a single expert, the syntactic label-based expert routing strategy loses its efficacy, leading to all tokens being treated uniformly under the sole expert. The ablation study suggests that both the syntactic label and the MoE module contribute positively to parameter-efficient fine-tuning.
Answer to RQ3: The ablation study quantifies the distinct and synergistic contributions of SIE and SMA to the overall performance. Removing either component leads to consistent degradation across all tasks, with SMA exerting a more pronounced impact.
5.4 RQ4: Impact of Hyperparameters
This section presents a comprehensive analysis of two critical hyperparameters in SynMOE: the number of experts and the value in Equation 4. Intuitively, increasing the number of experts can enhance model capacity by introducing more trainable parameters and greater adaptability. However, an excessive number of experts also incurs higher computational
Liu et al.
Table 3. The ablation study results of SynMOE. The best results in each set of comparisons are highlighted in bold. Since all experiments are repeated five times, we report their results in the format of mean .
| Tasks | Models | Metrics | SynMOE + LoRA | w/o SIE | w/o SMA | SynMOE + (IA) | w/o SIE | w/o SMA |
|---|---|---|---|---|---|---|---|---|
| CS | CodeBERT | MRR | ||||||
| UniXcoder | ||||||||
| CCD | CodeBERT | MAP | ||||||
| UniXcoder | ||||||||
| LCC | CodeGPT | EM | ||||||
| ES | ||||||||
| UniXcoder | EM | |||||||
| ES | ||||||||
| Deepseek-Coder | EM | |||||||
| ES | ||||||||
| Qwen2.5-Coder | EM | |||||||
| ES |
(a) CS - UniXcoder

(b) CCD - UniXcoder
(c) LCC - Deepseek-Coder

(d) LCC - Qwen2.5-Coder
Fig. 4. Parameter analysis of the number of experts. Since all experiments are repeated five times, each data point is specified by an average score, where the score range among repeated experiments is also plotted.
overhead, requiring careful balancing in practice. The value serves as a control factor to modulate the influence of syntactic labels on the MoE routing process, where a higher value amplifies the impact of syntactic information on routing decisions. To ensure the generalizability of our findings, we conduct experiments across all three code intelligence tasks, utilizing a diverse suite of base models including UniXcoder, Deepseek-Coder, and Qwen2.5-Coder. Given their outstanding performance in prior experiments, these models serve as logical and representative benchmarks in this study. Both LoRA and integration strategies are evaluated. In each study, we only vary the parameter that needs to be analyzed while keeping the others unchanged.

(c) LCC - Deepseek-Coder

(d) LCC - Qwen2.5-Coder
Fig. 5. Parameter analysis of the value. Since all experiments are repeated five times, each data point is specified by an average score, where the score range among repeated experiments is also plotted.
Regarding the impact of the number of experts, we vary it from 2 to 8 to investigate the scaling effects. We do not set the expert count to one because it's a single expert setup, as previously discussed in Section 5.3. On the other hand, an over-provision of experts incurs prohibitive computational overhead that can even exceed the FT baseline. Since this violates our efficiency prerequisite for SynMOE, we set the maximum number of experts to 8 in our discussion. As illustrated in Figure 4(a) and 4(b), in the code search and code clone detection tasks, the performance of SynMOE shows an upward trend as the number of experts grows from 2 to 4, consistent across both LoRA and variants. Further increasing the number of experts beyond 4 leads to performance fluctuations, but several improved results are still observed, particularly at 7 experts in the code search task when SynMOE is integrated with . For the line-level code completion task (Figure 4(c) and 4(d)), a similar tendency emerges. SynMOE with LoRA achieves peak edit similarity at 4 experts. While SynMOE with exhibits more gradual growth, it also maintains competitive performance at 4 experts. It is also observed that beyond a certain threshold of experts, the performance exhibits fluctuations and is accompanied by increased variance. These results collectively indicate that setting the number of experts to 4 allows SynMOE to strike an effective balance between model performance and computational efficiency. Therefore, we adopt this configuration as the default setting across all experiments. Meanwhile, the performance of SynMOE can be further enhanced by scaling up the number of experts, indicating its underlying potential.
To study the effect of , we sweep its value from 0.1 to 1.0 uniformly in all three code intelligence tasks. As shown in Figure 5, exhibits a non-monotonic effect on performance. For the code search task (Figure 5(a)), when paired with LoRA, SynMOE achieves its best performance at . In contrast, SynMOE with attains its peak performance at . In the code clone detection task (Figure 5(b)), the optimal configuration for SynMOE with LoRA is found at , while the highest efficacy for SynMOE with is observed when is set to 0.5. This divergence underscores the specific sensitivity of , where LoRA benefits more from stronger syntactic guidance, while tends to rely more on the contextual information encoding. As for line-level code completion (Figure 5(c) and 5(d)), it is observed that SynMOE maintains a high performance plateau when , but suffers a sharp drop in performance as approaches 1.0. Specifically, when employing DeepSeek-Coder as the base model, SynMoE with LoRA and reaches its peak
Liu et al.
Table 4. Evaluation results of the code search task and the code clone detection task in the low-resource scenario. The base model used here is UniXcoder. In comparisons of different methods for the same metric, the best results are highlighted in bold. Gray shading marks the best performance among SynMOE and its PEFT counterparts. Since all experiments are repeated five times, we report their results in the format of mean±std.
| Tasks | Methods | Metrics | 1% | 5% | 10% | 25% | 50% |
|---|---|---|---|---|---|---|---|
| CS | LoRA | MRR | |||||
| SynMOE + LoRA | |||||||
| SynMOE + | |||||||
| CCD | LoRA | MAP | |||||
| SynMOE + LoRA | |||||||
| SynMOE + |
Table 5. Evaluation results of the line-level code completion task in the low-resource scenario. The base model used here is Deepseek-Coder. The evaluation metric includes EM and ES. In comparisons of different methods for the same metric, the best results are highlighted in bold. Gray shading denotes the superior results among SynMOE and PEFT variants within each metric. Since all experiments are repeated five times, we report their results in the format of mean±std.
| Tasks | Methods | Metrics | 1% | 5% | 10% | 25% | 50% |
|---|---|---|---|---|---|---|---|
| LCC | LoRA | EM | |||||
| ES | |||||||
| EM | |||||||
| ES | |||||||
| SynMOE + LoRA | EM | ||||||
| ES | |||||||
| SynMOE + | EM | ||||||
| ES |
efficacy at and 0.1, respectively. With Qwen2.5-Coder as the base model, the optimal configurations are observed at and 0.4. Interestingly, certain cases exhibit a rebound in efficacy at , suggesting that while syntactic information is inherently beneficial, an excessive routing constraint may partially hinder the model's capabilities. Therefore, finding an optimal equilibrium is paramount for maximizing the overall performance.
Answer to RQ4: The performance of SynMOE is affected by both the number of experts and the value. According to our experiments, setting the number of experts to 4 offers a good trade-off between effectiveness and efficiency. Additionally, task-specific tuning of is recommended to align with the specific characteristics of target tasks and base models.
5.5 RQ5: Performance in the Low-Resource Scenario
Low-resource scenarios are common in real-world software engineering, such as adaptation to new technical stacks or software tasks [32, 36], where PEFT methods typically demonstrate superior performance [32, 36]. In this section, we evaluate SynMOE's capability when training data is scarce across all three code intelligence tasks. Specifically, we utilize Manuscript submitted to ACM
UniXcoder for the two classification tasks and Deepseek-Coder for the generation task. This choice is informed by their demonstrated superiority in preceding research questions, which establishes them as representative baseline models. To simulate varying degrees of data scarcity, we randomly sample subsets from the original training partitions, ranging from 1% to 50%, while preserving the integrity of the original validation and test sets to ensure unbiased evaluation. The complete results are summarized in Table 4 and Table 5.
As shown in Table 4, SynMOE outperforms vanilla PEFT methods across all data ratios in the two classification tasks. For code search, SynMOE achieves a maximum average boost of 1.65% in the 5% setting. While for code clone detection, the improvement peaks at 3.44% in the 1% setting. This indicates that the integration of syntactic information not only raises the performance ceiling but also provides an effective inductive bias during data-scarce scenarios, which functions as prior knowledge and provides a shortcut that enables code LMs to swiftly capture the structural patterns of code. Additionally, the standard deviation results reveal that SynMOE maintains a level of stability that is on par with or superior to baseline PEFT approaches. Such a trend suggests that by incorporating syntactic priors, SynMOE stabilizes the learning process and performs more robustly under diverse data-constrained settings.
Regarding line-level code completion, as detailed in Table 5, SynMOE yields superior results over vanilla PEFT baselines across nearly all settings, barring a marginal gap for SynMOE+LoRA at the 1% ratio. The robust performance demonstrates that SynMOE empowers PEFT methods with significant competitiveness in low-resource scenarios. Moreover, SynMOE exhibits superior learning efficiency. With a mere 25% data allocation, it exceeds the performance of PEFT baselines utilizing double the data volume (50%). This finding highlights its immense potential for real-world scenarios plagued by the scarcity of large-scale datasets.
Answer to RQ5: Across diverse code intelligence tasks, SynMOE exhibits persistent superiority over standard PEFT approaches, effectively outshining them in nearly all low-resource settings. Besides, SynMOE delivers improvements in both learning efficiency and stability. These findings underscore its practical utility in data-scarce real-world scenarios.
6 Discussion
6.1 Case Study
The advantages of SynMOE come from the syntax-aware MoE module, which incorporates syntactic labels and enables token-wise adaptation. In this section, we conduct case studies to intuitively explore its strength. As shown in Figure 6, we present illustrative examples across three evaluated tasks: code search, code clone detection, and line-level code completion. For each case, we present the results from four approaches, comparing two vanilla PEFT methods against their SynMOE-integrated counterparts.
In our code search case study, given a natural language query describing the target functionality, “like map but also chains the results”, the objective is to accurately retrieve a relevant code snippet that implement a “flatMap” function from a candidate codebase. We report the top-1 retrieval results for different approaches. While LoRA and fail by fetching non-relevant code, the SynMOE-integrated methods successfully identify the correct one. We attribute this to the fact that both LoRA and yield coarse-grained code representations, making them severely misled by the high-frequency appearance of keywords like mapping and map in the non-relevant code snippet, and leading to a spurious high relevance. In contrast, our SynMOE approaches leverage multiple experts to conduct fine-grained analysis, acutely identifying itertools.chain as the pivotal action in imapchain. This establishes a precise alignment with the query phrase “chains the results”, thereby enabling the successful retrieval of the correct code snippet.
Liu et al.

Fig. 6. Case studies in the three code intelligence tasks.
The code clone detection case study takes a pair of code snippets as input, with the objective of determining whether they share identical functional behavior. A preliminary analysis confirms that both code snippets implement identical functionality. Specifically, they both process the input string via "adjacent character addition," where each new character Manuscript submitted to ACM is derived by summing the ASCII codes of the character at the current position and its successor in the original string. The final character is cyclically wrapped around and processed separately after the loop. Although the two code snippets differ significantly in variable names (cha/pointa/len vs. bud/str/n), I/O functions (cin/cout vs. gets/printf), and loop structures, their core logic remains perfectly isomorphic. Nevertheless, vanilla LoRA yields a prediction probability of only 0.499, failing to cross the classification threshold, while struggles even more severely, with a confidence score of just 0.151. These poor scores indicate that vanilla PEFT methods are easily distracted by lexical differences, token mismatches, and structural variations. Conversely, SynMOE-integrated methods achieve a perfect prediction probability of 1.0, demonstrating they focus on underlying dependencies and enabling code LMs to robustly align the core patterns of the two code snippets.
For the line-level code completion instance, it contains an incomplete code snippet and the corresponding ground truth as input, defining a class named DynamicValidationStateChange, which is part of the Eclipse Ruby Development Tools plugin. It serves as a state monitor to manage the dynamic validation state of refactoring operations. It contains two implemented functions, initializeValidationData and dispose. The former aims to register a listener and record the current timestamp, while the latter handles resource disposal and cleanup. The function to be implemented, isValid, is responsible for validity checking. As shown in the Figure 6(c), the ground truth for isValid is simply the conditional check: if (fValidationState == null). The outputs of both SynMOE variants correctly produce this conditional, aligning well with the ground truth. In contrast, the LoRA output: RefactoringStatus status = super.isValid(pm);, misses the core logic entirely. It does not check fValidationState and instead directly calls the superclass method, which does not fulfill the required behavior. As for , it also fails to understand the intent of the code and generates irrelevant elements, such as the time stamp.
6.2 Threats to validity
In this section, we discuss potential threats to the validity of this work from two perspectives.
External Validity. We identify three major threats to the external validity, stemming from the limited selection of evaluation tasks, base models, and PEFT methods. Although we conduct experiments on three representative code intelligence tasks, including the objective of both code comprehension and code generation, other important tasks, such as code translation [58, 59] and program repair [26, 55], are not included in our evaluation. Further investigation into the performance of SynMOE on a broader range of code intelligence tasks is still needed. Additionally, the largest code LM employed in our experiments has approximately 1.5 billion parameters. The effectiveness of SynMOE on even larger models is yet to be investigated. Moreover, we evaluate the improvements of SynMOE over two widely-used PEFT methods in this work, namely LoRA and . As SynMOE is orthogonal to most PEFT approaches, including diverse adapters [16] and LoRA variants [21, 64, 66], its performance in these configurations is worth further exploration. For the above three potential threats, we will design follow-up experiments to explore them in the future.
Internal Validity primarily concerns factors that could impact the experimental results, such as the hyperparameter settings. In our experiments, hyperparameters are used in both the code LMs and their adaptation on downstream tasks. To reduce potential threats introduced by different model configurations, all code LMs used in this study are obtained from Huggingface with their default configurations. For the hyperparameters related to the adaptation process, we consistently follow the settings used in prior works, including training epochs and maximum input length. We also perform a grid search over learning rates to obtain the best results. In addition, we conduct a detailed hyperparameter analysis on the number of experts and the value to uncover their influence on performance. Despite the difficulty in identifying optimal hyperparameter settings, our effort can significantly mitigate these threats.
Liu et al.
7 Related Work
7.1 Parameter-Efficient Fine-Tuning in Code Intelligence
Code Language Models (code LMs) have achieved significant accomplishments in many code intelligence tasks, such as code search [43, 57], code clone detection [7, 27], and code completion [15, 22]. A typical approach to adapting code LMs to downstream tasks is FT. However, it becomes computationally expensive and memory-intensive with the continuous increase in the scale of code LMs. Therefore, some PEFT methods are proposed to alleviate the issues in the field of Artificial Intelligence (AI). Adapter tuning [16] adds compact bottleneck modules (adapters) to each layer of the Transformer architecture [49], fine-tuning these new modules solely and freezing the other parameters. LoRA [17] takes inspiration from the hypothesis that the change in weights during model adaptation has a low intrinsic rank. It learns parameter updates by trainable rank decomposition matrices. Prompt tuning [25] applies learnable vectors at the initial word embedding layer, aligning the objective of downstream tasks with that in the pre-training stage, and thus achieving decent performance with very few parameters. Similarly, prefix tuning [28] introduces learnable vectors to the key vector and the value vector across all Transformer layers. [31] introduces three learnable rescaling vectors to rescale the key vector, value vector, and the activations of feed-forward networks. The rescaling is realized by the element-wise multiplication operation, and due to its simplicity, introduces little computational overhead.
To be specific, in the field of code intelligence, Wang et al. [50] first empirically evaluate the effect of prompt tuning. Another work [51] concentrates on adapter tuning and uncovers its advantages in low-resource scenarios. Li et al. [26] conduct four PEFT methods on four code LMs that have sizes around 7B or larger, exploring their capabilities on automated program repair. Liu et al. [36] investigate adapter tuning and LoRA for tasks related to code changes. They find that both PEFT methods excel in classification tasks, but do not gain an advantage in generative tasks. Focusing on code-change learning, their follow-up work [32] proposed , which combines PEFT and FT methods across different layers, achieving comparable or superior performance to FT, while keeping parameter efficiency. However, is only applicable for code-change-related tasks, because its layer-wise combination is guided by their proposed probing tasks for code-change learning. In addition, to exploit the deep semantics embedded in the formal structure of code, Yang et al. [63] proposed Graph-LoRA, a PEFT variant based on the Attributed Patch Semantic Graph (APSG) for exclusively modeling code diffs in patch verification. Yu et al. [65] point out that existing PEFT methods struggle to capture common features shared across languages. Consequently, for the task of multilingual code summarization, they develop a LoRA-based approach incorporating a universal expert and a set of specialized linguistic experts to achieve superior performance. To date, existing works either fail to explicitly incorporate code features or focus solely on a single, specific task. In this paper, we integrate AST-based syntactic labels into vanilla PEFT methods, enhancing their code understanding performance while maintaining parameter efficiency.
7.2 Mixture-of-Experts
The concept of mixture-of-experts was first introduced by Jacob et al. [23], applying multiple sub-modules (experts), each of which is trained with a specific expertise. In the era of LLMs, MOE is incorporated with the Transformer architecture, introducing several sparse experts to the feed-forward sub-layer and using a trainable gating network to assign weights of experts on a per-example basis. It has shown promising effectiveness [6, 24, 42] but is still associated with high computational costs as FT. Recently, researchers have begun to combine the concept of MOE with PEFT methods. Liu et al. [33] explore the potential of using LoRAs as experts for multi-task medical applications. Similarly, Wu et al. [56] delve into the gating network, investigating how to dynamically and efficiently compose multiple trained
LoRAs while preserving their individual characteristics. Wang et al. [53] leverage a mixture of adapters to improve the performance of natural language understanding and generation tasks. Some other techniques, such as introducing asymmetric low-rank adaptation [52] or assigning more LoRA experts to higher layers [11], have also been explored. In this paper, we propose to leverage MOE to optimize the overall performance of PEFT methods by incorporating syntactic characteristics in the context of code intelligence.
8 Conclusion
In this paper, we propose SynMOE to incorporate token-wise syntax awareness into existing PEFT methods through a mixture-of-experts, thereby fostering their learning efficacy in the code intelligence field. In experiments, we examine the performance of SynMOE across three code intelligence tasks using five code LMs, focusing on its improvements over two widely adopted PEFT approaches, LoRA and (IA) . Experimental results show that SynMOE achieves consistent performance improvements. Moreover, it also outperforms several advanced PEFT methods. As for the comparison with FT, SynMOE achieves comparable or superior performance with reduced training time and lower memory consumption. In our future work, more PEFT methods could be integrated into SynMOE to further enhance the performance of code LMs under PEFT settings.
Acknowledgments
This work was partially supported by the National Natural Science Foundation of China (Grant Nos. 62502283 and U24B20149), the Natural Science Foundation of Shandong Province (Grant No. ZR2024QF093), and the Young Talent of Lifting Engineering for Science and Technology in Shandong, China (Grant No. SDAST2025QTB031). Besides, it is partially supported by the General Research Fund of the Research Grants Council of Hong Kong and the research funds of the City University of Hong Kong (Grant Nos. 6000796, 9229109, 9229098, 9220103, 9229029).
References
[1] Miltiadis Allamanis and Charles Sutton. 2013. Mining source code repositories at massive scale using language modeling. In 2013 10th working conference on mining software repositories (MSR). IEEE, 207–216.
[2] Max Brunsfeld, Patrick Thomson, Andrew Hlynskyi, et al. [n.d.]. Tree-sitter. https://github.com/tree-sitter/tree-sitter.
[3] Nghi DQ Bui, Yijun Yu, and Lingxiao Jiang. 2021. Self-supervised contrastive learning for code retrieval and summarization via semantic-preserving transformations. In Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval. 511–521.
[4] Luca Di Grazia and Michael Pradel. 2023. Code search: A survey of techniques for finding code. Comput. Surveys 55, 11 (2023), 1–31.
[5] Yangruibo Ding, Benjamin Steenhoek, Kexin Pei, Gail Kaiser, Wei Le, and Baishakhi Ray. 2024. Traced: Execution-aware pre-training for source code. In Proceedings of the 46th IEEE/ACM International Conference on Software Engineering. 1–12.
[6] Nan Du, Yanping Huang, Andrew M Dai, Simon Tong, Dmitry Lepikhin, Yuanzhong Xu, Maxim Krikun, Yanqi Zhou, Adams Wei Yu, Orhan Firat, et al. 2022. Glam: Efficient scaling of language models with mixture-of-experts. In International conference on machine learning. PMLR, 5547–5569.
[7] Yangkai Du, Tengfei Ma, Lingfei Wu, Xuhong Zhang, and Shouling Ji. 2024. AdaCCD: adaptive semantic contrasts discovery based cross lingual adaptation for code clone detection. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 38. 17942–17950.
[8] Ali Edalati, Marzieh Tahaei, Ivan Kobyzev, Vahid Partovi Nia, James J Clark, and Mehdi Rezagholizadeh. 2022. Krona: Parameter efficient tuning with kronecker adapter. arXiv preprint arXiv:2212.10650 (2022).
[9] Chunrong Fang, Zixi Liu, Yangyang Shi, Jeff Huang, and Qingkai Shi. 2020. Functional code clone detection with syntax and semantics fusion learning. In Proceedings of the 29th ACM SIGSOFT international symposium on software testing and analysis. 516–527.
[10] Zhangyin Feng, Daya Guo, Duyu Tang, Nan Duan, Xiaocheng Feng, Ming Gong, Linjun Shou, Bing Qin, Ting Liu, Daxin Jiang, et al. 2020. CodeBERT: A Pre-Trained Model for Programming and Natural Languages. In Findings of the Association for Computational Linguistics: EMNLP 2020. 1536–1547.
[11] Chongyang Gao, Kezhen Chen, Jinneng Rao, Baochen Sun, Ruibo Liu, Daiyi Peng, Yawen Zhang, Xiaoyuan Guo, Jie Yang, and VS Subrahmanian. 2024. Higher layers need more lora experts. arXiv preprint arXiv:2402.08562 (2024).
[12] Daya Guo, Shuai Lu, Nan Duan, Yanlin Wang, Ming Zhou, and Jian Yin. 2022. UniXcoder: Unified Cross-Modal Pre-training for Code Representation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). 7212–7225.
Liu et al.
[13] Daya Guo, Canwen Xu, Nan Duan, Jian Yin, and Julian McAuley. 2023. Longcoder: A long-range pre-trained language model for code completion. In International Conference on Machine Learning. PMLR, 12098–12107.
[14] Daya Guo, Qihao Zhu, Dejian Yang, Zhenda Xie, Kai Dong, Wentao Zhang, Guanting Chen, Xiao Bi, Yu Wu, YK Li, et al. 2024. DeepSeek-Coder: When the Large Language Model Meets Programming—The Rise of Code Intelligence. arXiv preprint arXiv:2401.14196 (2024).
[15] Qi Guo, Xiaohong Li, Xiaofei Xie, Shangqing Liu, Ze Tang, Ruitao Feng, Junjie Wang, Jidong Ge, and Lei Bu. 2024. FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completion. In Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis. 313–324.
[16] Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin De Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. 2019. Parameter-efficient transfer learning for NLP. In International conference on machine learning. PMLR, 2790–2799.
[17] Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu Chen, et al. 2022. Lora: Low-rank adaptation of large language models. ICLR (2022).
[18] Junjie Huang, Duyu Tang, Linjun Shou, Ming Gong, Ke Xu, Daxin Jiang, Ming Zhou, and Nan Duan. 2021. CoSQA: 20,000+ Web Queries for Code Search and Question Answering. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers). 5690–5700.
[19] Binyuan Hui, Jian Yang, Zeyu Cui, Jiaxi Yang, Dayiheng Liu, Lei Zhang, Tianyu Liu, Jiajun Zhang, Bowen Yu, Keming Lu, et al. 2024. Qwen2. 5-coder technical report. arXiv preprint arXiv:2409.12186 (2024).
[20] Hamel Husain, Ho-Hsiang Wu, Tiferet Gazit, Miltiadis Allamanis, and Marc Brockschmidt. 2019. Codesearchnet challenge: Evaluating the state of semantic code search. arXiv preprint arXiv:1909.09436 (2019).
[21] Nam Hyeon-Woo, Moon Ye-Bin, and Tae-Hyun Oh. 2022. FedPara: Low-rank Hadamard Product for Communication-Efficient Federated Learning. In International Conference on Learning Representations.
[22] Maliheh Izadi, Jonathan Katzy, Tim Van Dam, Marc Otten, Razvan Mihai Popescu, and Arie Van Deursen. 2024. Language models for code completion: A practical evaluation. In Proceedings of the IEEE/ACM 46th International Conference on Software Engineering. 1–13.
[23] Robert A Jacobs, Michael I Jordan, Steven J Nowlan, and Geoffrey E Hinton. 1991. Adaptive mixtures of local experts. Neural computation 3, 1 (1991), 79–87.
[24] Albert Q Jiang, Alexandre Sablayrolles, Antoine Roux, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, et al. 2024. Mixtral of experts. arXiv preprint arXiv:2401.04088 (2024).
[25] Brian Lester, Rami Al-Rfou, and Noah Constant. 2021. The Power of Scale for Parameter-Efficient Prompt Tuning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics.
[26] Guochang Li, Chen Zhi, Jialiang Chen, Junxiao Han, and Shuiguang Deng. 2024. Exploring parameter-efficient fine-tuning of large language model on automated program repair. In Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering. 719–731.
[27] Jia Li, Chongyang Tao, Zhi Jin, Fang Liu, and Ge Li. 2023. ZC 3: Zero-shot cross-language code clone detection. In 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 875–887.
[28] Xiang Lisa Li and Percy Liang. 2021. Prefix-Tuning: Optimizing Continuous Prompts for Generation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers). 4582–4597.
[29] Chao Liu, Xindong Zhang, Hongyu Zhang, Zhiyuan Wan, Zhan Huang, and Meng Yan. 2024. An empirical study of code search in intelligent coding assistant: Perceptions, expectations, and directions. In Companion Proceedings of the 32nd ACM International Conference on the Foundations of Software Engineering. 283–293.
[30] Fang Liu, Zhiyi Fu, Ge Li, Zhi Jin, Hui Liu, Yiyang Hao, and Li Zhang. 2024. Non-autoregressive line-level code completion. ACM Transactions on Software Engineering and Methodology 33, 5 (2024), 1–34.
[31] Haokun Liu, Derek Tam, Mohammed Muqueeth, Jay Mohta, Tenghao Huang, Mohit Bansal, and Colin A Raffel. 2022. Few-shot parameter-efficient fine-tuning is better and cheaper than in-context learning. Advances in Neural Information Processing Systems 35 (2022), 1950–1965.
[32] Jiaxing Liu, Chaofeng Sha, and Xin Peng. 2023. An empirical study of parameter-efficient fine-tuning methods for pre-trained code models. In 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 397–408.
[33] Qidong Liu, Xian Wu, Xiangyu Zhao, Yuanshao Zhu, Derong Xu, Feng Tian, and Yefeng Zheng. 2024. When moe meets llms: Parameter efficient fine-tuning for multi-task medical applications. In Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval. 1104–1114.
[34] Shuo Liu, Jacky Keung, Zhi Jin, Zhen Yang, Fang Liu, and Hao Zhang. 2025. An Empirical Study of Parameter-Efficient Fine-Tuning in Code Change Learning and Beyond. IEEE Transactions on Software Engineering 52, 1 (2025), 3–21.
[35] Shuo Liu, Jacky Keung, Zhen Yang, Fang Liu, Fengji Zhang, and Yicheng Sun. 2025. Exploring continual learning in code intelligence with domain-wise distilled prompts. Information and Software Technology (2025). doi:10.1016/j.infsof.2025.107775
[36] Shuo Liu, Jacky Keung, Zhen Yang, Fang Liu, Qilin Zhou, and Yihan Liao. 2024. Delving into parameter-efficient fine-tuning in code change learning: An empirical study. In 2024 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER). IEEE, 465–476.
[37] Shuo Liu, Jacky Keung, Zhen Yang, Zhenyu Mao, and Yicheng Sun. 2025. Can mamba be better? an experimental evaluation of mamba in code intelligence. In 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 1856–1868.
[38] Shuai Lu, Nan Duan, Hojae Han, Daya Guo, Seung Won Hwang, and Alexey Svyatkovskiy. 2022. ReACC: A Retrieval-Augmented Code Completion Framework. In 60th Annual Meeting of the Association for Computational Linguistics, ACL. 6227–6240.
[39] Shuai Lu, Daya Guo, Shuo Ren, Junjie Huang, Alexey Svyatkovskiy, Ambrosio Blanco, Colin B. Clement, Dawn Drain, Daxin Jiang, Duyu Tang, Ge Li, Lidong Zhou, Linjun Shou, Long Zhou, Michele Tufano, Ming Gong, Ming Zhou, Nan Duan, Neel Sundaresan, Shao Kun Deng, Shengyu Fu, and Shujie Liu. 2021. CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generation. CoRR abs/2102.04664 (2021).
[40] Yingwei Ma, Yue Yu, Shanshan Li, Zhouyang Jia, Jun Ma, Rulin Xu, Wei Dong, and Xiangke Liao. 2023. Mulcs: Towards a unified deep representation for multilingual code search. In 2023 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER). IEEE, 120–131.
[41] Lili Mou, Ge Li, Lu Zhang, Tao Wang, and Zhi Jin. 2016. Convolutional neural networks over tree structures for programming language processing. In Proceedings of the AAAI conference on artificial intelligence, Vol. 30.
[42] Basil Mustafa, Carlos Riquelme, Joan Puigcerver, Rodolphe Jenatton, and Neil Houlsby. 2022. Multimodal contrastive learning with limoe: the language-image mixture of experts. Advances in Neural Information Processing Systems 35 (2022), 9564–9576.
[43] Shinwoo Park, Youngwook Kim, and Yo-Sub Han. 2023. Contrastive learning with keyword-based data augmentation for code search and code question answering. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics. 3609–3619.
[44] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog 1, 8 (2019), 9.
[45] Francisco Ribeiro, Rui Abreu, and João Saraiva. 2022. Framing program repair as code completion. In Proceedings of the Third International Workshop on Automated Program Repair. 38–45.
[46] Rico Sennrich, Barry Haddow, and Alexandra Birch. 2016. Neural machine translation of rare words with subword units. In Proceedings of the 54th annual meeting of the association for computational linguistics (volume 1: long papers). 1715–1725.
[47] Ensheng Shi, Yanlin Wang, Wenchao Gu, Lun Du, Hongyu Zhang, Shi Han, Dongmei Zhang, and Hongbin Sun. 2023. Cocosoda: Effective contrastive learning for code search. In 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE). IEEE, 2198–2210.
[48] Chenning Tao, Qi Zhan, Xing Hu, and Xin Xia. 2022. C4: Contrastive cross-language code clone detection. In Proceedings of the 30th IEEE/ACM international conference on program comprehension. 413–424.
[49] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. Advances in neural information processing systems 30 (2017).
[50] Chaozheng Wang, Yuanhang Yang, Cuiyun Gao, Yun Peng, Hongyu Zhang, and Michael R Lyu. 2022. No more fine-tuning? an experimental evaluation of prompt tuning in code intelligence. In Proceedings of the 30th ACM joint European software engineering conference and symposium on the foundations of software engineering. 382–394.
[51] Deze Wang, Boxing Chen, Shanshan Li, Wei Luo, Shaoliang Peng, Wei Dong, and Xiangke Liao. 2023. One adapter for all programming languages? adapter tuning for code search and summarization. In 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE). IEEE, 5–16.
[52] Xujia Wang, Haiyan Zhao, Shuo Wang, Hanqing Wang, and Zhiyuan Liu. 2024. MALoRA: Mixture of Asymmetric Low-Rank Adaptation for Enhanced Multi-Task Learning. arXiv preprint arXiv:2410.22782 (2024).
[53] Yaqing Wang and Sahaj Agarwal. 2022. AdaMix: Mixture-of-Adaptations for Parameter-efficient Model Tuning. In The 2022 Conference on Empirical Methods in Natural Language Processing.
[54] Frank Wilcoxon. 1992. Individual comparisons by ranking methods. In Breakthroughs in Statistics: Methodology and Distribution. Springer, 196–202.
[55] Linhao Wu, Yifei Pei, Zhen Yang, Kainan Li, Zhonghang Lu, Hao Tan, Xiran Lyu, Jia Li, Yizhou Chen, Pengyu Xue, et al. 2026. DebugRepair: Enhancing LLM-Based Automated Program Repair via Self-Directed Debugging. arXiv preprint arXiv:2604.19305 (2026).
[56] Xun Wu, Shaohan Huang, and Furu Wei. 2024. Mixture of LoRA Experts. In The Twelfth International Conference on Learning Representations.
[57] Yutao Xie, Jiayi Lin, Hande Dong, Lei Zhang, and Zhonghai Wu. 2023. Survey of code search based on deep learning. ACM Transactions on Software Engineering and Methodology 33, 2 (2023), 1–42.
[58] Pengyu Xue, Linhao Wu, Zhen Yang, Chengyi Wang, Xiang Li, Yuxiang Zhang, Jia Li, Ruikai Jin, Yifei Pei, Zhaoyan Shen, Xiran Lyu, and Jacky Wai Keung. 2025. ClassEval-T: Evaluating Large Language Models in Class-Level Code Translation. Proc. ACM Softw. Eng. 2, ISSTA, Article ISSTA063 (June 2025), 24 pages. doi:10.1145/3728940
[59] Pengyu Xue, Kunwu Zheng, Zhen Yang, Yifei Pei, Linhao Wu, Jiahui Dong, Xiapu Luo, Yan Xiao, Fei Liu, Yuxuan Zhang, et al. 2025. TransLibEval: Demystify Large Language Models' Capability in Third-party Library-targeted Code Translation. arXiv preprint arXiv:2509.12087 (2025).
[60] Zhen Yang, Jacky Keung, Xiao Yu, Xiaodong Gu, Zhengyuan Wei, Xiaoxue Ma, and Miao Zhang. 2021. A multi-modal transformer-based code summarization approach for smart contracts. In 2021 IEEE/ACM 29th International Conference on Program Comprehension (ICPC). IEEE, 1–12.
[61] Zhen Yang, Jacky Wai Keung, Xiao Yu, Yan Xiao, Zhi Jin, and Jingyu Zhang. 2023. On the significance of category prediction for code-comment synchronization. ACM Transactions on Software Engineering and Methodology 32, 2 (2023), 1–41.
[62] Zhen Yang, Hongyi Lin, Xiao Yu, Jacky Wai Keung, Shuo Liu, Pak Yuen Patrick Chan, Yicheng Sun, and Fengji Zhang. 2026. R ComSync: improving code-comment synchronization with in-context learning and reranking. Empirical Software Engineering 31, 4 (2026), 84.
[63] Zhenyu Yang, Jingwen Wu, Zhen Yang, and Zhongxing Yu. 2026. Parameter-Efficient Fine-Tuning with Attributed Patch Semantic Graph for Automated Patch Correctness Assessment. IEEE Transactions on Software Engineering (April 2026), 1–20. doi:10.1109/TSE.2026.3684016
[64] Shih-Ying Yeh, Yu-Guan Hsieh, Zhidong Gao, Bernard BW Yang, Giyeong Oh, and Yanmin Gong. 2023. Navigating text-to-image customization: From lycoris fine-tuning to model evaluation. In The Twelfth International Conference on Learning Representations.
Liu et al.
[65] Tianchen Yu, Li Yuan, Hailing Huang, Jiexin Wang, and Yi Cai. 2025. Mixture-of-Experts Low-Rank Adaptation for Multilingual Code Summarization. In 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE) (Seoul, Korea). IEEE Press, 2248–2260. doi:10.1109/ASE63991.2025.00186
[66] Qingru Zhang, Minshuo Chen, Alexander Bukharin, Pengcheng He, Yu Cheng, Weizhu Chen, and Tuo Zhao. 2023. Adalora: Adaptive Budget Allocation for Parameter-Efficient Fine-Tuning. In The Eleventh International Conference on Learning Representations.
[67] Tingwei Zhu, Zhongxin Liu, Tongtong Xu, Ze Tang, Tian Zhang, Minxue Pan, and Xin Xia. 2024. Exploring and Improving Code Completion for Test Code. In Proceedings of the 32nd IEEE/ACM International Conference on Program Comprehension. 137–148.