Number result = null;
BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item);
if (stats != null) {
result = stats.getQ1();
}
return result;
List result = null;
BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item);
if (stats != null) {
result = stats.getOutliers();
}
return result;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/statistics/DefaultBoxAndWhiskerXYDataset.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/data/statistics/DefaultBoxAndWhiskerXYDataset.java
|
Method name: Number getQ1Value(int, int)
|
|
Method name: List getOutliers(int, int)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | Number result = null;↵ | | 1 | List result = null;↵
|
2 | BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item);↵ | | 2 | BoxAndWhiskerItem stats = (BoxAndWhiskerItem) this.items.get(item);↵
|
3 | if (stats != null) {↵ | | 3 | if (stats != null) {↵
|
4 | result = stats.getQ1();↵ | | 4 | result = stats.getOutliers();↵
|
5 | }↵ | | 5 | }↵
|
6 | return result; | | 6 | return result;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
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 | 13 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 1.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 1 | List result = null; |
1 | Number result = null; | | | |
2 | BoxAndWhiskerItem stats = (BoxAndWhiskerItem)this.items.get(item); | | 2 | BoxAndWhiskerItem stats = (BoxAndWhiskerItem)this.items.get(item); |
3 | if (stats != null) | | 3 | if (stats != null) |
| | | 4 | result = stats.getOutliers(); |
4 | | | | |
| | | 5 | return result; |
5 | return result; | | | |
Precondition Violations (4)
Row |
Violation |
1 | Unmatched statement result=stats.getOutliers(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement result=stats.getQ1(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched return result; |
4 | Unmatched return result; |