Modern language models (LMs) have been successfully employed in source code generation and understanding, leading to a significant increase in research focused on learning-based code intelligence, such as automated bug repair, and test case generation. Despite their great potential, language models for code intelligence (LM4Code) are susceptible to potential pitfalls, which hinder realistic performance and further impact their reliability and applicability in real-world deployment. Such challenges drive the need for a comprehensive understanding - not just identifying these issues but delving into their possible implications and existing solutions to build more reliable language models tailored to code intelligence. Based on a well-defined systematic research approach, we conducted an extensive literature review to uncover the pitfalls inherent in LM4Code. Finally, 67 primary studies from top-tier venues have been identified. After carefully examining these studies, we designed a taxonomy of pitfalls in LM4Code research and conducted a systematic study to summarize the issues, implications, current solutions, and challenges of different pitfalls for LM4Code systems. We developed a comprehensive classification scheme that dissects pitfalls across four crucial aspects: data collection and labeling, system design and learning, performance evaluation, and deployment and maintenance. Through this study, we aim to provide a roadmap for researchers and practitioners, facilitating their understanding and utilization of LM4Code in reliable and trustworthy ways.
翻译:现代语言模型已成功应用于源代码生成与理解,推动了以学习为基础的代码智能研究(如自动漏洞修复、测试用例生成)的显著增长。尽管潜力巨大,面向代码智能的语言模型(LM4Code)仍易受潜在陷阱影响,这些陷阱不仅阻碍了实际性能,更影响了其在真实部署中的可靠性与适用性。这一挑战催生了对系统性理解的需求——不仅需识别这些缺陷,更需深入探究其潜在影响及现有解决方案,以构建更可靠的代码智能语言模型。基于严格定义的系统研究方法,我们开展了广泛的文献综述,揭示LM4Code中固有的陷阱。最终从顶级学术平台筛选出67篇主要研究。通过细致分析这些文献,我们设计了LM4Code研究的陷阱分类体系,并开展系统性研究,归纳不同陷阱对LM4Code系统的影响、现有解决方案及挑战。我们构建了涵盖数据收集与标注、系统设计与学习、性能评估、部署与维护四个关键维度的综合分类框架。本研究旨在为研究人员和实践者提供路线图,助力其以可靠可信的方式理解与应用LM4Code。