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 条
  • [1] Semantic Code Clone Detection Based on Community Detection
    Wan, Zexuan
    Xie, Chunli
    Lv, Quanrun
    Fan, Yasheng
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2024, 34 (10) : 1661 - 1692
  • [2] Code Clone Detection Based on Contrastive Learning
    Xie, Chunli
    Liang, Yao
    Lv, Quanrun
    Wan, Zexuan
    2024 IEEE 4TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING AND ARTIFICIAL INTELLIGENCE, SEAI 2024, 2024, : 151 - 156
  • [3] A Novel Code Stylometry-based Code Clone Detection Strategy
    Dong, Wenyuan
    Feng, Zhiyong
    Wei, Hua
    Luo, Hong
    2020 16TH INTERNATIONAL WIRELESS COMMUNICATIONS & MOBILE COMPUTING CONFERENCE, IWCMC, 2020, : 1516 - 1521
  • [4] Program Slice based Vulnerable Code Clone Detection
    Song, Xiaonan
    Yu, Aimin
    Yu, Haibo
    Liu, Shirun
    Bai, Xin
    Cai, Lijun
    Meng, Dan
    2020 IEEE 19TH INTERNATIONAL CONFERENCE ON TRUST, SECURITY AND PRIVACY IN COMPUTING AND COMMUNICATIONS (TRUSTCOM 2020), 2020, : 293 - 300
  • [5] LLVM-Based Code Clone Detection Framework
    Avetisyan, Arutyun
    Kurmangaleev, Shamil
    Sargsyan, Sevak
    Arutunian, Mariam
    Belevantsev, Andrey
    TENTH INTERNATIONAL CONFERENCE ON COMPUTER SCIENCE AND INFORMATION TECHNOLOGIES REVISED SELECTED PAPERS CSIT-2015, 2015, : 100 - 104
  • [6] Refactoring Code Clone Detection
    Othman, Zhala Sarkawt
    Kaya, Mehmet
    2019 7TH INTERNATIONAL SYMPOSIUM ON DIGITAL FORENSICS AND SECURITY (ISDFS), 2019,
  • [7] Obfuscated code is identifiable by a token-based code clone detection technique
    Akram, Junaid
    Vasan, Danish
    Luo, Ping
    INTERNATIONAL JOURNAL OF INFORMATION AND COMPUTER SECURITY, 2022, 19 (3-4) : 254 - 273
  • [8] Prioritizing Code Clone Detection Results for Clone Management
    Venkatasubramanyam, Radhika D.
    Gupta, Shrinath
    Singh, Himanshu Kumar
    2013 7TH INTERNATIONAL WORKSHOP ON SOFTWARE CLONES (IWSC), 2013, : 30 - 36
  • [9] Fast Code Clone Detection Based on Weighted Recursive Autoencoders
    Zeng, Jie
    Ben, Kerong
    Li, Xiaowei
    Zhang, Xian
    IEEE ACCESS, 2019, 7 : 125062 - 125078
  • [10] Semantic Clone Detection Based on Code Feature Fusion Learning
    Zhang, Qianjin
    Jin, Dahai
    Wang, Yawen
    Gong, Yunzhan
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2023, 33 (07) : 1039 - 1062