Gapped Code Clone Detection with Lightweight Source Code Analysis

被引:0
作者
Murakami, Hiroaki [1 ]
Hotta, Keisuke [1 ]
Higo, Yoshiki [1 ]
Igaki, Hiroshi [1 ]
Kusumoto, Shinji [1 ]
机构
[1] Osaka Univ, Grad Sch Informat Sci & Technol, Suita, Osaka 5650871, Japan
来源
2013 IEEE 21ST INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC) | 2013年
关键词
Code Clone; Program Analysis; Software Maintenance; Tool Comparison; SYSTEM;
D O I
暂无
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
A variety of methods detecting code clones has been proposed before. In order to detect gapped code clones, AST-based technique, PDG-based technique, metric-based technique and text-based technique using the LCS algorithm have been proposed. However, each of those techniques has limitations. For example, existing AST-based techniques and PDG-based techniques require costs for transforming source files into intermediate representations such as ASTs or PDGs and comparing them. Existing metric-based techniques and text-based techniques using the LCS algorithm cannot detect code clones if methods or blocks are partially duplicated. This paper proposes a new method that detects gapped code clones using the Smith-Waterman algorithm to resolve those limitations. The Smith-Waterman algorithm is an algorithm for identifying similar alignments between two sequences even if they include some gaps. The authors developed the proposed method as a software tool named CDSW, and confirmed that the proposed method could resolve the limitations by conducting a quantitative evaluation with Bellon's benchmark.
引用
收藏
页码:93 / 102
页数:10
相关论文
共 50 条
[31]   Clone Detection with Pre-training Enhanced Code Representation [J].
Leng L.-S. ;
Liu S. ;
Tian C.-L. ;
Dou S.-J. ;
Wang Z. ;
Zhang M.-S. .
Ruan Jian Xue Bao/Journal of Software, 2022, 33 (05) :1758-1773
[32]   Structural Code Clone Detection Methodology Using Software Metrics [J].
Aktas, Mehmet S. ;
Kapdan, Mustafa .
INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2016, 26 (02) :307-332
[33]   Various Code Clone Detection Techniques and Tools: A Comprehensive Survey [J].
Gautam, Pratiksha ;
Saini, Hemraj .
SMART TRENDS IN INFORMATION TECHNOLOGY AND COMPUTER COMMUNICATIONS, SMARTCOM 2016, 2016, 628 :655-667
[34]   Code2Img: Tree-Based Image Transformation for Scalable Code Clone Detection [J].
Hu, Yutao ;
Fang, Yilin ;
Sun, Yifan ;
Jia, Yaru ;
Wu, Yueming ;
Zou, Deqing ;
Jin, Hai .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2023, 49 (09) :4429-4442
[35]   CloneTracker: Tool Support for Code Clone Management [J].
Duala-Ekoko, Ekwa ;
Robillard, Martin P. .
ICSE'08 PROCEEDINGS OF THE THIRTIETH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, 2008, :843-846
[36]   A Feature Analysis of Co-changed Code Clone by Using Clone Metrics [J].
Yudha, Myrizki Sandhi ;
Asano, Ryohei ;
Aman, Hirohisa .
IEICE TRANSACTIONS ON FUNDAMENTALS OF ELECTRONICS COMMUNICATIONS AND COMPUTER SCIENCES, 2012, E95A (09) :1498-1500
[37]   An extensible system for source code analysis [J].
Canfora, G ;
Cimitile, A ;
De Carlini, U ;
De Lucia, A .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1998, 24 (09) :721-740
[38]   Deep learning application on code clone detection: A review of current knowledge [J].
Lei, Maggie ;
Li, Hao ;
Li, Ji ;
Aundhkar, Namrata ;
Kim, Dae-Kyoo .
JOURNAL OF SYSTEMS AND SOFTWARE, 2022, 184
[39]   On Cloud Computing Infrastructure for Existing Code-Clone Detection Algorithms [J].
Walker, Andrew ;
Cerny, Tomas .
APPLIED COMPUTING REVIEW, 2020, 20 (01) :5-14
[40]   Software vulnerability code clone detection method based on characteristic metrics [J].
Gan, Shui-Tao ;
Qin, Xiao-Jun ;
Chen, Zuo-Ning ;
Wang, Lin-Zhang .
Ruan Jian Xue Bao/Journal of Software, 2015, 26 (02) :348-363