if ((lastTick != null) && (lastX == x) && (currentTickValue != cycleBound)) { anchor = isInverted() ? TextAnchor.BOTTOM_LEFT : TextAnchor.BOTTOM_RIGHT; result.remove(result.size() - 1); result.add(new CycleBoundTick( this.boundMappedToLastCycle, lastTick.getNumber(), lastTick.getText(), anchor, anchor, lastTick.getAngle()) ); this.internalMarkerWhenTicksOverlap = true; anchor = isInverted() ? TextAnchor.BOTTOM_RIGHT : TextAnchor.BOTTOM_LEFT; }
if ((lastTick != null) && (lastX == x) && (currentTickValue != cycleBound)) { anchor = isInverted() ? TextAnchor.TOP_LEFT : TextAnchor.TOP_RIGHT; result.remove(result.size() - 1); result.add(new CycleBoundTick( this.boundMappedToLastCycle, lastTick.getNumber(), lastTick.getText(), anchor, anchor, lastTick.getAngle()) ); this.internalMarkerWhenTicksOverlap = true; anchor = isInverted() ? TextAnchor.TOP_RIGHT : TextAnchor.TOP_LEFT; }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CyclicNumberAxis.java File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CyclicNumberAxis.java
Method name: List refreshTicksHorizontal(Graphics2D, Rectangle2D, RectangleEdge) Method name: List refreshTicksHorizontal(Graphics2D, Rectangle2D, RectangleEdge)
Number of AST nodes: 6 Number of AST nodes: 6
1
if ((lastTick != null) && (lastX == x) 
1
if ((lastTick != null) && (lastX == x) 
2
                            && (currentTickValue != cycleBound)) {
2
                            && (currentTickValue != cycleBound)) {
3
                        anchor = isInverted() 
3
                        anchor = isInverted() 
4
                            ? TextAnchor.BOTTOM_LEFT : TextAnchor.BOTTOM_RIGHT;
4
                            ? TextAnchor.TOP_LEFT : TextAnchor.TOP_RIGHT;
5
                        result.remove(result.size() - 1);
5
                        result.remove(result.size() - 1);
6
                        result.add(new CycleBoundTick(
6
                        result.add(new CycleBoundTick(
7
                            this.boundMappedToLastCycle, lastTick.getNumber(),
7
                            this.boundMappedToLastCycle, lastTick.getNumber(),
8
                            lastTick.getText(), anchor, anchor, 
8
                            lastTick.getText(), anchor, anchor, 
9
                            lastTick.getAngle())
9
                            lastTick.getAngle())
10
                        );
10
                        );
11
                        this.internalMarkerWhenTicksOverlap = true;
11
                        this.internalMarkerWhenTicksOverlap = true;
12
                        anchor = isInverted() 
12
                        anchor = isInverted() 
13
                            ? TextAnchor.BOTTOM_RIGHT : TextAnchor.BOTTOM_LEFT;
13
                            ? TextAnchor.TOP_RIGHT : TextAnchor.TOP_LEFT;
14
                    }
14
                    }
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.3
Clones locationClones are in the same method
Number of node comparisons20
  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)15.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    47
    if ((lastTick != null) && (lastX == x) && (currentTickValue != cycleBound))
    55
    if ((lastTick != null) && (lastX == x) && (currentTickValue != cycleBound))
    48
    anchor = isInverted() ? TextAnchor.BOTTOM_LEFT : TextAnchor.BOTTOM_RIGHT;
    48
    anchor = isInverted() ? TextAnchor.BOTTOM_LEFT : TextAnchor.BOTTOM_RIGHT;
    56
    anchor = isInverted() ? TextAnchor.TOP_LEFT : TextAnchor.TOP_RIGHT;
    Differences
    Expression1Expression2Difference
    BOTTOM_LEFTTOP_LEFTVARIABLE_NAME_MISMATCH
    BOTTOM_RIGHTTOP_RIGHTVARIABLE_NAME_MISMATCH
    56
    anchor = isInverted() ? TextAnchor.TOP_LEFT : TextAnchor.TOP_RIGHT;
    49
    result.remove(result.size() - 1);
    57
    result.remove(result.size() - 1);
    50
    result.add(new CycleBoundTick(this.boundMappedToLastCycle, lastTick.getNumber(), lastTick.getText(), anchor, anchor, lastTick.getAngle()));
    58
    result.add(new CycleBoundTick(this.boundMappedToLastCycle, lastTick.getNumber(), lastTick.getText(), anchor, anchor, lastTick.getAngle()));
    51
    this.internalMarkerWhenTicksOverlap = true;
    59
    this.internalMarkerWhenTicksOverlap = true;
    52
    anchor = isInverted() ? TextAnchor.BOTTOM_RIGHT : TextAnchor.BOTTOM_LEFT;
    52
    anchor = isInverted() ? TextAnchor.BOTTOM_RIGHT : TextAnchor.BOTTOM_LEFT;
    60
    anchor = isInverted() ? TextAnchor.TOP_RIGHT : TextAnchor.TOP_LEFT;
    Differences
    Expression1Expression2Difference
    BOTTOM_RIGHTTOP_RIGHTVARIABLE_NAME_MISMATCH
    BOTTOM_LEFTTOP_LEFTVARIABLE_NAME_MISMATCH
    60
    anchor = isInverted() ? TextAnchor.TOP_RIGHT : TextAnchor.TOP_LEFT;
    Precondition Violations (0)
    Row Violation