LLVM-Based Code Clone Detection Framework

被引:0
作者
Avetisyan, Arutyun [1 ]
Kurmangaleev, Shamil [1 ]
Sargsyan, Sevak [1 ]
Arutunian, Mariam [1 ]
Belevantsev, Andrey [1 ]
机构
[1] Russian Acad Sci, Inst Syst Programming, Moscow, Russia
来源
TENTH INTERNATIONAL CONFERENCE ON COMPUTER SCIENCE AND INFORMATION TECHNOLOGIES REVISED SELECTED PAPERS CSIT-2015 | 2015年
关键词
code clone; program dependence graph; LLVM;
D O I
暂无
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Existed methods of code clones detection have some restrictions. Textual and lexical approaches cannot detect strongly modified fragments of code. Syntactic and metrics based approaches detect strong modifications with low accuracy. On the contrary, semantic approach accurately detects the cloned fragments of code with small changes as well as the strongly modified ones. Methods based on this approach are not scalable for analysis of large projects. This paper describes LLVM-based code clone detection framework, which uses program semantic analysis. It has high accuracy and is scalable for analysis million lines of source code. The tool embeds a testing system, which allows generating code clones for the project automatically. It is used for determining the developed algorithms accuracy. The instrument is applicable for all languages that can be compiled to LLVM bitcode. Proposed method was compared with two widely used tools MOSS and CloneDR. Results show that it has higher accuracy. The tool is scalable for analysis of linux-2.6 kernel, which has about fourteen millions lines of source code.
引用
收藏
页码:100 / 104
页数:5
相关论文
共 19 条
  • [1] [Anonymous], 2014, SIGSOFT SOFTW ENG NO
  • [2] [Anonymous], INT J COMPUTER APPL
  • [3] BAKER BS, 1995, SECOND WORKING CONFERENCE ON REVERSE ENGINEERING, PROCEEDINGS, P86, DOI 10.1109/WCRE.1995.514697
  • [4] Clone detection using abstract syntax trees
    Baxter, ID
    Yahin, A
    Moura, L
    Sant'Anna, M
    Bier, L
    [J]. INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, PROCEEDINGS, 1998, : 368 - 377
  • [5] Comparison and evaluation of clone detection tools
    Bellon, Stefan
    Koschke, Rainer
    Antoniol, Giuliano
    Krinke, Jens
    Merlo, Ettore
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2007, 33 (09) : 577 - 591
  • [6] Davey N., 1995, International Journal of Applied Software Technology, V1, P219
  • [7] Ducasse S., 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). `Software Maintenance for Business Change' (Cat. No.99CB36360), P109, DOI 10.1109/ICSM.1999.792593
  • [8] Gabel M, 2008, ICSE'08 PROCEEDINGS OF THE THIRTIETH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, P321, DOI 10.1145/1368088.1368132
  • [9] Jiang LX, 2007, PROC INT CONF SOFTW, P96
  • [10] CCFinder: A multilinguistic token-based code clone detection system for large scale source code
    Kamiya, T
    Kusumoto, S
    Inoue, K
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2002, 28 (07) : 654 - 670