File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/DateAxis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/SymbolAxis.java | |||
Method name: List refreshTicksHorizontal(Graphics2D, Rectangle2D, RectangleEdge)
|
Method name: List refreshTicksVertical(Graphics2D, Rectangle2D, RectangleEdge)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | if (isVerticalTickLabels()) {↵ | 1 | if (isVerticalTickLabels()) {↵ | |
2 | anchor = TextAnchor.CENTER_RIGHT;↵ | 2 | anchor = TextAnchor.BOTTOM_CENTER;↵ | |
3 | rotationAnchor = TextAnchor.CENTER_RIGHT;↵ | 3 | rotationAnchor = TextAnchor.BOTTOM_CENTER;↵ | |
4 | if (edge == RectangleEdge.TOP) {↵ | 4 | if (edge == RectangleEdge.LEFT) {↵ | |
5 | angle = Math.PI / 2.0;↵ | 5 | angle = -Math.PI / 2.0;↵ | |
6 | }↵ | 6 | }↵ | |
7 | else {↵ | 7 | else {↵ | |
8 | angle = -Math.PI / 2.0;↵ | 8 | angle = Math.PI / 2.0;↵ | |
9 | }↵ | 9 | } ↵ | |
10 | }↵ | 10 | }↵ | |
11 | else {↵ | 11 | else {↵ | |
12 | if (edge == RectangleEdge.TOP) {↵ | 12 | if (edge == RectangleEdge.LEFT) {↵ | |
13 | anchor = TextAnchor.BOTTOM_CENTER;↵ | 13 | anchor = TextAnchor.CENTER_RIGHT;↵ | |
14 | rotationAnchor = TextAnchor.BOTTOM_CENTER;↵ | 14 | rotationAnchor = TextAnchor.CENTER_RIGHT;↵ | |
15 | }↵ | 15 | }↵ | |
16 | else {↵ | 16 | else {↵ | |
17 | anchor = TextAnchor.TOP_CENTER;↵ | 17 | anchor = TextAnchor.CENTER_LEFT;↵ | |
18 | rotationAnchor = TextAnchor.TOP_CENTER;↵ | 18 | rotationAnchor = TextAnchor.CENTER_LEFT;↵ | |
19 | }↵ | 19 | }↵ | |
20 | } | 20 |
| |
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.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 61 |
Number of mapped statements | 11 |
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) | 3.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
19 | if (isVerticalTickLabels()) | 32 | if (isVerticalTickLabels()) | |||||||||||
20 | anchor = TextAnchor.CENTER_RIGHT; |
| 33 | anchor = TextAnchor.BOTTOM_CENTER; | ||||||||||
21 | rotationAnchor = TextAnchor.CENTER_RIGHT; |
| 34 | rotationAnchor = TextAnchor.BOTTOM_CENTER; | ||||||||||
22 | if (edge == RectangleEdge.TOP) |
| 35 | if (edge == RectangleEdge.LEFT) | ||||||||||
23 | angle = Math.PI / 2.0; |
| 36 | angle = -Math.PI / 2.0; | ||||||||||
else | else | |||||||||||||
24 | angle = -Math.PI / 2.0; |
| 37 | angle = Math.PI / 2.0; | ||||||||||
else | else | |||||||||||||
25 | if (edge == RectangleEdge.TOP) |
| 38 | if (edge == RectangleEdge.LEFT) | ||||||||||
26 | anchor = TextAnchor.BOTTOM_CENTER; |
| 39 | anchor = TextAnchor.CENTER_RIGHT; | ||||||||||
27 | rotationAnchor = TextAnchor.BOTTOM_CENTER; |
| 40 | rotationAnchor = TextAnchor.CENTER_RIGHT; | ||||||||||
else | else | |||||||||||||
28 | anchor = TextAnchor.TOP_CENTER; |
| 41 | anchor = TextAnchor.CENTER_LEFT; | ||||||||||
29 | rotationAnchor = TextAnchor.TOP_CENTER; |
| 42 | rotationAnchor = TextAnchor.CENTER_LEFT; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables anchor, rotationAnchor, angle , while Clone fragment #2 returns variables anchor, rotationAnchor, angle |