CPD Results

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

Duplications

File Project Line
org/waarp/ftp/core/data/handler/FtpDataModeCodec.java WaarpFtp-SimpleServer 328
org/waarp/ftp/core/data/handler/FtpDataModeCodec.java WaarpFtp-SimpleServer 363
                if (newbyte == 0xFF) {
                    newbuf.writeByte((byte) (newbyte & 0xFF));
                }
                newbuf.writeByte((byte) (newbyte & 0xFF));
            }
        } catch (IndexOutOfBoundsException e) {
            // end of read
        }
        int value = 0;
        if (msg.isEOF()) {
            value += 2;
        }
        if (msg.isEOR()) {
            value += 1;
        }
        if (value > 0) {
            newbuf.writeByte((byte) 0xFF);
            newbuf.writeByte((byte) (value & 0xFF));
        }
        msg.clear();
File Project Line
org/waarp/ftp/core/data/handler/FtpDataModeCodec.java WaarpFtp-SimpleServer 159
org/waarp/ftp/core/data/handler/FtpDataModeCodec.java WaarpFtp-SimpleServer 212
                    if (nextbyte == 0xFF) {
                        newbuf.writeByte((byte) (lastbyte & 0xFF));
                    } else {
                        if (nextbyte == 1) {
                            dataBlock.setEOR(true);
                        } else if (nextbyte == 2) {
                            dataBlock.setEOF(true);
                        } else if (nextbyte == 3) {
                            dataBlock.setEOR(true);
                            dataBlock.setEOF(true);
                        }
                    }
                } else {
                    newbuf.writeByte((byte) (lastbyte & 0xFF));
                }
                lastbyte = 0;
            }
        } catch (IndexOutOfBoundsException e) {
            // End of read
        }