This paper presents the design and implementation of CD-Form (Clone Detector based on FORmal Methods), a tool targeted at the detection of Type-2 clones in Java code. CD-Form is based on a novel approach for detecting code clones. The methodology adopted performs the analysis on Java bytecode and not on the original Java source. The bytecode is transformed into CCS (Calculus of Communicating Systems) processes, which are successively checked for equivalence. After a thorough description of the methodology used for detecting clones, the design of the tool is presented. The results obtained by evaluating sample Java codes are validated by comparing them to those obtained by a state-of-the-art tool for clone detection.
CD-Form, proposed by Cuomo et al. REF , converted the Java bytecode to the calculus of communicating systems format, and detected code clones on the method level.
CD-Form: A Clone Detector based on Formal Methods
Sci. Comput. Program.
Sci. Comput. Program.
Computer Science