A systematic literature review on source code similarity measurement and clone detection: Techniques, applications, and challenges

被引:36
作者
Zakeri-Nasrabadi, Morteza [1 ]
Parsa, Saeed [1 ]
Ramezani, Mohammad [1 ]
Roy, Chanchal [2 ]
Ekhtiarzadeh, Masoud [1 ]
机构
[1] Iran Univ Sci & Technol, Sch Comp Engn, Hengam St, Resalat Sq, Tehran 1684613114, Iran
[2] Univ Saskatchewan, Dept Comp Sci, Saskatoon, SK, Canada
关键词
Source code similarity; Code clone; Plagiarism detection; Code recommendation; Systematic literature review; SOFTWARE; BENCHMARK; FRAMEWORK; EFFICIENT; PROGRAMS; NICAD; COPY;
D O I
10.1016/j.jss.2023.111796
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Measuring and evaluating source code similarity is a fundamental software engineering activity that embraces a broad range of applications, including but not limited to code recommendation, duplicate code, plagiarism, malware, and smell detection. This paper proposes a systematic literature review and meta-analysis on code similarity measurement and evaluation techniques to shed light on the existing approaches and their characteristics in different applications. We initially found over 10,000 articles by querying four digital libraries and ended up with 136 primary studies in the field. The studies were classified according to their methodology, programming languages, datasets, tools, and applications. A deep investigation reveals 80 software tools, working with eight different techniques on five application domains. Nearly 49% of the tools work on Java programs and 37% support C and C++, while there is no support for many programming languages. A noteworthy point was the existence of 12 datasets related to source code similarity measurement and duplicate codes, of which only eight datasets were publicly accessible. The lack of reliable datasets, empirical evaluations, hybrid methods, and focuses on multi-paradigm languages are the main challenges in the field. Emerging applications of code similarity measurement concentrate on the development phase in addition to the maintenance.& COPY; 2023 Elsevier Inc. All rights reserved.
引用
收藏
页数:33
相关论文
共 257 条
[1]  
Abid C, 2020, Arxiv, DOI arXiv:2007.02194
[2]  
Agrawal Ankit, 2013, 2013 IEEE International Conference on Big Data, P1, DOI 10.1109/BigData.2013.6691751
[3]  
Agrawal R., 1994, P 20 INT C VER LARG, P487, DOI DOI 10.5555/645920.672836
[4]  
Aiken Alex, 2022, Moss: A System for Detecting Software Similarity
[5]   DroidCC: A Scalable Clone Detection Approach for Android Applications to Detect Similarity at Source Code Level [J].
Akram, Junaid ;
Shi, Zhendong ;
Mumtaz, Majid ;
Ping, Luo .
2018 IEEE 42ND ANNUAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE (COMPSAC), VOL 1, 2018, :100-105
[6]  
Allamanis M, 2016, PR MACH LEARN RES, V48
[7]   Suggesting Accurate Method and Class Names [J].
Allamanis, Miltiadis ;
Barr, Earl T. ;
Bird, Christian ;
Sutton, Charles .
2015 10TH JOINT MEETING OF THE EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND THE ACM SIGSOFT SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING (ESEC/FSE 2015) PROCEEDINGS, 2015, :38-49
[8]   code2vec: Learning Distributed Representations of Code [J].
Alon, Uri ;
Zilberstein, Meital ;
Levy, Omer ;
Yahav, Eran .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (POPL)
[9]  
Alon Uri, 2019, 7 INT C LEARNING REP
[10]   You Look so Different: Finding Structural Clones and Subclones in Java']Java Source Code [J].
Amme, Wolfram ;
Heinze, Thomas S. ;
Schafer, Andre .
2021 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2021), 2021, :70-80