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: 11 | Number of AST nodes: 10 | |||
1 | Object result =↵ | 1 | Object result =↵ | |
2 | values == null ? ↵ | 2 | values == null ? ↵ | |
3 | valueInternalEList == null ? ↵ | 3 | valueInternalEList == null ? ↵ | |
4 | valueList.get(--valueListIndex) : ↵ | 4 | valueList.get(valueListIndex++) : ↵ | |
5 | valueInternalEList.basicGet(--valueListIndex) : ↵ | 5 | valueInternalEList.basicGet(valueListIndex++) : ↵ | |
6 | values.previous();↵ | 6 | values.↵ | |
7 | ↵ | 7 | next();↵ | |
8 | if (isHandlingFeatureMap)↵ | 8 | if (isHandlingFeatureMap)↵ | |
9 | {↵ | 9 | ↵ | |
10 | ↵ | 10 | {↵ | |
11 | FeatureMap.Entry entry = (FeatureMap.Entry)result; ↵ | 11 | FeatureMap.Entry entry = (FeatureMap.Entry)result; ↵ | |
12 | preparedFeature = entry.getEStructuralFeature();↵ | 12 | preparedFeature = entry.getEStructuralFeature();↵ | |
13 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue();↵ | 13 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue();↵ | |
14 | preparedResult = newPreparedResult;↵ | 14 | preparedResult = newPreparedResult;↵ | |
15 | }↵ | 15 | ↵ | |
16 | ↵ | 16 | }↵ | |
17 | else↵ | 17 | else↵ | |
18 | {↵ | 18 | ↵ | |
19 | ↵ | 19 | {↵ | |
20 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result;↵ | 20 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result;↵ | |
21 | preparedResult = newPreparedResult;↵ | 21 | preparedResult = newPreparedResult;↵ | |
22 | preparedFeature = feature;↵ | 22 | ↵ | |
23 | }↵ | |||
24 | ↵ | 23 | }↵ | |
25 | prepared = -3;↵ | 24 | prepared = 3;↵ | |
26 | return true; | 25 |
| |
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.2 |
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 | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 2.6 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
29 | Object result = values == null ? valueInternalEList == null ? valueList.get(--valueListIndex) : valueInternalEList.basicGet(--valueListIndex) : values.previous(); |
| | |||||||||||
| 54 | Object result = values == null ? valueInternalEList == null ? valueList.get(valueListIndex++) : valueInternalEList.basicGet(valueListIndex++) : values.next(); | ||||||||||||
30 | if (isHandlingFeatureMap) | 55 | if (isHandlingFeatureMap) | |||||||||||
31 | FeatureMap.Entry entry = (FeatureMap.Entry)result; | 56 | FeatureMap.Entry entry = (FeatureMap.Entry)result; | |||||||||||
32 | preparedFeature = entry.getEStructuralFeature(); | 57 | preparedFeature = entry.getEStructuralFeature(); | |||||||||||
33 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue(); | 58 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue(); | |||||||||||
34 | preparedResult = newPreparedResult; | 59 | preparedResult = newPreparedResult; | |||||||||||
else | else | |||||||||||||
35 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result; | 60 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result; | |||||||||||
36 | preparedResult = newPreparedResult; | 61 | preparedResult = newPreparedResult; | |||||||||||
37 | preparedFeature = feature; |
| | |||||||||||
38 | prepared = -3; |
| 62 | prepared = 3; | ||||||||||
39 | return true; |
| 63 | return true; |
Row | Violation |
---|---|
1 | Unmatched statement Object result=values == null ? valueInternalEList == null ? valueList.get(--valueListIndex) : valueInternalEList.basicGet(--valueListIndex) : values.previous(); 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; |