File path: /jfreechart-1.0.10/src/org/jfree/chart/block/BorderArrangement.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/block/BorderArrangement.java | |||
Method name: Size2D arrangeFF(BlockContainer, Graphics2D, RectangleConstraint)
|
Method name: Size2D arrangeFF(BlockContainer, Graphics2D, RectangleConstraint)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (this.topBlock != null) {↵ | 1 | if (this.leftBlock != null) {↵ | |
2 | RectangleConstraint c1 = new RectangleConstraint(w[0], null,↵ | 2 | RectangleConstraint c3 = new RectangleConstraint(0.0,↵ | |
3 | LengthConstraintType.FIXED, 0.0,↵ | 3 | new Range(0.0, constraint.getWidth()),↵ | |
4 | new Range(0.0, constraint.getHeight()),↵ | 4 | LengthConstraintType.RANGE, h[2], null,↵ | |
5 | LengthConstraintType.RANGE);↵ | 5 | LengthConstraintType.FIXED);↵ | |
6 | Size2D size = this.topBlock.arrange(g2, c1);↵ | 6 | Size2D size = this.leftBlock.arrange(g2, c3);↵ | |
7 | h[0] = size.height;↵ | 7 | w[2] = size.width;↵ | |
8 | } | 8 |
| |
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.1 |
Clones location | Clones are in the same method |
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) | 6.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | if (this.topBlock != null) |
| 14 | if (this.leftBlock != null) | ||||||||||||||||||||||||||||
5 | RectangleConstraint c1 = new RectangleConstraint(w[0], null, LengthConstraintType.FIXED, 0.0, new Range(0.0, constraint.getHeight()), LengthConstraintType.RANGE); |
| 15 | RectangleConstraint c3 = new RectangleConstraint(0.0, new Range(0.0, constraint.getWidth()), LengthConstraintType.RANGE, h[2], null, LengthConstraintType.FIXED); | ||||||||||||||||||||||||||||
6 | Size2D size = this.topBlock.arrange(g2, c1); |
| 16 | Size2D size = this.leftBlock.arrange(g2, c3); | ||||||||||||||||||||||||||||
7 | h[0] = size.height; |
| 17 | w[2] = size.width; |
Row | Violation |
---|---|
1 | Expression size.height cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression size.width cannot be parameterized, because it has dependencies to/from statements that will be extracted |