CONTEXT-AWARE CODE GENERATION WITH LARGE LANGUAGE MODELS FOR ANDROID: A SYSTEMATIC TECHNICAL REVIEW

Authors

  • Đoàn Ngọc Phương
  • Nguyễn Thu Phương
  • Nguyễn Thị Dung
  • Nguyễn Thị Thu Hằng

Keywords

Large language models, Context-aware code generation, Android, Android studio, Retrieval augmentation, Mô hình ngôn ngữ lớn, Sinh mã có ngữ cảnh, Android Studio, Tăng cường truy hồi

DOI:

https://doi.org/10.34238/tnu-jst.14685

Abstract

Generating code for Android applications using large language models places specific demands, as the results need to simultaneously fit multiple project components and project artifacts, including user interface resources, configuration files, application programming interfaces, and feedback from the development environment. Although many recent studies show that large language models have the potential to support programming, the description and exploitation of context in the Android domain remain inconsistent, making it difficult to compare techniques and explain why a system might produce reliable results in real-world implementation. This paper conducts a systematic survey focusing on contextual code generation techniques for Android and Android studio. The studies are organized according to contextual sources, encoding and composition mechanisms for inference, and the code generation process from context selection to verification steps. Based on this, the study comprehensively examines common design patterns such as encapsulating context in prompts, representing code structure, providing context through retrieval-augmented prompting, and exploiting feedback from the development environment, while also discussing trade-offs regarding relevance, cost, and robustness to noise.

Downloads

Download data is not yet available.

References

X. Hou et al., “Large language models for software engineering: A systematic literature review,” ACM Trans. Softw. Eng. Methodol., vol. 33, no. 8, 2024, Art. no. 220, doi: 10.1145/3695988.

J. Jiang, F. Wang, J. Shen, S. Kim, and S. Kim, “A survey on large language models for code generation,” ACM Trans. Softw. Eng. Methodol., vol. 35, 2025, doi: 10.1145/3747588.

D. Shrivastava, H. Larochelle, and D. Tarlow, “Repository-level prompt generation for large language models of code,” in Proc. 40th Int. Conf. Machine Learning (ICML 2023), vol. 202, pp. 31693-31715, 2023.

N.-P. Doan, T.-V. Nguyen, T.-T. Pham, T. T.-H. Nguyen, and X.-K. Pham, “A Systematic Review of Generative AI Applications in UI/UX Design for Mobile Applications,” in Proc. Int. Conf. Advances in Information and Communication Technology (ICTA 2025), vol. 1831, Springer, Cham, 2026, pp. 184-193, doi: 10.1007/978-3-032-18316-3_21.

Y. Li, Y. Peng, Y. Huo, and M. R. Lyu, “Enhancing LLM-Based Coding Tools through Native Integration of IDE-Derived Static Context,” in Proc. 1st Int. Workshop on Large Language Models for Code (LLM4Code 2024), Lisbon, Portugal, 2024, pp. 70-74, doi: 10.1145/3643795.3648392.

F. Zhang et al., “RepoCoder: Repository-level code completion through iterative retrieval and generation,” in Proc. EMNLP 2023, Singapore, 2023, pp. 2471-2484, doi: 10.18653/v1/2023.emnlp-main.151.

X. Yu, C. Li, M. Pan, and X. Li, “DroidCoder: Enhanced Android code completion with context-enriched retrieval-augmented generation,” in Proc. ASE '24, 2024, pp. 681-693, doi: 10.1145/3691620.3695063.

D. N. Phuong, N. T. Phuong, and N. T. Dung, “Reviewing the Role of Artificial Intelligence in Mobile App Creation,” TNU Journal of Science and Technology, vol. 230, no. 07, pp. 288-298, 2025, doi: 10.34238/tnu-jst.12946.

J. Kim, R. Rua, and K. Ali, “BuilDroid: A self-correcting LLM agent for automated Android builds,” in Proc. 40th IEEE/ACM Int. Conf. Automated Software Engineering (ASE 2025), Tool Demonstrations, Seoul, Republic of Korea, 2025, pp. 4041-4044.

Z. Z. Wang, A. Asai, X. V. Yu, F. F. Xu, Y. Xie, G. Neubig, and D. Fried, “CodeRAG-Bench: Can Retrieval Augment Code Generation?,” in Proc. Findings of the Association for Computational Linguistics: NAACL 2025, Albuquerque, NM, USA, 2025, pp. 3199-3214, doi: 10.18653/v1/2025.findings-naacl.176.

M. J. Page et al., “The PRISMA 2020 statement: An updated guideline for reporting systematic reviews,” BMJ, vol. 372, 2021, doi: 10.1136/bmj.n71.

B. Kitchenham and S. Charters, “Guidelines for performing systematic literature reviews in software engineering,” EBSE Technical Report EBSE-2007-01, 2007.

W. Cheng, Y. Wu, and W. Hu, “Dataflow-guided retrieval augmentation for repository-level code completion,” in Proc. 62nd Annu. Meeting Assoc. Comput. Linguistics (ACL 2024), Long Papers, vol. 1, Bangkok, Thailand, 2024, pp. 7957-7977, doi: 10.18653/v1/2024.acl-long.431.

S. Zhang, Y. Ding, S. Lian, S. Song, and H. Li, “CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completion,” in Proc. EMNLP 2025, Suzhou, China, 2025, pp. 23278-23288, doi: 10.18653/v1/2025.emnlp-main.1187.

R. Bairi et al., “CodePlan: Repository-level coding using LLMs and planning,” Proc. ACM Softw. Eng., vol. 1 (FSE), pp. 675-698, 2024, doi: 10.1145/3643757.

S. Feng and C. Chen, “Prompting is all you need: Automated Android bug replay with large language models,” in Proc. 46th IEEE/ACM Int. Conf. Software Engineering (ICSE '24), 2024, doi: 10.1145/3597503.3608137.

X. Liu et al., “CodexGraph: Bridging large language models and code repositories via code graph databases,” in Proc. NAACL 2025: Human Language Technologies, Long Papers, vol. 1, pp. 142-160, 2025, doi: 10.18653/v1/2025.naacl-long.7.

W. Liu et al., “GraphCoder: Enhancing repository-level code completion via coarse-to-fine retrieval based on code context graph,” in Proc. 39th IEEE/ACM Int. Conf. Automated Software Engineering (ASE '24), Sacramento, CA, USA, 2024, doi: 10.1145/3691620.3695054.

A. Semenkin, Y. Sokolov, and E. Vu, “Context composing for full line code completion,” in Proc. IDE '24, Lisbon, Portugal, 2024, pp. 15-17, doi: 10.1145/3643796.3648446.

Y. Wang et al., “RLCoder: Reinforcement learning for repository-level code completion,” in Proc. 47th IEEE/ACM Int. Conf. Software Engineering (ICSE 2025), 2025, pp. 1140-1152, doi: 10.1109/ICSE55347.2025.00014.

T. Mahmud et al., “Automated Update of Android Deprecated API Usages with Large Language Models,” IEEE Trans. Softw. Eng., vol. 52, pp. 70-85, 2025, doi: 10.1109/TSE.2025.3627897.

Downloads

Published

2026-05-27

Issue

Section

INFORMATION AND COMMUNICATIONS TECHNOLOGY