Twin-Finder: Integrated Reasoning Engine for Pointer-Related Code Clone Detection

Hongfa Xue,Yongsheng Mei,Kailash Gogineni,Tian Lan,Guru Venkataramani
DOI: https://doi.org/10.1109/iwsc50091.2020.9047638
2020-02-01
Abstract:Detecting code clones is crucial in various software engineering tasks. In particular, code clone detection can have significant uses in the context of analyzing and fixing bugs in large scale applications. However, prior works, such as machine learning-based clone detection, may cause a considerable amount of false positives. In this paper, we propose Twin-Finder, a novel, closed-loop approach for pointer-related code clone detection that integrates machine learning and symbolic execution techniques to achieve precision. Twin-Finder introduces a clone verification mechanism to formally verify if two clone samples are indeed clones and a feedback loop to automatically generated formal rules to tune machine learning algorithm and further reduce the false positives. Our experimental results show that Twin-Finder can swiftly identify up 9× more code clones comparing to a tree-based clone detector, Deckard and remove an average 91.69% false nositives.
What problem does this paper attempt to address?