Structural and Nominal Cross-Language Clone Detection

Report ID: 
2019-01
Authors: 
Lawton Nichols, Mehmet Emre, and Ben Hardekopf
Date: 
2019-02-01 00:00:00

Abstract

In this paper we address the challenge of cross-language clone detection. Due to the rise of cross-language libraries and applications (e.g., apps written for both Android and iPhone), it has become common for code fragments in one language to be ported over into another language in an extension of the usual "copy and paste" coding methodology. As with single-language clones, it is important to be able to detect these cross-language clones. However there are many real-world cross-language clones that existing techniques cannot detect.

We describe the first general, cross-language algorithm that combines both structural and nominal similarity to find syntactic clones, thereby enabling more complete clone detection than any existing technique. This algorithm also performs comparably to the state of the art in single-language clone detection when applied to single-language source code; thus it generalizes the state of the art in clone detection to detect both single- and cross-language clones using one technique.

Document

PDF icon nichols19structrual.pdf