On the Relationships Between Domain-based Coupling and Code Clones: An Exploratory Study

Published:

Md Saidur Rahman, Amir Aryani, Chanchal K. Roy, and Fabrizio Perin, "On the Relationships Between Domain-based Coupling and Code Clones: An Exploratory Study", IEEE/ACM 35th International conference on Software Engineering (ICSE) (NIER Track), pp. 1265-1268, 2013, San Francisco, CA, USA. Preprint Published


Abstract

Knowledge of similar code fragments, also known as code clones, is important to many software maintenance activities including bug fixing, refactoring, impact analysis and program comprehension. While a great deal of research has been conducted for finding techniques and implementing tools to identify code clones, little research has been done to analyze the relationships between code clones and other aspects of software. In this paper, we attempt to uncover the relationships between code clones and coupling among domain-level components. We report on a case study of a large-scale open source enterprise system, where we demonstrate that the probability of finding code clones among components with domain-based coupling is more than 90%. While such a probabilistic view does not replace a clone detection tool per se, it certainly has the potential to complement the existing tools by providing the probability of having code clones between software components. For example, it can both reduce the clone search space and provide a flexible and language independent way of focusing only on a specific part of the system. It can also provide a higher level of abstraction to look at the cloning relationships among software components.