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 hasPrevious()
|
Method name: boolean hasNext()
|
|||
Number of AST nodes: 10 | Number of AST nodes: 11 | |||
1 | Object result =↵ | 1 | Object result =↵ | |
2 | ↵ | |||
2 | values == null ? ↵ | 3 | values == null ? ↵ | |
3 | valueInternalEList == null ? ↵ | 4 | valueInternalEList == null ? ↵ | |
4 | valueList.get(--valueListIndex) : ↵ | 5 | valueList.get(valueListIndex++) : ↵ | |
5 | valueInternalEList.basicGet(--valueListIndex) : ↵ | 6 | valueInternalEList.basicGet(valueListIndex++) : ↵ | |
6 | values.previous();↵ | 7 | values.↵ | |
8 | next();↵ | |||
7 | if (isHandlingFeatureMap)↵ | 9 | if (isHandlingFeatureMap)↵ | |
8 | {↵ | 10 | ↵ | |
11 | {↵ | |||
9 | FeatureMap.Entry entry = (FeatureMap.Entry)result; ↵ | 12 | FeatureMap.Entry entry = (FeatureMap.Entry)result; ↵ | |
10 | preparedFeature = entry.getEStructuralFeature();↵ | 13 | preparedFeature = entry.getEStructuralFeature();↵ | |
11 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue();↵ | 14 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue();↵ | |
12 | preparedResult = newPreparedResult;↵ | 15 | preparedResult = newPreparedResult;↵ | |
13 | }↵ | 16 | ↵ | |
17 | }↵ | |||
14 | else↵ | 18 | else↵ | |
15 | {↵ | 19 | ↵ | |
20 | {↵ | |||
16 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result;↵ | 21 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result;↵ | |
17 | preparedResult = newPreparedResult;↵ | 22 | preparedResult = newPreparedResult;↵ | |
18 | }↵ | 23 | ↵ | |
24 | preparedFeature = feature;↵ | |||
25 | }↵ | |||
19 | prepared = -3;↵ | 26 | prepared = 3;↵ | |
20 | return true; | 27 | return true; | |
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 | 65 |
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 2.3 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 30 | Object result = values == null ? valueInternalEList == null ? valueList.get(valueListIndex++) : valueInternalEList.basicGet(valueListIndex++) : values.next(); | |||||||||||
52 | Object result = values == null ? valueInternalEList == null ? valueList.get(--valueListIndex) : valueInternalEList.basicGet(--valueListIndex) : values.previous(); | | ||||||||||||
53 | if (isHandlingFeatureMap) | 31 | if (isHandlingFeatureMap) | |||||||||||
54 | FeatureMap.Entry entry = (FeatureMap.Entry)result; | 32 | FeatureMap.Entry entry = (FeatureMap.Entry)result; | |||||||||||
55 | preparedFeature = entry.getEStructuralFeature(); | 33 | preparedFeature = entry.getEStructuralFeature(); | |||||||||||
56 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue(); | 34 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue(); | |||||||||||
57 | preparedResult = newPreparedResult; | 35 | preparedResult = newPreparedResult; | |||||||||||
else | else | |||||||||||||
58 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result; | 36 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result; | |||||||||||
59 | preparedResult = newPreparedResult; | 37 | preparedResult = newPreparedResult; | |||||||||||
|
| 38 | preparedFeature = feature; | |||||||||||
60 | prepared = -3; |
| 39 | prepared = 3; | ||||||||||
61 | return true; |
| 40 | return true; |
Row | Violation |
---|---|
1 | Unmatched statement Object result=values == null ? valueInternalEList == null ? valueList.get(valueListIndex++) : valueInternalEList.basicGet(valueListIndex++) : values.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement preparedFeature=feature; 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; |