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 条
  • [31] Code smells detection via modern code review: a study of the OpenStack and Qt communities
    Han, Xiaofeng
    Tahir, Amjed
    Liang, Peng
    Counsell, Steve
    Blincoe, Kelly
    Li, Bing
    Luo, Yajing
    EMPIRICAL SOFTWARE ENGINEERING, 2022, 27 (06)
  • [32] Revisiting Code Ownership and its Relationship with Software Quality in the Scope of Modern Code Review
    Thongtanunam, Patanamon
    McIntosh, Shane
    Hassan, Ahmed E.
    Iida, Hajimu
    2016 IEEE/ACM 38TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2016, : 1039 - 1050
  • [33] Transformation from a temporal code to rate code
    Uchida, Nashige
    Haddad, Rafi
    CHEMICAL SENSES, 2015, 40 (03) : 219 - 220
  • [34] Complementing Secure Code Review with Automated Program Analysis
    Charoenwet, Wachiraphan
    2023 IEEE/ACM 45TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: COMPANION PROCEEDINGS, ICSE-COMPANION, 2023, : 189 - 191
  • [35] Automated test code
    Deitz, D
    MECHANICAL ENGINEERING, 1998, 120 (05) : 16 - 16
  • [36] CORMS: A GitHub and Gerrit Based Hybrid Code Reviewer Recommendation Approach for Modern Code Review
    Pandya, Prahar
    Tiwari, Saurabh
    PROCEEDINGS OF THE 30TH ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2022, 2022, : 546 - 557
  • [37] CodeFlow: Improving the code review process at Microsoft
    Czerwonka J.
    Queue, 2018, 16 (05):
  • [38] ACF Code of Ethics-Review Process
    Worrell, E. Glen, Jr.
    JOURNAL OF FORESTRY, 2019, 117 (02) : 183 - 183
  • [39] CodeFlow: Improving the Code Review Process at Microsoft
    Czerwonka, Jacek
    Greiler, Michaela
    Bird, Christian
    Panjer, Lucas
    Coatta, Terry
    COMMUNICATIONS OF THE ACM, 2019, 62 (02) : 36 - 44
  • [40] Automatically Recommending Peer Reviewers in Modern Code Review
    Zanjani, Motahareh Bahrami
    Kagdi, Huzefa
    Bird, Christian
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2016, 42 (06) : 530 - 543