Intelligent Code Completion by a Unified Multi-task Learning with a Large Language Model

Shradha Maharjan, Meng Xia, Tae Hyuk Ahn, Myoungkyu Song · 2025

Code completion has become an essential tool in modern software development. It helps developers by predicting the next token (e.g., an API function call) based on the current coding context. Its widespread use highlights the need for efficient and context-aware solutions that streamline the development process. Despite ongoing efforts to enhance code completion performance, many existing approaches remain limited, offering ranked lists primarily based on alphabetical order or usage frequency from partially typed code fragments. While these studies have seen incremental improvements, the level of meaningful assistance provided to developers has not advanced in parallel. To address this limitation, we propose CODECOM, a deep learning-based code completion technique that leverages a large language model (LLM) with multi-task learning. Our approach processes sequences of source code tokens, their corresponding abstract syntax trees (ASTs), and program dependencies, enabling more context-aware and accurate code predictions. In our case study, CODECOM demonstrates state-of-the-art performance in the code completion downstream task. The evaluation results highlight significant improvements over the baseline, achieving 29.49% in BLEU, 71.16% in Acc@1, and 67.19% in Acc@5. These advancements are further validated by the Wilcoxon signed-rank test, which confirms strong statistical significance across all metrics. These findings indicate that Code Com can accelerate software development and assist developers in reducing potential errors effectively. Index Terms-software maintenance, automated code completion, deep learning, large language model.

Read the paper · More papers on PaperTik