Code review is one of the best practices as a powerful safeguard for software quality. In practice, senior or highly skilled reviewers inspect source code and provide constructive comments, considering what authors may ignore, for example, some special cases. The collaborative validation between contributors results in code being highly qualified and less chance of bugs. However, since personal knowledge is limited and varies, the efficiency and effectiveness of code review practice are worthy of further improvement. In fact, it still takes a colossal and time-consuming effort to deliver useful review comments. This paper explores a synergy of multiple practical review comments to enhance code review and proposes AUGER (AUtomatically GEnerating Review comments): a review comments generator with pre-training models. We first collect empirical review data from 11 notable Java projects and construct a dataset of 10,882 code changes. By leveraging Text-to-Text Transfer Transformer (T5) models, the framework synthesizes valuable knowledge in the training stage and effectively outperforms baselines by 37.38% in ROUGE-L. 29% of our automatic review comments are considered useful according to prior studies. The inference generates just in 20 seconds and is also open to training further. Moreover, the performance also gets improved when thoroughly analyzed in case study.
翻译:守则审查是作为软件质量有力保障的最佳做法之一。在实践中,高级或高技能审查者检查源码并提供建设性意见,同时考虑到作者可能忽略的问题,例如某些特殊案例。捐助者之间的协作验证导致守则高度合格,减少出现错误的机会。然而,由于个人知识有限,差异很大,守则审查做法的效率和效果值得进一步改进。事实上,为了提供有用的审查意见,仍需要花费大量时间作出大量努力。本文件探讨多种实际审查意见的协同作用,以加强守则审查,并提出AUGER(AUPATIGENE Review Comments):审查评论产生者,带有培训前模式。我们首先从11个著名的爪哇项目收集经验性审查数据,并建立一个10,882个代码修改的数据集。通过利用文本到文本转换转换器(T5)模型,该框架综合了培训阶段的宝贵知识,有效地将基线比ROUGE-L的基线(37.38%)有效改进了。根据先前的研究,我们29%的自动审查意见被认为有用。在20秒内才产生经验,在进一步分析后,还会进一步分析。