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 条
  • [41] Understanding Human-machine Collaborative Systems in Industrial Decision-making
    Bhandari, K.
    Xin, Y.
    Ojanen, V
    2021 IEEE INTERNATIONAL CONFERENCE ON INDUSTRIAL ENGINEERING AND ENGINEERING MANAGEMENT (IEEE IEEM21), 2021, : 1402 - 1406
  • [42] Fluid Annotation: A Human-Machine Collaboration Interface for Full Image Annotation
    Andriluka, Mykhaylo
    Uijlings, Jasper R. R.
    Ferrari, Vittorio
    PROCEEDINGS OF THE 2018 ACM MULTIMEDIA CONFERENCE (MM'18), 2018, : 1957 - 1966
  • [43] Perfection Not Required? Human-AI Partnerships in Code Translation
    Weisz, Justin D.
    Muller, Michael
    Houde, Stephanie
    Richards, John
    Ross, Steven, I
    Martinez, Fernando
    Agarwal, Mayank
    Talamadupula, Kartik
    IUI '21 - 26TH INTERNATIONAL CONFERENCE ON INTELLIGENT USER INTERFACES, 2021, : 402 - 412
  • [44] Visual analytics for collaborative human-machine confidence in human-centric active learning tasks
    Legg, Phil
    Smith, Jim
    Downing, Alexander
    HUMAN-CENTRIC COMPUTING AND INFORMATION SCIENCES, 2019, 9 (01)
  • [45] Optimal human-machine collaboration for enhanced cost-sensitive biometric authentication
    Coetzer, Johannes
    Swanepoel, Jacques P.
    Sabourin, Robert
    SAIEE AFRICA RESEARCH JOURNAL, 2021, 112 (02): : 110 - 119
  • [46] Prototype Learning for Medical Time Series Classification via Human-Machine Collaboration
    Xie, Jia
    Wang, Zhu
    Yu, Zhiwen
    Ding, Yasan
    Guo, Bin
    SENSORS, 2024, 24 (08)
  • [47] CAUSALITY-BASED TRANSPARENCY AND ACCURACY IN SYSTEM MODELING WITH HUMAN-MACHINE COLLABORATION
    Marutschke, D. Moritz
    Nakajima, Hiroshi
    Tsuchiya, Naoki
    Yoneda, Mitsuhiro
    2008 WORLD AUTOMATION CONGRESS PROCEEDINGS, VOLS 1-3, 2008, : 89 - +
  • [48] Systematic literature review of human-machine collaboration in organizations using bibliometric analysis
    Li, Jia-Min
    Wu, Tung-Ju
    Wu, Yenchun Jim
    Goh, Mark
    MANAGEMENT DECISION, 2023, 61 (10) : 2920 - 2944
  • [49] Human-Machine Cooperative Vehicle Control Based on Driving Intention and Risk Avoidance
    Guan, Yong
    Li, Ning
    Chen, Pengzhan
    Zhang, Yongchao
    INTERNATIONAL JOURNAL OF AUTOMOTIVE TECHNOLOGY, 2025, : 877 - 894
  • [50] Human-Machine Relationship-Perspective and Future Roadmap for Industry 5.0 Solutions
    Pizon, Jakub
    Gola, Arkadiusz
    MACHINES, 2023, 11 (02)