CloneSet445


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
32250.982class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1324176
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
2314451
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
Clone Instance
1
Line Count
32
Source Line
4176
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java

public void invokestatic(MethodBinding methodBinding) {
        if (DEBUG) System.out.println(position + "\t\tinvokestatic:" + methodBinding); //$NON-NLS-1$
        // initialized to 0 to take into account that there is no this for
        // a static method
        countLabels = 0;
        int argCount = 0;
        int id;
        if (classFileOffset + 2 >= bCodeStream.length) {
                resizeByteArray();
        }
        position++;
        bCodeStream[classFileOffset++ ] = Opcodes.OPC_invokestatic;
        writeUnsignedShort(
                constantPool.literalIndexForMethod(
                        methodBinding.constantPoolDeclaringClass().constantPoolName(), 
                        methodBinding.selector, 
                        methodBinding.signature(), 
                        false                     ));
        for (int i = methodBinding.parameters.length - 1; i >= 0; i--)
                if (((id = methodBinding.parameters[i].id) == TypeIds.T_double) || (id == TypeIds.T_long))
                        argCount += 2;
                else
                        argCount += 1;
        if (((id = methodBinding.returnType.id) == TypeIds.T_double) || (id == TypeIds.T_long))
                stackDepth += (2 - argCount);
        else
                if (id == TypeIds.T_void)
                        stackDepth -= argCount;
                else
                        stackDepth += (1 - argCount);
        if (stackDepth > stackMax)
                stackMax = stackDepth;
}


Clone Instance
2
Line Count
31
Source Line
4451
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java

public void invokevirtual(MethodBinding methodBinding) {
        if (DEBUG) System.out.println(position + "\t\tinvokevirtual:" + methodBinding); //$NON-NLS-1$
        // initialized to 1 to take into account this  immediately
        countLabels = 0;
        int argCount = 1;
        int id;
        if (classFileOffset + 2 >= bCodeStream.length) {
                resizeByteArray();
        }
        position++;
        bCodeStream[classFileOffset++ ] = Opcodes.OPC_invokevirtual;
        writeUnsignedShort(
                constantPool.literalIndexForMethod(
                        methodBinding.constantPoolDeclaringClass().constantPoolName(), 
                        methodBinding.selector, 
                        methodBinding.signature(), 
                        false                     ));
        for (int i = methodBinding.parameters.length - 1; i >= 0; i--)
                if (((id = methodBinding.parameters[i].id) == TypeIds.T_double) || (id == TypeIds.T_long))
                        argCount += 2;
                else
                        argCount++;
        if (((id = methodBinding.returnType.id) == TypeIds.T_double) || (id == TypeIds.T_long))
                stackDepth += (2 - argCount);
        else
                if (id == TypeIds.T_void)
                        stackDepth -= argCount;
                else
                        stackDepth += (1 - argCount);
        if (stackDepth > stackMax)
                stackMax = stackDepth;
}


Clone AbstractionParameter Count: 5Parameter Bindings

public void [[#variablec11815e0]](MethodBinding methodBinding) {
  if (DEBUG)
    System.out.println(position +  [[#variablec1181560]] + methodBinding); //$NON-NLS-1$
  // initialized to 0 to take into account that there is no this for
  // a static method
  // initialized to 1 to take into account this  immediately
  countLabels = 0;
  int argCount = [[#variablec11814e0]];
  int id;
  if (classFileOffset + 2 >= bCodeStream.length) {
    resizeByteArray();
  }
  position++;
  bCodeStream[classFileOffset++ ] = Opcodes. [[#variablec1181440]];
  writeUnsignedShort(constantPool.literalIndexForMethod(methodBinding.constantPoolDeclaringClass().constantPoolName(), methodBinding.selector, methodBinding.signature(), false));
  for (int i = methodBinding.parameters.length - 1; i >= 0; i--)
    if (((id = methodBinding.parameters[i].id) == TypeIds.T_double) || (id == TypeIds.T_long))
      argCount += 2;
    else
       [[#variablec1181320]];
  if (((id = methodBinding.returnType.id) == TypeIds.T_double) || (id == TypeIds.T_long))
    stackDepth += (2 - argCount);
  else
    if (id == TypeIds.T_void)
      stackDepth -= argCount;
    else
      stackDepth += (1 - argCount);
  if (stackDepth > stackMax)
    stackMax = stackDepth;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#c11815e0]]
invokestatic 
12[[#c11815e0]]
invokevirtual 
21[[#c1181560]]
"\t\tinvokestatic:" 
22[[#c1181560]]
"\t\tinvokevirtual:" 
31[[#c11814e0]]
0 
32[[#c11814e0]]
1 
41[[#c1181440]]
OPC_invokestatic 
42[[#c1181440]]
OPC_invokevirtual 
51[[#c1181320]]
argCount += 1 
52[[#c1181320]]
argCount++