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 条
  • [11] Transformer-based networks over tree structures for code classification
    Hua, Wei
    Liu, Guangzhong
    Applied Intelligence, 2022, 52 (08): : 8895 - 8909
  • [12] Transformer-based code search for software Q&A sites
    Peng, Yaohui
    Xie, Jing
    Hu, Gang
    Yuan, Mengting
    JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2024, 36 (02)
  • [13] Transformer-based networks over tree structures for code classification
    Wei Hua
    Guangzhong Liu
    Applied Intelligence, 2022, 52 : 8895 - 8909
  • [14] Transformer-based networks over tree structures for code classification
    Hua, Wei
    Liu, Guangzhong
    APPLIED INTELLIGENCE, 2022, 52 (08) : 8895 - 8909
  • [15] A Sparse Transformer-Based Approach for Image Captioning
    Lei, Zhou
    Zhou, Congcong
    Chen, Shengbo
    Huang, Yiyong
    Liu, Xianrui
    IEEE ACCESS, 2020, 8 : 213437 - 213446
  • [16] A Sparse Transformer-Based Approach for Image Captioning
    Lei, Zhou
    Zhou, Congcong
    Chen, Shengbo
    Huang, Yiyong
    Liu, Xianrui
    IEEE Access, 2020, 8 : 213437 - 213446
  • [17] A transformer-based approach to irony and sarcasm detection
    Rolandos Alexandros Potamias
    Georgios Siolas
    Andreas - Georgios Stafylopatis
    Neural Computing and Applications, 2020, 32 : 17309 - 17320
  • [18] TRANSFORMER-BASED APPROACH FOR DOCUMENT LAYOUT UNDERSTANDING
    Yang, Huichen
    Hsu, William
    2022 IEEE INTERNATIONAL CONFERENCE ON IMAGE PROCESSING, ICIP, 2022, : 4043 - 4047
  • [19] TSLocator: A Transformer-Based Approach to Bug Localization
    HUCheng
    XIAOYuliang
    Wuhan University Journal of Natural Sciences, 2021, 26 (02) : 200 - 206
  • [20] A transformer-based approach to irony and sarcasm detection
    Potamias, Rolandos Alexandros
    Siolas, Georgios
    Stafylopatis, Andreas-Georgios
    NEURAL COMPUTING & APPLICATIONS, 2020, 32 (23): : 17309 - 17320