RefDiff 2.0: A Multi-Language Refactoring Detection Tool

被引:10
|
作者
Silva, Danilo [1 ]
da Silva, Joao Paulo [2 ]
Santos, Gustavo [3 ]
Terra, Ricardo [4 ]
Valente, Marco Tulio [1 ]
机构
[1] Univ Fed Minas Gerais, Dept Comp Sci, BR-31270010 Belo Horizonte, MG, Brazil
[2] Quimbik Inc, San Rafael, CA 94901 USA
[3] Fed Univ Technol UTFPR, Software Engn, BR-85660000 Dois Vizinhos, PR, Brazil
[4] Fed Univ Lavras UFLA, Dept Comp Sci, BR-37200000 Lavras, MG, Brazil
关键词
Codes; !text type='Java']Java[!/text; Source coding; History; Crawlers; Measurement; Refactoring; source code analysis; code repositories; git;
D O I
10.1109/TSE.2020.2968072
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Identifying refactoring operations in source code changes is valuable to understand software evolution. Therefore, several tools have been proposed to automatically detect refactorings applied in a system by comparing source code between revisions. The availability of such infrastructure has enabled researchers to study refactoring practice in large scale, leading to important advances on refactoring knowledge. However, although a plethora of programming languages are used in practice, the vast majority of existing studies are restricted to the Java language due to limitations of the underlying tools. This fact poses an important threat to external validity. Thus, to overcome such limitation, in this paper we propose RefDiff 2.0, a multi-language refactoring detection tool. Our approach leverages techniques proposed in our previous work and introduces a novel refactoring detection algorithm that relies on the Code Structure Tree (CST), a simple yet powerful representation of the source code that abstracts away the specificities of particular programming languages. Despite its language-agnostic design, our evaluation shows that RefDiff's precision (96 percent) and recall (80 percent) are on par with state-of-the-art refactoring detection approaches specialized in the Java language. Our modular architecture also enables one to seamlessly extend RefDiff to support other languages via a plugin system. As a proof of this, we implemented plugins to support two other popular programming languages: JavaScript and C. Our evaluation in these languages reveals that precision and recall ranges from 88 to 91 percent. With these results, we envision RefDiff as a viable alternative for breaking the single-language barrier in refactoring research and in practical applications of refactoring detection.
引用
收藏
页码:2786 / 2802
页数:17
相关论文
共 50 条
  • [1] RefDetect: A Multi-Language Refactoring Detection Tool Based on String Alignment
    Moghadam, Iman Hemati
    Cinneide, Mel O.
    Zarepour, Faezeh
    Jahanmir, Mohamad Aref
    IEEE ACCESS, 2021, 9 : 86698 - 86727
  • [2] HURDLES IN MULTI-LANGUAGE REFACTORING OF HIBERNATE APPLICATIONS
    Schink, Hagen
    Kuhlemann, Martin
    Saake, Gunter
    Laemmel, Ralf
    ICSOFT 2011: PROCEEDINGS OF THE 6TH INTERNATIONAL CONFERENCE ON SOFTWARE AND DATABASE TECHNOLOGIES, VOL 2, 2011, : 129 - 134
  • [3] A tool for understanding multi-language program dependencies
    Linos, PK
    Chen, ZH
    Berrier, S
    O'Rourke, B
    IWPC 2003: 11TH IEEE INTERNATIONAL WORKSHOP ON PROGRAM COMPREHENSION, 2003, : 64 - 72
  • [4] sql-schema-comparer: Support of Multi-Language Refactoring with Relational Databases
    Schink, Hagen
    2013 IEEE 13TH INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION (SCAM), 2013, : 173 - 178
  • [5] MERLIN: Multi-Language Web Vulnerability Detection
    Figueiredo, Alexandra
    Lide, Tatjana
    Matos, David
    Correia, Miguel
    2020 IEEE 19TH INTERNATIONAL SYMPOSIUM ON NETWORK COMPUTING AND APPLICATIONS (NCA), 2020,
  • [6] MERLIN: Multi-Language Web Vulnerability Detection
    Figueiredo, Alexandra
    Lide, Tatjana
    Matos, David
    Correia, Miguel
    2020 IEEE 19th International Symposium on Network Computing and Applications, NCA 2020, 2020,
  • [7] On Multi-language Abstraction Towards a Static Analysis of Multi-language Programs
    Buro, Samuele
    Crole, Roy L.
    Mastroeni, Isabella
    STATIC ANALYSIS (SAS 2020), 2020, 12389 : 310 - 332
  • [8] On multi-language abstraction: Towards a static analysis of multi-language programs
    Buro, Samuele
    Crole, Roy
    Mastroeni, Isabella
    FORMAL METHODS IN SYSTEM DESIGN, 2023, 65 (1) : 4 - 38
  • [9] Multi-language synchronization
    Ennals, Robert
    Gay, David
    PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2007, 4421 : 475 - +
  • [10] A deep learner model for multi-language webshell detection
    Hannousse, Abdelhakim
    Nait-Hamoud, Mohamed Cherif
    Yahiouche, Salima
    INTERNATIONAL JOURNAL OF INFORMATION SECURITY, 2023, 22 (01) : 47 - 61