Detecting Duplications in Sequence Diagrams Based on Suffix Trees

Hui Liu,Zhiyi Ma,Lu Zhang,Weizhong Shao
DOI: https://doi.org/10.1109/apsec.2006.32
2006-01-01
Abstract:With the popularity of UML and MDA, models are re- placing source code as core artifacts of software devel- opment and maintenance. But duplications in models re- duce models' maintainability and reusability. To address the problem, we should detect duplications first. As an ini- tial step to address the problem, we propose an approach to detect duplications in sequence diagrams. With special pre- processing, we convert 2-dimensional sequence diagrams into a 1-dimensional array. Then we construct a suffix tree of the array. We revise the traditional construction algo- rithm of suffix trees by proposing a special algorithm to detect common prefixes of suffixes. The algorithm ensures that every duplication detected with the suffix tree can be extracted into a separate reusable sequence diagram. With the suffix tree, duplications are found as refactoring candi- dates. With tool support, the proposed approach has been applied to real industrial projects, and the evaluation re- sults suggest that the approach is effective.
What problem does this paper attempt to address?