Large Language Models (LLMs) have significantly impacted numerous domains, including Software Engineering (SE). Many recent publications have explored LLMs applied to various SE tasks and applications. Nevertheless, a comprehensive understanding of the application, effects, and possible limitations of LLMs on SE is still in its early stages. To bridge this gap, we conducted a systematic literature review on the intersection of LLMs and SE, with a particular focus on understanding how LLMs can be exploited in SE to optimize processes and outcomes. We collect and analyze a total of 229 research papers from 2017 to 2023 to answer four key research questions (RQs). In RQ1, we categorize and provide a comparative analysis of different LLMs that have been employed in SE tasks, characterising their distinctive features and uses. In RQ2, we analyse the methods used in data collection, preprocessing, and application highlighting the role of robust, well-curated datasets for successful LLM for SE implementation. RQ3 investigates the strategies employed to optimize and evaluate the performance of LLMs in SE, as well as the common techniques related to prompt optimization. Finally, RQ4 examines the specific SE tasks where LLMs have shown success to date, illustrating their practical contributions to the field. From the answers to these RQs, we discuss the current state-of-the-art and trends, identifying gaps in existing research, and flagging promising areas for future study.
翻译:大语言模型已显著影响包括软件工程在内的诸多领域。近年来,大量出版物探索了将大语言模型应用于各类软件工程任务与应用场景。然而,关于大语言模型在软件工程中的适用性、影响及潜在局限性的全面理解仍处于初期阶段。为填补这一空白,我们针对大语言模型与软件工程的交叉领域开展了系统性文献综述,重点阐释如何利用大语言模型优化软件工程流程与成果。我们收集并分析了2017年至2023年间共229篇研究论文,以回答四个关键研究问题。研究问题一:我们对应用于软件工程任务的不同大语言模型进行归类与比较分析,刻画其独特特征与用途。研究问题二:我们分析数据采集、预处理及使用方法,强调高质量、精心筛选的数据集对成功实现面向软件工程的大语言模型的关键作用。研究问题三:探究优化与评估大语言模型在软件工程中性能的策略,以及提示优化相关常用技术。研究问题四:考察迄今大语言模型已成功应用的特定软件工程任务,阐明其对领域的实际贡献。基于这些研究问题的解答,我们讨论当前前沿趋势,指出现有研究空白,并标记出未来研究的潜力方向。