An Experimental Comparison of Clone Detection Techniques using Java Bytecode
Jean-Guy Schneider, Sung Une Lee · 2022
It is generally accepted in Software Engineering that code clones – often the result of copy-and-paste of existing code – result in poorer maintainability of software systems. Consequently, a variety of techniques have been devised to detect cloned code in software systems and alert developers of duplicated code. Most techniques operate at the source-code level and require some combination of pretty-printing, tokenization and abstraction in order to improve the comparison of code fragments over purely string-based techniques. Avoiding some of the issues of source-code based approaches, we are investigating the effectiveness of using various similarity measures on Bytecode to identify code clones in Java-based systems in this work. The results of our evaluation on selected Java systems indicate that instruction sequences can be used to effectively detect identical code clones. Especially, we achieved the best performance when using the normalized edit distance among applied similarity measures.