Improving Automated Code Reviews: Learning from Experience

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Lin, Hong Yi, Thongtanunam, Patanamon, Treude, Christoph, Charoenwet, Wachiraphan
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866907787708071936
author Lin, Hong Yi
Thongtanunam, Patanamon
Treude, Christoph
Charoenwet, Wachiraphan
author_facet Lin, Hong Yi
Thongtanunam, Patanamon
Treude, Christoph
Charoenwet, Wachiraphan
contents Modern code review is a critical quality assurance process that is widely adopted in both industry and open source software environments. This process can help newcomers learn from the feedback of experienced reviewers; however, it often brings a large workload and stress to reviewers. To alleviate this burden, the field of automated code reviews aims to automate the process, teaching large language models to provide reviews on submitted code, just as a human would. A recent approach pre-trained and fine-tuned the code intelligent language model on a large-scale code review corpus. However, such techniques did not fully utilise quality reviews amongst the training data. Indeed, reviewers with a higher level of experience or familiarity with the code will likely provide deeper insights than the others. In this study, we set out to investigate whether higher-quality reviews can be generated from automated code review models that are trained based on an experience-aware oversampling technique. Through our quantitative and qualitative evaluation, we find that experience-aware oversampling can increase the correctness, level of information, and meaningfulness of reviews generated by the current state-of-the-art model without introducing new data. The results suggest that a vast amount of high-quality reviews are underutilised with current training strategies. This work sheds light on resource-efficient ways to boost automated code review models.
format Preprint
id arxiv_https___arxiv_org_abs_2402_03777
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Improving Automated Code Reviews: Learning from Experience
Lin, Hong Yi
Thongtanunam, Patanamon
Treude, Christoph
Charoenwet, Wachiraphan
Software Engineering
Modern code review is a critical quality assurance process that is widely adopted in both industry and open source software environments. This process can help newcomers learn from the feedback of experienced reviewers; however, it often brings a large workload and stress to reviewers. To alleviate this burden, the field of automated code reviews aims to automate the process, teaching large language models to provide reviews on submitted code, just as a human would. A recent approach pre-trained and fine-tuned the code intelligent language model on a large-scale code review corpus. However, such techniques did not fully utilise quality reviews amongst the training data. Indeed, reviewers with a higher level of experience or familiarity with the code will likely provide deeper insights than the others. In this study, we set out to investigate whether higher-quality reviews can be generated from automated code review models that are trained based on an experience-aware oversampling technique. Through our quantitative and qualitative evaluation, we find that experience-aware oversampling can increase the correctness, level of information, and meaningfulness of reviews generated by the current state-of-the-art model without introducing new data. The results suggest that a vast amount of high-quality reviews are underutilised with current training strategies. This work sheds light on resource-efficient ways to boost automated code review models.
title Improving Automated Code Reviews: Learning from Experience
topic Software Engineering
url https://arxiv.org/abs/2402.03777