if (xMedian != null) { double xxMedian = rangeAxis.valueToJava2D(xMedian.doubleValue(), dataArea, location); g2.draw(new Line2D.Double(xxMedian, yy, xxMedian, yy + state.getBarWidth())); }
if (yMedian != null) { double yyMedian = rangeAxis.valueToJava2D(yMedian.doubleValue(), dataArea, location); g2.draw(new Line2D.Double(xx, yyMedian, xx + state.getBarWidth(), yyMedian)); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java
Method name: void drawHorizontalItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int) Method name: void drawVerticalItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (xMedian != null) {
1
if (yMedian != null) {
2
            double xxMedian = rangeAxis.valueToJava2D(xMedian.doubleValue(),
2
            double yyMedian = rangeAxis.valueToJava2D(yMedian.doubleValue(),
3
                    dataArea, location);
3
                    dataArea, location);
4
            g2.draw(new Line2D.Double(xxMedian, yy, xxMedian,
4
            g2.draw(new Line2D.Double(xx, yyMedian, xx + state.getBarWidth(),
5
                    yy + state.getBarWidth()));
5
                    yyMedian));
6
        }
6
        }
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.1
Clones locationClones are declared in the same class
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)9.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    51
    if (xMedian != null)
    51
    if (xMedian != null)
    54
    if (yMedian != null)
    Differences
    Expression1Expression2Difference
    xMedianyMedianVARIABLE_NAME_MISMATCH
    54
    if (yMedian != null)
    52
    double xxMedian = rangeAxis.valueToJava2D(xMedian.doubleValue(), dataArea, location);
    52
    double xxMedian = rangeAxis.valueToJava2D(xMedian.doubleValue(), dataArea, location);
    55
    double yyMedian = rangeAxis.valueToJava2D(yMedian.doubleValue(), dataArea, location);
    Differences
    Expression1Expression2Difference
    xxMedianyyMedianVARIABLE_NAME_MISMATCH
    xMedianyMedianVARIABLE_NAME_MISMATCH
    55
    double yyMedian = rangeAxis.valueToJava2D(yMedian.doubleValue(), dataArea, location);
    53
    g2.draw(new Line2D.Double(xxMedian, yy, xxMedian, yy + state.getBarWidth()));
    53
    g2.draw(new Line2D.Double(xxMedian, yy, xxMedian, yy + state.getBarWidth()));
    56
    g2.draw(new Line2D.Double(xx, yyMedian, xx + state.getBarWidth(), yyMedian));
    Differences
    Expression1Expression2Difference
    xxMedianxxVARIABLE_NAME_MISMATCH
    yyyyMedianVARIABLE_NAME_MISMATCH
    xxMedianxx + state.getBarWidth()TYPE_COMPATIBLE_REPLACEMENT
    yy + state.getBarWidth()yyMedianTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression xxMedian cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression yyMedian cannot be parameterized, because it has dependencies to/from statements that will be extracted
    56
    g2.draw(new Line2D.Double(xx, yyMedian, xx + state.getBarWidth(), yyMedian));
    Precondition Violations (2)
    Row Violation
    1Expression xxMedian cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression yyMedian cannot be parameterized, because it has dependencies to/from statements that will be extracted