RefDiff: Detecting Refactorings in Version Histories

被引:84
|
作者
Silva, Danilo [1 ]
Valente, Marco Tulio [1 ]
机构
[1] Univ Fed Minas Gerais, Dept Comp Sci, Belo Horizonte, MG, Brazil
关键词
refactoring; software evolution; software repositories; git; METRICS;
D O I
10.1109/MSR.2017.14
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Refactoring is a well-known technique that is widely adopted by software engineers to improve the design and enable the evolution of a system. Knowing which refactoring operations were applied in a code change is a valuable information to understand software evolution, adapt software components, merge code changes, and other applications. In this paper, we present RefDiff, an automated approach that identifies refactorings performed between two code revisions in a git repository. RefDiff employs a combination of heuristics based on static analysis and code similarity to detect 13 well-known refactoring types. In an evaluation using an oracle of 448 known refactoring operations, distributed across seven Java projects, our approach achieved precision of 100% and recall of 88%. Moreover, our evaluation suggests that RefDiff has superior precision and recall than existing state-of-the-art approaches.
引用
收藏
页码:269 / 279
页数:11
相关论文
共 50 条
  • [1] Mining Version Histories for Detecting Code Smells
    Palomba, Fabio
    Bavota, Gabriele
    Di Penta, Massimiliano
    Oliveto, Rocco
    Poshyvanyk, Denys
    De Lucia, Andrea
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2015, 41 (05) : 462 - 489
  • [2] Quality Histories of Past Extract Method Refactorings
    Taqui, Abel Mamani
    Alcocer, Juan Pablo Sandoval
    Hecht, Geoffrey
    Bergel, Alexandre
    [J]. COMPUTATIONAL SCIENCE AND ITS APPLICATIONS, ICCSA 2021, PT VII, 2021, 12955 : 336 - 352
  • [3] Dependent or Not: Detecting and Understanding Collections of Refactorings
    Ferreira, Thiago
    Ivers, James
    Yackley, Jeffrey J.
    Kessentini, Marouane
    Ozkaya, Ipek
    Gaaloul, Khouloud
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2023, 49 (06) : 3344 - 3358
  • [4] Detecting and visualizing refactorings from software archives
    Görg, C
    Weissgerber, P
    [J]. 13TH INTERNATIONAL WORKSHOP ON PROGRAM COMPREHENSION, PROCEEDINGS, 2005, : 205 - 214
  • [5] Extracting prehistories of software refactorings from version archives
    Hayashi, Shinpei
    Saeki, Motoshi
    [J]. LARGE-SCALE KNOWLEDGE RESOURCES: CONSTRUCTION AND APPLICATION, 2008, 4938 : 82 - 89
  • [6] Detecting complex changes and refactorings during (Meta) model evolution
    Khelladi, Djamel Eddine
    Hebig, Regina
    Bendraou, Reda
    Robin, Jacques
    Gervais, Marie -Pierre
    [J]. INFORMATION SYSTEMS, 2016, 62 : 220 - 241
  • [7] Detecting Full Initialization Points of Objects to Support Code Refactorings
    Rama, Girish Maskeri
    Komondoor, Raghavan
    [J]. 2017 24TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2017), 2017, : 110 - 119
  • [8] Major motivations for extract method refactorings: analysis based on interviews and change histories
    Liu, Wenmei
    Liu, Hui
    [J]. FRONTIERS OF COMPUTER SCIENCE, 2016, 10 (04) : 644 - 656
  • [9] Major motivations for extract method refactorings:analysis based on interviews and change histories
    Wenmei LIU
    Hui LIU
    [J]. Frontiers of Computer Science., 2016, 10 (04) - 656
  • [10] Major motivations for extract method refactorings: analysis based on interviews and change histories
    Wenmei Liu
    Hui Liu
    [J]. Frontiers of Computer Science, 2016, 10 : 644 - 656