Back to Table of Contents

Textual filtering

Textual filtering allows to remove clones that are only structurally similar without having any semantic similariy. For each clone class, VisCad determines the clone fragment that maximizes the sum of the textual similarity to all other fragments of that class. We call this fragment as the ‘leading clone fragment’ for that class. If the textual similarity between the ‘leading clone fragment’ and any other clone fragment in the clone class falls below a given threshold value, we remove the fragment from the analysis. We discard an entire clone class from the analysis when the textual similarities between the leading clone fragment and all other non-leading clone fragments of that clone class fall below the threshold value.

Make the selection

Select the Clone Classes node from the Clone Class Tree. Right click on it to bring the popup menu and select the Filter Clone Class option. This open the similarity browser view.

Similarity Browser View

Filter the result

Filter the result(Continued)

VisCad saves the filtered clone detection result in VisCad input file format.