系统分析代码智能中上下文信息的使用,揭示研究趋势与挑战
Towards an Understanding of Context Utilization in Code Intelligence
- 梳理146篇论文,构建代码智能上下文类型新分类体系
- 发现多数研究依赖文档与语法树等上下文提升模型性能
- 提出未来研究方向,适合关注代码生成与理解的研究者
代码智能是软件工程中的新兴领域,旨在提升各类代码相关任务的效率与效果。近期研究表明,引入源代码之外的上下文信息(如API文档、抽象语法树等)可显著提升模型表现。尽管学术界对此兴趣日益增长,但缺乏对上下文使用的系统性分析。为此,我们对2007年9月至2024年8月间发表的146篇相关研究进行了广泛文献综述,主要贡献包括:(1) 对研究格局的量化分析,涵盖发表趋势、会议分布及应用领域;(2) 提出代码智能中上下文类型的新型分类体系;(3) 针对不同任务的任务导向型上下文融合策略分析;(4) 对上下文感知方法评估方法的批判性评价。基于上述发现,我们识别出当前代码智能系统在上下文利用方面的核心挑战,并提出一项研究路线图,明确未来关键研究机遇。
原文摘要 · Abstract (English)
Code intelligence is an emerging domain in software engineering, aiming to improve the effectiveness and efficiency of various code-related tasks. Recent research suggests that incorporating contextual information beyond the basic original task inputs (i.e., source code) can substantially enhance model performance. Such contextual signals may be obtained directly or indirectly from sources such as API documentation or intermediate representations like abstract syntax trees can significantly improve the effectiveness of code intelligence. Despite growing academic interest, there is a lack of systematic analysis of context in code intelligence. To address this gap, we conduct an extensive literature review of 146 relevant studies published between September 2007 and August 2024. Our investigation yields four main contributions. (1) A quantitative analysis of the research landscape, including publication trends, venues, and the explored domains; (2) A novel taxonomy of context types used in code intelligence; (3) A task-oriented analysis investigating context integration strategies across diverse code intelligence tasks; (4) A critical evaluation of evaluation methodologies for context-aware methods. Based on these findings, we identify fundamental challenges in context utilization in current code intelligence systems and propose a research roadmap that outlines key opportunities for future research.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。