File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/impl/ChangeDescriptionImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/impl/ChangeDescriptionImpl.java | |||
Method name: EObject getOldContainer(EObject)
|
Method name: EReference getOldContainmentFeature(EObject)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | OldContainmentInformation oldContainmentInformation = getOldContainmentInformation().get(eObject);↵ | 1 | OldContainmentInformation oldContainmentInformation = getOldContainmentInformation().get(eObject);↵ | |
2 | if (oldContainmentInformation == null)↵ | 2 | if (oldContainmentInformation == null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | return eObject.eContainer();↵ | 4 | return eObject.eContainmentFeature();↵ | |
5 | }↵ | 5 | }↵ | |
6 | else↵ | 6 | else↵ | |
7 | {↵ | 7 | {↵ | |
8 | return oldContainmentInformation.container;↵ | 8 | return oldContainmentInformation.containmentFeature;↵ | |
9 | } | 9 |
| |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
Number of mapped statements | 2 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
1 | OldContainmentInformation oldContainmentInformation = getOldContainmentInformation().get(eObject); | 1 | OldContainmentInformation oldContainmentInformation = getOldContainmentInformation().get(eObject); | |||||
2 | if (oldContainmentInformation == null) | 2 | if (oldContainmentInformation == null) | |||||
|
| 3 | return eObject.eContainmentFeature(); | |||||
3 | return eObject.eContainer(); |
| | |||||
else | | |||||||
|
| 4 | return oldContainmentInformation.containmentFeature; | |||||
4 | return oldContainmentInformation.container; |
| |
Row | Violation |
---|---|
1 | Unmatched return eObject.eContainmentFeature(); |
2 | Unmatched return eObject.eContainer(); |
3 | Unmatched statement return oldContainmentInformation.containmentFeature; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched return oldContainmentInformation.containmentFeature; |
5 | Unmatched statement return oldContainmentInformation.container; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Unmatched return oldContainmentInformation.container; |