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

优化优于生成:利用人工撰写的提交消息优化提交消息

Optimization is Better than Generation: Optimizing Commit Message Leveraging Human-written Commit Message

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

AI总结:

针对现有提交消息生成技术易遗漏开发者考量的上下文、自动化工具难获取相关信息的问题,提出结合大语言模型与搜索式优化的提交消息优化方法,以人工撰写消息为起点迭代优化,生成的消息质量显著优于现有最优方法和人工撰写结果。

摘要:

提交消息在软件开发中至关重要,可支撑维护任务与开发者间的沟通。尽管大语言模型(LLMs)已利用各类软件上下文推进了提交消息生成(CMG)技术,但开发者考量的部分上下文常被CMG技术遗漏,且自动化工具难以检索甚至完全无法获取这些信息。为解决该问题,我们提出提交消息优化(CMO)方法,该方法借助LLMs和基于搜索的优化来增强人工撰写的消息。CMO以人工撰写的消息为起点,通过整合关键上下文与外部评估器的反馈迭代改进消息质量。我们的大量评估表明,CMO生成的提交消息在合理性、全面性和表达性上显著更优,在88.2%-95.4%的情况下优于当前最优的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 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 88.2%-95.4% of the time.

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

↑