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 条
  • [1] Detecting Java']Java Code Clones Based on Bytecode Sequence Alignment
    Yu, Dongjin
    Yang, Jiazha
    Chen, Xin
    Chen, Jie
    [J]. IEEE ACCESS, 2019, 7 : 22421 - 22433
  • [2] Finding Source Code Clones in Intermediate Representations of Java']Java Bytecode
    Schaefer, Andre
    Heinze, Thomas S.
    Amme, Wolfram
    [J]. 2023 IEEE 17TH INTERNATIONAL WORKSHOP ON SOFTWARE CLONES, IWSC 2023, 2023, : 37 - 43
  • [3] AUTOMATIC DETECTING AND REMOVING CLONES IN JAVA']JAVA SOURCE CODE
    Bublik, Tomas
    Virius, Miroslav
    [J]. SOFTWARE DEVELOPMENT 2011, 2011, : 10 - 18
  • [4] Mobile code security by Java']Java bytecode instrumentation
    Chander, A
    Mitchell, JC
    Shin, I
    [J]. DISCEX'01: DARPA INFORMATION SURVIVABILITY CONFERENCE & EXPOSITION II, VOL II, PROCEEDINGS, 2001, : 27 - 40
  • [5] Mobile code security by Java']Java bytecode dependence analysis
    Bian, G
    Nakayama, K
    Kobayashi, Y
    Maekawa, M
    [J]. IEEE INTERNATIONAL SYMPOSIUM ON COMMUNICATIONS AND INFORMATION TECHNOLOGIES 2004 (ISCIT 2004), PROCEEDINGS, VOLS 1 AND 2: SMART INFO-MEDIA SYSTEMS, 2004, : 923 - 926
  • [6] Code coverage differences of Java']Java bytecode and source code instrumentation tools
    Horvath, Ferenc
    Gergely, Tamas
    Beszedes, Arpad
    Tengeri, David
    Balogh, Gergo
    Gyimothy, Tibor
    [J]. SOFTWARE QUALITY JOURNAL, 2019, 27 (01) : 79 - 123
  • [7] Target code generation using the code expansion technique for Java']Java Bytecode
    Ko, KM
    Kim, SG
    [J]. PARALLEL AND DISTRIBUTED COMPUTING: APPLICATIONS AND TECHNOLOGIES, PROCEEDINGS, 2004, 3320 : 752 - 755
  • [8] Checking secure information flow in Java']Java bytecode by code transformation and standard bytecode verification
    Bernardeschi, C
    De Francesco, N
    Lettieri, G
    Martini, L
    [J]. SOFTWARE-PRACTICE & EXPERIENCE, 2004, 34 (13): : 1225 - 1255
  • [9] Negative Effects of Bytecode Instrumentation on Java']Java Source Code Coverage
    Tengeri, David
    Horvath, Ferenc
    Beszedes, Arpad
    Gergely, Tamas
    Gyimothy, Tibor
    [J]. 2016 IEEE 23RD INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), VOL 1, 2016, : 225 - 235
  • [10] A novel code representation for detecting Java']Java code clones using high-level and abstract compiled code representations
    Quradaa, Fahmi H.
    Shahzad, Sara
    Saeed, Rashad
    Sufyan, Mubarak M.
    [J]. PLOS ONE, 2024, 19 (05):