Rectangle2D anchorRect = null; if (orientation == PlotOrientation.HORIZONTAL) { anchorRect = markerOffset.createAdjustedRectangle(markerArea, LengthAdjustmentType.CONTRACT, labelOffsetType); } else if (orientation == PlotOrientation.VERTICAL) { anchorRect = markerOffset.createAdjustedRectangle(markerArea, labelOffsetType, LengthAdjustmentType.CONTRACT); } return RectangleAnchor.coordinates(anchorRect, anchor);
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);
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/category/AbstractCategoryItemRenderer.java
Method name: Point2D calculateDomainMarkerTextAnchorPoint(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
                    LengthAdjustmentType.CONTRACT, labelOffsetType);
4
                    labelOffsetType, 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
                    labelOffsetType, LengthAdjustmentType.CONTRACT);
8
                    LengthAdjustmentType.CONTRACT, labelOffsetType);
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.4
Clones locationClones are declared in the same 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.0
    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)
    4
    if (orientation == PlotOrientation.VERTICAL)
    Differences
    Expression1Expression2Difference
    HORIZONTALVERTICALVARIABLE_NAME_MISMATCH
    4
    if (orientation == PlotOrientation.VERTICAL)
    3
    anchorRect = markerOffset.createAdjustedRectangle(markerArea, LengthAdjustmentType.CONTRACT, labelOffsetType);
    5
    anchorRect = markerOffset.createAdjustedRectangle(markerArea, LengthAdjustmentType.CONTRACT, labelOffsetType);
    4
    else if (orientation == PlotOrientation.VERTICAL)
    4
    else if (orientation == PlotOrientation.VERTICAL)
    2
    else if (orientation == PlotOrientation.HORIZONTAL)
    Differences
    Expression1Expression2Difference
    VERTICALHORIZONTALVARIABLE_NAME_MISMATCH
    2
    else if (orientation == PlotOrientation.HORIZONTAL)
    5
    anchorRect = markerOffset.createAdjustedRectangle(markerArea, labelOffsetType, LengthAdjustmentType.CONTRACT);
    3
    anchorRect = markerOffset.createAdjustedRectangle(markerArea, labelOffsetType, LengthAdjustmentType.CONTRACT);
    6
    return RectangleAnchor.coordinates(anchorRect, anchor);
    6
    return RectangleAnchor.coordinates(anchorRect, anchor);
    Precondition Violations (0)
    Row Violation