Skip to Main Content
Code clone is a prevalent activity during the development of softwares. However, it is harmful to the maintenance and evolution of softwares. Current techniques for detecting code clones are most syntax-based, and cannot detect all code clones. In this paper, we present a novel semantic-based clone detection technique by obtaining the similarity about the precondition and post condition of each procedure, which are computed by a context and field sensitive fix point iteration algorithm based on modular heap abstraction in heap-manipulating programs. Experimental evaluation about a set of C benchmark programs shows that the proposed approach can be scalable to detect various clones that existing syntax-based clone detectors have missed.