arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2512.19481cs.SEcs.AI
收藏

一个用于代码变更影响分析的的数据集及初步研究

A Dataset and Preliminary Study of Using GPT-5 for Code-change Impact Analysis

Software Engineering Research Group University of Klagenfurt(软件工程研究组 卡拉克福大学)

Katharina Stengg, Christian Macho, Martin Pinzger

AI总结:

本文研究了GPT-5和GPT-5-mini在代码变更影响分析中的性能,构建了包含种子变更、变更对和变更类型的数据库,并发现GPT-5在预测受影响代码实体方面优于GPT-5-mini。

摘要:

理解源代码变更及其对其他代码实体的影响是软件开发中一项至关重要的技能。然而,对代码变更及其影响的分析往往需要手动执行,因此耗时较长。最近在人工智能领域,尤其是大语言模型(LLMs)的进步显示出帮助开发者在各种代码分析任务中的潜力。然而,这种潜力在理解代码变更及其影响方面的应用仍处于探索阶段。为了解决这一差距,我们研究了GPT-5和GPT-5-mini预测给定源代码变更所影响的代码实体的能力。我们构建了一个包含有关种子变更、变更对和每个提交的变更类型的的数据集。现有数据集缺乏关于种子变更和受影响代码实体的关键信息。我们的实验在两种配置下评估了LLMs:(1)种子变更信息和父提交树;(2)种子变更信息、父提交树和每个种子变更的diff hunk。我们发现,两种LLMs在两个实验中表现不佳,但GPT-5比GPT-5-mini表现更好。此外,提供diff hunks有助于两种模型略微提高性能。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑