Various methods for Measuring Similarity and code clone detection - Kaur, Gagandeep; Kaur, Bikrampal (International Journal of Computer Sciences and Engineering, 2025)
Code clones means duplicate fragments of source code, have been identified as “a major source of faults, which means that duplicating can be a considerable problem during development and maintenance”. As a consequence, a large body of planned has been industrialized on how to prevent, or spot and remove code clones. The problem with code clones is that they are related only by their resemblance, i.e., implicitly rather than explicitly which makes it difficult to notice them. Therefore, changes like promotions or patches that are often meant to affect all clones in a similar way are frequently not applied to all of them uniformly. Code clone helps the developers from probable mistakes, to save time and exertion in planning the logic, to help in decoupling of classes or components and more important it reduces development cost. But identical code is generally considered as unwanted for number of reasons. Introduction of bad design and lack of good legacy structure or concept may be caused due to code clones. Probably the biggest problem in model clone detection is defining exactly what a model clone is just as for code clones a small part of a domain model of the “Library Management System”.