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 条
  • [21] Automated code generation support for BI with MDA TALISMAN
    Garcia-Diaz, Vicente
    Fernandez-Fernandez, Hector
    Palacios-Gonzalez, Elias
    Cristina Pelayo G-Bustelo, B.
    Sanjuan-Martinez, Oscar
    Cueva Lovelle, Juan Manuel
    INTERNATIONAL JOURNAL OF INTERACTIVE MULTIMEDIA AND ARTIFICIAL INTELLIGENCE, 2009, 1 (02): : 87 - 93
  • [23] A systematic literature review and taxonomy of modern code review
    Davila, Nicole
    Nunes, Ingrid
    JOURNAL OF SYSTEMS AND SOFTWARE, 2021, 177
  • [24] A Review on Multicriteria Decision Support System and Industrial Internet of Things for Source Code Transformation
    Hao, Qinxia
    Nazir, Shah
    Gao, Xiaoxu
    Ma, Li
    Ilyas, Muhammad
    SCIENTIFIC PROGRAMMING, 2021, 2021
  • [25] Modern Code Review: A Case Study at Google
    Sadowski, Caitlin
    Soderberg, Emma
    Church, Luke
    Sipko, Michal
    Bacchelli, Alberto
    2018 IEEE/ACM 40TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING - SOFTWARE ENGINEERING IN PRACTICE TRACK (ICSE-SEIP 2018), 2018, : 181 - 190
  • [26] Removing Stagnation from Modern Code Review
    Viviani, Giovanni
    Murphy, Gail C.
    COMPANION PROCEEDINGS OF THE 2016 ACM SIGPLAN INTERNATIONAL CONFERENCE ON SYSTEMS, PROGRAMMING, LANGUAGES AND APPLICATIONS: SOFTWARE FOR HUMANITY (SPLASH COMPANION'16), 2016, : 43 - 44
  • [27] Learning to Boost the Efficiency of Modern Code Review
    Heumueller, Robert
    2021 IEEE/ACM 43RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: COMPANION PROCEEDINGS (ICSE-COMPANION 2021), 2021, : 275 - 277
  • [28] Expectations, Outcomes, and Challenges of Modern Code Review
    Bacchelli, Alberto
    Bird, Christian
    PROCEEDINGS OF THE 35TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2013), 2013, : 712 - 721
  • [29] Who Should Review My Code? A File Location-Based Code-Reviewer Recommendation Approach for Modern Code Review
    Thongtanunam, Patanamon
    Tantithamthavorn, Chakkrit
    Kula, Raula Gaikovina
    Yoshida, Norihiro
    Iida, Hajimu
    Matsumoto, Ken-ichi
    2015 22ND INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), 2015, : 141 - 150
  • [30] Code smells detection via modern code review: a study of the OpenStack and Qt communities
    Xiaofeng Han
    Amjed Tahir
    Peng Liang
    Steve Counsell
    Kelly Blincoe
    Bing Li
    Yajing Luo
    Empirical Software Engineering, 2022, 27