| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 25 | 2 | 1 | 0.990 | statement_sequence_member |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 25 | 76 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java |
| 2 | 25 | 165 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java |
| ||||
// initialize new variable bounds
for (int i = 0; i < length; i++) {
TypeVariableBinding originalVariable = originalVariables[i];
TypeVariableBinding substitutedVariable = substitutedVariables[i];
TypeBinding substitutedSuperclass = Scope.substitute(substitution, originalVariable.superclass);
ReferenceBinding[] substitutedInterfaces = Scope.substitute(substitution, originalVariable.superInterfaces);
if (originalVariable.firstBound != null) {
substitutedVariable.firstBound = originalVariable.firstBound == originalVariable.superclass ?
substitutedSuperclass // could be array type or interface
: substitutedInterfaces[0];
}
switch (substitutedSuperclass.kind()) {
case Binding.ARRAY_TYPE:
substitutedVariable.superclass = parameterizedDeclaringClass.environment.getResolvedType(JAVA_LANG_OBJECT, null);
substitutedVariable.superInterfaces = substitutedInterfaces;
break;
default:
if (substitutedSuperclass.isInterface()) {
substitutedVariable.superclass = parameterizedDeclaringClass.environment.getResolvedType(JAVA_LANG_OBJECT, null);
int interfaceCount = substitutedInterfaces.length;
System.arraycopy(substitutedInterfaces, 0, substitutedInterfaces = new ReferenceBinding[interfaceCount + 1], 1, interfaceCount);
substitutedInterfaces[0] = (ReferenceBinding) substitutedSuperclass;
substitutedVariable.superInterfaces = substitutedInterfaces;
}
else {
substitutedVariable.superclass = (ReferenceBinding) substitutedSuperclass; // typeVar was extending other typeVar which got substituted with interface
substitutedVariable.superInterfaces = substitutedInterfaces;
}
}
}
|
| ||||
// initialize new variable bounds
for (int i = 0; i < length; i++) {
TypeVariableBinding originalVariable = originalVariables[i];
TypeVariableBinding substitutedVariable = substitutedVariables[i];
TypeBinding substitutedSuperclass = Scope.substitute(substitution, originalVariable.superclass);
ReferenceBinding[] substitutedInterfaces = Scope.substitute(substitution, originalVariable.superInterfaces);
if (originalVariable.firstBound != null) {
substitutedVariable.firstBound = originalVariable.firstBound == originalVariable.superclass ?
substitutedSuperclass // could be array type or interface
: substitutedInterfaces[0];
}
switch (substitutedSuperclass.kind()) {
case Binding.ARRAY_TYPE:
substitutedVariable.superclass = environment.getResolvedType(JAVA_LANG_OBJECT, null);
substitutedVariable.superInterfaces = substitutedInterfaces;
break;
default:
if (substitutedSuperclass.isInterface()) {
substitutedVariable.superclass = environment.getResolvedType(JAVA_LANG_OBJECT, null);
int interfaceCount = substitutedInterfaces.length;
System.arraycopy(substitutedInterfaces, 0, substitutedInterfaces = new ReferenceBinding[interfaceCount + 1], 1, interfaceCount);
substitutedInterfaces[0] = (ReferenceBinding) substitutedSuperclass;
substitutedVariable.superInterfaces = substitutedInterfaces;
}
else {
substitutedVariable.superclass = (ReferenceBinding) substitutedSuperclass; // typeVar was extending other typeVar which got substituted with interface
substitutedVariable.superInterfaces = substitutedInterfaces;
}
}
}
|
| |||
// initialize new variable bounds
for (int i = 0; i < length; i++) {
TypeVariableBinding originalVariable = originalVariables[i];
TypeVariableBinding substitutedVariable = substitutedVariables[i];
TypeBinding substitutedSuperclass = Scope.substitute(substitution, originalVariable.superclass);
ReferenceBinding[] substitutedInterfaces = Scope.substitute(substitution, originalVariable.superInterfaces);
if (originalVariable.firstBound != null) {
substitutedVariable.firstBound = originalVariable.firstBound == originalVariable.superclass ? substitutedSuperclass // could be array type or interface
: substitutedInterfaces[0];
}
switch (substitutedSuperclass.kind()) {
case Binding.ARRAY_TYPE:
substitutedVariable.superclass = [[#variableb68f2a00]].getResolvedType(JAVA_LANG_OBJECT, null);
substitutedVariable.superInterfaces = substitutedInterfaces;
break;
default:
if (substitutedSuperclass.isInterface()) {
substitutedVariable.superclass = [[#variableb68f2a00]].getResolvedType(JAVA_LANG_OBJECT, null);
int interfaceCount = substitutedInterfaces.length;
System.arraycopy(substitutedInterfaces, 0, substitutedInterfaces = new ReferenceBinding[interfaceCount + 1], 1, interfaceCount);
substitutedInterfaces[0] = (ReferenceBinding) substitutedSuperclass;
substitutedVariable.superInterfaces = substitutedInterfaces;
}
else {
substitutedVariable.superclass = (ReferenceBinding) substitutedSuperclass; // typeVar was extending other typeVar which got substituted with interface
substitutedVariable.superInterfaces = substitutedInterfaces;
}
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b68f2a00]] | environment |
| 1 | 2 | [[#b68f2a00]] | parameterizedDeclaringClass.environment |