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 refreshVerticalTicks(Graphics2D, Rectangle2D, RectangleEdge)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | anchor = TextAnchor.TOP_CENTER; ↵ | 1 | anchor = TextAnchor.CENTER_LEFT; ↵ | |
2 | if ((lastTick != null) && (lastX == x) ↵ | 2 | if ((lastTick != null) && (lastY == y) ↵ | |
3 | && (currentTickValue != cycleBound)) {↵ | 3 | && (currentTickValue != cycleBound)) {↵ | |
4 | anchor = isInverted() ↵ | 4 | anchor = isInverted() ↵ | |
5 | ? TextAnchor.TOP_LEFT : TextAnchor.TOP_RIGHT;↵ | 5 | ? TextAnchor.BOTTOM_LEFT : TextAnchor.TOP_LEFT;↵ | |
6 | result.remove(result.size() - 1);↵ | 6 | result.remove(result.size() - 1);↵ | |
7 | result.add(new CycleBoundTick(↵ | 7 | result.add(new CycleBoundTick(↵ | |
8 | this.boundMappedToLastCycle, lastTick.getNumber(),↵ | 8 | this.boundMappedToLastCycle, lastTick.getNumber(),↵ | |
9 | lastTick.getText(), anchor, anchor, ↵ | 9 | lastTick.getText(), anchor, anchor, ↵ | |
10 | lastTick.getAngle())↵ | 10 | lastTick.getAngle())↵ | |
11 | );↵ | 11 | );↵ | |
12 | this.internalMarkerWhenTicksOverlap = true;↵ | 12 | this.internalMarkerWhenTicksOverlap = true;↵ | |
13 | anchor = isInverted() ↵ | 13 | anchor = isInverted() ↵ | |
14 | ? TextAnchor.TOP_RIGHT : TextAnchor.TOP_LEFT;↵ | 14 | ? TextAnchor.TOP_LEFT : TextAnchor.BOTTOM_LEFT;↵ | |
15 | }↵ | 15 | }↵ | |
16 | rotationAnchor = anchor; | 16 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 43 |
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 14.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
54 | anchor = TextAnchor.TOP_CENTER; |
| 63 | anchor = TextAnchor.CENTER_LEFT; | ||||||||||||||||
55 | if ((lastTick != null) && (lastX == x) && (currentTickValue != cycleBound)) |
| 64 | if ((lastTick != null) && (lastY == y) && (currentTickValue != cycleBound)) | ||||||||||||||||
56 | anchor = isInverted() ? TextAnchor.TOP_LEFT : TextAnchor.TOP_RIGHT; |
| 65 | anchor = isInverted() ? TextAnchor.BOTTOM_LEFT : TextAnchor.TOP_LEFT; | ||||||||||||||||
57 | result.remove(result.size() - 1); | 66 | result.remove(result.size() - 1); | |||||||||||||||||
58 | result.add(new CycleBoundTick(this.boundMappedToLastCycle, lastTick.getNumber(), lastTick.getText(), anchor, anchor, lastTick.getAngle())); |
| 67 | result.add(new CycleBoundTick(this.boundMappedToLastCycle, lastTick.getNumber(), lastTick.getText(), anchor, anchor, lastTick.getAngle())); | ||||||||||||||||
59 | this.internalMarkerWhenTicksOverlap = true; | 68 | this.internalMarkerWhenTicksOverlap = true; | |||||||||||||||||
60 | anchor = isInverted() ? TextAnchor.TOP_RIGHT : TextAnchor.TOP_LEFT; |
| 69 | anchor = isInverted() ? TextAnchor.TOP_LEFT : TextAnchor.BOTTOM_LEFT; | ||||||||||||||||
61 | rotationAnchor = anchor; | 70 | rotationAnchor = anchor; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables anchor, rotationAnchor , while Clone fragment #2 returns variables anchor, rotationAnchor |