hmCodeTrans: Human-Machine Interactive Code Translation

被引:0
作者
Liu, Jiaqi [1 ]
Zhang, Fengming [1 ]
Zhang, Xin [1 ]
Yu, Zhiwen [1 ,2 ]
Wang, Liang [1 ]
Zhang, Yao [1 ]
Guo, Bin [1 ]
机构
[1] Northwestern Polytech Univ, Sch Comp Sci, Xian 710129, Peoples R China
[2] Haerbin Engn Univ, Harbin 150001, Peoples R China
关键词
Code translation; human-machine collaboration; interactive translation;
D O I
10.1109/TSE.2024.3379583
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Code translation, i.e., translating one kind of code language to another, plays an important role in scenarios such as application modernization and multi-language versions of applications on different platforms. Even the most advanced machine-based code translation methods can not guarantee an error-free result. Therefore, the participance of software engineer is necessary. Considering both accuracy and efficiency, it is suggested to work in a human-machine collaborative way. However, in many realistic scenarios, human and machine collaborate ineffectively - model translates first and then human makes further editing, without any interaction. To solve this problem, we propose hmCodeTrans, a novel method that achieves code translation in an interactive human-machine collaborative way. It can (1) save the human effort by introducing two novel human-machine collaboration patterns: prefix-based and segment-based ones, which feed the software engineer's sequential or scattered editing back to model and thus enabling the model to make a better retranslation; (2) reduce the response time based on two proposed modules: attention cache module that avoids duplicate prefix inference with cached attention information, and suffix splicing module that reduces invalid suffix inference by splicing a predefined suffix. The experiments are conducted on two real datasets. Results show that compared with the baselines, our approach can effectively save the human effort and reduce the response time. Last but not least, a user study involving five real software engineers is given, which validates that the proposed approach owns the lowest human effort and shows the users' satisfaction towards the approach.
引用
收藏
页码:1163 / 1181
页数:19
相关论文
共 50 条
  • [21] A taxonomy of human-machine collaboration: capturing automation and technical autonomy
    Simmler, Monika
    Frischknecht, Ruth
    AI & SOCIETY, 2021, 36 (01) : 239 - 250
  • [22] Olfactory Psychological Computation and Olfactory Environment for Human-Machine Collaboration
    Dai, Weihui
    Liu, Liu
    Li, Meilin
    Zhang, Gaoyang
    Xue, Qiyun
    Song, Lijuan
    COMPUTER SUPPORTED COOPERATIVE WORK AND SOCIAL COMPUTING, CHINESECSCW 2021, PT I, 2022, 1491 : 590 - 598
  • [23] Challenges of human-machine collaboration in risky decision-making
    Xiong, Wei
    Fan, Hongmiao
    Ma, Liang
    Wang, Chen
    FRONTIERS OF ENGINEERING MANAGEMENT, 2022, 9 (01) : 89 - 103
  • [24] Human-machine collaboration for enhanced decision-making in governance
    Van Rooy, Dirk
    DATA & POLICY, 2024, 6
  • [25] Effects of personality traits on user trust in human-machine collaborations
    Zhou, Jianlong
    Luo, Simon
    Chen, Fang
    JOURNAL ON MULTIMODAL USER INTERFACES, 2020, 14 (04) : 387 - 400
  • [26] A human-machine integrated optimization method for long walkway space
    Wang, Yating
    Wang, Zijun
    Wang, Hui
    JOURNAL OF ASIAN ARCHITECTURE AND BUILDING ENGINEERING, 2025,
  • [27] Human-machine co-intelligence through symbiosis in the SMV space
    Yiyu Yao
    Applied Intelligence, 2023, 53 : 2777 - 2797
  • [28] Human-machine Collaborative Knowledge Modeling in Railway Location Intelligent Environment
    Han, Chunhua
    Zhu, Ying
    Cheng, Wei
    Xu, Yuan
    SUSTAINABLE DEVELOPMENT AND ENVIRONMENT II, PTS 1 AND 2, 2013, 409-410 : 1502 - +
  • [29] Behavioral Analysis of Human-Machine Interaction in the Context of Demand Planning Decisions
    Lauer, Tim
    Welsch, Rebecca
    Abbas, S. Ramlah
    Henke, Michael
    ADVANCES IN ARTIFICIAL INTELLIGENCE, SOFTWARE AND SYSTEMS ENGINEERING, 2020, 965 : 130 - 141
  • [30] Enabling human-machine collaboration in infrastructure inspections through mixed reality
    Al-Sabbag, Zaid Abbas
    Yeum, Chul Min
    Narasimhan, Sriram
    ADVANCED ENGINEERING INFORMATICS, 2022, 53