Using Pre-Trained Models to Boost Code Review Automation
Rosalia Tufano, Simone Masiero, Antonio Mastropaolo, Luca Pascarella, Denys Poshyvanyk, Gabriele Bavota
Abstract
Code review is a practice widely adopted in open source and industrial projects. Given the non-negligible cost of such a process, researchers started investigating the possibility of automating specific code review tasks. We recently proposed Deep Learning (DL) models targeting the automation of two tasks: the first model takes as input a code submitted for review and implements in it changes likely to be recommended by a reviewer; the second takes as input the submitted code and a reviewer comment posted in natural language and automatically implements the change required by the reviewer. While the preliminary results we achieved are encouraging, both models had been tested in rather simple code review scenarios, substantially simplifying the targeted problem. This was also due to the choices we made when designing both the technique and the experiments. In this paper, we build on top of that work by demonstrating that a pre-trained Text-To-Text Transfer Transformer (T5) model can outperform previous DL models for automating code review tasks. Also, we conducted our experiments on a larger and more realistic (and challenging) dataset of code review activities.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
35 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Towards Automating Code Review Activities cites On learning meaningful assert statements for unit test cases
- AUGER: automatically generating review comments with pre-training models cites Towards Automating Code Review Activities
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning cites On learning meaningful assert statements for unit test cases
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning cites AUGER: automatically generating review comments with pre-training models
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning cites On Multi-Modal Learning of Editing Source Code
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning cites Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Tasks
- Retrieval-Based Prompt Selection for Code-Related Few-Shot Learning cites CoditT5: Pretraining for Source Code and Natural Language Editing
- On Multi-Modal Learning of Editing Source Code cites Towards Automating Code Review Activities
- Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Tasks cites On learning meaningful assert statements for unit test cases
- Automating code review activities by large-scale pre-training cites Towards Automating Code Review Activities
- Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical Study cites Towards Automating Code Review Activities
- Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical Study cites Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Tasks
- Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical Study cites Automating code review activities by large-scale pre-training
- CoditT5: Pretraining for Source Code and Natural Language Editing cites Towards Automating Code Review Activities
- CoditT5: Pretraining for Source Code and Natural Language Editing cites On Multi-Modal Learning of Editing Source Code
- CoditT5: Pretraining for Source Code and Natural Language Editing cites Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related Tasks
Cited by top-tier papers35
- Automating code review activities by large-scale pre-trainingZhiyu Li, Shuai Lu, Daya Guo, Nan Duan et al.FSE 2022 · 195 citations
- Retrieval-Based Prompt Selection for Code-Related Few-Shot LearningNoor Nashid, Mifta Sintaha, Ali MesbahICSE 2023 · 156 citations
- Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical StudyQi Guo, Junming Cao, Xiaofei Xie, Shangqing Liu et al.ICSE 2024 · 107 citations
- CoditT5: Pretraining for Source Code and Natural Language EditingJiyang Zhang, Sheena Panthaplackel, Pengyu Nie, Junyi Jessy Li et al.ASE 2022 · 81 citations
- AUGER: automatically generating review comments with pre-training modelsLingwei Li, Li Yang, Huaxi Jiang, Jun Yan et al.FSE 2022 · 56 citations
Builds on4
- On learning meaningful assert statements for unit test casesCody Watson, Michele Tufano, Kevin Moran, Gabriele Bavota et al.ICSE 2020 · 96 citations
- Studying the Usage of Text-To-Text Transfer Transformer to Support Code-Related TasksAntonio Mastropaolo, Simone Scalabrino, Nathan Cooper, David Nader-Palacio et al.ICSE 2021 · 9 citations
- Towards Automating Code Review ActivitiesRosalia Tufano, Luca Pascarella, Michele Tufano, Denys Poshyvanyk et al.ICSE 2021 · 4 citations
- On Multi-Modal Learning of Editing Source CodeSaikat Chakraborty, Baishakhi RayASE 2021 · 1 citation
Related papers
- CCT5: A Code-Change-Oriented Pre-trained ModelBo Lin, Shangwen Wang, Zhongxin Liu, Yepang Liu et al.FSE 2023 · 69 citations
- Deep Learning-based Code Reviews: A Paradigm Shift or a Double-Edged Sword?Rosalia Tufano, Alberto Martin-Lopez, Ahmad Tayeb, Ozren Dabic et al.ICSE 2025 · 1 citation
- CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and GenerationYue Wang, Weishi Wang, Shafiq R. Joty, Steven C. H. HoiEMNLP 2021 · 1,224 citations
- CommentFinder: a simpler, faster, more accurate code review comments recommendationYang Hong, Chakkrit Tantithamthavorn, Patanamon Thongtanunam, Aldeida AletiFSE 2022 · 57 citations
- SPT-Code: Sequence-to-Sequence Pre-Training for Learning Source Code RepresentationsChangan Niu, Chuanyi Li, Vincent Ng, Jidong Ge et al.ICSE 2022 · 99 citations
