CloneSet427


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
46201.000statement_sequence[7]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
146109
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java
246248
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
Clone Instance
1
Line Count
46
Source Line
109
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java

        if (isPrivate()) {
                // answer true if the receiverType is the declaringClass
                // AND the invocationType and the declaringClass have a common enclosingType
                receiverCheck: {
                        if (receiverType != declaringClass) {
                                // special tolerance for type variable direct bounds
                                if (receiverType.isTypeVariable() && ((TypeVariableBinding) receiverType).isErasureBoundTo(declaringClass.erasure()))
                                        break receiverCheck;
                                return false;
                        }
                }

                if (invocationType != declaringClass) {
                        ReferenceBinding outerInvocationType = invocationType;
                        ReferenceBinding temp = outerInvocationType.enclosingType();
                        while (temp != null) {
                                outerInvocationType = temp;
                                temp = temp.enclosingType();
                        }

                        ReferenceBinding outerDeclaringClass = (ReferenceBinding) declaringClass.erasure();
                        temp = outerDeclaringClass.enclosingType();
                        while (temp != null) {
                                outerDeclaringClass = temp;
                                temp = temp.enclosingType();
                        }
                        if (outerInvocationType != outerDeclaringClass) return false;
                }
                return true;
        }

        // isDefault()
        PackageBinding declaringPackage = declaringClass.fPackage;
        if (invocationType.fPackage != declaringPackage) return false;

        // receiverType can be an array binding in one case... see if you can change it
        if (receiverType instanceof ArrayBinding)
                return false;
        ReferenceBinding currentType = (ReferenceBinding) receiverType;
        do {
                if (declaringClass == currentType) return true;
                PackageBinding currentPackage = currentType.fPackage;
                // package could be null for wildcards/intersection types, ignore and recurse in superclass
                if (currentPackage != null && currentPackage != declaringPackage) return false;
        }
        while (  (currentType = currentType.superclass()) != null);
        return false;


Clone Instance
2
Line Count
46
Source Line
248
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java

        if (isPrivate()) {
                // answer true if the receiverType is the declaringClass
                // AND the invocationType and the declaringClass have a common enclosingType
                receiverCheck: {
                        if (receiverType != declaringClass) {
                                // special tolerance for type variable direct bounds
                                if (receiverType.isTypeVariable() && ((TypeVariableBinding) receiverType).isErasureBoundTo(declaringClass.erasure()))
                                        break receiverCheck;
                                return false;
                        }
                }

                if (invocationType != declaringClass) {
                        ReferenceBinding outerInvocationType = invocationType;
                        ReferenceBinding temp = outerInvocationType.enclosingType();
                        while (temp != null) {
                                outerInvocationType = temp;
                                temp = temp.enclosingType();
                        }

                        ReferenceBinding outerDeclaringClass = (ReferenceBinding) declaringClass.erasure();
                        temp = outerDeclaringClass.enclosingType();
                        while (temp != null) {
                                outerDeclaringClass = temp;
                                temp = temp.enclosingType();
                        }
                        if (outerInvocationType != outerDeclaringClass) return false;
                }
                return true;
        }

        // isDefault()
        PackageBinding declaringPackage = declaringClass.fPackage;
        if (invocationType.fPackage != declaringPackage) return false;

        // receiverType can be an array binding in one case... see if you can change it
        if (receiverType instanceof ArrayBinding)
                return false;
        ReferenceBinding currentType = (ReferenceBinding) receiverType;
        do {
                if (declaringClass == currentType) return true;
                PackageBinding currentPackage = currentType.fPackage;
                // package could be null for wildcards/intersection types, ignore and recurse in superclass
                if (currentPackage != null && currentPackage != declaringPackage) return false;
        }
        while (  (currentType = currentType.superclass()) != null);
        return false;


Clone AbstractionParameter Count: 0Parameter Bindings

if (isPrivate()) {
  // answer true if the receiverType is the declaringClass
  // AND the invocationType and the declaringClass have a common enclosingType
  receiverCheck: {
    if (receiverType != declaringClass) {
      // special tolerance for type variable direct bounds
      if (receiverType.isTypeVariable() && ((TypeVariableBinding) receiverType).isErasureBoundTo(declaringClass.erasure()))
        break receiverCheck;
      return false;
    }
  }
  if (invocationType != declaringClass) {
    ReferenceBinding outerInvocationType = invocationType;
    ReferenceBinding temp = outerInvocationType.enclosingType();
    while (temp != null) {
      outerInvocationType = temp;
      temp = temp.enclosingType();
    }
    ReferenceBinding outerDeclaringClass = (ReferenceBinding) declaringClass.erasure();
    temp = outerDeclaringClass.enclosingType();
    while (temp != null) {
      outerDeclaringClass = temp;
      temp = temp.enclosingType();
    }
    if (outerInvocationType != outerDeclaringClass)
      return false;
  }
  return true;
}
// isDefault()
PackageBinding declaringPackage = declaringClass.fPackage;
if (invocationType.fPackage != declaringPackage)
  return false;
// receiverType can be an array binding in one case... see if you can change it
if (receiverType instanceof ArrayBinding)
  return false;
ReferenceBinding currentType = (ReferenceBinding) receiverType;
do {
  if (declaringClass == currentType)
    return true;
  PackageBinding currentPackage = currentType.fPackage;
  // package could be null for wildcards/intersection types, ignore and recurse in superclass
  if (currentPackage != null && currentPackage != declaringPackage)
    return false;
}
while ((currentType = currentType.superclass()) != null);
return false;
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None