Rectangle2D anchorRect = null; if (orientation == PlotOrientation.HORIZONTAL) { anchorRect = markerOffset.createAdjustedRectangle(markerArea, labelOffsetType, LengthAdjustmentType.CONTRACT); } else if (orientation == PlotOrientation.VERTICAL) { anchorRect = markerOffset.createAdjustedRectangle(markerArea, LengthAdjustmentType.CONTRACT, labelOffsetType); } return RectangleAnchor.coordinates(anchorRect, anchor);
Rectangle2D anchorRect = null; if (orientation == PlotOrientation.HORIZONTAL) { anchorRect = markerOffset.createAdjustedRectangle(markerArea, labelOffsetForRange, LengthAdjustmentType.CONTRACT); } else if (orientation == PlotOrientation.VERTICAL) { anchorRect = markerOffset.createAdjustedRectangle(markerArea, LengthAdjustmentType.CONTRACT, labelOffsetForRange); } return RectangleAnchor.coordinates(anchorRect, anchor);
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java
Method name: Point2D calculateRangeMarkerTextAnchorPoint(Graphics2D, PlotOrientation, Rectangle2D, Rectangle2D, RectangleInsets, LengthAdjustmentType, RectangleAnchor) Method name: Point2D calculateRangeMarkerTextAnchorPoint(Graphics2D, PlotOrientation, Rectangle2D, Rectangle2D, RectangleInsets, LengthAdjustmentType, RectangleAnchor)
Number of AST nodes: 6 Number of AST nodes: 6
1
Rectangle2D anchorRect = null;
1
Rectangle2D anchorRect = null;
2
        if (orientation == PlotOrientation.HORIZONTAL) {
2
        if (orientation == PlotOrientation.HORIZONTAL) {
3
            anchorRect = markerOffset.createAdjustedRectangle(markerArea,
3
            anchorRect = markerOffset.createAdjustedRectangle(markerArea,
4
                    labelOffsetType, LengthAdjustmentType.CONTRACT);
4
                    labelOffsetForRange, LengthAdjustmentType.CONTRACT);
5
        }
5
        }
6
        else if (orientation == PlotOrientation.VERTICAL) {
6
        else if (orientation == PlotOrientation.VERTICAL) {
7
            anchorRect = markerOffset.createAdjustedRectangle(markerArea,
7
            anchorRect = markerOffset.createAdjustedRectangle(markerArea,
8
                    LengthAdjustmentType.CONTRACT, labelOffsetType);
8
                    LengthAdjustmentType.CONTRACT, labelOffsetForRange);
9
        }
9
        }
10
        return RectangleAnchor.coordinates(anchorRect, anchor);
10
        return RectangleAnchor.coordinates(anchorRect, anchor);
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 comparisons17
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    Rectangle2D anchorRect = null;
    1
    Rectangle2D anchorRect = null;
    2
    if (orientation == PlotOrientation.HORIZONTAL)
    2
    if (orientation == PlotOrientation.HORIZONTAL)
    3
    anchorRect = markerOffset.createAdjustedRectangle(markerArea, labelOffsetType, LengthAdjustmentType.CONTRACT);
    3
    anchorRect = markerOffset.createAdjustedRectangle(markerArea, labelOffsetType, LengthAdjustmentType.CONTRACT);
    3
    anchorRect = markerOffset.createAdjustedRectangle(markerArea, labelOffsetForRange, LengthAdjustmentType.CONTRACT);
    Differences
    Expression1Expression2Difference
    labelOffsetTypelabelOffsetForRangeVARIABLE_NAME_MISMATCH
    3
    anchorRect = markerOffset.createAdjustedRectangle(markerArea, labelOffsetForRange, LengthAdjustmentType.CONTRACT);
    4
    else if (orientation == PlotOrientation.VERTICAL)
    4
    else if (orientation == PlotOrientation.VERTICAL)
    5
    anchorRect = markerOffset.createAdjustedRectangle(markerArea, LengthAdjustmentType.CONTRACT, labelOffsetType);
    5
    anchorRect = markerOffset.createAdjustedRectangle(markerArea, LengthAdjustmentType.CONTRACT, labelOffsetType);
    5
    anchorRect = markerOffset.createAdjustedRectangle(markerArea, LengthAdjustmentType.CONTRACT, labelOffsetForRange);
    Differences
    Expression1Expression2Difference
    labelOffsetTypelabelOffsetForRangeVARIABLE_NAME_MISMATCH
    5
    anchorRect = markerOffset.createAdjustedRectangle(markerArea, LengthAdjustmentType.CONTRACT, labelOffsetForRange);
    6
    return RectangleAnchor.coordinates(anchorRect, anchor);
    6
    return RectangleAnchor.coordinates(anchorRect, anchor);
    Precondition Violations (0)
    Row Violation