File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/util/EditUIMarkerHelper.java | File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/util/EditUIMarkerHelper.java | |||
Method name: void deleteMarkers(Object, boolean, int)
|
Method name: boolean hasMarkers(Object, boolean, int)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 5 | |||
1 | List<?> data = ((Diagnostic)object).getData();↵ | 1 | List<?> data = ((Diagnostic)object).getData();↵ | |
2 | if (data != null)↵ | 2 | if (data != null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | for (Object datum : data)↵ | 4 | for (Object datum : data)↵ | |
5 | {↵ | 5 | {↵ | |
6 | if (datum instanceof ResourceSet)↵ | 6 | if (datum instanceof ResourceSet)↵ | |
7 | {↵ | 7 | {↵ | |
8 | deleteMarkers(datum, includeSubtypes, depth); ↵ | 8 | return hasMarkers(datum, includeSubtypes, depth); ↵ | |
9 | return;↵ | |||
10 | }↵ | 9 | }↵ | |
11 | }↵ | 10 | }↵ | |
12 | } | 11 |
| |
See real code fragment | See real code fragment |
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 | 7 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
10 | if (datum instanceof ResourceSet) | 12 | if (datum instanceof ResourceSet) | |||||
11 | deleteMarkers(datum, includeSubtypes, depth); |
| | |||||
12 | return; |
| | |||||
|
| 13 | return hasMarkers(datum, includeSubtypes, depth); |
Row | Violation |
---|---|
1 | Unmatched statement deleteMarkers(datum,includeSubtypes,depth); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched return; |
3 | Unmatched statement return hasMarkers(datum,includeSubtypes,depth); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched return hasMarkers(datum,includeSubtypes,depth); |