Abstract Code clone detection has garnered significant attention across various fields, including code refactoring, plagiarism detection, and software maintenance. Numerous methods have been proposed for detecting code clones; however, while text-based and token-based approaches are scalable, they often fail to consider code semantics and are unable to effectively handle semantic code clones. Although tree-based methods perform well in semantic code clone detection, they are limited by the complex structure of trees, making it challenging to apply to large-scale clone detection. Moreover, these methods struggle to achieve fine-grained semantic code clone detection, lacking the ability to pinpoint specific code blocks within semantic clones. In this paper, we propose Rator , a tree-based code clone detector that combines scalability and fine-grained analysis capabilities while effectively detecting semantic clones. Specifically, we design a tree encoding method based on node degrees of freedom, which can transform complex tree structures into simple vector representations while preserving the structural d
📖 افتح في inklap 🔗 DOI 📮 اطلب بحثاً