Code Clone Detection: Techniques for Revealing Code Clones
P Vijay Bhaskar, Geetika Geetika · 2025
In the era of AI, code clone has become a critical issue in globe for educational institutes and for software industry as well. Code clone detection plays a critical role in maintaining software quality, ensuring efficient code reuse, and identifying potential maintenance challenges in large codebases. Despite numerous approaches to detecting code similarity, existing methods often struggle with scalability and accuracy, particularly when distinguishing between exact and modified clones. The proposed work demonstrates a unified approach for detection of code clones by leveraging tokenization and sequence matcher. In Python programming language, code is example used through sequenced tokenization and where similarity via Sequence Matcher is applied. The effectiveness of the proposed method is tested on a set of Python scripts, from which it distinguishes exact and modified clones with high accuracy and completeness of results. The results include table of comparing the performance of different algorithms in terms of accuracy, precision, recall, and F1 score and histogram of clone similarity. The results prove that the approach yields high accuracy in detecting code clones, and has the potential to overshadow several traditional methods including the fact that it can identify code clones with structural modifications. This work advances line by line the on-going effort to improve and define the methods of code clone detection with relevance to automated code evaluation and information update.