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

考虑人类所考虑的内容:利用人类考虑的上下文优化提交信息

Consider What Humans Consider: Optimizing Commit Message Leveraging Contexts Considered By Human

Jiawei Li, David Faragó, Christian Petrov, Iftekhar Ahmed

AI总结:

针对自动化 CMG 遗漏开发者实际依赖上下文的问题,提出 CMO,从人工提交信息出发,结合 LLM、搜索优化、关键上下文与外部评估反馈迭代改进,显著优于现有方法及人工信息。

摘要:

提交信息在软件开发中至关重要,可支持维护任务以及开发者之间的沟通。尽管大型语言模型(LLM)已利用各种软件上下文推动了提交信息生成(CMG)的发展,但开发者在编写高质量提交信息时所考虑的一些上下文,往往被 CMG 技术遗漏,且无法被自动化工具轻松检索,甚至根本无法检索。为解决这一问题,我们提出提交信息优化(CMO),该方法利用 LLM 和基于搜索的优化来增强人工编写的信息。CMO 从人工编写的信息出发,通过整合关键上下文和来自外部评估器的反馈,对其进行迭代改进。我们的广泛评估表明,CMO 生成的提交信息在合理性、全面性和表达性方面显著更强,并且在 40.3% 至 78.4% 的情况下优于最先进的 CMG 方法和人工信息。此外,CMO 能够支持现有 CMG 技术进一步提升信息质量,并在人工编写信息留空时生成高质量信息。

英文摘要:

Commit messages are crucial in software development, supporting maintenance tasks and communication among developers. While Large Language Models (LLMs) have advanced Commit Message Generation (CMG) using various software contexts, some contexts developers consider to write high-quality commit messages are often missed by CMG techniques and can't be easily retrieved or even retrieved at all by automated tools. To address this, we propose Commit Message Optimization (CMO), which enhances human-written messages by leveraging LLMs and search-based optimization. CMO starts with human-written messages and iteratively improves them by integrating key contexts and feedback from external evaluators. Our extensive evaluation shows CMO generates commit messages that are significantly more Rational, Comprehensive, and Expressive while outperforming state-of-the-art CMG methods and human messages 40.3% to 78.4% of the time. Moreover, CMO can support existing CMG techniques to further improve message quality and generate high-quality messages when the human-written ones are left blank.

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

↑