if (isItemLabelVisible(row, column)) { if (orientation == PlotOrientation.HORIZONTAL) { drawItemLabel(g2, orientation, dataset, row, column, y1, x1, (value < 0.0)); } else if (orientation == PlotOrientation.VERTICAL) { drawItemLabel(g2, orientation, dataset, row, column, x1, y1, (value < 0.0)); } }
if (isItemLabelVisible(row, column)) { if (orientation == PlotOrientation.HORIZONTAL) { drawItemLabel(g2, orientation, dataset, row, column, y1, x1, (meanValue.doubleValue() < 0.0)); } else if (orientation == PlotOrientation.VERTICAL) { drawItemLabel(g2, orientation, dataset, row, column, x1, y1, (meanValue.doubleValue() < 0.0)); } }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/LineAndShapeRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StatisticalLineAndShapeRenderer.java
Method name: void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int) Method name: void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (isItemLabelVisible(row, column)) {
1
if (isItemLabelVisible(row, column)) {
2
                if (orientation == PlotOrientation.HORIZONTAL) {
2
            if (orientation == PlotOrientation.HORIZONTAL) {
3
                    drawItemLabel(g2, orientation, dataset, row, column, y1,
3
                drawItemLabel(g2, orientation, dataset, row, column,
4
                            x1, (value < 0.0));
4
                        y1, x1, (meanValue.doubleValue() < 0.0));
5
                }
5
            }
6
                else if (orientation == PlotOrientation.VERTICAL) {
6
            else if (orientation == PlotOrientation.VERTICAL) {
7
                    drawItemLabel(g2, orientation, dataset, row, column, x1,
7
                drawItemLabel(g2, orientation, dataset, row, column,
8
                            y1, (value < 0.0));
8
                        x1, y1, (meanValue.doubleValue() < 0.0));
9
                }
9
            
10
    
10
}
11
        }
11
        }
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.5
Clones locationClones are in different classes having the same super class
Number of node comparisons14
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)14.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    51
    if (isItemLabelVisible(row, column))
    76
    if (isItemLabelVisible(row, column))
    52
    if (orientation == PlotOrientation.HORIZONTAL)
    77
    if (orientation == PlotOrientation.HORIZONTAL)
    53
    drawItemLabel(g2, orientation, dataset, row, column, y1, x1, (value < 0.0));
    53
    drawItemLabel(g2, orientation, dataset, row, column, y1, x1, (value < 0.0));
    78
    drawItemLabel(g2, orientation, dataset, row, column, y1, x1, (meanValue.doubleValue() < 0.0));
    Differences
    Expression1Expression2Difference
    valuemeanValue.doubleValue()TYPE_COMPATIBLE_REPLACEMENT
    78
    drawItemLabel(g2, orientation, dataset, row, column, y1, x1, (meanValue.doubleValue() < 0.0));
    54
    else if (orientation == PlotOrientation.VERTICAL)
    79
    else if (orientation == PlotOrientation.VERTICAL)
    55
    drawItemLabel(g2, orientation, dataset, row, column, x1, y1, (value < 0.0));
    55
    drawItemLabel(g2, orientation, dataset, row, column, x1, y1, (value < 0.0));
    80
    drawItemLabel(g2, orientation, dataset, row, column, x1, y1, (meanValue.doubleValue() < 0.0));
    Differences
    Expression1Expression2Difference
    valuemeanValue.doubleValue()TYPE_COMPATIBLE_REPLACEMENT
    80
    drawItemLabel(g2, orientation, dataset, row, column, x1, y1, (meanValue.doubleValue() < 0.0));
    Precondition Violations (0)
    Row Violation