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 replaceBottomPosition(CategoryLabelPositions, CategoryLabelPosition)
|
Method name: CategoryLabelPositions replaceLeftPosition(CategoryLabelPositions, CategoryLabelPosition)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
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 (bottom == null) {↵ | 4 | if (left == null) {↵ | |
5 | throw new IllegalArgumentException("Null 'bottom' argument.");↵ | 5 | throw new IllegalArgumentException("Null 'left' argument.");↵ | |
6 | }↵ | 6 | }↵ | |
7 | ↵ | 7 | ↵ | |
8 | return new CategoryLabelPositions(↵ | 8 | return new CategoryLabelPositions(↵ | |
9 | base.getLabelPosition(RectangleEdge.TOP),↵ | 9 | base.getLabelPosition(RectangleEdge.TOP),↵ | |
10 | bottom,↵ | |||
11 | base.getLabelPosition(RectangleEdge.LEFT)↵ | 10 | base.getLabelPosition(RectangleEdge.BOTTOM),↵ | |
12 | ,↵ | 11 | left,↵ | |
13 | base.getLabelPosition(RectangleEdge.RIGHT)↵ | 12 | base.getLabelPosition(RectangleEdge.RIGHT)↵ | |
14 | ); | 13 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
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 | 14 |
Number of mapped statements | 5 |
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) | 1.5 |
Clone type | Type 2 |
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 (bottom == null) |
| 3 | if (left == null) | |||||||||||||||
4 | throw new IllegalArgumentException("Null 'bottom' argument."); |
| 4 | throw new IllegalArgumentException("Null 'left' argument."); | |||||||||||||||
5 | return new CategoryLabelPositions(base.getLabelPosition(RectangleEdge.TOP), bottom, base.getLabelPosition(RectangleEdge.LEFT), base.getLabelPosition(RectangleEdge.RIGHT)); |
| 5 | return new CategoryLabelPositions(base.getLabelPosition(RectangleEdge.TOP), base.getLabelPosition(RectangleEdge.BOTTOM), left, base.getLabelPosition(RectangleEdge.RIGHT)); |
Row | Violation |
---|---|
1 | Expression base.getLabelPosition(RectangleEdge.BOTTOM) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression base.getLabelPosition(RectangleEdge.LEFT) cannot be parameterized, because it has dependencies to/from statements that will be extracted |