Using Pre-Trained Models to Boost Code Review Automation

Rosalia Tufano, Simone Masiero, Antonio Mastropaolo, Luca Pascarella, Denys Poshyvanyk +1 more
1/18/2022
cs.SE

Official code: RosaliaTufano/code_review_automation (26 stars, Jupyter Notebook, MIT, last commit 2022-01-24).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

MIT
269Jupyter Notebook, PythonJan 14, 20224 years agoMIT

Similar Papers

Cite this paper

@article{tufano2022using,
  title  = {Using Pre-Trained Models to Boost Code Review Automation},
  author = {Rosalia Tufano and Simone Masiero and Antonio Mastropaolo and Luca Pascarella and Denys Poshyvanyk and Gabriele Bavota},
  year   = {2022},
  eprint = {2201.06850},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2201.06850}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2201.06850.svg)](https://codeofpaper.com/paper/2201.06850)

Discussion