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 replaceLeftPosition(CategoryLabelPositions, CategoryLabelPosition)
|
Method name: CategoryLabelPositions replaceRightPosition(CategoryLabelPositions, CategoryLabelPosition)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | if (base == null) {↵ | 1 | if (base == null) {↵ | |
2 | throw new IllegalArgumentException("Null 'base' argument.");↵ | 2 | throw new IllegalArgumentException("Null 'base' argument.");↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (left == null) {↵ | 4 | if (right == null) {↵ | |
5 | throw new IllegalArgumentException("Null 'left' argument.");↵ | 5 | throw new IllegalArgumentException("Null 'right' argument.");↵ | |
6 | }↵ | 6 |
| |
7 | ↵ | |||
8 | return new CategoryLabelPositions(↵ | |||
9 | base.getLabelPosition(RectangleEdge.TOP),↵ | |||
10 | base.getLabelPosition(RectangleEdge.BOTTOM),↵ | |||
11 | left,↵ | |||
12 | base.getLabelPosition(RectangleEdge.RIGHT)↵ | |||
13 | ); | |||
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (base == null) | 1 | if (base == null) | |||||||||||
2 | throw new IllegalArgumentException("Null 'base' argument."); | 2 | throw new IllegalArgumentException("Null 'base' argument."); | |||||||||||
3 | if (left == null) |
| 3 | if (right == null) | ||||||||||
4 | throw new IllegalArgumentException("Null 'left' argument."); |
| 4 | throw new IllegalArgumentException("Null 'right' argument."); | ||||||||||
5 | return new CategoryLabelPositions(base.getLabelPosition(RectangleEdge.TOP), base.getLabelPosition(RectangleEdge.BOTTOM), left, base.getLabelPosition(RectangleEdge.RIGHT)); |
| |
Row | Violation |
---|---|
1 | Unmatched statement return new CategoryLabelPositions(base.getLabelPosition(RectangleEdge.TOP),base.getLabelPosition(RectangleEdge.BOTTOM),left,base.getLabelPosition(RectangleEdge.RIGHT)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched return new CategoryLabelPositions(base.getLabelPosition(RectangleEdge.TOP),base.getLabelPosition(RectangleEdge.BOTTOM),left,base.getLabelPosition(RectangleEdge.RIGHT)); |