XYItemRenderer r = getRenderer(i); if (i >= getDatasetCount()) { // we need the dataset to make continue; // a link to the axes } if (r != null) { ValueAxis domainAxis = getDomainAxisForDataset(i); ValueAxis rangeAxis = getRangeAxisForDataset(i); r.drawAnnotations(g2, dataArea, domainAxis, rangeAxis, Layer.BACKGROUND, info); }
XYItemRenderer r = getRenderer(i); if (i >= getDatasetCount()) { // we need the dataset to make continue; // a link to the axes } if (r != null) { ValueAxis domainAxis = getDomainAxisForDataset(i); ValueAxis rangeAxis = getRangeAxisForDataset(i); r.drawAnnotations(g2, dataArea, domainAxis, rangeAxis, Layer.FOREGROUND, info); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java
Method name: void draw(Graphics2D, Rectangle2D, Point2D, PlotState, PlotRenderingInfo) Method name: void draw(Graphics2D, Rectangle2D, Point2D, PlotState, PlotRenderingInfo)
Number of AST nodes: 7 Number of AST nodes: 7
1
XYItemRenderer r = getRenderer(i);
1
XYItemRenderer r = getRenderer(i);
2
                if (i >= getDatasetCount()) { // we need the dataset to make
2
                if (i >= getDatasetCount()) { // we need the dataset to make
3
                    continue;                 // a link to the axes
3
                    continue;                 // a link to the axes
4
                }
4
                }
5
                if (r != null) {
5
                if (r != null) {
6
                    ValueAxis domainAxis = getDomainAxisForDataset(i);
6
                    ValueAxis domainAxis = getDomainAxisForDataset(i);
7
                    ValueAxis rangeAxis = getRangeAxisForDataset(i);
7
                    ValueAxis rangeAxis = getRangeAxisForDataset(i);
8
                    r.drawAnnotations(g2, dataArea, domainAxis, rangeAxis,
8
                    r.drawAnnotations(g2, dataArea, domainAxis, rangeAxis,
9
                            Layer.BACKGROUND, info);
9
                            Layer.FOREGROUND, info);
10
                }
10
                }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.6
Clones locationClones are in the same method
Number of node comparisons43
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)26.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    88
    XYItemRenderer r = getRenderer(i);
    98
    XYItemRenderer r = getRenderer(i);
    89
    if (i >= getDatasetCount())
    99
    if (i >= getDatasetCount())
    90
    continue;
    90
    continue;
    100
    continue;
    Preondition Violations
    Statement continue; without innermost loop
    Statement continue; without innermost loop
    100
    continue;
    91
    if (r != null)
    101
    if (r != null)
    92
    ValueAxis domainAxis = getDomainAxisForDataset(i);
    102
    ValueAxis domainAxis = getDomainAxisForDataset(i);
    93
    ValueAxis rangeAxis = getRangeAxisForDataset(i);
    103
    ValueAxis rangeAxis = getRangeAxisForDataset(i);
    94
    r.drawAnnotations(g2, dataArea, domainAxis, rangeAxis, Layer.BACKGROUND, info);
    94
    r.drawAnnotations(g2, dataArea, domainAxis, rangeAxis, Layer.BACKGROUND, info);
    104
    r.drawAnnotations(g2, dataArea, domainAxis, rangeAxis, Layer.FOREGROUND, info);
    Differences
    Expression1Expression2Difference
    BACKGROUNDFOREGROUNDVARIABLE_NAME_MISMATCH
    104
    r.drawAnnotations(g2, dataArea, domainAxis, rangeAxis, Layer.FOREGROUND, info);
    Precondition Violations (2)
    Row Violation
    1Statement continue; without innermost loop
    2Statement continue; without innermost loop