| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 32 | 2 | 5 | 0.982 | class_body_declaration |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 32 | 4176 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java |
| 2 | 31 | 4451 | 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;
}
|
| ||||
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;
}
|
| |||
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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#c11815e0]] | invokestatic |
| 1 | 2 | [[#c11815e0]] | invokevirtual |
| 2 | 1 | [[#c1181560]] | "\t\tinvokestatic:" |
| 2 | 2 | [[#c1181560]] | "\t\tinvokevirtual:" |
| 3 | 1 | [[#c11814e0]] | 0 |
| 3 | 2 | [[#c11814e0]] | 1 |
| 4 | 1 | [[#c1181440]] | OPC_invokestatic |
| 4 | 2 | [[#c1181440]] | OPC_invokevirtual |
| 5 | 1 | [[#c1181320]] | argCount += 1 |
| 5 | 2 | [[#c1181320]] | argCount++ |