One of the current false-positives the CloneDetector produces is that the statements a < b ? b and b < a ? b are considered clones of each other, even though they represent two different kinds of algorithms. The reason for this is that the StmtDataCollector ignores variable names when collecting data, so that two clones that only differ in the names of the referenced variables are considered clones. The pattern in which they are referenced however is not taken into aspect so far and causes the mentioned false-positive.
This patch introduces a filter that removes clones which don't have the same variable pattern which prevents these kinds of false-positives.
It should be noted that this is intentionally done after the clones are grouped together by their collected data vector because another planned feature will find clones that explicitly violate the variable patterns of each other.