Viewing simple clones from structural clones' perspective

  • Authors:
  • Hamid Abdul Basit;Usman Ali;Stan Jarzabek

  • Affiliations:
  • Lahore University of Management Sciences, Pakistan, Pakistan;Lahore University of Management Sciences, Pakistan, Pakistan;National University of Singapore, Singapore, Singapore

  • Venue:
  • Proceedings of the 5th International Workshop on Software Clones
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

In previous work, we described a technique for detecting designlevel similar program structures that we called structural clones. Structural clones are recurring configurations of simple clones (i.e., similar code fragments). In this paper, we show how structural clone analysis extends the benefits of analysis based on simple clones only. First, we present experimental results showing that in many cases simple clones participated in structural clones. In such cases, structural clones being larger than simple clones but smaller in number, allow analysts to see the "forest from the trees", as far as the similarity situation is concerned. We provide arguments and examples to show how the knowledge of structural clones - their location and exact similarities and differences - helps in program understanding, design recovery, maintenance, and refactoring.