Detection and Analysis of Clones in UML Class Models Dhavleesh Rattan (1), Rajesh Bhatia (2), and Maninder Singh (3) (1) Department of Computer Engineering. Punjabi University (India) E-mail: dhavleesh@rediffmail.com (2) Department of Computer Science and Engineering. PEC University of Technology (India) E-mail: rbhatiapatiala@gmail.com (3) Computer Science and Engineering Department. Thapar University (India) E-mail: msingh@thapar.edu ABSTRACT It is quite frequent to copy and paste code fragments in software development. The copied source code is called a software clone and the activity is referred to as code cloning. The presence of code clones hamper maintenance and may lead to bug propagation. Now-a-days, model driven development has become a standard industry practice. Duplicate parts in models i.e. model clones pose similar challenges as in source code. This paper presents an approach to detect clones in Unified Modeling Language class models. The core of our technique is the construction of a labeled, ranked tree corresponding to the UML class model where attributes with their data types and methods with their signatures are represented as subtrees. By grouping and clustering of repeating subtrees, the tool is able to detect duplications in a UML class model at different levels of granularity i.e. complete class diagram, attributes with their data types and methods with their signatures across the model and cluster of such attributes/methods. We propose a new classification of model clones with the objective of detecting exact and meaningful clones. Empirical evaluation of the tool using open source reverse engineered and forward designed models show some interesting and relevant clones which provide useful insights into software modeling practice. Keywords: Maintenance, Model clone, Model clone detection, UML Class models, Reverse Engineering. 1- INTRODUCTION AND MOTIVATION Now-a-days modeling is playing a significant role in industries of different domains like automotive domain, web based applications and other complex systems [1]. Model driven software development using Unified Modeling Language (UML) improves the quality of product delivery and analysis of the product [2]. UML models bring in extra advantages of automatic code generation, early verification and validation [2]. Since modeling has been accepted as best practice, UML class models may also be analyzed for the presence of clones. Detection and Analysis of Clones in UML Rattan, Bhatia, and Singh 69