if (DEBUG_DRAW_INTERIOR) { double hGap = plotArea.getWidth() * this.interiorGap; double vGap = plotArea.getHeight() * this.interiorGap; double igx1 = plotArea.getX() + hGap; double igx2 = plotArea.getMaxX() - hGap; double igy1 = plotArea.getY() + vGap; double igy2 = plotArea.getMaxY() - vGap; g2.setPaint(Color.gray); g2.draw(new Rectangle2D.Double(igx1, igy1, igx2 - igx1, igy2 - igy1)); }
if (DEBUG_DRAW_INTERIOR) { double hGap = plotArea.getWidth() * getInteriorGap(); double vGap = plotArea.getHeight() * getInteriorGap(); double igx1 = plotArea.getX() + hGap; double igx2 = plotArea.getMaxX() - hGap; double igy1 = plotArea.getY() + vGap; double igy2 = plotArea.getMaxY() - vGap; g2.setPaint(Color.lightGray); g2.draw(new Rectangle2D.Double(igx1, igy1, igx2 - igx1, igy2 - igy1)); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot3D.java
Method name: void drawPie(Graphics2D, Rectangle2D, PlotRenderingInfo) Method name: void draw(Graphics2D, Rectangle2D, Point2D, PlotState, PlotRenderingInfo)
Number of AST nodes: 9 Number of AST nodes: 9
1
if (DEBUG_DRAW_INTERIOR) {
1
if (DEBUG_DRAW_INTERIOR) {
2
            double hGap = plotArea.getWidth() * this.interiorGap;
2
            double hGap = plotArea.getWidth() * getInteriorGap();
3
            double vGap = plotArea.getHeight() * this.interiorGap;
3
            double vGap = plotArea.getHeight() * getInteriorGap
4
        
4
();
5
            double igx1 = plotArea.getX() + hGap;
5
            double igx1 = plotArea.getX() + hGap;
6
            double igx2 = plotArea.getMaxX() - hGap;
6
            double igx2 = plotArea.getMaxX() - hGap;
7
            double igy1 = plotArea.getY() + vGap;
7
            double igy1 = plotArea.getY() + vGap;
8
            double igy2 = plotArea.getMaxY() - vGap;
8
            double igy2 = plotArea.getMaxY() - vGap;
9
            g2.setPaint(Color.gray);
9
            g2.setPaint(Color.lightGray);
10
            g2.draw(new Rectangle2D.Double(igx1, igy1, igx2 - igx1, 
10
            g2.draw(new Rectangle2D.Double(igx1, igy1, igx2 - igx1, 
11
                    igy2 - igy1));
11
                    igy2 - igy1));
12
        }
12
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes having the same super class
Number of node comparisons81
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)35.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    if (DEBUG_DRAW_INTERIOR)
    16
    if (DEBUG_DRAW_INTERIOR)
    8
    double hGap = plotArea.getWidth() * this.interiorGap;
    8
    double hGap = plotArea.getWidth() * this.interiorGap;
    17
    double hGap = plotArea.getWidth() * getInteriorGap();
    Differences
    Expression1Expression2Difference
    thisMISSING_METHOD_INVOCATION_EXPRESSION
    this.interiorGapgetInteriorGap()FIELD_ACCESS_REPLACED_WITH_GETTER
    17
    double hGap = plotArea.getWidth() * getInteriorGap();
    9
    double vGap = plotArea.getHeight() * this.interiorGap;
    9
    double vGap = plotArea.getHeight() * this.interiorGap;
    18
    double vGap = plotArea.getHeight() * getInteriorGap();
    Differences
    Expression1Expression2Difference
    thisMISSING_METHOD_INVOCATION_EXPRESSION
    this.interiorGapgetInteriorGap()FIELD_ACCESS_REPLACED_WITH_GETTER
    18
    double vGap = plotArea.getHeight() * getInteriorGap();
    10
    double igx1 = plotArea.getX() + hGap;
    19
    double igx1 = plotArea.getX() + hGap;
    11
    double igx2 = plotArea.getMaxX() - hGap;
    20
    double igx2 = plotArea.getMaxX() - hGap;
    12
    double igy1 = plotArea.getY() + vGap;
    12
    double igy1 = plotArea.getY() + vGap;
    22
    double igy2 = plotArea.getMaxY() - vGap;
    Differences
    Expression1Expression2Difference
    igy1igy2VARIABLE_NAME_MISMATCH
    getYgetMaxYMETHOD_INVOCATION_NAME_MISMATCH
    +-OPERATOR_MISMATCH
    Preondition Violations
    Expression plotArea.getY() + vGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression plotArea.getMaxY() - vGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    22
    double igy2 = plotArea.getMaxY() - vGap;
    13
    double igy2 = plotArea.getMaxY() - vGap;
    13
    double igy2 = plotArea.getMaxY() - vGap;
    21
    double igy1 = plotArea.getY() + vGap;
    Differences
    Expression1Expression2Difference
    igy2igy1VARIABLE_NAME_MISMATCH
    getMaxYgetYMETHOD_INVOCATION_NAME_MISMATCH
    -+OPERATOR_MISMATCH
    Preondition Violations
    Expression plotArea.getMaxY() - vGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression plotArea.getY() + vGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    21
    double igy1 = plotArea.getY() + vGap;
    14
    g2.setPaint(Color.gray);
    14
    g2.setPaint(Color.gray);
    23
    g2.setPaint(Color.lightGray);
    Differences
    Expression1Expression2Difference
    graylightGrayVARIABLE_NAME_MISMATCH
    23
    g2.setPaint(Color.lightGray);
    15
    g2.draw(new Rectangle2D.Double(igx1, igy1, igx2 - igx1, igy2 - igy1));
    24
    g2.draw(new Rectangle2D.Double(igx1, igy1, igx2 - igx1, igy2 - igy1));
    Precondition Violations (4)
    Row Violation
    1Expression plotArea.getY() + vGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression plotArea.getMaxY() - vGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression plotArea.getMaxY() - vGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression plotArea.getY() + vGap cannot be parameterized, because it has dependencies to/from statements that will be extracted