arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.09223cs.SE
收藏

AILINKPREVIEWER:借助LLM驱动的链接预览增强代码审查

AILINKPREVIEWER: Enhancing Code Reviews with LLM-Powered Link Previews

Mahidol University(玛希隆大学);Kyushu University(九州大学)

Panya Trakoolgerntong, Tao Xiao, Masanari Kondo, Chaiyong Ragkhitwetsagul, Morakot Choetkiertikul, Pattaraporn Sangaroonsilp, Yasutaka Kamei

AI总结:

针对代码审查中PR链接在自动化任务中被丢弃导致信息不足的问题,提出AILINKPREVIEWER工具,利用LLM结合PR元数据生成链接预览,实验显示上下文摘要指标更优但用户偏好非上下文摘要,为提升审查效率提供新方案。

摘要:

代码审查是软件工程中的关键实践,开发人员通过评估代码变更以确保质量和可维护性。拉取请求(PRs)中常包含问题和外部资源的链接以提供额外上下文,但这些链接在PR摘要生成和代码审查评论生成等自动化任务中通常被丢弃。这限制了审查人员可获取的信息丰富度,并通过强制上下文切换增加认知负荷。为解决这一差距,我们提出AILINKPREVIEWER工具,该工具利用大型语言模型(LLMs),结合PR元数据(包括标题、描述、评论和链接正文内容)生成PR中链接的预览。我们分析了50个精选GitHub仓库,比较了三种方法:上下文LLM摘要、非上下文LLM摘要和基于元数据的预览。BLEU、BERTScore和压缩率等指标结果显示,上下文摘要持续优于其他方法。然而,在7名参与者的用户研究中,大多数人更偏好非上下文摘要,表明指标性能与感知可用性之间存在权衡。这些发现证明了LLM驱动的链接预览在提升代码审查效率、为开发人员和软件工程自动化提供更丰富上下文方面的潜力。视频演示见https://www.youtube.com/watch?v=h2qH4RtrB3E,工具及源代码见https://github.com/c4rtune/AILinkPreviewer。

英文摘要:

Code review is a key practice in software engineering, where developers evaluate code changes to ensure quality and maintainability. Links to issues and external resources are often included in Pull Requests (PRs) to provide additional context, yet they are typically discarded in automated tasks such as PR summarization and code review comment generation. This limits the richness of information available to reviewers and increases cognitive load by forcing context-switching. To address this gap, we present AILINKPREVIEWER, a tool that leverages Large Language Models (LLMs) to generate previews of links in PRs using PR metadata, including titles, descriptions, comments, and link body content. We analyzed 50 engineered GitHub repositories and compared three approaches: Contextual LLM summaries, Non-Contextual LLM summaries, and Metadata-based previews. The results in metrics such as BLEU, BERTScore, and compression ratio show that contextual summaries consistently outperform other methods. However, in a user study with seven participants, most preferred non-contextual summaries, suggesting a trade-off between metric performance and perceived usability. These findings demonstrate the potential of LLM-powered link previews to enhance code review efficiency and to provide richer context for developers and automation in software engineering. The video demo is available at https://www.youtube.com/watch?v=h2qH4RtrB3E, and the tool and its source code can be found at https://github.com/c4rtune/AILinkPreviewer.

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

↑