SSA-HIAST: A Novel Framework for Code Clone Detection

被引:1
作者
Saini, Neha [1 ]
Singh, Sukhdip [1 ]
机构
[1] Deenbandhu Chhotu Ram Univ Sci & Technol, Murthal 131001, India
来源
CMC-COMPUTERS MATERIALS & CONTINUA | 2022年 / 71卷 / 02期
关键词
Code cloning; clone detection; hash inspired abstract syntax tree; rotations; hybrid framework; SEMANTIC CODE; INTERNET; SYSTEM;
D O I
10.32604/cmc.2022.022659
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
In the recent era of software development, reusing software is one of the major activities that is widely used to save time. To reuse software, the copy and paste method is used and this whole process is known as code cloning. This activity leads to problems like difficulty in debugging, increase in time to debug and manage software code. In the literature, various algorithms have been developed to find out the clones but it takes too much time as well as more space to figure out the clones. Unfortunately, most of them are not scalable. This problem has been targeted upon in this paper. In the proposed framework, authors have proposed a new method of identifying clones that takes lesser time to find out clones as compared with many popular code clone detection algorithms. The proposed framework has also addressed one of the key issues in code clone detection i.e., detection of near-miss (Type-3) and semantic clones (Type-4) with significant accuracy of 95.52% and 92.80% respectively. The present study is divided into two phases, the first method converts any code into an intermediate representation form i.e., Hash inspired abstract syntax trees. In the second phase, these abstract syntax trees are passed to a novel approach "Similarity-based self-adjusting hash inspired abstract syntax tree" algorithm that helps in knowing the similarity level of codes. The proposed method has shown a lot of improvement over the existing code clones identification methods.
引用
收藏
页码:2999 / 3017
页数:19
相关论文
共 39 条
[21]   CP-Miner: Finding copy-paste and related bugs in large-scale software code [J].
Li, ZM ;
Lu, S ;
Myagmar, S ;
Zhou, YY .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2006, 32 (03) :176-192
[22]  
Liu H., 2016, ASIA PACIFIC SOFTWAR, P269
[23]   Improving code readability classification using convolutional neural networks [J].
Mi, Qing ;
Keung, Jacky ;
Xiao, Yan ;
Mensah, Solomon ;
Gao, Yujin .
INFORMATION AND SOFTWARE TECHNOLOGY, 2018, 104 :60-71
[24]   Scalable code clone detection and search based on adaptive prefix filtering [J].
Nishi, Manziba Akanda ;
Damevski, Kostadin .
JOURNAL OF SYSTEMS AND SOFTWARE, 2018, 137 :130-142
[25]  
Rahman W, 2020, INT WORKS SOFTW CLON, P38, DOI [10.1109/iwsc50091.2020.9047640, 10.1109/IWSC50091.2020.9047640]
[26]   Software clone detection: A systematic review [J].
Rattan, Dhavleesh ;
Bhatia, Rajesh ;
Singh, Maninder .
INFORMATION AND SOFTWARE TECHNOLOGY, 2013, 55 (07) :1165-1199
[27]   NICAD: Accurate detection of near-miss intentional clones using flexible pretty-printing and code normalization [J].
Roy, Chanchal K. ;
Cordy, James R. .
PROCEEDINGS OF THE 16TH IEEE INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION, 2008, :172-181
[28]   Oreo: Detection of Clones in the Twilight Zone [J].
Saini, Vaibhav ;
Farmahinifarahani, Farima ;
Lu, Yadong ;
Baldi, Pierre ;
Lopes, Cristina V. .
ESEC/FSE'18: PROCEEDINGS OF THE 2018 26TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, 2018, :354-365
[29]   SourcererCC and SourcererCC-I: Tools to Detect Clones in Batch mode and During Software Development [J].
Saini, Vaibhav ;
Sajnani, Hitesh ;
Kim, Jaewoo ;
Lopes, Cristina .
2016 IEEE/ACM 38TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING COMPANION (ICSE-C), 2016, :597-600
[30]   A detection framework for semantic code clones and obfuscated code [J].
Sheneamer, Abdullah ;
Roy, Swarup ;
Kalita, Jugal .
EXPERT SYSTEMS WITH APPLICATIONS, 2018, 97 :405-420