| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 49 | 2 | 5 | 0.954 | statement_sequence[3] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 48 | 160 | plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ClassTypeImpl.java |
| 2 | 49 | 229 | plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ClassTypeImpl.java |
| ||||
// check the type and the vm of the arguments. Convert the values if needed
List checkedArguments = ValueImpl.checkValues(arguments, method.argumentTypes(), virtualMachineImpl());
initJdwpRequest();
try {
ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
DataOutputStream outData = new DataOutputStream(outBytes);
write(this, outData);
threadImpl.write(this, outData);
methodImpl.write(this, outData);
writeInt(checkedArguments.size(), "size", outData); //$NON-NLS-1$
Iterator iter = checkedArguments.iterator();
while (iter.hasNext()) {
ValueImpl elt = (ValueImpl) iter.next();
if (elt != null) {
elt.writeWithTag(this, outData);
}
else {
ValueImpl.writeNullWithTag(this, outData);
}
}
writeInt(optionsToJdwpOptions(options), "options", MethodImpl.getInvokeOptions(), outData); //$NON-NLS-1$
JdwpReplyPacket replyPacket = requestVM(JdwpCommandPacket.CT_INVOKE_METHOD, outBytes);
switch (replyPacket.errorCode()) {
case JdwpReplyPacket.INVALID_METHODID:
throw new IllegalArgumentException();
case JdwpReplyPacket.TYPE_MISMATCH:
throw new InvalidTypeException();
case JdwpReplyPacket.INVALID_CLASS:
throw new ClassNotLoadedException(name());
case JdwpReplyPacket.INVALID_THREAD:
throw new IncompatibleThreadStateException();
case JdwpReplyPacket.THREAD_NOT_SUSPENDED:
throw new IncompatibleThreadStateException();
}
defaultReplyErrorHandler(replyPacket.errorCode());
DataInputStream replyData = replyPacket.dataInStream();
ValueImpl value = ValueImpl.readWithTag(this, replyData);
ObjectReferenceImpl exception = ObjectReferenceImpl.readObjectRefWithTag(this, replyData);
if (exception != null)
throw new InvocationException(exception);
return value;
} catch (IOException e) {
defaultIOExceptionHandler(e);
return null;
}
finally {
handledJdwpRequest();
}
|
| ||||
List checkedArguments = ValueImpl.checkValues(arguments, method.argumentTypes(), virtualMachineImpl());
initJdwpRequest();
try {
ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
DataOutputStream outData = new DataOutputStream(outBytes);
write(this, outData);
threadImpl.write(this, outData);
methodImpl.write(this, outData);
writeInt(checkedArguments.size(), "size", outData); //$NON-NLS-1$
Iterator iter = checkedArguments.iterator();
while (iter.hasNext()) {
ValueImpl elt = (ValueImpl) iter.next();
if (elt != null) {
checkVM(elt);
elt.writeWithTag(this, outData);
}
else {
ValueImpl.writeNullWithTag(this, outData);
}
}
writeInt(optionsToJdwpOptions(options), "options", MethodImpl.getInvokeOptions(), outData); //$NON-NLS-1$
JdwpReplyPacket replyPacket = requestVM(JdwpCommandPacket.CT_NEW_INSTANCE, outBytes);
switch (replyPacket.errorCode()) {
case JdwpReplyPacket.INVALID_METHODID:
throw new IllegalArgumentException();
case JdwpReplyPacket.TYPE_MISMATCH:
throw new InvalidTypeException();
case JdwpReplyPacket.INVALID_CLASS:
throw new ClassNotLoadedException(name());
case JdwpReplyPacket.INVALID_THREAD:
throw new IncompatibleThreadStateException();
case JdwpReplyPacket.THREAD_NOT_SUSPENDED:
throw new IncompatibleThreadStateException();
}
defaultReplyErrorHandler(replyPacket.errorCode());
DataInputStream replyData = replyPacket.dataInStream();
ObjectReferenceImpl object = ObjectReferenceImpl.readObjectRefWithTag(this, replyData);
ObjectReferenceImpl exception = ObjectReferenceImpl.readObjectRefWithTag(this, replyData);
if (exception != null)
throw new InvocationException(exception);
return object;
} catch (IOException e) {
defaultIOExceptionHandler(e);
return null;
}
finally {
handledJdwpRequest();
}
|
| |||
// check the type and the vm of the arguments. Convert the values if needed
List checkedArguments = ValueImpl.checkValues(arguments, method.argumentTypes(), virtualMachineImpl());
initJdwpRequest();
try {
ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
DataOutputStream outData = new DataOutputStream(outBytes);
write(this, outData);
threadImpl.write(this, outData);
methodImpl.write(this, outData);
writeInt(checkedArguments.size(), "size", outData); //$NON-NLS-1$
Iterator iter = checkedArguments.iterator();
while (iter.hasNext()) {
ValueImpl elt = (ValueImpl) iter.next();
if (elt != null) {
[[#variableb4b8b720]]
}
else {
ValueImpl.writeNullWithTag(this, outData);
}
}
writeInt(optionsToJdwpOptions(options), "options", MethodImpl.getInvokeOptions(), outData); //$NON-NLS-1$
JdwpReplyPacket replyPacket = requestVM(JdwpCommandPacket. [[#variableb8256d20]], outBytes);
switch (replyPacket.errorCode()) {
case JdwpReplyPacket.INVALID_METHODID:
throw new IllegalArgumentException();
case JdwpReplyPacket.TYPE_MISMATCH:
throw new InvalidTypeException();
case JdwpReplyPacket.INVALID_CLASS:
throw new ClassNotLoadedException(name());
case JdwpReplyPacket.INVALID_THREAD:
throw new IncompatibleThreadStateException();
case JdwpReplyPacket.THREAD_NOT_SUSPENDED:
throw new IncompatibleThreadStateException();
}
defaultReplyErrorHandler(replyPacket.errorCode());
DataInputStream replyData = replyPacket.dataInStream();
[[#variableb1ab9ba0]] [[#variableb4b8b6a0]]= [[#variableb1ab9ba0]]. [[#variableb4b8b680]](this, replyData);
ObjectReferenceImpl exception = ObjectReferenceImpl.readObjectRefWithTag(this, replyData);
if (exception != null)
throw new InvocationException(exception);
return [[#variableb4b8b6a0]];
}
catch (IOException e) {
defaultIOExceptionHandler(e);
return null;
}
finally {
handledJdwpRequest();
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#b4b8b720]] | checkVM(elt); elt.writeWithTag(this, outData); |
| 1 | 2 | [[#b4b8b720]] | elt.writeWithTag(this, outData); |
| 2 | 1 | [[#b8256d20]] | CT_NEW_INSTANCE |
| 2 | 2 | [[#b8256d20]] | CT_INVOKE_METHOD |
| 3 | 1 | [[#b1ab9ba0]] | ObjectReferenceImpl |
| 3 | 2 | [[#b1ab9ba0]] | ValueImpl |
| 4 | 1 | [[#b4b8b6a0]] | object |
| 4 | 2 | [[#b4b8b6a0]] | value |
| 5 | 1 | [[#b4b8b680]] | readObjectRefWithTag |
| 5 | 2 | [[#b4b8b680]] | readWithTag |