DeepMig: A transformer-based approach to support coupled library and code migrations

被引:0
|
作者
机构
[1] Di Rocco, Juri
[2] Nguyen, Phuong T.
[3] Di Sipio, Claudio
[4] Rubei, Riccardo
[5] Di Ruscio, Davide
[6] Di Penta, Massimiliano
关键词
Application programs;
D O I
10.1016/j.infsof.2024.107588
中图分类号
学科分类号
摘要
Context: While working on software projects, developers often replace third-party libraries (TPLs) with different ones offering similar functionalities. However, choosing a suitable TPL to migrate to is a complex task. As TPLs provide developers with Application Programming Interfaces (APIs) to allow for the invocation of their functionalities after adopting a new TPL, projects need to be migrated by the methods containing the affected API calls. Altogether, the coupled migration of TPLs and code is a strenuous process, requiring massive development effort. Most of the existing approaches either deal with library or API call migration but usually fail to solve both problems coherently simultaneously. Objective: This paper presents DeepMig, a novel approach to the coupled migration of TPLs and API calls. We aim to support developers in managing their projects, at the library and API level, allowing them to increase their productivity. Methods: DeepMig is based on a transformer architecture, accepts a set of libraries to predict a new set of libraries. Then, it looks for the changed API calls and recommends a migration plan for the affected methods. We evaluate DeepMig using datasets of Java projects collected from the Maven Central Repository, ensuring an assessment based on real-world dependency configurations. Results: Our evaluation reveals promising outcomes: DeepMig recommends both libraries and code; by several projects, it retrieves a perfect match for the recommended items, obtaining an accuracy of 1.0. Moreover, being fed with proper training data, DeepMig provides comparable code migration steps of a static API migrator, a baseline for the code migration task. Conclusion: We conclude that DeepMig is capable of recommending both TPL and API migration, providing developers with a practical tool to migrate the entire project. © 2024 Elsevier B.V.
引用
收藏
相关论文
共 50 条
  • [1] TBCUP: A Transformer-based Code Comments Updating Approach
    Liu, Shifan
    Cui, Zhanqi
    Chen, Xiang
    Yang, Jun
    Li, Li
    Zheng, Liwei
    2023 IEEE 47TH ANNUAL COMPUTERS, SOFTWARE, AND APPLICATIONS CONFERENCE, COMPSAC, 2023, : 892 - 897
  • [2] A Transformer-Based Approach for Smart Invocation of Automatic Code Completion
    de Moor, Aral
    van Deursen, Arie
    Izadi, Maliheh
    PROCEEDINGS OF THE 1ST ACM INTERNATIONAL CONFERENCE ON AI-POWERED SOFTWARE, AIWARE 2024, 2024, : 28 - 37
  • [3] A Multi-Modal Transformer-based Code Summarization Approach for Smart Contracts
    Yang, Zhen
    Keung, Jacky
    Yu, Xiao
    Gu, Xiaodong
    Wei, Zhengyuan
    Ma, Xiaoxue
    Zhang, Miao
    2021 IEEE/ACM 29TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2021), 2021, : 1 - 12
  • [4] An Empirical Study of Code Smells in Transformer-based Code Generation Techniques
    Siddiq, Mohammed Latif
    Majumder, Shafayat H.
    Mim, Maisha R.
    Jajodia, Sourov
    Santos, Joanna C. S.
    2022 IEEE 22ND INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION (SCAM 2022), 2022, : 71 - 82
  • [5] SeTransformer: A Transformer-Based Code Semantic Parser for Code Comment Generation
    Li, Zheng
    Wu, Yonghao
    Peng, Bin
    Chen, Xiang
    Sun, Zeyu
    Liu, Yong
    Paul, Doyle
    IEEE TRANSACTIONS ON RELIABILITY, 2023, 72 (01) : 258 - 273
  • [6] Transformer-Based Approach to Melanoma Detection
    Cirrincione, Giansalvo
    Cannata, Sergio
    Cicceri, Giovanni
    Prinzi, Francesco
    Currieri, Tiziana
    Lovino, Marta
    Militello, Carmelo
    Pasero, Eros
    Vitabile, Salvatore
    SENSORS, 2023, 23 (12)
  • [7] Transformer-based code model with compressed hierarchy representation
    Kechi Zhang
    Jia Li
    Zhuo Li
    Zhi Jin
    Ge Li
    Empirical Software Engineering, 2025, 30 (2)
  • [8] Transformer-based approach to variable typing
    Rey, Charles Arthel
    Danguilan, Jose Lorenzo
    Mendoza, Karl Patrick
    Remolona, Miguel Francisco
    HELIYON, 2023, 9 (10)
  • [9] Identify and Update Test Cases when Production Code Changes: A Transformer-based Approach
    Hu, Xing
    Liu, Zhuang
    Xia, Xin
    Liu, Zhongxin
    Xu, Tongtong
    Yang, Xiaohu
    2023 38TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, ASE, 2023, : 1111 - 1122
  • [10] VCO utilising bilaterally coupled transformer-based resonator
    Yen, T. -A.
    Wang, T.
    Feng, W. -S.
    ELECTRONICS LETTERS, 2013, 49 (23) : 1465 - 1467