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 hasPrevious()
|
|||
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.previous();↵ | |
7 | if (isHandlingFeatureMap)↵ | 7 | if (isHandlingFeatureMap)↵ | |
8 | {↵ | 8 | ↵ | |
9 | ↵ | 9 | {↵ | |
10 | FeatureMap.Entry entry = (FeatureMap.Entry)result; ↵ | 10 | FeatureMap.Entry entry = (FeatureMap.Entry)result; ↵ | |
11 | preparedFeature = entry.getEStructuralFeature();↵ | 11 | preparedFeature = entry.getEStructuralFeature();↵ | |
12 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue();↵ | 12 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue();↵ | |
13 | preparedResult = newPreparedResult;↵ | 13 | preparedResult = newPreparedResult;↵ | |
14 | }↵ | 14 | ↵ | |
15 | ↵ | 15 | }↵ | |
16 | else↵ | 16 | else↵ | |
17 | {↵ | 17 | {↵ | |
18 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result;↵ | 18 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result;↵ | |
19 | preparedResult = newPreparedResult;↵ | 19 | preparedResult = newPreparedResult;↵ | |
20 | preparedFeature = feature;↵ | 20 | ↵ | |
21 | }↵ | |||
22 | ↵ | 21 | }↵ | |
23 | prepared = -3;↵ | 22 | prepared = -3;↵ | |
24 | return true; | 23 |
| |
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 in the same method |
Number of node comparisons | 65 |
Number of mapped statements | 10 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
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(); | 52 | Object result = values == null ? valueInternalEList == null ? valueList.get(--valueListIndex) : valueInternalEList.basicGet(--valueListIndex) : values.previous(); | |||||||
30 | if (isHandlingFeatureMap) | 53 | if (isHandlingFeatureMap) | |||||||
31 | FeatureMap.Entry entry = (FeatureMap.Entry)result; | 54 | FeatureMap.Entry entry = (FeatureMap.Entry)result; | |||||||
32 | preparedFeature = entry.getEStructuralFeature(); | 55 | preparedFeature = entry.getEStructuralFeature(); | |||||||
33 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue(); | 56 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue(); | |||||||
34 | preparedResult = newPreparedResult; | 57 | preparedResult = newPreparedResult; | |||||||
else | else | |||||||||
35 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result; | 58 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result; | |||||||
36 | preparedResult = newPreparedResult; | 59 | preparedResult = newPreparedResult; | |||||||
37 | preparedFeature = feature; |
| | |||||||
38 | prepared = -3; | 60 | prepared = -3; | |||||||
39 | return true; |
| 61 | return true; |
Row | Violation |
---|---|
1 | Unmatched statement preparedFeature=feature; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Conditional return true; |
3 | Conditional return true; |