| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 46 | 2 | 0 | 1.000 | statement_sequence[7] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 46 | 109 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java |
| 2 | 46 | 248 | 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;
|
| ||||
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;
|
| |||
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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| None | |||