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: RectangleConstraint toRangeWidth(Range)
|
Method name: RectangleConstraint toRangeHeight(Range)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if (range == null) {↵ | 1 | if (range == null) {↵ | |
2 | throw new IllegalArgumentException("Null 'range' argument."); ↵ | 2 | throw new IllegalArgumentException("Null 'range' argument."); ↵ | |
3 | }↵ | 3 | }↵ | |
4 | return new RectangleConstraint(range.getUpperBound(), range, ↵ | 4 | return new RectangleConstraint(this.width, this.widthRange, ↵ | |
5 | LengthConstraintType.RANGE, this.height, this.heightRange, ↵ | 5 | this.widthConstraintType, range.getUpperBound(), range, ↵ | |
6 | this.heightConstraintType); | 6 | LengthConstraintType.RANGE); | |
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 declared in the same class |
Number of node comparisons | 5 |
Number of mapped statements | 3 |
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) | 4.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (range == null) | 1 | if (range == null) | ||||||||||||||||||||||||||||
2 | throw new IllegalArgumentException("Null 'range' argument."); | 2 | throw new IllegalArgumentException("Null 'range' argument."); | ||||||||||||||||||||||||||||
3 | return new RectangleConstraint(range.getUpperBound(), range, LengthConstraintType.RANGE, this.height, this.heightRange, this.heightConstraintType); |
| 3 | return new RectangleConstraint(this.width, this.widthRange, this.widthConstraintType, range.getUpperBound(), range, LengthConstraintType.RANGE); |
Row | Violation |
---|---|
1 | Expression range.getUpperBound() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression range.getUpperBound() cannot be parameterized, because it has dependencies to/from statements that will be extracted |