CPD Results

The following document contains the results of PMD's CPD 5.3.5.

Duplications

File Line
nl\tno\imb\TByteBuffer.java 865
nl\tno\imb\TByteBuffer.java 965
        this.fBuffer[this.fWriteCursor] = (byte) (aValue & 0xFF);
        this.fBuffer[this.fWriteCursor + 1] = (byte) ((aValue >> 8) & 0xFF);
        this.fBuffer[this.fWriteCursor + 2] = (byte) ((aValue >> 16) & 0xFF);
        this.fBuffer[this.fWriteCursor + 3] = (byte) ((aValue >> 24) & 0xFF);
        this.fBuffer[this.fWriteCursor + 4] = (byte) ((aValue >> 32) & 0xFF);
        this.fBuffer[this.fWriteCursor + 5] = (byte) ((aValue >> 40) & 0xFF);
        this.fBuffer[this.fWriteCursor + 6] = (byte) ((aValue >> 48) & 0xFF);
        this.fBuffer[this.fWriteCursor + 7] = (byte) ((aValue >> 56) & 0xFF);
        this.fWriteCursor += SIZE_OF_INT64;
    }

    /**Write the specified single (float) to the byte buffer.
     * Buffer space is allocated if needed. 
     * @param aValue the single (float) to be written to the byte buffer
     */
    public void write(float aValue) {
File Line
nl\tno\imb\TByteBuffer.java 217
nl\tno\imb\TByteBuffer.java 443
        if (SIZE_OF_INT64 <= getReadAvailable()) {
            this.fReadCursor += SIZE_OF_INT64;
            return (long)(this.fBuffer[this.fReadCursor - 8] & 0xFF) 
                    + ((long)(this.fBuffer[this.fReadCursor - 7] & 0xFF) << 8)
                    + ((long)(this.fBuffer[this.fReadCursor - 6] & 0xFF) << 16) 
                    + ((long)(this.fBuffer[this.fReadCursor - 5] & 0xFF) << 24)
                    + ((long)(this.fBuffer[this.fReadCursor - 4] & 0xFF) << 32) 
                    + ((long)(this.fBuffer[this.fReadCursor - 3] & 0xFF) << 40)
                    + ((long)(this.fBuffer[this.fReadCursor - 2] & 0xFF) << 48) 
                    + ((long)(this.fBuffer[this.fReadCursor - 1] & 0xFF) << 56);
        } else
File Line
nl\tno\imb\TConnection.java 834
nl\tno\imb\TConnection.java 865
            int Command = TEventEntry.IC_INVALID_COMMAND;
            // define once
            // magic + command + payload size
            TByteBuffer FixedCommandPart = new TByteBuffer(MAGIC_BYTES.length + TByteBuffer.SIZE_OF_INT32
                    + TByteBuffer.SIZE_OF_INT32);
            TByteBuffer Payload = new TByteBuffer();
            TByteBuffer PayloadCheck = new TByteBuffer(TByteBuffer.SIZE_OF_INT32);
            do {
                try {
                    try {
                        Command = readCommand(FixedCommandPart, Payload, PayloadCheck);
                        if (Command != TEventEntry.IC_INVALID_COMMAND)
                            handleCommand(Command, Payload);
                    } catch (ThreadDeath ex) {
                        Command = TEventEntry.IC_END_OF_SESSION;
                    }
                } catch (Exception ex) {
                    if (isConnected())
                        System.out.println("## Exception in ReadCommands loop: " + ex.getMessage());
                }
            } while ((Command != TEventEntry.IC_END_OF_SESSION) && isConnected() && (this.finputStream.available() != 0));