CloneSet191


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
49250.954statement_sequence[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
148160
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ClassTypeImpl.java
249229
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ClassTypeImpl.java
Clone Instance
1
Line Count
48
Source Line
160
Source File
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();
                  }


Clone Instance
2
Line Count
49
Source Line
229
Source File
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ClassTypeImpl.java

                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();
                  }


Clone AbstractionParameter Count: 5Parameter Bindings

// 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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b4b8b720]]
checkVM(elt);
elt.writeWithTag(this, outData); 
12[[#b4b8b720]]
elt.writeWithTag(this, outData); 
21[[#b8256d20]]
CT_NEW_INSTANCE 
22[[#b8256d20]]
CT_INVOKE_METHOD 
31[[#b1ab9ba0]]
ObjectReferenceImpl 
32[[#b1ab9ba0]]
ValueImpl 
41[[#b4b8b6a0]]
object 
42[[#b4b8b6a0]]
value 
51[[#b4b8b680]]
readObjectRefWithTag 
52[[#b4b8b680]]
readWithTag