## 1 Introduction  
Developers often develop software using copied and modified existing code fragments, referred to as \"code clone\" or simply \"clone\" [1, 2]. These code fragments can ultimately make the code larger, more complex, and more challenging to maintain. According to some research, between 20% and 59% of all source code is duplicated [3, 4, 5]. The 'clone-and-own' approach, in which preexisting code fragments are used to fulfill new requirements, is widely employed when a new software system is similar but not identical to an existing system. While this method does allow for the rapid and cost-effective development of software systems, code clones can render it more difficult to maintain a system, and they result in the copying of subtle errors across systems [6, 7]. Once a bug is found in a clone, it has to be checked everywhere that clone was deployed, and any modifications have to be repeated across all systems. This can increase the costs associated with the development and maintenance of large-scale software systems. When cloned code fragments are not searched for, identified, and possibly refactored, the same bug (and adverse effects) will be repeated across software systems. According to [PERSON] et al. [1] and [PERSON] et al. [2], code clones can be divided into four types: \"an exact copy without modifications (Type 1, T1)\", \"a structurally and syntactically identical fragments except variable, type, or function identifiers (Type 2, T2)\", \"a copied fragments with further modifications in which statements were changed, added, or removed (Type 3, T3)\", and \"code fragments that perform the same computation but are implemented by different syntactic variants (Type 4, T4).\" Known clone detection techniques are text-based, token-based, tree-based, Program-Dependent Graph (PDG) based, or metric-based [8, 9]. Existing clone detection techniques perform well when tested against types T1 and T2, but the detection rate is relatively low for types T3 and T4. Furthermore, because these techniques are designed only for clone detection, they do not provide information about what category the detected clones fall into. As actual code may contain various types of clone code, each technique's performance must be confirmed to detect each clone type reliably. Furthermore, if clone detection is to lead to refactoring, all clone types must be identifiable. Clone-type information thus helps with decisions as about whether removing clones or process changes, such as modifying coding guidelines, should be made [10]. Finally, the ability to identify clones by type is an essential step towards automated refactoring systems. Though not all clones are suitable for refactoring as some clones may be beneficial [11], investigating clone types helps to visualize clone genealogies that need to be refactored and those that do not [12]. In his paper, we propose a two-pass technique for clone detection and type classification using a Tree-Based Convolutional Neural Network (TBCNN), which can capture structural features with short propagation path and achieves comparable performance to word-by-word attention models [13]. TBCNN is efficient for structural learning because its propagation length between input and output layers is fixed and independent of the tree size. We tested the performance of this technique against all four clone types and presented its accuracy at identifying each. Our technique does not classify the clone type directly with a code fragment's Abstract Syntax Tree (AST). Rather, our technique detects clones on the first pass and then determines the clone type on the second pass. Both the first and second pass use the TBCNN to extract features from the code fragments' ASTs to be compared [14]. To verify the performance of the two-pass technique, we used the BigCloneBench dataset [15], a well-known dataset widely used by researchers. The proposed technique's clone detection performance was 96% (recall), 96% (precision), and 95% (F1 score).