AUGER: automatically generating review comments with pre-training models
Lingwei Li, Li Yang, Huaxi Jiang, Jun Yan, Tiejian Luo, Zihan Hua, Geng Liang, Chun Zuo
摘要
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, consider- ing 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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 9 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- CORE: Resolving Code Quality Issues using LLMs 引用了 Using Pre-Trained Models to Boost Code Review Automation
- CORE: Resolving Code Quality Issues using LLMs 引用了 Language Models are Few-Shot Learners
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning 引用了 Using Pre-Trained Models to Boost Code Review Automation
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning 引用了 GraphCodeBERT: Pre-training Code Representations with Data Flow
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning 引用了 Language Models are Few-Shot Learners
- DivLog: Log Parsing with Prompt Enhanced In-Context Learning 引用了 Language Models are Few-Shot Learners
- Towards AI-Assisted Synthesis of Verified Dafny Methods 引用了 Using Pre-Trained Models to Boost Code Review Automation
- Towards AI-Assisted Synthesis of Verified Dafny Methods 引用了 Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning
- Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learning 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learning 引用了 Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning
- Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learning 引用了 GraphCodeBERT: Pre-training Code Representations with Data Flow
- Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learning 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper9
- Retrieval-Based Prompt Selection for Code-Related Few-Shot LearningNoor Nashid, Mifta Sintaha, Ali MesbahICSE 2023 · 156 次引用
- Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context LearningMingyang Geng, Shangwen Wang, Dezun Dong, Haotian Wang 等ICSE 2024 · 124 次引用
- DivLog: Log Parsing with Prompt Enhanced In-Context LearningJunjielong Xu, Ruichun Yang, Yintong Huo, Chengyu Zhang 等ICSE 2024 · 54 次引用
- CORE: Resolving Code Quality Issues using LLMsNalin Wadhwa, Jui Pradhan, Atharv Sonwane, Surya Prakash Sahu 等FSE 2024 · 32 次引用
- Towards AI-Assisted Synthesis of Verified Dafny MethodsMd Rakib Hossain Misu, Cristina V. Lopes, Iris Ma, James NobleFSE 2024 · 26 次引用
它引用的 Paper10
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
- GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng 等ICLR 2021 · 1,644 次引用
- Using Pre-Trained Models to Boost Code Review AutomationRosalia Tufano, Simone Masiero, Antonio Mastropaolo, Luca Pascarella 等ICSE 2022 · 149 次引用
- Using Deep Learning to Generate Complete Log StatementsAntonio Mastropaolo, Luca Pascarella, Gabriele BavotaICSE 2022 · 60 次引用
相关 Paper
- LAURA: Enhancing Code Review Generation with Context-Enriched Retrieval-Augmented LLMYuxin Zhang, Yuxia Zhang, Zeyu Sun, Yanjie Jiang 等ASE 2025 · 8 次引用
- Automating code review activities by large-scale pre-trainingZhiyu Li, Shuai Lu, Daya Guo, Nan Duan 等FSE 2022 · 195 次引用
- CommentFinder: a simpler, faster, more accurate code review comments recommendationYang Hong, Chakkrit Tantithamthavorn, Patanamon Thongtanunam, Aldeida AletiFSE 2022 · 57 次引用
- Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related TasksAntonio Mastropaolo, Simone Scalabrino, Nathan Cooper, David Nader-Palacio 等ICSE 2021 · 9 次引用
- Towards Automating Code Review ActivitiesRosalia Tufano, Luca Pascarella, Michele Tufano, Denys Poshyvanyk 等ICSE 2021 · 4 次引用
