A Framework for Clone Detection in UML Models (UMCD)
Ayesha Irshad, Farooque Azam, Muhammad Waseem Anwar · 2024
Clone detection plays a vital role in managing the quality and maintainability of software systems. In the process of software development, the initial phase is to specify and visualize the software design using UML models. These models serve as a blueprint to guide through all the phases of the software development process. Therefore, if there are clones in these UML models they will induce clones in further stages of software development as well. Subsequently, these clones will propagate and amplify the clone-related issues throughout the software development process. For this reason, detection, tracking, and removal of the clones in UML models is as crucial as in code. Furthermore, Model Driven Software Engineering (MDSE) aims to automatically generate code from models such as UML models. Consequently, increasing the importance of Model clone detection. This study focuses on the application of Natural Language Processing (NLP) to detect clones within UML models especially targeting UML state-machine models. Initially, a UML model is created, and exported in XML format, to represent the model in textual form. Since the XML code of UML diagrams carries a lot of structural information that is irrelevant for clone detection and is also not balanced. Therefore, the XML code is parsed to extract the relevant features of the model. The extracted features are further preprocessed to represent them in a suitable format. Furthermore, the extracted data is labeled to represent clone and nonclone pairs. Moreover, for the detection of clones Natural Language processing techniques are used since, UML models have a lot of textual information e.g., names of elements, constraints, etc. Therefore, NLP techniques can efficiently identify duplicates in UML Models. The proposed framework is applied to several case studies. These case studies validate the effectiveness of our approach in model clone detection.