File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EStructuralFeatureImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EStructuralFeatureImpl.java | |||
Method name: void dynamicSet(InternalEObject, EStructuralFeature.Internal.DynamicValueHolder, int, Object)
|
Method name: NotificationChain dynamicInverseAdd(InternalEObject, EStructuralFeature.Internal.DynamicValueHolder, int, InternalEObject, NotificationChain)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 7 | |||
1 | if (isContainment())↵ | 1 | if (hasInverse())↵ | |
2 | {↵ | 2 | {↵ | |
3 | if (oldValue != newValue)↵ | 3 | if (oldValue != ↵ | |
4 | {↵ | |||
5 | if (oldValue != null)↵ | |||
6 | {↵ | |||
7 | ↵ | 4 | otherEnd && oldValue != null)↵ | |
5 | {↵ | |||
6 | InternalEObject internalEObject = (InternalEObject)oldValue;↵ | |||
8 | notifications = ↵ | 7 | notifications = ↵ | |
9 | ((InternalEObject)oldValue).eInverseRemove↵ | 8 | internalEObject.eInverseRemove↵ | |
10 | (owner,↵ | 9 | (owner,↵ | |
11 | InternalEObject.EOPPOSITE_FEATURE_BASE - owner.eClass().getFeatureID(feature),↵ | 10 | internalEObject.eClass().getFeatureID(inverseFeature),↵ | |
12 | null,↵ | 11 | null,↵ | |
13 | notifications);↵ | 12 | notifications);↵ | |
14 | ↵ | 13 | }↵ | |
15 | }↵ | 14 | }↵ | |
16 | ↵ | 15 | else if (isContainment())↵ | |
16 | {↵ | |||
17 | if (newValue != null)↵ | 17 | if (oldValue != null)↵ | |
18 | {↵ | 18 | ↵ | |
19 | ↵ | 19 | {↵ | |
20 | notifications = ↵ | 20 | notifications = ↵ | |
21 | ((InternalEObject)newValue).eInverseAdd↵ | 21 | ((InternalEObject)oldValue).eInverse↵ | |
22 | ↵ | 22 | Remove↵ | |
23 | (owner,↵ | 23 | (owner,↵ | |
24 | InternalEObject.EOPPOSITE_FEATURE_BASE - owner.eClass().getFeatureID(feature),↵ | 24 | InternalEObject.EOPPOSITE_FEATURE_BASE - owner.eClass().getFeatureID(feature),↵ | |
25 | null,↵ | 25 | null,↵ | |
26 | notifications);↵ | 26 | notifications);↵ | |
27 | }↵ | |||
28 | }↵ | 27 | }↵ | |
29 | } | 28 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 2 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
Number of mapped statements | 2 |
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) | 2.8 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
16 | if (oldValue != null) | 9 | if (oldValue != null) | |
17 | notifications = ((InternalEObject)oldValue).eInverseRemove(owner, InternalEObject.EOPPOSITE_FEATURE_BASE - owner.eClass().getFeatureID(feature), null, notifications); | 10 | notifications = ((InternalEObject)oldValue).eInverseRemove(owner, InternalEObject.EOPPOSITE_FEATURE_BASE - owner.eClass().getFeatureID(feature), null, notifications); |
Row | Violation |
---|
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 40.5 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18 | if (newValue != null) |
| 5 | if (oldValue != otherEnd && oldValue != null) | |||||||||||||||||||||
|
| 6 | InternalEObject internalEObject = (InternalEObject)oldValue; | ||||||||||||||||||||||
19 | notifications = ((InternalEObject)newValue).eInverseAdd(owner, InternalEObject.EOPPOSITE_FEATURE_BASE - owner.eClass().getFeatureID(feature), null, notifications); |
| 7 | notifications = internalEObject.eInverseRemove(owner, internalEObject.eClass().getFeatureID(inverseFeature), null, notifications); |
Row | Violation |
---|---|
1 | Unmatched statement InternalEObject internalEObject=(InternalEObject)oldValue; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Expression internalEObject.eClass().getFeatureID(inverseFeature) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression ((InternalEObject)newValue).eInverseAdd(owner,InternalEObject.EOPPOSITE_FEATURE_BASE - owner.eClass().getFeatureID(feature),null,notifications) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression internalEObject.eInverseRemove(owner,internalEObject.eClass().getFeatureID(inverseFeature),null,notifications) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression ((InternalEObject)newValue) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression internalEObject cannot be parameterized, because it has dependencies to/from statements that will be extracted |