CloneSet505


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
32220.988class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
132284
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ClassTypeImpl.java
232449
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ObjectReferenceImpl.java
Clone Instance
1
Line Count
32
Source Line
284
Source File
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ClassTypeImpl.java

        /**
         * Assigns a value to a static field. .
         */
        public void setValue(Field field, Value value) throws  InvalidTypeException, ClassNotLoadedException {
                // Note that this information should not be cached.
                initJdwpRequest();
                try {
                        ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
                        DataOutputStream outData = new DataOutputStream(outBytes);
                        write(this, outData);
                        writeInt(1, "size", outData);   // We only set one field //$NON-NLS-1$
                        checkVM(field);
                        ((FieldImpl) field).write(this, outData);

                        // check the type and the vm of the value. Convert the value if needed
                        ValueImpl checkedValue = ValueImpl.checkValue(value, field.type(), virtualMachineImpl());

                        if (checkedValue != null) {
                                checkedValue.write(this, outData);
                        }
                        else   {
                                ValueImpl.writeNull(this, outData);
                        }
                        JdwpReplyPacket replyPacket = requestVM(JdwpCommandPacket.CT_SET_VALUES, outBytes);
                        switch (replyPacket.errorCode()) {
                                case JdwpReplyPacket.TYPE_MISMATCH:
                                        throw new InvalidTypeException();
                                case JdwpReplyPacket.INVALID_CLASS:
                                        throw new ClassNotLoadedException(name());
                              }
                        defaultReplyErrorHandler(replyPacket.errorCode());
                } catch (IOException e) {
                        defaultIOExceptionHandler(e);
                  }
                  finally {
                        handledJdwpRequest();
                  }
        }


Clone Instance
2
Line Count
32
Source Line
449
Source File
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/ObjectReferenceImpl.java

        /**
         * Sets the value of a given instance or static field in this object. 
         */
        public void setValue(Field field, Value value) throws InvalidTypeException, ClassNotLoadedException {
                // Note that this information should not be cached.
                initJdwpRequest();
                try {
                        ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
                        DataOutputStream outData = new DataOutputStream(outBytes);
                        write(this, outData);
                        writeInt(1, "size", outData);   // We only set one field //$NON-NLS-1$
                        checkVM(field);
                        ((FieldImpl) field).write(this, outData);

                        // check the type and the vm of the value. Convert the value if needed
                        ValueImpl checkedValue = ValueImpl.checkValue(value, field.type(), virtualMachineImpl());

                        if (checkedValue != null) {
                                checkedValue.write(this, outData);
                        }
                        else   {
                                ValueImpl.writeNull(this, outData);
                        }
                        JdwpReplyPacket replyPacket = requestVM(JdwpCommandPacket.OR_SET_VALUES, outBytes);
                        switch (replyPacket.errorCode()) {
                                case JdwpReplyPacket.TYPE_MISMATCH:
                                        throw new InvalidTypeException();
                                case JdwpReplyPacket.INVALID_CLASS:
                                        throw new ClassNotLoadedException(referenceType().name());
                              }
                        defaultReplyErrorHandler(replyPacket.errorCode());
                } catch (IOException e) {
                        defaultIOExceptionHandler(e);
                  }
                  finally {
                        handledJdwpRequest();
                  }
        }


Clone AbstractionParameter Count: 2Parameter Bindings

/**
         * Sets the value of a given instance or static field in this object. 
         */
/**
         * Assigns a value to a static field. .
         */
public void setValue(Field field, Value value) throws InvalidTypeException, ClassNotLoadedException {
  // Note that this information should not be cached.
  initJdwpRequest();
  try {
    ByteArrayOutputStream outBytes = new ByteArrayOutputStream();
    DataOutputStream outData = new DataOutputStream(outBytes);
    write(this, outData);
    writeInt(1, "size", outData); // We only set one field //$NON-NLS-1$
    checkVM(field);
    ((FieldImpl) field).write(this, outData);
    // check the type and the vm of the value. Convert the value if needed
    ValueImpl checkedValue = ValueImpl.checkValue(value, field.type(), virtualMachineImpl());
    if (checkedValue != null) {
      checkedValue.write(this, outData);
    }
    else {
      ValueImpl.writeNull(this, outData);
    }
    JdwpReplyPacket replyPacket = requestVM(JdwpCommandPacket. [[#variablec3408760]], outBytes);
    switch (replyPacket.errorCode()) {
      case JdwpReplyPacket.TYPE_MISMATCH:
        throw new InvalidTypeException();
      case JdwpReplyPacket.INVALID_CLASS:
        throw new ClassNotLoadedException( [[#variablec3408660]]);
    }
    defaultReplyErrorHandler(replyPacket.errorCode());
  }
  catch (IOException e) {
    defaultIOExceptionHandler(e);
  }
  finally {
    handledJdwpRequest();
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#c3408760]]
OR_SET_VALUES 
12[[#c3408760]]
CT_SET_VALUES 
21[[#c3408660]]
referenceType().name() 
22[[#c3408660]]
name()