File path: /jfreechart-1.0.10/src/org/jfree/chart/block/CenterArrangement.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/block/FlowArrangement.java | |||
Method name: Size2D arrangeRN(BlockContainer, Graphics2D, RectangleConstraint)
|
Method name: Size2D arrangeRR(BlockContainer, Graphics2D, RectangleConstraint)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | Size2D s1 = arrangeNN(container, g2);↵ | 1 | Size2D s1 = arrangeNN(container, g2);↵ | |
2 | if (constraint.getWidthRange().contains(s1.width)) {↵ | 2 | if (constraint.getWidthRange().contains(s1.width)) {↵ | |
3 | return s1; ↵ | 3 | return s1; // TODO: we didn't check the height yet↵ | |
4 | }↵ | 4 | }↵ | |
5 | else {↵ | 5 | else {↵ | |
6 | RectangleConstraint c = constraint.toFixedWidth(↵ | 6 | RectangleConstraint c = constraint.toFixedWidth(↵ | |
7 | constraint.getWidthRange().getUpperBound()↵ | 7 | constraint.getWidthRange().getUpperBound()↵ | |
8 | );↵ | 8 | );↵ | |
9 | return arrangeFN(container, g2, c);↵ | 9 | return arrangeFR(container, g2, c);↵ | |
10 | } | 10 |
| |
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 in different classes |
Number of node comparisons | 17 |
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) | 514.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Size2D s1 = arrangeNN(container, g2); | 1 | Size2D s1 = arrangeNN(container, g2); | |||||||||||||
2 | if (constraint.getWidthRange().contains(s1.width)) | 2 | if (constraint.getWidthRange().contains(s1.width)) | |||||||||||||
3 | return s1; | 3 | return s1; | |||||||||||||
else | else | |||||||||||||||
4 | RectangleConstraint c = constraint.toFixedWidth(constraint.getWidthRange().getUpperBound()); | 4 | RectangleConstraint c = constraint.toFixedWidth(constraint.getWidthRange().getUpperBound()); | |||||||||||||
5 | return arrangeFN(container, g2, c); |
| 5 | return arrangeFR(container, g2, c); |
Row | Violation |
---|---|
1 | Expression arrangeFN(container,g2,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression arrangeFR(container,g2,c) cannot be parameterized, because it has dependencies to/from statements that will be extracted |