CloneSet394


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
25210.990statement_sequence_member
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12576
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java
225165
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java
Clone Instance
1
Line Count
25
Source Line
76
Source File
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;
                                                }
                                      }
                        }


Clone Instance
2
Line Count
25
Source Line
165
Source File
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 = 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;
                                                }
                                      }
                        }


Clone AbstractionParameter Count: 1Parameter Bindings

// 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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b68f2a00]]
environment 
12[[#b68f2a00]]
parameterizedDeclaringClass.environment