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 条
  • [41] Automated code transformation for distributed training of TensorFlow deep learning models
    Sim, Yusung
    Shin, Wonho
    Lee, Sungho
    SCIENCE OF COMPUTER PROGRAMMING, 2025, 242
  • [42] C macro handling in automated-source code transformation systems
    Yao, Bin
    Mielke, William
    Kennedy, Steve
    Buskens, Rick
    ICSM 2006: 22nd IEEE International Conference on Software Maintenance, Proceedings, 2006, : 68 - 69
  • [43] A SEMI-AUTOMATED PROCESS FOR OPEN SOURCE CODE REUSE
    Kritikos, Apostolos
    Kakarontzas, George
    Stamelos, Ioannis
    ENASE 2010: PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON EVALUATION OF NOVEL APPROACHES TO SOFTWARE ENGINEERING, 2010, : 179 - 185
  • [44] DLFix: Context-based Code Transformation Automated Program Repair
    Li, Yi
    Wang, Shaohua
    Nguyen, Tien N.
    2020 ACM/IEEE 42ND INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2020), 2020, : 602 - 614
  • [45] A MODERN CODE OF EVIDENCE
    Ladd, Mason
    IOWA LAW REVIEW, 1942, 27 (02) : 213 - 231
  • [46] Misplaced Trust: The Security Flaw in Modern Code Signing Process
    Bajpai, Pranshu
    Kannavara, Raghudeep
    2023 IEEE SECURE DEVELOPMENT CONFERENCE, SECDEV, 2023, : 49 - 50
  • [47] Crowdsourcing Code and Process via Code Hunt
    Xie, Tao
    Bishop, Judith
    Horspool, R. Nigel
    Tillmann, Nikolai
    de Halleux, Jonathan
    SECOND INTERNATIONAL WORKSHOP ON CROWDSOURCING IN SOFTWARE ENGINEERING CSI-SE 2015, 2015, : 15 - 16
  • [48] BinSign: Fingerprinting Binary Functions to Support Automated Analysis of Code Executables
    Nouh, Lina
    Rahimian, Ashkan
    Mouheb, Djedjiga
    Debbabi, Mourad
    Hanna, Aiman
    ICT SYSTEMS SECURITY AND PRIVACY PROTECTION, SEC 2017, 2017, 502 : 341 - 355
  • [49] Automated AI planning and code pattern based code synthesis
    Fu, Jicheng
    Bastani, Farokh B.
    Yen, I-Ling
    ICTAI-2006: EIGHTEENTH INTERNATIONAL CONFERENCE ON TOOLS WITH ARTIFICIAL INTELLIGENCE, PROCEEDINGS, 2006, : 540 - +
  • [50] A Systematic Review of Automated Query Reformulations in Source Code Search
    Rahman, Mohammad Masudur
    Roy, Chanchal K.
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2023, 32 (06)