Viewing simple clones from structural clones' perspective

Hamid Abdul Basit, Usman Ali, Stan Jarzabek · 2011

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.

Read the paper · More papers on PaperTik