Generation-based code review automation: How far are we?

Code review is an effective software quality assurance activity; however, it is labor-intensive and time-consuming. Thus, a number of generation-based automatic code review (ACR) approaches have been proposed recently, which leverage deep learning techniques to automate various activities in the cod...

Full description

Saved in:
Bibliographic Details
Main Authors: ZHOU, Xin, KIM, Kisub, XU, Bowen, HAN, DongGyun, HE, Junda, LO, David
Format: text
Language:English
Published: Institutional Knowledge at Singapore Management University 2023
Subjects:
Online Access:https://ink.library.smu.edu.sg/sis_research/8567
https://ink.library.smu.edu.sg/context/sis_research/article/9570/viewcontent/generation_based.pdf
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Singapore Management University
Language: English
id sg-smu-ink.sis_research-9570
record_format dspace
spelling sg-smu-ink.sis_research-95702024-01-25T09:01:07Z Generation-based code review automation: How far are we? ZHOU, Xin KIM, Kisub XU, Bowen HAN, DongGyun HE, Junda LO, David Code review is an effective software quality assurance activity; however, it is labor-intensive and time-consuming. Thus, a number of generation-based automatic code review (ACR) approaches have been proposed recently, which leverage deep learning techniques to automate various activities in the code review process (e.g., code revision generation and review comment generation).We find the previous works carry three main limitations. First, the ACR approaches have been shown to be beneficial in each work, but those methods are not comprehensively compared with each other to show their superiority over their peer ACR approaches. Second, general-purpose pre-trained models such as CodeT5 are proven to be effective in a wide range of Software Engineering (SE) tasks. However, no prior work has investigated the effectiveness of these models in ACR tasks yet. Third, prior works heavily rely on the Exact Match (EM) metric which only focuses on the perfect predictions and ignores the positive progress made by incomplete answers. To fill such a research gap, we conduct a comprehensive study by comparing the effectiveness of recent ACR tools as well as the general-purpose pre-trained models. The results show that a general-purpose pre-trained model CodeT5 can outperform other models in most cases. Specifically, CodeT5 outperforms the prior state-of-the-art by 13.4%-38.9% in two code revision generation tasks. In addition, we introduce a new metric namely Edit Progress (EP) to quantify the partial progress made by ACR tools. The results show that the rankings of models for each task could be changed according to whether EM or EP is being utilized. Lastly, we derive several insightful lessons from the experimental results and reveal future research directions for generation-based code review automation. 2023-05-01T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/8567 info:doi/10.1109/ICPC58990.2023.00036 https://ink.library.smu.edu.sg/context/sis_research/article/9570/viewcontent/generation_based.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Automatic codes Code review Engineering tasks Labor time Labour-intensive Learning techniques Research gaps Review process Software quality assurance State of the art Databases and Information Systems Software Engineering
institution Singapore Management University
building SMU Libraries
continent Asia
country Singapore
Singapore
content_provider SMU Libraries
collection InK@SMU
language English
topic Automatic codes
Code review
Engineering tasks
Labor time
Labour-intensive
Learning techniques
Research gaps
Review process
Software quality assurance
State of the art
Databases and Information Systems
Software Engineering
spellingShingle Automatic codes
Code review
Engineering tasks
Labor time
Labour-intensive
Learning techniques
Research gaps
Review process
Software quality assurance
State of the art
Databases and Information Systems
Software Engineering
ZHOU, Xin
KIM, Kisub
XU, Bowen
HAN, DongGyun
HE, Junda
LO, David
Generation-based code review automation: How far are we?
description Code review is an effective software quality assurance activity; however, it is labor-intensive and time-consuming. Thus, a number of generation-based automatic code review (ACR) approaches have been proposed recently, which leverage deep learning techniques to automate various activities in the code review process (e.g., code revision generation and review comment generation).We find the previous works carry three main limitations. First, the ACR approaches have been shown to be beneficial in each work, but those methods are not comprehensively compared with each other to show their superiority over their peer ACR approaches. Second, general-purpose pre-trained models such as CodeT5 are proven to be effective in a wide range of Software Engineering (SE) tasks. However, no prior work has investigated the effectiveness of these models in ACR tasks yet. Third, prior works heavily rely on the Exact Match (EM) metric which only focuses on the perfect predictions and ignores the positive progress made by incomplete answers. To fill such a research gap, we conduct a comprehensive study by comparing the effectiveness of recent ACR tools as well as the general-purpose pre-trained models. The results show that a general-purpose pre-trained model CodeT5 can outperform other models in most cases. Specifically, CodeT5 outperforms the prior state-of-the-art by 13.4%-38.9% in two code revision generation tasks. In addition, we introduce a new metric namely Edit Progress (EP) to quantify the partial progress made by ACR tools. The results show that the rankings of models for each task could be changed according to whether EM or EP is being utilized. Lastly, we derive several insightful lessons from the experimental results and reveal future research directions for generation-based code review automation.
format text
author ZHOU, Xin
KIM, Kisub
XU, Bowen
HAN, DongGyun
HE, Junda
LO, David
author_facet ZHOU, Xin
KIM, Kisub
XU, Bowen
HAN, DongGyun
HE, Junda
LO, David
author_sort ZHOU, Xin
title Generation-based code review automation: How far are we?
title_short Generation-based code review automation: How far are we?
title_full Generation-based code review automation: How far are we?
title_fullStr Generation-based code review automation: How far are we?
title_full_unstemmed Generation-based code review automation: How far are we?
title_sort generation-based code review automation: how far are we?
publisher Institutional Knowledge at Singapore Management University
publishDate 2023
url https://ink.library.smu.edu.sg/sis_research/8567
https://ink.library.smu.edu.sg/context/sis_research/article/9570/viewcontent/generation_based.pdf
_version_ 1789483277496614912