File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java | |||
Method name: List
|
Method name: List
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (result == null)↵ | 1 | if (result == null)↵ | |
2 | {↵ | 2 | ↵ | |
3 | ↵ | 3 | {↵ | |
4 | result = allAttributes;↵ | 4 | return attributes;↵ | |
5 | }↵ | 5 | }↵ | |
6 | else↵ | 6 | else↵ | |
7 | {↵ | 7 | {↵ | |
8 | if (!changeable)↵ | 8 | if (!changeable)↵ | |
9 | {↵ | 9 | {↵ | |
10 | changeable = true;↵ | |||
11 | result = new UniqueEList<EStructuralFeature>(result);↵ | 10 | result = new UniqueEList<EStructuralFeature>(result);↵ | |
12 | }↵ | 11 | ↵ | |
13 | ↵ | 12 | }↵ | |
14 | result.addAll(allAttributes);↵ | 13 | result.addAll(attributes);↵ | |
15 | ↵ | 14 | return result;↵ | |
16 | } | 15 |
| |
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 in the same method |
Number of node comparisons | 20 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.4 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8 | if (result == null) | 16 | if (result == null) | |||||||||||
9 | result = allAttributes; |
| | |||||||||||
|
| 17 | return attributes; | |||||||||||
else | else | |||||||||||||
10 | if (!changeable) | 18 | if (!changeable) | |||||||||||
11 | changeable = true; |
| | |||||||||||
12 | result = new UniqueEList<EStructuralFeature>(result); | 19 | result = new UniqueEList<EStructuralFeature>(result); | |||||||||||
13 | result.addAll(allAttributes); |
| 20 | result.addAll(attributes); | ||||||||||
|
| 21 | return result; |
Row | Violation |
---|---|
1 | Unmatched statement result=allAttributes; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched return attributes; |
3 | Unmatched statement changeable=true; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement return result; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched return result; |