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()
|
Method name: boolean scanNext()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | FeatureMap.Entry entry = (FeatureMap.Entry)valueList.get(valueListIndex - 1);↵ | 1 | FeatureMap.Entry entry = (FeatureMap.Entry)valueList.get(valueListIndex);↵ | |
2 | EStructuralFeature entryFeature = entry.getEStructuralFeature();↵ | 2 | EStructuralFeature entryFeature = entry.getEStructuralFeature();↵ | |
3 | if (isIncludedEntry(entryFeature) && entry.getValue() != null)↵ | 3 | if (isIncludedEntry(entryFeature) && entry.getValue() != null)↵ | |
4 | {↵ | 4 | {↵ | |
5 | return true;↵ | 5 | return true;↵ | |
6 | }↵ | 6 | }↵ | |
7 | else↵ | 7 | else↵ | |
8 | {↵ | 8 | {↵ | |
9 | --valueListIndex;↵ | 9 | ++valueListIndex;↵ | |
10 | } | 10 |
| |
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 | 14 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | FeatureMap.Entry entry = (FeatureMap.Entry)valueList.get(valueListIndex - 1); |
| 3 | FeatureMap.Entry entry = (FeatureMap.Entry)valueList.get(valueListIndex); | ||||||||||
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 | return true; |
| 6 | return true; | ||||||||||
else | | |||||||||||||
|
| 7 | ++valueListIndex; | |||||||||||
7 | --valueListIndex; |
| |
Row | Violation |
---|---|
1 | Unmatched statement ++valueListIndex; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement --valueListIndex; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Conditional return true; |
4 | Conditional return true; |