File path: /jfreechart-1.0.10/src/org/jfree/chart/block/RectangleConstraint.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/block/RectangleConstraint.java | |||
Method name: Size2D calculateConstrainedSize(Size2D)
|
Method name: Size2D calculateConstrainedSize(Size2D)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (this.heightConstraintType == LengthConstraintType.NONE) {↵ | 1 | if (this.heightConstraintType == LengthConstraintType.NONE) {↵ | |
2 | result.height = base.height;↵ | 2 | result.height = base.height;↵ | |
3 | }↵ | 3 | }↵ | |
4 | else if (this.heightConstraintType == LengthConstraintType.RANGE) {↵ | 4 | else if (this.heightConstraintType == LengthConstraintType.RANGE) {↵ | |
5 | result.height = this.heightRange.constrain(base.height);↵ | 5 | result.height = this.heightRange.constrain(base.height);↵ | |
6 | }↵ | 6 | }↵ | |
7 | else if (this.heightConstraintType == LengthConstraintType.FIXED) {↵ | 7 | else if (this.heightConstraintType == LengthConstraintType.FIXED) {↵ | |
8 | result.height = this.height;↵ | 8 | result.height = this.height;↵ | |
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) | 1.1 |
Clones location | Clones are in the same method |
Number of node comparisons | 28 |
Number of mapped statements | 6 |
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.0 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
4 | if (this.heightConstraintType == LengthConstraintType.NONE) | 12 | if (this.heightConstraintType == LengthConstraintType.NONE) | |
5 | result.height = base.height; | 13 | result.height = base.height; | |
6 | else if (this.heightConstraintType == LengthConstraintType.RANGE) | 14 | else if (this.heightConstraintType == LengthConstraintType.RANGE) | |
7 | result.height = this.heightRange.constrain(base.height); | 15 | result.height = this.heightRange.constrain(base.height); | |
8 | else if (this.heightConstraintType == LengthConstraintType.FIXED) | 16 | else if (this.heightConstraintType == LengthConstraintType.FIXED) | |
9 | result.height = this.height; | 17 | result.height = this.height; |
Row | Violation |
---|