CPD Results

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

Duplications

File Project Line
au/gov/amsa/navigation/ShipStaticDataCreator.java behaviour-detector 75
au/gov/amsa/navigation/ShipStaticDataCreator.java behaviour-detector 114
                    out.format("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", m.getMmsi(),
                            getImo(m).or(-1), m instanceof AisShipStaticA ? "A" : "B",
                            m.getShipType(), getMaximumPresentStaticDraughtMetres(m).or(-1F),
                            m.getDimensionA().or(-1), m.getDimensionB().or(-1),
                            m.getDimensionC().or(-1), m.getDimensionD().or(-1),
                            AisShipStaticUtil.lengthMetres(m).or(-1),
                            AisShipStaticUtil.widthMetres(m).or(-1), prepareName(m.getName()));
                    out.flush();
                });

        Action1<PrintStream> disposeAction = out -> out.close();
        return Observable.using(resourceFactory, observableFactory, disposeAction);
    }
File Project Line
au/gov/amsa/ais/message/AisPositionB.java ais 73
au/gov/amsa/ais/message/AisPositionBExtended.java ais 83
    }

    static Double extractSpeedOverGround(AisExtractor extractor) {
        int val = extractor.getValue(46, 56);
        if (val == SOG_NOT_AVAILABLE)
            return null;
        else
            return val / 10.0;
    }

    static Double extractLongitude(AisExtractor extractor) {
        int val = extractor.getSignedValue(57, 85);
        if (val == LONGITUDE_NOT_AVAILABLE) {
            return null;
        } else {
            Util.checkLong(val / 600000.0);
            return val / 600000.0;
        }
    }

    static Double extractLatitude(AisExtractor extractor) {
        int val = extractor.getSignedValue(85, 112);
        if (val == LATITUDE_NOT_AVAILABLE) {
            return null;
        } else {
            Util.checkLat(val / 600000.0);
            return val / 600000.0;
        }
    }

    @Override
    public int getMessageId() {
        return messageId;
    }

    @Override
    public int getRepeatIndicator() {
        return extractor.getValue(6, 8);
File Project Line
au/gov/amsa/ais/message/AisPositionA.java ais 229
au/gov/amsa/ais/message/AisPositionB.java ais 216
au/gov/amsa/ais/message/AisPositionGPS.java ais 179
        builder.append(getRateOfTurn());
        builder.append(", speedOverGroundKnots=");
        builder.append(getSpeedOverGroundKnots());
        builder.append(", isHighAccuracyPosition=");
        builder.append(isHighAccuracyPosition());
        builder.append(", longitude=");
        builder.append(longitude);
        builder.append(", latitude=");
        builder.append(latitude);
        builder.append(", courseOverGround=");
        builder.append(getCourseOverGround());
        builder.append(", trueHeading=");
        builder.append(getTrueHeading());
        builder.append(", timeSecondsOnly=");
        builder.append(getTimeSecondsOnly());
        builder.append(", specialManoeuvreIndicator=");