paperbot · PL 论文追踪

全部论文 待读 收藏

P2 DroidCoder: Enhanced Android Code Completion with Context-Enriched Retrieval-Augmented Generation

DroidCoder:面向 Android 的上下文增强检索增强生成式代码补全
ASE Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering2024匹配度 1/10 · 该论文聚焦 Android 代码补全与 RAG 增强的 Code LLM 微调,属于软件开发工具/代码生成方向;与用户关注的静态分析、形式化验证、Agentic 程序分析、浮点程序分析及贝叶斯程序分析均无直接关联。引用 4 inbox
Xinran Yu, Chun Li, Minxue Pan, Xuandong Li
crossref: 2026-09-12

AI 速览

一句话:提出面向 Android 的上下文增强 RAG 代码补全框架,并设计微调损失以更好利用上下文。

Android 开发大量依赖生命周期回调、UI 组件等特有代码,现有基于 RAG 的代码补全难以为 Code LLM 检索到足够有效的上下文。为此,本文提出 DroidCoder:利用 Android 开发特征与代码片段上下文信息增强 RAG,并设计专用损失函数微调模型,使其更好地利用上下文增强的检索结果。作者在三个基座模型和不同类型应用上,与两种先进代码补全方法比较;结果表明,DroidCoder 在行级与多行级补全上显著优于基线,并提升补全代码质量。

问题
现有 RAG 代码补全方法难以针对 Android 特有开发特征(如生命周期回调、UI 组件)检索到充分上下文,导致 Android 补全效果受限。
方法
结合 Android 开发特征与代码片段上下文增强 RAG,并设计专用损失函数微调 Code LLM,以更好利用检索上下文进行补全。
评估
在三个基座模型和多种应用类型上与两种 SOTA 方法比较,在行级/多行级补全及生成代码质量上取得显著提升。
原文摘要(Abstract)

Android is the most popular mobile operating system. However, Android development requires extensive coding, especially for unique features such as lifecycle callbacks and UI widgets. Existing code completion methods typically utilize Retrieval-Augmented Generation (RAG) to provide contextual information for pre-trained code large language models (Code LLMs) to perform completion. Despite considerable progress in these methods, their effectiveness in Android development remains limited. This is because the features of Android development make it challenging for existing retrieval mechanisms to extract sufficient context effectively. In response, we propose DroidCoder, a novel Android code completion framework that employs Android development features and contextual information of code snippets to enrich RAG. It also incorporates a specifically designed loss function to fine-tune the model, enabling it to better utilize context-enhanced RAG for Android code completion. We evaluated our method on three base models and different types of applications, comparing it with two state-of-the-art code completion methods. The experimental results demonstrate that our method significantly outperforms the baselines at line-level and multi-line-level code completion and improves the quality of the completed code.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8342,
  title = {DroidCoder: Enhanced Android Code Completion with Context-Enriched Retrieval-Augmented Generation},
  author = {Xinran Yu and Chun Li and Minxue Pan and Xuandong Li},
  booktitle = {ASE},
  year = {2024},
  doi = {10.1145/3691620.3695063}
}