Understanding source code changes and their impact on other code entities is a crucial skill in software development. However, the analysis of code changes and their impact is often performed manually and therefore is time-consuming. Recent advancements in AI, and in particular large language models (LLMs) show promises to help developers in various code analysis tasks. However, the extent to which this potential can be utilized for understanding code changes and their impact is underexplored. To address this gap, we study the capabilities of GPT-5 and GPT-5-mini to predict the code entities impacted by given source code changes. We construct a dataset containing information about seed-changes, change pairs, and change types for each commit. Existing datasets lack crucial information about seed changes and impacted code entities. Our experiments evaluate the LLMs in two configurations: (1) seed-change information and the parent commit tree and (2) seed-change information, the parent commit tree, and the diff hunk of each seed change. We found that both LLMs perform poorly in the two experiments, whereas GPT-5 outperforms GPT-5-mini. Furthermore, the provision of the diff hunks helps both models to slightly improve their performance.


翻译:理解源代码变更及其对其他代码实体的影响是软件开发中的一项关键技能。然而,代码变更及其影响的分析通常依赖人工进行,因此耗时费力。人工智能,尤其是大语言模型(LLMs)的最新进展,显示出在协助开发者完成各类代码分析任务方面的潜力。然而,这种潜力在多大程度上可用于理解代码变更及其影响,目前尚未得到充分探索。为填补这一空白,我们研究了GPT-5和GPT-5-mini预测给定源代码变更所影响代码实体的能力。我们构建了一个数据集,包含每次提交的种子变更、变更对及变更类型信息。现有数据集缺乏关于种子变更和受影响代码实体的关键信息。我们的实验在两种配置下评估了LLMs的性能:(1)提供种子变更信息及父提交树;(2)提供种子变更信息、父提交树以及每个种子变更的差异块(diff hunk)。我们发现,在两个实验中,两种LLMs的表现均不佳,而GPT-5的表现优于GPT-5-mini。此外,提供差异块信息有助于两种模型轻微提升其性能。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
Python图像处理,366页pdf,Image Operators Image Processing in Python
LibRec 每周算法:LDA主题模型
LibRec智能推荐
29+阅读 · 2017年12月4日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2016年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2016年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员