Detecting Java']Java Code Clones with Multi-Granularities Based on Bytecode

被引:20
|
作者
Yu, Dongjin [1 ]
Wang, Jie [1 ]
Wu, Qing [1 ]
Yang, Jiazha [1 ]
Wang, Jiaojiao [1 ]
Yang, Wei [2 ]
Yan, Wei [3 ]
机构
[1] Hangzhou Dianzi Univ, Sch Comp Sci & Technol, Hangzhou, Zhejiang, Peoples R China
[2] Zhejiang Topcheer Informat Technol Co Ltd, Zhejiang Inst Comp Technol, Hangzhou, Zhejiang, Peoples R China
[3] Zhejiang Inst Sci & Technol Informat, Hangzhou, Zhejiang, Peoples R China
基金
中国国家自然科学基金;
关键词
code clone detection; !text type='Java']Java[!/text] bytecode; instruction; multi-granularities; method call; ACCURATE DETECTION; TREES;
D O I
10.1109/COMPSAC.2017.104
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
Sequences of duplicate code, either with or without modification, are known as code clones or just clones. Code clones are generally considered undesirable for a number of reasons, although they can offer some convenience to developers. The detection of code clones helps to improve the quality of source code through software re-engineering. Numerous methods have been proposed for code clone detection in Java code. However, the existing methods are mostly based on the Java source code, while only a few focus on its bytecode; in fact, the Java bytecode reflects more of the semantic nature of the source code than the source code itself does. In this paper, we propose a novel code clone detection method based on Java bytecode. Using the block-level code fragments extracted from bytecode, it can simultaneously detect code clones at both method level and block level. In addition, during the process of code clone detection, the similarities of both method call sequences and instruction sequences are calculated in order to improve accuracy. We conduct two extensive experiments to evaluate the performance of our method. The results show that the proposed method can detect code clones more effectively than the state-of-the-art methods.
引用
收藏
页码:317 / 326
页数:10
相关论文
共 50 条
  • [41] A metric-based approach to identifying refactoring opportunities for merging code clones in a Java']Java software system
    Higo, Yoshiki
    Kusumoto, Shinji
    Inoue, Katsuro
    [J]. JOURNAL OF SOFTWARE MAINTENANCE AND EVOLUTION-RESEARCH AND PRACTICE, 2008, 20 (06): : 435 - 461
  • [42] MINIMUM COST ROUTING BASED RESTORATION IN MULTI-GRANULARITIES TRANSLUCENT WSON
    Guo, Xiaolin
    Huang, Zhitong
    Ji, Yuefeng
    [J]. PROCEEDINGS OF THE 2010 INTERNATIONAL CONFERENCE ON ADVANCED INTELLIGENCE AND AWARENESS INTERNET, AIAI2010, 2010, : 85 - 89
  • [43] Detecting malicious Java']JavaScript code in Mozilla
    Hallaraker, O
    Vigna, G
    [J]. ICECCS 2005: 10TH IEEE INTERNATIONAL CONFERENCE ON ENGINEERING OF COMPLEX COMPUTER SYSTEMS, PROCEEDINGS, 2005, : 85 - 94
  • [44] Annotation-based Parallelization of Java']Java Code
    Mehrabi, Mostafa
    Giacaman, Nasser
    Sinnen, Oliver
    [J]. 2017 IEEE INTERNATIONAL PARALLEL AND DISTRIBUTED PROCESSING SYMPOSIUM WORKSHOPS (IPDPSW), 2017, : 775 - 784
  • [45] Recommendation Based on Java']Java Code Analysis and Search
    Fu, Shanqing
    Li, Bing
    Cai, Yi
    Liu, Zhuang
    Guo, Junxia
    [J]. FUZZY SYSTEMS AND DATA MINING VI, 2020, 331 : 514 - 521
  • [46] Model-based generation of Java']Java code
    Chow, KO
    Jia, WJ
    Chan, VCP
    Cao, JN
    [J]. PROCEEDINGS OF THE INTERNATIONAL CONFERENCE ON PARALLEL AND DISTRIBUTED PROCESSING TECHNIQUES AND APPLICATIONS, VOLS I-V, 2000, : 2811 - 2817
  • [47] A JAVA']JAVA Code Generation Method based on XUML
    Wang, Zhenyu
    [J]. 2019 INTERNATIONAL CONFERENCE ON ADVANCED ELECTRONIC MATERIALS, COMPUTERS AND MATERIALS ENGINEERING (AEMCME 2019), 2019, 563
  • [48] Detecting Vulnerable Java']Java Classes Based on the Analysis of Java']Java Library Call Graph
    Park, Hyosung
    Park, Chulwoo
    Yoo, SangBong
    Kim, Kichang
    [J]. IEEE 2018 INTERNATIONAL CONGRESS ON CYBERMATICS / 2018 IEEE CONFERENCES ON INTERNET OF THINGS, GREEN COMPUTING AND COMMUNICATIONS, CYBER, PHYSICAL AND SOCIAL COMPUTING, SMART DATA, BLOCKCHAIN, COMPUTER AND INFORMATION TECHNOLOGY, 2018, : 1872 - 1879
  • [49] You Look so Different: Finding Structural Clones and Subclones in Java']Java Source Code
    Amme, Wolfram
    Heinze, Thomas S.
    Schafer, Andre
    [J]. 2021 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2021), 2021, : 70 - 80
  • [50] From CIL to Java']Java bytecode: Semantics-based translation for static analysis leveraging
    Ferrara, Pietro
    Cortesi, Agostino
    Spot, Fausto
    [J]. SCIENCE OF COMPUTER PROGRAMMING, 2020, 191