CPD Results

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

Duplications

File Line
org/jtheque/metrics/view/impl/nodes/lines/code/LinesOfCodeRootNode.java 37
org/jtheque/metrics/view/impl/nodes/lines/comment/LinesOfCommentRootNode.java 37
    public PhysicalLinesRootNode(String name) {
        super();

        this.name = name;
    }

    @Override
    public Object getValueAt(int column) {
        Object res = null;

        switch (column) {
            case Columns.NAME:
                res = name;
                break;
            case Columns.TOTAL:
                res = total;
                break;
            case Columns.AVERAGE:
                res = average;
                break;
        }

        return res;
    }

    /**
     * Return the total lines of code.
     *
     * @return The total lines of code.
     */
    public int getTotal() {
        return total;
    }

    /**
     * Set the total lines of code.
     *
     * @param total The total lines of code.
     */
    public void setTotal(int total) {
        this.total = total;
    }

    /**
     * Set the average lines of code by class.
     *
     * @param average The average lines of code by class.
     */
    public void setAverage(double average) {
        this.average = average;
    }
}

File Line
org/jtheque/metrics/utils/elements/Constructor.java 35
org/jtheque/metrics/utils/elements/Method.java 36
    public Method(String name) {
        super();

        this.name = name;
    }

    /**
     * Return the number of lines of code of the method.
     *
     * @return The number of lines of code of the method.
     */
    public int getCodeLines() {
        return codeLines;
    }

    /**
     * Set the number of lines of code of the method.
     *
     * @param codeLines The number of lines of code of the method.
     */
    public void setCodeLines(int codeLines) {
        this.codeLines = codeLines;
    }

    /**
     * Return the number of comment lines of the method.
     *
     * @return The number of comment lines of the method.
     */
    public int getCommentLines() {
        return commentLines;
    }

    /**
     * Set the number of comment lines of the method.
     *
     * @param commentLines The number of comment lines of the method.
     */
    public void setCommentLines(int commentLines) {
        this.commentLines = commentLines;
    }

    /**
     * Return the number of physical lines of the method.
     *
     * @return The number of physical lines of the method.
     */
    public int getPhysicalLines() {
        return physicalLines;
    }

    /**
     * Set the number of physical lines of the constructor.
     *
     * @param physicalLines The number of physical lines of the method.
     */
    public void setPhysicalLines(int physicalLines) {
        this.physicalLines = physicalLines;
    }

    /**
     * Return the name of the method.
     *
     * @return The name of the method.
     */
    public String getName() {
        return name;
    }

    @Override
    public String toString() {
        return "Method{" +