CloneSet578


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
82210.957class_body_declarations[16]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
18227
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpPacket.java
28230
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/JdwpPacket.java
Clone Instance
1
Line Count
82
Source Line
27
Source File
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/jdwp/JdwpPacket.java

        /** General JDWP constants. */
        public static final byte FLAG_REPLY_PACKET = (byte) 0x80;

        protected static final int MIN_PACKET_LENGTH = 11;

        /** Map with Strings for flag bits. */
        private static String[] fgFlagStrings = null;

        /** Header fields. */
        protected int fId = 0;

        protected byte fFlags = 0;

        protected byte[] fDataBuf = null;

        /**
         * Set Id.
         */
        /*package*/
                    void setId(int id) {
                fId = id;
                    }

        /**
         * @return Returns Id.
         */
        public int getId() {
                return fId;
        }

        /**
         * Set Flags.
         */
        /*package*/
                    void setFlags(byte flags) {
                fFlags = flags;
                    }

        /**
         * @return Returns Flags.
         */
        public byte getFlags() {
                return fFlags;
        }

        /**
         * @return Returns total length of packet.
         */
        public int getLength() {
                return MIN_PACKET_LENGTH + getDataLength();
        }

        /**
         * @return Returns length of data in packet.
         */
        public int getDataLength() {
                return fDataBuf == null ? 0:  fDataBuf.length;
        }

        /**
         * @return Returns data of packet.
         */
        public byte[] data() {
                return fDataBuf;
        }

        /**
         * @return Returns DataInputStream with reply data, or an empty stream if there is none.
         */
        public DataInputStream dataInStream() {
                if (fDataBuf != null) {
                        return new DataInputStream(new ByteArrayInputStream(fDataBuf));
                }

                return new DataInputStream(new ByteArrayInputStream(new byte[0]));
        }

        /**
         * Assigns data to packet.
         */
        public void setData(byte[] data) {
                fDataBuf = data;
        }

        /**
         * Reads header fields that are specific for a type of packet.
         */
        protected abstract int readSpecificHeaderFields(byte[] bytes, int index)
          throws                                                                        IOException;


Clone Instance
2
Line Count
82
Source Line
30
Source File
plugins/org.eclipse.jdt.debug/jdi/org/eclipse/jdi/internal/spy/JdwpPacket.java

        /** General JDWP constants. */
        public static final byte FLAG_REPLY_PACKET = (byte) 0x80;

        protected static final int MIN_PACKET_LENGTH = 11;

        /** Map with Strings for flag bits. */
        private static String[] fgFlagStrings = null;

        /** Header fields. */
        protected int fId = 0;

        protected byte fFlags = 0;

        protected byte[] fDataBuf = null;

        /**
         * Set Id.
         */
        /*package*/
                    void setId(int id) {
                fId = id;
                    }

        /**
         * @return Returns Id.
         */
        public int getId() {
                return fId;
        }

        /**
         * Set Flags.
         */
        /*package*/
                    void setFlags(byte flags) {
                fFlags = flags;
                    }

        /**
         * @return Returns Flags.
         */
        public byte getFlags() {
                return fFlags;
        }

        /**
         * @return Returns total length of packet.
         */
        public int getLength() {
                return MIN_PACKET_LENGTH + getDataLength();
        }

        /**
         * @return Returns length of data in packet.
         */
        public int getDataLength() {
                return fDataBuf == null ? 0:  fDataBuf.length;
        }

        /**
         * @return Returns data of packet.
         */
        public byte[] data() {
                return fDataBuf;
        }

        /**
         * @return Returns DataInputStream with reply data, or an empty stream if there is none.
         */
        public DataInputStream dataInStream() {
                if (fDataBuf != null) {
                        return new DataInputStream(new ByteArrayInputStream(fDataBuf));
                }

                return new DataInputStream(new ByteArrayInputStream(new byte[0]));
        }

        /**
         * Assigns data to packet.
         */
        public void setData(byte[] data) {
                fDataBuf = data;
        }

        /**
         * Reads header fields that are specific for a type of packet.
         */
        protected abstract void readSpecificHeaderFields(DataInputStream dataInStream)
          throws                                                                              IOException;


Clone AbstractionParameter Count: 1Parameter Bindings

/** General JDWP constants. */
public static final byte FLAG_REPLY_PACKET = (byte) 0x80;

protected static final int MIN_PACKET_LENGTH = 11;

/** Map with Strings for flag bits. */
private static String[] fgFlagStrings = null;

/** Header fields. */
protected int fId = 0;

protected byte fFlags = 0;

protected byte[] fDataBuf = null;

/**
         * Set Id.
         */
/*package*/
void setId(int id) {
  fId = id;
}

/**
         * @return Returns Id.
         */
public int getId() {
  return fId;
}

/**
         * Set Flags.
         */
/*package*/
void setFlags(byte flags) {
  fFlags = flags;
}

/**
         * @return Returns Flags.
         */
public byte getFlags() {
  return fFlags;
}

/**
         * @return Returns total length of packet.
         */
public int getLength() {
  return MIN_PACKET_LENGTH + getDataLength();
}

/**
         * @return Returns length of data in packet.
         */
public int getDataLength() {
  return fDataBuf == null ? 0: fDataBuf.length;
}

/**
         * @return Returns data of packet.
         */
public byte[] data() {
  return fDataBuf;
}

/**
         * @return Returns DataInputStream with reply data, or an empty stream if there is none.
         */
public DataInputStream dataInStream() {
  if (fDataBuf != null) {
    return new DataInputStream(new ByteArrayInputStream(fDataBuf));
  }
  return new DataInputStream(new ByteArrayInputStream(new byte[0]));
}

/**
         * Assigns data to packet.
         */
public void setData(byte[] data) {
  fDataBuf = data;
}

 [[#variablebaee1ae0]]
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#baee1ae0]]
/**
 * Reads header fields that are specific for a type of packet.
 */
protected abstract int readSpecificHeaderFields(byte[] bytes, int index)
  throws IOException; 
12[[#baee1ae0]]
/**
 * Reads header fields that are specific for a type of packet.
 */
protected abstract void readSpecificHeaderFields(DataInputStream dataInStream)
  throws IOException;