return new CategoryLabelPositions( new CategoryLabelPosition( RectangleAnchor.BOTTOM, TextBlockAnchor.BOTTOM_LEFT, TextAnchor.BOTTOM_LEFT, -angle, CategoryLabelWidthType.RANGE, 0.50f ), // TOP new CategoryLabelPosition( RectangleAnchor.TOP, TextBlockAnchor.TOP_RIGHT, TextAnchor.TOP_RIGHT, -angle, CategoryLabelWidthType.RANGE, 0.50f ), // BOTTOM new CategoryLabelPosition( RectangleAnchor.RIGHT, TextBlockAnchor.BOTTOM_RIGHT, TextAnchor.BOTTOM_RIGHT, -angle, CategoryLabelWidthType.RANGE, 0.50f ), // LEFT new CategoryLabelPosition( RectangleAnchor.LEFT, TextBlockAnchor.TOP_LEFT, TextAnchor.TOP_LEFT, -angle, CategoryLabelWidthType.RANGE, 0.50f ) // RIGHT );
return new CategoryLabelPositions( new CategoryLabelPosition( RectangleAnchor.BOTTOM, TextBlockAnchor.BOTTOM_RIGHT, TextAnchor.BOTTOM_RIGHT, angle, CategoryLabelWidthType.RANGE, 0.50f ), // TOP new CategoryLabelPosition( RectangleAnchor.TOP, TextBlockAnchor.TOP_LEFT, TextAnchor.TOP_LEFT, angle, CategoryLabelWidthType.RANGE, 0.50f ), // BOTTOM new CategoryLabelPosition( RectangleAnchor.RIGHT, TextBlockAnchor.TOP_RIGHT, TextAnchor.TOP_RIGHT, angle, CategoryLabelWidthType.RANGE, 0.50f ), // LEFT new CategoryLabelPosition( RectangleAnchor.LEFT, TextBlockAnchor.BOTTOM_LEFT, TextAnchor.BOTTOM_LEFT, angle, CategoryLabelWidthType.RANGE, 0.50f ) // RIGHT );
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CategoryLabelPositions.java File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CategoryLabelPositions.java
Method name: CategoryLabelPositions createUpRotationLabelPositions(double) Method name: CategoryLabelPositions createDownRotationLabelPositions(double)
Number of AST nodes: 1 Number of AST nodes: 1
1
return new CategoryLabelPositions(
1
return new CategoryLabelPositions(
2
            new CategoryLabelPosition(
2
            new CategoryLabelPosition(
3
                RectangleAnchor.BOTTOM, TextBlockAnchor.BOTTOM_LEFT, 
3
                RectangleAnchor.BOTTOM, TextBlockAnchor.BOTTOM_RIGHT, 
4
                TextAnchor.BOTTOM_LEFT, -angle,
4
                TextAnchor.BOTTOM_RIGHT, angle,
5
                CategoryLabelWidthType.RANGE, 0.50f
5
                CategoryLabelWidthType.RANGE, 0.50f
6
            ), // TOP
6
            ), // TOP
7
            new CategoryLabelPosition(
7
            new CategoryLabelPosition(
8
                RectangleAnchor.TOP, TextBlockAnchor.TOP_RIGHT, 
8
                RectangleAnchor.TOP, TextBlockAnchor.TOP_LEFT, 
9
                TextAnchor.TOP_RIGHT, -angle,
9
                TextAnchor.TOP_LEFT, angle,
10
                CategoryLabelWidthType.RANGE, 0.50f
10
                CategoryLabelWidthType.RANGE, 0.50f
11
            ), // BOTTOM
11
            ), // BOTTOM
12
            new CategoryLabelPosition(
12
            new CategoryLabelPosition(
13
                RectangleAnchor.RIGHT, TextBlockAnchor.BOTTOM_RIGHT, 
13
                RectangleAnchor.RIGHT, TextBlockAnchor.TOP_RIGHT, 
14
                TextAnchor.BOTTOM_RIGHT, -angle,
14
                TextAnchor.TOP_RIGHT, angle,
15
                CategoryLabelWidthType.RANGE, 0.50f
15
                CategoryLabelWidthType.RANGE, 0.50f
16
            ), // LEFT
16
            ), // LEFT
17
            new CategoryLabelPosition(
17
            new CategoryLabelPosition(
18
                RectangleAnchor.LEFT, TextBlockAnchor.TOP_LEFT, 
18
                RectangleAnchor.LEFT, TextBlockAnchor.BOTTOM_LEFT, 
19
                TextAnchor.TOP_LEFT, -angle,
19
                TextAnchor.BOTTOM_LEFT, angle,
20
                CategoryLabelWidthType.RANGE, 0.50f
20
                CategoryLabelWidthType.RANGE, 0.50f
21
            ) // RIGHT
21
            ) // RIGHT
22
        );
22
        );
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.0
Clones locationClones are declared in the same class
Number of node comparisons1
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    return new CategoryLabelPositions(new CategoryLabelPosition(RectangleAnchor.BOTTOM, TextBlockAnchor.BOTTOM_LEFT, TextAnchor.BOTTOM_LEFT, -angle, CategoryLabelWidthType.RANGE, 0.50f), new CategoryLabelPosition(RectangleAnchor.TOP, TextBlockAnchor.TOP_RIGHT, TextAnchor.TOP_RIGHT, -angle, CategoryLabelWidthType.RANGE, 0.50f), new CategoryLabelPosition(RectangleAnchor.RIGHT, TextBlockAnchor.BOTTOM_RIGHT, TextAnchor.BOTTOM_RIGHT, -angle, CategoryLabelWidthType.RANGE, 0.50f), new CategoryLabelPosition(RectangleAnchor.LEFT, TextBlockAnchor.TOP_LEFT, TextAnchor.TOP_LEFT, -angle, CategoryLabelWidthType.RANGE, 0.50f));
    1
    return new CategoryLabelPositions(new CategoryLabelPosition(RectangleAnchor.BOTTOM, TextBlockAnchor.BOTTOM_LEFT, TextAnchor.BOTTOM_LEFT, -angle, CategoryLabelWidthType.RANGE, 0.50f), new CategoryLabelPosition(RectangleAnchor.TOP, TextBlockAnchor.TOP_RIGHT, TextAnchor.TOP_RIGHT, -angle, CategoryLabelWidthType.RANGE, 0.50f), new CategoryLabelPosition(RectangleAnchor.RIGHT, TextBlockAnchor.BOTTOM_RIGHT, TextAnchor.BOTTOM_RIGHT, -angle, CategoryLabelWidthType.RANGE, 0.50f), new CategoryLabelPosition(RectangleAnchor.LEFT, TextBlockAnchor.TOP_LEFT, TextAnchor.TOP_LEFT, -angle, CategoryLabelWidthType.RANGE, 0.50f));
    1
    return new CategoryLabelPositions(new CategoryLabelPosition(RectangleAnchor.BOTTOM, TextBlockAnchor.BOTTOM_RIGHT, TextAnchor.BOTTOM_RIGHT, angle, CategoryLabelWidthType.RANGE, 0.50f), new CategoryLabelPosition(RectangleAnchor.TOP, TextBlockAnchor.TOP_LEFT, TextAnchor.TOP_LEFT, angle, CategoryLabelWidthType.RANGE, 0.50f), new CategoryLabelPosition(RectangleAnchor.RIGHT, TextBlockAnchor.TOP_RIGHT, TextAnchor.TOP_RIGHT, angle, CategoryLabelWidthType.RANGE, 0.50f), new CategoryLabelPosition(RectangleAnchor.LEFT, TextBlockAnchor.BOTTOM_LEFT, TextAnchor.BOTTOM_LEFT, angle, CategoryLabelWidthType.RANGE, 0.50f));
    Differences
    Expression1Expression2Difference
    BOTTOM_LEFTBOTTOM_RIGHTVARIABLE_NAME_MISMATCH
    BOTTOM_LEFTBOTTOM_RIGHTVARIABLE_NAME_MISMATCH
    -angleangleTYPE_COMPATIBLE_REPLACEMENT
    TOP_RIGHTTOP_LEFTVARIABLE_NAME_MISMATCH
    TOP_RIGHTTOP_LEFTVARIABLE_NAME_MISMATCH
    -angleangleTYPE_COMPATIBLE_REPLACEMENT
    BOTTOM_RIGHTTOP_RIGHTVARIABLE_NAME_MISMATCH
    BOTTOM_RIGHTTOP_RIGHTVARIABLE_NAME_MISMATCH
    -angleangleTYPE_COMPATIBLE_REPLACEMENT
    TOP_LEFTBOTTOM_LEFTVARIABLE_NAME_MISMATCH
    TOP_LEFTBOTTOM_LEFTVARIABLE_NAME_MISMATCH
    -angleangleTYPE_COMPATIBLE_REPLACEMENT
    1
    return new CategoryLabelPositions(new CategoryLabelPosition(RectangleAnchor.BOTTOM, TextBlockAnchor.BOTTOM_RIGHT, TextAnchor.BOTTOM_RIGHT, angle, CategoryLabelWidthType.RANGE, 0.50f), new CategoryLabelPosition(RectangleAnchor.TOP, TextBlockAnchor.TOP_LEFT, TextAnchor.TOP_LEFT, angle, CategoryLabelWidthType.RANGE, 0.50f), new CategoryLabelPosition(RectangleAnchor.RIGHT, TextBlockAnchor.TOP_RIGHT, TextAnchor.TOP_RIGHT, angle, CategoryLabelWidthType.RANGE, 0.50f), new CategoryLabelPosition(RectangleAnchor.LEFT, TextBlockAnchor.BOTTOM_LEFT, TextAnchor.BOTTOM_LEFT, angle, CategoryLabelWidthType.RANGE, 0.50f));
    Precondition Violations (0)
    Row Violation