On the Relationships between Domain-Based Coupling and Code Clones: An Exploratory Study

Author(s): Rahman, M.S. ; Aryani, A. ; Roy, C.K. ; Perin, F.
Venue: Internation Conference on Software Engineering, San Francisco, CA
Date: 2013

Type of Experiement: Other
Data Collection Method: Code Metric


This paper seeks to prove that coupling at the domain level can approximate clones in the source code. Code clones constitute a significant fraction of code (7% to 23%) and it is important to be aware of clones for maintenance. Duplicate code can propagate bugs and new bugs can arise due to inconsistent updates. Tools have been proposed, however cross-language and source code independent code analysis are still open research challenges. The authors of the paper were able to to achieve a 90% probability of finding code clones where there is domain-based coupling.

Instead of reviewing an exhaustive list of all clones in the system, it is more useful to have a short list of higher abstraction level components that most likely contain code clones. The maintainers can then confidently look at those selected components for their intended task. Using domain-based coupling one can provide such a short list based on the top most coupled UICs, and which might in turn help in prioritizing the components to work on.