Multilingual Code Co-evolution using Large Language Models

被引:1
|
作者
Zhang, Jiyang [1 ]
Nie, Pengyu [1 ]
Li, Junyi Jessy [1 ]
Gligoric, Milos [1 ]
机构
[1] UT Austin, Austin, TX 78712 USA
基金
美国国家科学基金会;
关键词
Language models; code translation; software evolution;
D O I
10.1145/3611643.3616350
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Many software projects implement APIs and algorithms in multiple programming languages. Maintaining such projects is tiresome, as developers have to ensure that any change (e.g., a bug fix or a new feature) is being propagated, timely and without errors, to implementations in other programming languages. In the world of ever-changing software, using rule-based translation tools (i.e., transpilers) or machine learning models for translating code from one language to another provides limited value. Translating each time the entire codebase from one language to another is not the way developers work. In this paper, we target a novel task: translating code changes from one programming language to another using large language models (LLMs). We design and implement the first LLM, dubbed Codeditor, to tackle this task. Codeditor explicitly models code changes as edit sequences and learns to correlate changes across programming languages. To evaluate Codeditor, we collect a corpus of 6,613 aligned code changes from 8 pairs of open-source software projects implementing similar functionalities in two programming languages ( Java and C#). Results show that Codeditor outperforms the state-of-the-art approaches by a large margin on all commonly used automatic metrics. Our work also reveals that Codeditor is complementary to the existing generation-based models, and their combination ensures even greater performance.
引用
收藏
页码:695 / 707
页数:13
相关论文
共 50 条
  • [31] Automated Co-evolution of GMF Editor Models
    Di Ruscio, Davide
    Laemmel, Ralf
    Pierantonio, Alfonso
    [J]. SOFTWARE LANGUAGE ENGINEERING, 2011, 6563 : 143 - +
  • [32] Approaches to Co-Evolution of Metamodels and Models: A Survey
    Hebig, Regina
    Khelladi, Djamel Eddine
    Bendraou, Reda
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2017, 43 (05) : 396 - 414
  • [33] Towards Models and Metamodels Co-Evolution Approach
    Anguel, Fouzia
    Amirat, Abdelkrim
    Bounour, Nora
    [J]. 2013 11TH INTERNATIONAL SYMPOSIUM ON PROGRAMMING AND SYSTEMS (ISPS), 2013, : 163 - 167
  • [34] A Generative Artificial Intelligence Using Multilingual Large Language Models for ChatGPT Applications
    Tuan, Nguyen Trung
    Moore, Philip
    Thanh, Dat Ha Vu
    Pham, Hai Van
    [J]. APPLIED SCIENCES-BASEL, 2024, 14 (07):
  • [35] The symbolic species: The co-evolution of language and the human brain
    Dunbar, R
    [J]. PSYCHOLOGIST, 2000, 13 (09) : 466 - 467
  • [36] Generative artificial intelligence, co-evolution, and language education
    Thorne, Steven L.
    [J]. MODERN LANGUAGE JOURNAL, 2024, 108 (02): : 567 - 572
  • [37] A computational model of the cultural co-evolution of language and mindreading
    Woensdregt, Marieke
    Cummins, Chris
    Smith, Kenny
    [J]. SYNTHESE, 2021, 199 (1-2) : 1347 - 1385
  • [38] The symbolic species: The co-evolution of language and the brain.
    Cavanaugh, M
    [J]. ZYGON, 1999, 34 (01): : 195 - 198
  • [39] The symbolic species - The co-evolution of language and the human brain
    Hurford, JR
    [J]. TLS-THE TIMES LITERARY SUPPLEMENT, 1998, (4986): : 34 - 34
  • [40] A computational model of the cultural co-evolution of language and mindreading
    Marieke Woensdregt
    Chris Cummins
    Kenny Smith
    [J]. Synthese, 2021, 199 : 1347 - 1385