Detecting Differences across Multiple Instances of Code Clones

被引:28
|
作者
Lin, Yun [1 ,2 ]
Xing, Zhenchang [3 ]
Xue, Yinxing [4 ]
Liu, Yang [3 ]
Peng, Xin [1 ,2 ]
Sun, Jun [5 ]
Zhao, Wenyun [1 ,2 ]
机构
[1] Fudan Univ, Sch Comp Sci, Shanghai, Peoples R China
[2] Fudan Univ, Shanghai Key Lab Data Sci, Shanghai, Peoples R China
[3] Nanyang Technol Univ, Sch Comp Engn, Singapore, Singapore
[4] Natl Univ Singapore, Sch Comp, Singapore, Singapore
[5] Singapore Univ Technol & Design, Singapore, Singapore
来源
36TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2014) | 2014年
关键词
Code clone; Program differencing; Human study;
D O I
10.1145/2568225.2568298
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Clone detectors find similar code fragments (i.e., instances of code clones) and report large numbers of them for industrial systems. To maintain or manage code clones, developers often have to investigate differences of multiple cloned code fragments. However, existing program differencing techniques compare only two code fragments at a time. Developers then have to manually combine several pairwise differencing results. In this paper, we present an approach to automatically detecting differences across multiple clone instances. We have implemented our approach as an Eclipse plugin and evaluated its accuracy with three Java software systems. Our evaluation shows that our algorithm has precision over 97.66% and recall over 95.63% in three open source Java projects. We also conducted a user study of 18 developers to evaluate the usefulness of our approach for eight clone-related refactoring tasks. Our study shows that our approach can significantly improve developers' performance in refactoring decisions, refactoring details, and task completion time on clone-related refactoring tasks. Automatically detecting differences across multiple clone instances also opens opportunities for building practical applications of code clones in software maintenance, such as auto-generation of application skeleton, intelligent simultaneous code editing.
引用
收藏
页码:164 / 174
页数:11
相关论文
共 50 条
  • [31] Efficient Algorithm for Detecting Parameterized Multiple Clones in a Large Software System
    Prasad, Rajesh
    Agarwal, Suneeta
    Sharma, Anuj Kumar
    Singh, Alok
    Misra, Sanjay
    COMPUTATIONAL SCIENCE AND ITS APPLICATIONS - ICCSA 2011, PT V, 2011, 6786 : 398 - 409
  • [32] Detecting Refactored Clones
    Shomrat, Mati
    Feldman, Yishai A.
    ECOOP 2013 - OBJECT-ORIENTED PROGRAMMING, 2013, 7920 : 502 - 526
  • [33] Clone-Slicer: Detecting Domain Specific Binary Code Clones through Program Slicing
    Xue, Hongfa
    Venkataramani, Guru
    Lan, Tian
    FEAST'18: PROCEEDINGS OF THE 2018 WORKSHOP ON FORMING AN ECOSYSTEM AROUND SOFTWARE TRANSFORMATION, 2018, : 27 - 33
  • [34] Detecting pages to protect in Wikipedia across multiple languages
    Spezzano, Francesca
    Suyehira, Kelsey
    Gundala, Laxmi Amulya
    SOCIAL NETWORK ANALYSIS AND MINING, 2019, 9 (01)
  • [35] Detecting Code Clones with Graph Neural Network and Flow-Augmented Abstract Syntax Tree
    Wang, Wenhan
    Li, Ge
    Ma, Bo
    Xia, Xin
    Jin, Zhi
    PROCEEDINGS OF THE 2020 IEEE 27TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER '20), 2020, : 261 - 271
  • [36] Tritor: Detecting Semantic Code Clones by Building Social Network-Based Triads Model
    Zou, Deqing
    Feng, Siyue
    Wu, Yueming
    Suo, Wenqi
    Jin, Hai
    PROCEEDINGS OF THE 31ST ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2023, 2023, : 771 - 783
  • [37] Tool for Detecting Standardwise Differences in C plus plus Legacy Code
    Brunner, Tibor
    Pataki, Norbert
    Porkolab, Zoltan
    2015 IEEE 13TH INTERNATIONAL SCIENTIFIC CONFERENCE ON INFORMATICS, 2015, : 51 - 56
  • [38] Development and analysis of an algorithm for detecting multiple instances of an object in microscopic images using numerical methods
    Ganigin, S. Yu.
    Davydov, A. N.
    Nechaev, A. S.
    Kiyashchenko, V. V.
    IZVESTIYA OF SARATOV UNIVERSITY MATHEMATICS MECHANICS INFORMATICS, 2025, 25 (01): : 116 - 127
  • [39] FIFE: an Infrastructure-as-Code Based Framework for Evaluating VM Instances from Multiple Clouds
    Lin, Yuhui
    Briggs, Jack
    Barker, Adam
    2020 IEEE/ACM 13TH INTERNATIONAL CONFERENCE ON UTILITY AND CLOUD COMPUTING (UCC 2020), 2020, : 91 - 100
  • [40] A code obfuscation framework using code clones
    Kulkarni, Aniket
    Metta, Ravindra
    22nd International Conference on Program Comprehension, ICPC 2014 - Proceedings, 2014, : 295 - 299