The final, formatted version of the article will be published soon.
ORIGINAL RESEARCH article
Front. Comput. Sci.
Sec. Software
Volume 6 - 2024 |
doi: 10.3389/fcomp.2024.1455860
This article is part of the Research Topic Software Engineering and Intelligent Systems View all articles
CodeGuard: Enhancing Accuracy in Detecting Clones within Java Source Code
Provisionally accepted- Tsinghua University, Beijing, China
Detecting code clones remains challenging, particularly for Type-II clones, with modified identifiers, and Type-III ST and MT clones, where up to 30% and 50% of code, respectively, are added or removed from the original clone code. To address this, we introduce CodeGuard, an innovative technique that employs comprehensive level-by-level abstraction for Type-II clones and a flexible signature matching algorithm for Type-III clone categories. This method requires at least 50% similarity within two corresponding chunks within the same file, ensuring accurate clone identification. Unlike recently proposed methods limited to clone detection, CodeGuard precisely pinpoints changes within clone files, facilitating effective debugging and thorough code analysis. It is validated through comprehensive evaluations using reputable datasets, CodeGuard demonstrates superior precision, high recall, robust F1 scores, and outstanding accuracy. This innovative methodology not only sets new performance standards in clone detection but also emphasizes the role CodeGuard's can play in modern software development, paving the way for advancements in code quality and maintenance.
Keywords: Code clone detection, Clone Identi-fication, software reliability, code quality assurance, Software reuse
Received: 27 Jun 2024; Accepted: 06 Nov 2024.
Copyright: © 2024 GLANI and Ping. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
* Correspondence:
YASIR GLANI, Tsinghua University, Beijing, China
Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.