File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EContentsEList.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EContentsEList.java | |||
Method name: boolean scanPrevious(ListIterator
|
Method name: boolean scanNext(ListIterator
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (isHandlingFeatureMap)↵ | 1 | if (isHandlingFeatureMap)↵ | |
2 | {↵ | 2 | {↵ | |
3 | while (values.hasPrevious())↵ | 3 | while (values.hasNext())↵ | |
4 | {↵ | 4 | {↵ | |
5 | FeatureMap.Entry entry = (FeatureMap.Entry)values.previous();↵ | 5 | FeatureMap.Entry entry = (FeatureMap.Entry)values.next();↵ | |
6 | EStructuralFeature entryFeature = entry.getEStructuralFeature();↵ | 6 | EStructuralFeature entryFeature = entry.getEStructuralFeature();↵ | |
7 | if (isIncludedEntry(entryFeature) && entry.getValue() != null)↵ | 7 | if (isIncludedEntry(entryFeature) && entry.getValue() != null)↵ | |
8 | {↵ | 8 | {↵ | |
9 | values.next();↵ | 9 | values.previous();↵ | |
10 | return true;↵ | 10 | return true;↵ | |
11 | }↵ | 11 | }↵ | |
12 | }↵ | 12 | }↵ | |
13 | return false;↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | else↵ | 15 | else↵ | |
16 | {↵ | 16 | {↵ | |
17 | return values.hasPrevious();↵ | 17 | return values.hasNext();↵ | |
18 | } | 18 |
| |
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.3 |
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) | 5.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (isHandlingFeatureMap) | 1 | if (isHandlingFeatureMap) | |||||||||||||
2 | while (values.hasPrevious()) |
| 2 | while (values.hasNext()) | ||||||||||||
3 | FeatureMap.Entry entry = (FeatureMap.Entry)values.previous(); |
| 3 | FeatureMap.Entry entry = (FeatureMap.Entry)values.next(); | ||||||||||||
4 | EStructuralFeature entryFeature = entry.getEStructuralFeature(); | 4 | EStructuralFeature entryFeature = entry.getEStructuralFeature(); | |||||||||||||
5 | if (isIncludedEntry(entryFeature) && entry.getValue() != null) | 5 | if (isIncludedEntry(entryFeature) && entry.getValue() != null) | |||||||||||||
6 | values.next(); |
| 6 | values.previous(); | ||||||||||||
7 | return true; | 7 | return true; | |||||||||||||
8 | return false; | 8 | return false; | |||||||||||||
else | else | |||||||||||||||
9 | return values.hasPrevious(); |
| 9 | return values.hasNext(); |
Row | Violation |
---|---|
1 | Expression values.hasPrevious() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression values.hasNext() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression values.previous() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression values.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression values.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression values.previous() cannot be parameterized, because it has dependencies to/from statements that will be extracted |