Abstract
dc:description.abstractCode clones are code fragments that share syntactic or semantic similarities. Clones arise when software engineers modify or adapt preexisting codes inside or between codebases to reuse them. It incurs a negative impact and, hence, is crucial for a wide range of software maintenance tasks. Thus, a lot of research focuses on identifying clones and comprehending how they affect current software systems. With the rise of deep learning, clone detection techniques have witnessed high performance but they often lack consistent evaluation, leading to an inaccurate assessment of their true potential. Furthermore, the scarcity of cross-language clone data hinders language-agnostic model development in the era of multi-language development. In addition to these difficulties, future clones become pivotal because they affect how software evolves. In this thesis, we set out to alleviate these challenges through a multi-faceted approach, encompassing a thorough evaluation of existing techniques, improvements in cross-language clone detection, and the development of predictive models for forecasting future clones. At first, we propose a multi-step evaluation approach of the state-of-the-art deep learning models for clone detection. We evaluated three single-language models (ASTNN, CodeBERT, GMN) and two cross-language models (CLCDSA, C4) on benchmarks such as BigCloneBench, SemanticCloneBench, GPTCloneBench and CLCDSA dataset. Moreover, we assessed the models' robustness through random perturbations exploiting mutation operations on SemanticCloneBench. We found that single-language models' performances drop drastically on semantic clones whereas the language-agnostic model (C4) has a more robust performance. Then, we introduced a data augmentation technique for cross-language clone detection models leveraging a pre-trained transcompiler. Experimental results showed that this approach improves the performance of cutting-edge cross-language clone detection models. We also proposed a pipeline to adapt a single-language model (GMN) by leveraging a transcompiler for cross-language clone detection. Subsequently, based on this idea, we released a language-agnostic clone detector, TransClone. Furthermore, we propose a novel approach to predict future syntactic clones. Our experiments showed that CodeBERT, fine-tuned on the existing cloned and non-cloned fragments performs highly in predicting future clone-prone code fragments. We also demonstrate that it is possible to reliably forecast the future file where such clone-prone fragments will be cloned. Our findings yield an efficient evaluation strategy, enhancement of cross-language clone detection models in a low-resource environment, and transfer-learning models for forecasting future clones.
Degree
thesis:*- Name thesis:degree_name
- Master of Science (M.Sc.)
- Level thesis:degree_level
- Masters
- Discipline thesis:degree_discipline
- Computer Science
- Department thesis:degree_department
- Computer Science
- Grantor
- University of Saskatchewan
- Year dc:date.issued
- 2024
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Pinku, Subroto Nag
- Advisors dc:contributor.advisor
-
- Roy, Chanchal K.
- Mondal, Debajyoti
- Committee members dc:contributor.committeemember
-
- Roy, Banani
- Stakhanova, Natalia
- ORCID person:identifier.orcid
Subjects
dc:subject × 14Rights
- Language dc:language.iso
- en
Identifiers
dc:identifier.*- Handle dc:identifier.uri
- https://hdl.handle.net/10388/15503