COMET:使用增量图上下文表示生成提交消息
COMET: Generating Commit Messages using Delta Graph Context Representation
AI总结:
针对提交消息生成中上下文捕获不足的问题,提出基于增量图表示和Transformer的Comet方法,在多个指标上优于现有技术及GPT模型,可用于生成上下文感知的提交消息。
摘要:
提交消息解释了提交中的代码变更,并促进开发者之间的协作。已有多种提交消息生成方法被提出;然而,它们在捕获代码变更上下文方面表现出有限的成功。我们提出了Comet(上下文感知的提交消息生成),一种新颖的方法,它使用基于图的表示来捕获代码变更的上下文,并利用基于Transformer的模型生成高质量的提交消息。我们提出的方法利用了增量图,该图是我们开发的,用于有效表示代码差异。我们还引入了一个可定制的质量保证模块,以识别最佳消息,减轻提交消息中的主观性。实验表明,Comet在bleu-norm和meteor指标上优于最先进的技术,而在rogue-l方面则具有可比性。此外,我们将所提出的方法与流行的gpt-3.5-turbo模型以及gpt-4-turbo(最强大的GPT模型)在零样本、单样本和多样本设置下进行了比较。我们发现Comet在五个和四个指标上分别优于GPT模型,并在另外两个指标上提供了有竞争力的结果。该研究对研究人员、工具开发者和软件开发者具有意义。软件开发者可以利用Comet生成上下文感知的提交消息。研究人员和工具开发者可以在类似的情境中应用所提出的增量图技术,如代码审查摘要。
英文摘要:
Commit messages explain code changes in a commit and facilitate collaboration among developers. Several commit message generation approaches have been proposed; however, they exhibit limited success in capturing the context of code changes. We propose Comet (Context-Aware Commit Message Generation), a novel approach that captures context of code changes using a graph-based representation and leverages a transformer-based model to generate high-quality commit messages. Our proposed method utilizes delta graph that we developed to effectively represent code differences. We also introduce a customizable quality assurance module to identify optimal messages, mitigating subjectivity in commit messages. Experiments show that Comet outperforms state-of-the-art techniques in terms of bleu-norm and meteor metrics while being comparable in terms of rogue-l. Additionally, we compare the proposed approach with the popular gpt-3.5-turbo model, along with gpt-4-turbo; the most capable GPT model, over zero-shot, one-shot, and multi-shot settings. We found Comet outperforming the GPT models, on five and four metrics respectively and provide competitive results with the two other metrics. The study has implications for researchers, tool developers, and software developers. Software developers may utilize Comet to generate context-aware commit messages. Researchers and tool developers can apply the proposed delta graph technique in similar contexts, like code review summarization.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。