File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EStoreEObjectImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/DynamicEStoreEObjectImpl.java | |||
Method name: void eInitializeContainer()
|
Method name: void eInitializeContainer()
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | eContainer = eStore().getContainer(this);↵ | 1 | eContainer = eStore().getContainer(this);↵ | |
2 | if (eContainer != null)↵ | 2 | if (eContainer != null)↵ | |
3 | {↵ | 3 | {↵ | |
4 | EStructuralFeature eContainingFeature = eStore().getContainingFeature(this);↵ | 4 | EStructuralFeature eContainingFeature = eStore().getContainingFeature(this);↵ | |
5 | if (eContainingFeature instanceof EReference)↵ | 5 | if (eContainingFeature instanceof EReference)↵ | |
6 | {↵ | 6 | {↵ | |
7 | EReference eContainingReference = (EReference)eContainingFeature;↵ | 7 | EReference eContainingReference = (EReference)eContainingFeature;↵ | |
8 | EReference eOpposite = eContainingReference.getEOpposite();↵ | 8 | EReference eOpposite = eContainingReference.getEOpposite();↵ | |
9 | if (eOpposite != null)↵ | 9 | if (eOpposite != null)↵ | |
10 | {↵ | 10 | {↵ | |
11 | eContainerFeatureID = eClass().getFeatureID(eOpposite);↵ | 11 | eContainerFeatureID = eClass().getFeatureID(eOpposite);↵ | |
12 | return;↵ | 12 | return;↵ | |
13 | }↵ | 13 | }↵ | |
14 | }↵ | 14 | }↵ | |
15 | eContainerFeatureID = EOPPOSITE_FEATURE_BASE - eContainer.eClass().getFeatureID(eContainingFeature);↵ | 15 | eContainerFeatureID = EOPPOSITE_FEATURE_BASE - eContainer.eClass().getFeatureID(eContainingFeature);↵ | |
16 | } | 16 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 28 |
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) | 1.4 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | eContainer = eStore().getContainer(this); | 1 | eContainer = eStore().getContainer(this); | |
2 | if (eContainer != null) | 2 | if (eContainer != null) | |
3 | EStructuralFeature eContainingFeature = eStore().getContainingFeature(this); | 3 | EStructuralFeature eContainingFeature = eStore().getContainingFeature(this); | |
4 | if (eContainingFeature instanceof EReference) | 4 | if (eContainingFeature instanceof EReference) | |
5 | EReference eContainingReference = (EReference)eContainingFeature; | 5 | EReference eContainingReference = (EReference)eContainingFeature; | |
6 | EReference eOpposite = eContainingReference.getEOpposite(); | 6 | EReference eOpposite = eContainingReference.getEOpposite(); | |
7 | if (eOpposite != null) | 7 | if (eOpposite != null) | |
8 | eContainerFeatureID = eClass().getFeatureID(eOpposite); | 8 | eContainerFeatureID = eClass().getFeatureID(eOpposite); | |
9 | return; | 9 | return; | |
10 | eContainerFeatureID = EOPPOSITE_FEATURE_BASE - eContainer.eClass().getFeatureID(eContainingFeature); | 10 | eContainerFeatureID = EOPPOSITE_FEATURE_BASE - eContainer.eClass().getFeatureID(eContainingFeature); |
Row | Violation |
---|