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 条
[41]   On Cloud Computing Infrastructure for Existing Code-Clone Detection Algorithms [J].
Walker, Andrew ;
Cerny, Tomas .
APPLIED COMPUTING REVIEW, 2020, 20 (01) :5-14
[42]   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
[43]   Comparison and evaluation of code clone detection techniques and tools: A qualitative approach [J].
Roy, Chanchal K. ;
Cordy, James R. ;
Koschke, Rainer .
SCIENCE OF COMPUTER PROGRAMMING, 2009, 74 (07) :470-495
[44]   VFDETECT: A Vulnerable Code Clone Detection System Based on Vulnerability Fingerprint [J].
Liu, Zhen ;
Wei, Qiang ;
Cao, Yan .
2017 IEEE 3RD INFORMATION TECHNOLOGY AND MECHATRONICS ENGINEERING CONFERENCE (ITOEC), 2017, :548-553
[45]   Siamese: scalable and incremental code clone search via multiple code representations [J].
Ragkhitwetsagul, Chaiyong ;
Krinke, Jens .
EMPIRICAL SOFTWARE ENGINEERING, 2019, 24 (04) :2236-2284
[46]   Clone-Writer: An effective editor for developing code by using code clones [J].
Hammad, Muhammad ;
Babur, Onder ;
Basit, Hamid Abdul ;
van den Brand, Mark .
SOFTWARE IMPACTS, 2022, 13
[47]   REPD: Source Code Defect Prediction As Anomaly Detection [J].
Afric, Petar ;
Sikic, Lucija ;
Kurdija, Adrian Satja ;
Silic, Marin .
2019 COMPANION OF THE 19TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY (QRS-C 2019), 2019, :227-234
[48]   REPD: Source code defect prediction as anomaly detection [J].
Afric, Petar ;
Sikic, Lucija ;
Kurdija, Adrian Satja ;
Silic, Marin .
JOURNAL OF SYSTEMS AND SOFTWARE, 2020, 168
[49]   Harnessing the Power of LLMs in Source Code Vulnerability Detection [J].
Mahyari, Andrew A. .
MILCOM 2024-2024 IEEE MILITARY COMMUNICATIONS CONFERENCE, MILCOM, 2024, :251-256
[50]   FCCA: Hybrid Code Representation for Functional Clone Detection Using Attention Networks [J].
Hua, Wei ;
Sui, Yulei ;
Wan, Yao ;
Liu, Guangzhong ;
Xu, Guandong .
IEEE TRANSACTIONS ON RELIABILITY, 2021, 70 (01) :304-318