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 hasNext()
|
Method name: boolean hasPrevious()
|
|||
Number of AST nodes: 10 | 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.next();↵ | 6 | values.previous();↵ | |
7 | if (isHandlingFeatureMap)↵ | 7 | if (isHandlingFeatureMap)↵ | |
8 | {↵ | 8 | {↵ | |
9 | FeatureMap.Entry entry = (FeatureMap.Entry)result; ↵ | 9 | FeatureMap.Entry entry = (FeatureMap.Entry)result; ↵ | |
10 | preparedFeature = entry.getEStructuralFeature();↵ | 10 | preparedFeature = entry.getEStructuralFeature();↵ | |
11 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue();↵ | 11 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue();↵ | |
12 | preparedResult = newPreparedResult;↵ | 12 | preparedResult = newPreparedResult;↵ | |
13 | }↵ | 13 | }↵ | |
14 | else↵ | 14 | else↵ | |
15 | {↵ | 15 | {↵ | |
16 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result;↵ | 16 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result;↵ | |
17 | preparedResult = newPreparedResult;↵ | 17 | preparedResult = newPreparedResult;↵ | |
18 | }↵ | 18 | }↵ | |
19 | prepared = 3;↵ | 19 | prepared = -3;↵ | |
20 | return true; | 20 |
| |
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) | 3.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 139 |
Number of mapped statements | 10 |
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) | 3.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
54 | 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(); | ||||||||||
55 | if (isHandlingFeatureMap) | 53 | if (isHandlingFeatureMap) | |||||||||||
56 | FeatureMap.Entry entry = (FeatureMap.Entry)result; | 54 | FeatureMap.Entry entry = (FeatureMap.Entry)result; | |||||||||||
57 | preparedFeature = entry.getEStructuralFeature(); | 55 | preparedFeature = entry.getEStructuralFeature(); | |||||||||||
58 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue(); | 56 | @SuppressWarnings("unchecked") E newPreparedResult = (E)entry.getValue(); | |||||||||||
59 | preparedResult = newPreparedResult; | 57 | preparedResult = newPreparedResult; | |||||||||||
else | else | |||||||||||||
60 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result; | 58 | @SuppressWarnings("unchecked") E newPreparedResult = (E)result; | |||||||||||
61 | preparedResult = newPreparedResult; | 59 | preparedResult = newPreparedResult; | |||||||||||
62 | prepared = 3; |
| 60 | prepared = -3; | ||||||||||
63 | return true; |
| 61 | return true; |
Row | Violation |
---|---|
1 | Conditional return true; |
2 | Conditional return true; |