Loading [MathJax]/extensions/MathMenu.js
AutoTransform: Automated Code Transformation to Support Modern Code Review Process | IEEE Conference Publication | IEEE Xplore

AutoTransform: Automated Code Transformation to Support Modern Code Review Process


Abstract:

Code review is effective, but human-intensive (e.g., developers need to manually modify source code until it is approved). Recently, prior work proposed a Neural Machine ...Show More

Abstract:

Code review is effective, but human-intensive (e.g., developers need to manually modify source code until it is approved). Recently, prior work proposed a Neural Machine Translation (NMT) approach to automatically transform source code to the version that is reviewed and approved (i.e., the after version). Yet, its performance is still suboptimal when the after version has new identifiers or literals (e.g., renamed variables) or has many code tokens. To address these limitations, we propose AutoTransform which leverages a Byte-Pair Encoding (BPE) approach to handle new tokens and a Transformer-based NMT architecture to handle long sequences. We evaluate our approach based on 14,750 changed methods with and without new tokens for both small and medium sizes. The results show that when generating one candidate for the after version (i.e., beam width = 1), our AUTOTRANSFORM can correctly transform 1,413 changed methods, which is 567% higher than the prior work, highlighting the substantial improvement of our approach for code transformation in the context of code review. This work contributes towards automated code transformation for code reviews, which could help developers reduce their effort in modifying source code during the code review process.
Date of Conference: 25-27 May 2022
Date Added to IEEE Xplore: 20 June 2022
ISBN Information:

ISSN Information:

Conference Location: Pittsburgh, PA, USA

Funding Agency:


Contact IEEE to Subscribe

References

References is not available for this document.