File path: /jfreechart-1.0.10/src/org/jfree/chart/block/ColumnArrangement.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/block/FlowArrangement.java | |||
Method name: Size2D arrangeRF(BlockContainer, Graphics2D, RectangleConstraint)
|
Method name: Size2D arrangeFR(BlockContainer, Graphics2D, RectangleConstraint)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (constraint.getWidthRange().contains(s.width)) {↵ | 1 | if (constraint.getHeightRange().contains(s.height)) {↵ | |
2 | return s; ↵ | 2 | return s; ↵ | |
3 | }↵ | 3 | }↵ | |
4 | else {↵ | 4 | else {↵ | |
5 | RectangleConstraint c = constraint.toFixedWidth(↵ | 5 | RectangleConstraint c = constraint.toFixedHeight(↵ | |
6 | constraint.getWidthRange().constrain(s.getWidth())↵ | 6 | constraint.getHeightRange().constrain(s.getHeight())↵ | |
7 | );↵ | 7 | );↵ | |
8 | return arrangeFF(container, g2, c);↵ | 8 | return arrangeFF(container, g2, c);↵ | |
9 | } | 9 |
| |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 16 |
Number of mapped statements | 4 |
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) | 5.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (constraint.getWidthRange().contains(s.width)) |
| 2 | if (constraint.getHeightRange().contains(s.height)) | ||||||||||||||||||||||
3 | return s; | 3 | return s; | |||||||||||||||||||||||
else | else | |||||||||||||||||||||||||
4 | RectangleConstraint c = constraint.toFixedWidth(constraint.getWidthRange().constrain(s.getWidth())); |
| 4 | RectangleConstraint c = constraint.toFixedHeight(constraint.getHeightRange().constrain(s.getHeight())); | ||||||||||||||||||||||
5 | return arrangeFF(container, g2, c); | 5 | return arrangeFF(container, g2, c); |
Row | Violation |
---|---|
1 | Expression s.getWidth() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression s.getHeight() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression constraint.getWidthRange() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression constraint.getHeightRange() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression constraint.toFixedWidth(constraint.getWidthRange().constrain(s.getWidth())) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression constraint.toFixedHeight(constraint.getHeightRange().constrain(s.getHeight())) cannot be parameterized, because it has dependencies to/from statements that will be extracted |