CMCD: Count Matrix based Code Clone Detection

被引:0
|
作者
Yuan, Yang [1 ]
Guo, Yao [1 ]
机构
[1] Peking Univ, Natl Engn Res Ctr Software Engn, Key Lab High Confidence Software Technol, Minist Educ,Sch Elect Engn & Comp Sci, Beijing 100871, Peoples R China
基金
中国国家自然科学基金;
关键词
Code clone detection; count matrix; bipartite graph matching; SOFTWARE;
D O I
10.1109/APSC.2011.13
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
This paper introduces CMCD, a Count Matrix based technique to detect clones in program code. The key concept behind CMCD is Count Matrix, which is created while counting the occurrence frequencies of every variable in situations specified by pre-determined counting conditions. Because the characteristics of the count matrix do not change due to variable name replacements or even switching of statements, CMCD works well on many hard-to-detect code clones, such as swapping statements or deleting a few lines, which are difficult for other state-of-the-art detection techniques. We have obtained the following interesting results using CMCD: (1) we successfully detected all 16 clone scenarios proposed by C. Roy et al.; (2) we discovered two clone clusters with three copies each from 29 student-submitted compiler lab projects; (3) we identified 174 code clone clusters and a potential bug from JDK 1.6 source files.
引用
收藏
页码:250 / 257
页数:8
相关论文
共 50 条
  • [31] Code Clone Detection: A Literature Review
    Chen Q.-Y.
    Li S.-P.
    Yan M.
    Xia X.
    Ruan Jian Xue Bao/Journal of Software, 2019, 30 (04): : 962 - 980
  • [32] Interface Driven Code Clone Detection
    Misu, Md Rakib Hossain
    Sakib, Kazi
    2017 24TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2017), 2017, : 747 - 748
  • [33] CloneTM: A Code Clone Detection Tool Based on Latent Dirichlet Allocation
    Reddivari, Sandeep
    Khan, Mohammed Salman
    2019 IEEE 43RD ANNUAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE (COMPSAC), VOL 1, 2019, : 930 - 931
  • [34] TPCaps: a framework for code clone detection and localization based on improved CapsNet
    Li, Yuancheng
    Yu, Chaohang
    Cui, Yaqi
    APPLIED INTELLIGENCE, 2023, 53 (13) : 16594 - 16605
  • [35] Index-Based Code Clone Detection: Incremental, Distributed, Scalable
    Hummel, Benjamin
    Juergens, Elmar
    Heinemann, Lars
    Conradt, Michael
    2010 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, 2010,
  • [36] Scalable code clone detection and search based on adaptive prefix filtering
    Nishi, Manziba Akanda
    Damevski, Kostadin
    JOURNAL OF SYSTEMS AND SOFTWARE, 2018, 137 : 130 - 142
  • [37] TPCaps: a framework for code clone detection and localization based on improved CapsNet
    Yuancheng Li
    Chaohang Yu
    Yaqi Cui
    Applied Intelligence, 2023, 53 : 16594 - 16605
  • [38] A parallel deep learning-based code clone detection model
    Zhang, Xiangping
    Liu, Jianxun
    Shi, Min
    JOURNAL OF PARALLEL AND DISTRIBUTED COMPUTING, 2023, 181
  • [39] A Method of Program Refactoring based on Code Clone Detection and Impact Analysis
    Takahashi, Masakazu
    Nanba, Reiji
    Anang, Yunarso
    Uchiyama, Tatsuya
    Watanabe, Yoshimichi
    2016 55TH ANNUAL CONFERENCE OF THE SOCIETY OF INSTRUMENT AND CONTROL ENGINEERS OF JAPAN (SICE), 2016, : 673 - 678
  • [40] Software vulnerability code clone detection method based on characteristic metrics
    Gan, Shui-Tao
    Qin, Xiao-Jun
    Chen, Zuo-Ning
    Wang, Lin-Zhang
    Ruan Jian Xue Bao/Journal of Software, 2015, 26 (02): : 348 - 363