public ClonesRelativeLocation getClonesRelativeLocation() {
Set<String> uniqueCloneCodeFragmentsSourceFiles = new HashSet<String>();
Set<String> uniqueCloneMethodIMethods = new HashSet<String>();
for (CloneInstance instance : cloneInstances) {
uniqueCloneCodeFragmentsSourceFiles.add(instance.getLocationInfo().getContainingFilePath());
<BUG>uniqueCloneMethodIMethods.add(instance.getIMethodSignature());
}</BUG>
if (uniqueCloneCodeFragmentsSourceFiles.size() == 1) {
if (uniqueCloneMethodIMethods.size() == 1) {
return ClonesRelativeLocation.WITHIN_THE_SAME_METHOD;

public ClonesRelativeLocation getClonesRelativeLocation() {
Set<String> uniqueCloneCodeFragmentsSourceFiles = new HashSet<String>();
Set<String> uniqueCloneMethodIMethods = new HashSet<String>();
for (CloneInstance instance : cloneInstances) {
uniqueCloneCodeFragmentsSourceFiles.add(instance.getLocationInfo().getContainingFilePath());
uniqueCloneMethodIMethods.add(instance.getContainingClassFullyQualifiedName() + "#" +
instance.getMethodName() + ":" +
instance.getIMethodSignature());
}
if (uniqueCloneCodeFragmentsSourceFiles.size() == 1) {
if (uniqueCloneMethodIMethods.size() == 1) {
return ClonesRelativeLocation.WITHIN_THE_SAME_METHOD;
