An execution-semantic and content-and-context-based code-clone detection and analysis
Toshihiro Kamiya · 2015
This paper presents a code-clone detection and its analysis method, based on an execution-semantic and arbitrary-granularity model[8] of code fragments. The principal goal of introducing the proposed detection method is to provide a code-clone detection method suitable for programming languages, where software developers can define their own “control sentences” with such as lambda or lazy evaluation. Code clones detected with the proposed method are a kind of type-3 clone, where code fragments exist across boundaries of procedures or modules. The model also seems useful as clone metrics (for a clone triage) based on the contents and contexts of code fragments in a clone class and extensible to a unified method of code-clone detection and code search. This paper introduces an execution-semantic and content-and-context based code clone, describes its definition, a detection method, an analysis method, and a prototype implementation of a tool chain, which was applied to two open-source products as an preliminary empirical evaluation.