AutoTransform: Automated Code Transformation to Support Modern Code Review Process

被引:35
|
作者
Thongtanunam, Patanamon [1 ]
Pornprasit, Chanathip [2 ]
Tantithamthavorn, Chakkrit [2 ]
机构
[1] Univ Melbourne, Melbourne, Vic, Australia
[2] Monash Univ, Clayton, Vic, Australia
来源
2022 ACM/IEEE 44TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2022) | 2022年
基金
澳大利亚研究理事会;
关键词
D O I
10.1145/3510003.3510067
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:237 / 248
页数:12
相关论文
共 50 条
  • [1] Automated Code Review Comment Classification to Improve Modern Code Reviews
    Ochodek, Miroslaw
    Staron, Miroslaw
    Meding, Wilhelm
    Soder, Ola
    SOFTWARE QUALITY: THE NEXT BIG THING IN SOFTWARE ENGINEERING AND QUALITY, SWQD 2022, 2022, 439 : 23 - 40
  • [2] Automated process for code refactoring
    Riggs, KR
    Stoecklin, S
    6TH WORLD MULTICONFERENCE ON SYSTEMICS, CYBERNETICS AND INFORMATICS, VOL VII, PROCEEDINGS: INFORMATION SYSTEMS DEVELOPMENT II, 2002, : 504 - 509
  • [3] Understanding Automated Code Review Process and Developer Experience in Industry
    Kim, Hyungjin
    Kwon, Yonghwi
    Joh, Sangwoo
    Kwon, Hyukin
    Ryou, Yeonhee
    Kim, Taeksu
    PROCEEDINGS OF THE 30TH ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2022, 2022, : 1398 - 1407
  • [4] AUTOMATED SUPPORT FOR LEGACY CODE UNDERSTANDING
    NING, JQ
    ENGBERTS, A
    KOZACZYNSKI, W
    COMMUNICATIONS OF THE ACM, 1994, 37 (05) : 50 - 57
  • [5] Learning to Predict Code Review Completion Time In Modern Code Review
    Chouchen, Moataz
    Ouni, Ali
    Olongo, Jefferson
    Mkaouer, Mohamed Wiem
    EMPIRICAL SOFTWARE ENGINEERING, 2023, 28 (04)
  • [6] Learning to Predict Code Review Completion Time In Modern Code Review
    Moataz Chouchen
    Ali Ouni
    Jefferson Olongo
    Mohamed Wiem Mkaouer
    Empirical Software Engineering, 2023, 28
  • [7] Review participation in modern code review
    Thongtanunam, Patanamon
    McIntosh, Shane
    Hassan, Ahmed E.
    Iida, Hajimu
    EMPIRICAL SOFTWARE ENGINEERING, 2017, 22 (02) : 768 - 817
  • [8] Automating modern code review processes with code similarity measurement
    Kartal, Yusuf
    Akdeniz, E. Kaan
    Ozkan, Kemal
    INFORMATION AND SOFTWARE TECHNOLOGY, 2024, 173
  • [9] Situational Factors for Modern Code Review to Support Software Engineers' Sustainability
    Nazir, Sumaira
    Fatima, Nargis
    Chuprat, Suriayati
    INTERNATIONAL JOURNAL OF ADVANCED COMPUTER SCIENCE AND APPLICATIONS, 2020, 11 (01) : 498 - 504
  • [10] Automated Code Transformation for Context Propagation in Go
    Welc, Adam
    PROCEEDINGS OF THE 29TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING (ESEC/FSE '21), 2021, : 1242 - 1252