File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EPackageImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EFactoryImpl.java | |||
Method name: void setEFactoryInstance(EFactory)
|
Method name: void setEPackage(EPackage)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | if (newEFactoryInstance != eFactoryInstance)↵ | 1 | if (newEPackage != ePackage)↵ | |
2 | {↵ | 2 | {↵ | |
3 | NotificationChain msgs = null;↵ | 3 | NotificationChain msgs = null;↵ | |
4 | if (eFactoryInstance != null)↵ | 4 | if (ePackage != null)↵ | |
5 | msgs = ((InternalEObject)eFactoryInstance).eInverseRemove(this, EcorePackage.EFACTORY__EPACKAGE, EFactory.class, msgs);↵ | 5 | msgs = ((InternalEObject)ePackage).eInverseRemove(this, EcorePackage.EPACKAGE__EFACTORY_INSTANCE, EPackage.class, msgs);↵ | |
6 | if (newEFactoryInstance != null)↵ | 6 | if (newEPackage != null)↵ | |
7 | msgs = ((InternalEObject)newEFactoryInstance).eInverseAdd(this, EcorePackage.EFACTORY__EPACKAGE, EFactory.class, msgs);↵ | 7 | msgs = ((InternalEObject)newEPackage).eInverseAdd(this, EcorePackage.EPACKAGE__EFACTORY_INSTANCE, EPackage.class, msgs);↵ | |
8 | msgs = basicSetEFactoryInstance(newEFactoryInstance, msgs);↵ | 8 | msgs = basicSetEPackage(newEPackage, msgs);↵ | |
9 | if (msgs != null) msgs.dispatch();↵ | 9 | if (msgs != null) msgs.dispatch();↵ | |
10 | }↵ | 10 | }↵ | |
11 | else if (eNotificationRequired())↵ | 11 | else if (eNotificationRequired())↵ | |
12 | eNotify(new ENotificationImpl(this, Notification.SET, EcorePackage.EPACKAGE__EFACTORY_INSTANCE, newEFactoryInstance, newEFactoryInstance)); | 12 | eNotify(new ENotificationImpl(this, Notification.SET, EcorePackage.EFACTORY__EPACKAGE, newEPackage, newEPackage)); | |
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.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 32 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | NotificationChain msgs = null; | 2 | NotificationChain msgs = null; | ||||||||||||||||||
3 | if (eFactoryInstance != null) |
| 3 | if (ePackage != null) | |||||||||||||||||
4 | msgs = ((InternalEObject)eFactoryInstance).eInverseRemove(this, EcorePackage.EFACTORY__EPACKAGE, EFactory.class, msgs); |
| 4 | msgs = ((InternalEObject)ePackage).eInverseRemove(this, EcorePackage.EPACKAGE__EFACTORY_INSTANCE, EPackage.class, msgs); | |||||||||||||||||
5 | if (newEFactoryInstance != null) |
| 5 | if (newEPackage != null) | |||||||||||||||||
6 | msgs = ((InternalEObject)newEFactoryInstance).eInverseAdd(this, EcorePackage.EFACTORY__EPACKAGE, EFactory.class, msgs); |
| 6 | msgs = ((InternalEObject)newEPackage).eInverseAdd(this, EcorePackage.EPACKAGE__EFACTORY_INSTANCE, EPackage.class, msgs); | |||||||||||||||||
|
| 7 | msgs = basicSetEPackage(newEPackage, msgs); | ||||||||||||||||||
7 | msgs = basicSetEFactoryInstance(newEFactoryInstance, msgs); |
| | ||||||||||||||||||
8 | if (msgs != null) | 8 | if (msgs != null) | ||||||||||||||||||
9 | msgs.dispatch(); | 9 | msgs.dispatch(); |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.ecore.EFactory of variable eFactoryInstance does not match with type org.eclipse.emf.ecore.EPackage of variable ePackage |
2 | Type org.eclipse.emf.ecore.EFactory of variable eFactoryInstance does not match with type org.eclipse.emf.ecore.EPackage of variable ePackage |
3 | Type org.eclipse.emf.ecore.EFactory of variable newEFactoryInstance does not match with type org.eclipse.emf.ecore.EPackage of variable newEPackage |
4 | Type org.eclipse.emf.ecore.EFactory of variable newEFactoryInstance does not match with type org.eclipse.emf.ecore.EPackage of variable newEPackage |
5 | Unmatched statement msgs=basicSetEPackage(newEPackage,msgs); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement msgs=basicSetEFactoryInstance(newEFactoryInstance,msgs); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |