Detecting Duplications in Sequence Diagrams Based on Suffix Trees

  • Authors:
  • Hui Liu;Zhiyi Ma;Lu Zhang;Weizhong Shao

  • Affiliations:
  • Peking University, Beijing 100871, China;Peking University, Beijing 100871, China;Peking University, Beijing 100871, China;Peking University, Beijing 100871, China

  • Venue:
  • APSEC '06 Proceedings of the XIII Asia Pacific Software Engineering Conference
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

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.