CPD Results

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

Duplications

File Line
org\opentrafficsim\road\network\factory\vissim\xsd\ROADLAYOUT.java 615
org\opentrafficsim\road\network\factory\vissim\xsd\ROADLAYOUT.java 725
    {

        @XmlAttribute(name = "NAME")
        protected String name;

        @XmlAttribute(name = "OFFSET", required = true)
        protected String offset;

        @XmlAttribute(name = "WIDTH")
        protected String width;

        @XmlAttribute(name = "COLOR")
        protected String color;

        /**
         * Gets the value of the name property.
         * @return possible object is {@link String }
         */
        public String getNAME()
        {
            return name;
        }

        /**
         * Sets the value of the name property.
         * @param value allowed object is {@link String }
         */
        public void setNAME(String value)
        {
            this.name = value;
        }

        /**
         * Gets the value of the offset property.
         * @return possible object is {@link String }
         */
        public String getOFFSET()
        {
            return offset;
        }

        /**
         * Sets the value of the offset property.
         * @param value allowed object is {@link String }
         */
        public void setOFFSET(String value)
        {
            this.offset = value;
        }

        /**
         * Gets the value of the width property.
         * @return possible object is {@link String }
         */
        public String getWIDTH()
        {
            return width;
        }

        /**
         * Sets the value of the width property.
         * @param value allowed object is {@link String }
         */
        public void setWIDTH(String value)
        {
            this.width = value;
        }

        /**
         * Gets the value of the color property.
         * @return possible object is {@link String }
         */
        public String getCOLOR()
        {
            return color;
        }

        /**
         * Sets the value of the color property.
         * @param value allowed object is {@link String }
         */
        public void setCOLOR(String value)
        {
            this.color = value;
        }

    }

    /**
     * <p>
     * Java class for anonymous complex type.
     * <p>
     * The following schema fragment specifies the expected content contained within this class.
     *
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;attribute name="NAME" type="{http://www.w3.org/2001/XMLSchema}string" />
     *       &lt;attribute name="OFFSET" use="required" type="{http://www.opentrafficsim.org/ots}SIGNEDLENGTHTYPE" />
     *       &lt;attribute name="WIDTH" type="{http://www.opentrafficsim.org/ots}LENGTHTYPE" />
     *       &lt;attribute name="COLOR" type="{http://www.opentrafficsim.org/ots}COLORTYPE" />
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "")
    public static class SHOULDER
File Line
org\opentrafficsim\road\network\factory\vissim\units\LaneAttributes.java 112
org\opentrafficsim\road\network\factory\vissim\units\LaneAttributes.java 138
        else if (ocStr.startsWith("LEFTSET"))
        {
            int lset1 = ocStr.indexOf('[') + 1;
            int rset1 = ocStr.indexOf(']', lset1);
            int lset2 = ocStr.indexOf('[', ocStr.indexOf("OVERTAKE")) + 1;
            int rset2 = ocStr.indexOf(']', lset2);
            if (lset1 == -1 || rset1 == -1 || rset1 - lset1 < 3 || lset2 == -1 || rset2 == -1 || rset2 - lset2 < 3)
            {
                throw new NetworkException("Sets in overtaking conditions string: '" + ocStr + "' not coded right");
            }
            Set<GTUType> overtakingGTUs = parseGTUTypeSet(ocStr.substring(lset1, rset1), parser);
            Set<GTUType> overtakenGTUs = parseGTUTypeSet(ocStr.substring(lset2, rset2), parser);
            if (ocStr.contains("RIGHTSPEED"))
File Line
org\opentrafficsim\road\network\factory\vissim\CrossSectionElementTag.java 206
org\opentrafficsim\road\network\factory\vissim\CrossSectionElementTag.java 354
org\opentrafficsim\road\network\factory\vissim\CrossSectionElementTag.java 427
        if (attributes.getNamedItem("OFFSET") != null)
        {
            cseTag.offset = LengthUnits.parseLength(attributes.getNamedItem("OFFSET").getNodeValue());
        }
        else
        {
            throw new SAXException("ROADLAYOUT.LANE: missing attribute OFFSET for lane " + roadLayoutTag.name + "." + name);
        }

        if (attributes.getNamedItem("WIDTH") != null)
        {
            cseTag.width = LengthUnits.parseLength(attributes.getNamedItem("WIDTH").getNodeValue());
        }
        else if (roadLayoutTag.defaultLaneWidth != null)
        {
            cseTag.width = roadLayoutTag.defaultLaneWidth;
        }
        else if (roadLayoutTag.roadTypeTag.defaultLaneWidth != null)
        {
            cseTag.width = roadLayoutTag.roadTypeTag.defaultLaneWidth;
        }
        else
        {
            throw new SAXException("ROADLAYOUT.LANE: cannot determine WIDTH for lane: " + roadLayoutTag.name + "." + name);
File Line
org\opentrafficsim\road\network\factory\vissim\GTUTYPE.java 34
org\opentrafficsim\road\network\factory\vissim\xsd\GTUTYPE.java 38
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "GTUTYPE")
public class GTUTYPE
{

    @XmlAttribute(name = "NAME", required = true)
    protected String name;

    @XmlAttribute(name = "base", namespace = "http://www.w3.org/XML/1998/namespace")
    @XmlSchemaType(name = "anyURI")
    protected String base;

    /**
     * Gets the value of the name property.
     * @return possible object is {@link String }
     */
    public String getNAME()
    {
        return name;
    }

    /**
     * Sets the value of the name property.
     * @param value allowed object is {@link String }
     */
    public void setNAME(String value)
    {
        this.name = value;
    }

    /**
     * Gets the value of the base property.
     * @return possible object is {@link String }
     */
    public String getBase()
    {
        return base;
    }

    /**
     * Sets the value of the base property.
     * @param value allowed object is {@link String }
     */
    public void setBase(String value)
    {
        this.base = value;
    }

}
File Line
org\opentrafficsim\road\network\factory\vissim\LinkTag.java 532
org\opentrafficsim\road\network\factory\vissim\LinkTag.java 567
            }
            if (i == coords.length - 1)
            {
                linkTag.nodeEndTag.coordinate = new OTSPoint3D(coord);
            }
            if (coords.length > 2 && (i > 0 && i < coords.length - 1))
            {
                vertices[i - 1] = new OTSPoint3D(coord);
            }
            i++;
        }
        if (linkTag.polyLineTag != null)
        {
            if (coords.length <= 2)
            {
                linkTag.polyLineTag = null;
                linkTag.straightTag = new StraightTag();
            }
            else
            {
                linkTag.polyLineTag.vertices = vertices;
            }
        }
    }