arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.04346cs.SEcs.AI
收藏

利用大型语言模型从代码审查评论自动生成补丁集

Automating Patch Set Generation from Code Review Comments Using Large Language Models

Gannon University(甘农大学)

Tajmilur Rahman, Rahul Singh, Mir Yousuf Sultan

AI总结:

本文评估五种预训练大型语言模型根据真实代码审查评论自动生成补丁集的能力,并与人类历史补丁集对比,以衡量其准确性、相关性和深度,为自动化代码质量保证奠定基础。

摘要:

大型语言模型(LLMs)的出现已经彻底改变了人工智能的多个领域,包括软件工程领域。在本研究中,我们评估了预训练的大型语言模型在复现开发人员传统上针对代码审查评论所执行任务方面的有效性。我们向五个流行的大型语言模型提供代码上下文,并获取源自真实世界代码审查评论的建议代码更改(补丁集)。通过将每个模型生成的补丁集与来自相同代码仓库的人类生成补丁集的历史数据进行比较,对每个模型的性能进行了细致的评估。该比较分析旨在确定大型语言模型反馈的准确性、相关性和深度,从而评估它们在支持开发人员响应代码审查评论方面的就绪程度。新颖性:这一特定研究领域仍不成熟,尚需大量研究。此前没有研究比较过现有大型语言模型(LLMs)在代码审查评论中的表现。这项正在进行中的研究评估了当前的大型语言模型在代码审查中的能力,并为未来自动化代码质量保证的进步铺平了道路,减少了因代码更改请求造成的中断所带来的上下文切换开销。

英文摘要:

The advent of Large Language Models (LLMs) has revolutionized various domains of artificial intelligence, including the realm of software engineering. In this research, we evaluate the efficacy of pre-trained LLMs in replicating the tasks traditionally performed by developers in response to code review comments. We provide code contexts to five popular LLMs and obtain the suggested code-changes (patch sets) derived from real-world code-review comments. The performance of each model is meticulously assessed by comparing their generated patch sets against the historical data of human-generated patch-sets from the same repositories. This comparative analysis aims to determine the accuracy, relevance, and depth of the LLMs' feedback, thereby evaluating their readiness to support developers in responding to code-review comments. Novelty: This particular research area is still immature requiring a substantial amount of studies yet to be done. No prior research has compared the performance of existing Large Language Models (LLMs) in code-review comments. This in-progress study assesses current LLMs in code review and paves the way for future advancements in automated code quality assurance, reducing context-switching overhead due to interruptions from code change requests.

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

↑