File path: /jfreechart-1.0.10/src/org/jfree/chart/block/AbstractBlock.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/block/AbstractBlock.java | |||
Method name: Range trimToContentWidth(Range)
|
Method name: Range trimToContentHeight(Range)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (r == null) {↵ | 1 | if (r == null) {↵ | |
2 | return null; ↵ | 2 | return null; ↵ | |
3 | }↵ | 3 | }↵ | |
4 | double lowerBound = 0.0;↵ | 4 | double lowerBound = 0.0;↵ | |
5 | double upperBound = Double.POSITIVE_INFINITY;↵ | 5 | double upperBound = Double.POSITIVE_INFINITY;↵ | |
6 | if (r.getLowerBound() > 0.0) {↵ | 6 | if (r.getLowerBound() > 0.0) {↵ | |
7 | lowerBound = trimToContentWidth(r.getLowerBound()); ↵ | 7 | lowerBound = trimToContentHeight(r.getLowerBound()); ↵ | |
8 | }↵ | 8 | }↵ | |
9 | if (r.getUpperBound() < Double.POSITIVE_INFINITY) {↵ | 9 | if (r.getUpperBound() < Double.POSITIVE_INFINITY) {↵ | |
10 | upperBound = trimToContentWidth(r.getUpperBound());↵ | 10 | upperBound = trimToContentHeight(r.getUpperBound());↵ | |
11 | }↵ | 11 | }↵ | |
12 | return new Range(lowerBound, upperBound); | 12 |
| |
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.8 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 27 |
Number of mapped statements | 9 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (r == null) | 1 | if (r == null) | |||||||||||||
2 | return null; | 2 | return null; | |||||||||||||
3 | double lowerBound = 0.0; | 3 | double lowerBound = 0.0; | |||||||||||||
4 | double upperBound = Double.POSITIVE_INFINITY; | 4 | double upperBound = Double.POSITIVE_INFINITY; | |||||||||||||
5 | if (r.getLowerBound() > 0.0) | 5 | if (r.getLowerBound() > 0.0) | |||||||||||||
6 | lowerBound = trimToContentWidth(r.getLowerBound()); |
| 6 | lowerBound = trimToContentHeight(r.getLowerBound()); | ||||||||||||
7 | if (r.getUpperBound() < Double.POSITIVE_INFINITY) | 7 | if (r.getUpperBound() < Double.POSITIVE_INFINITY) | |||||||||||||
8 | upperBound = trimToContentWidth(r.getUpperBound()); |
| 8 | upperBound = trimToContentHeight(r.getUpperBound()); | ||||||||||||
9 | return new Range(lowerBound, upperBound); | 9 | return new Range(lowerBound, upperBound); |
Row | Violation |
---|---|
1 | Expression trimToContentWidth(r.getLowerBound()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression trimToContentHeight(r.getLowerBound()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression trimToContentWidth(r.getUpperBound()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression trimToContentHeight(r.getUpperBound()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |