EStructuralFeature.Internal feature = (EStructuralFeature.Internal)eClass().getEStructuralFeature(featureID);
if (feature instanceof EReference && ((EReference)feature).isContainer())
{
return eSettingDelegate(feature).dynamicInverseRemove(this, null, -1, otherEnd, notifications);
}
else
{
return featureMap.basicRemove(feature, otherEnd, notifications);
}
EStructuralFeature.Internal feature = (EStructuralFeature.Internal)eClass().getEStructuralFeature(featureID);
if (feature instanceof EReference && ((EReference)feature).isContainer())
{
return eSettingDelegate(feature).dynamicInverseRemove(this, null, -1, otherEnd, notifications);
}
else
{
return featureMap.basicRemove(feature, otherEnd, notifications);
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java
|
Method name: NotificationChain eDynamicInverseRemove(InternalEObject, int, Class>, NotificationChain)
|
|
Method name: NotificationChain eDynamicInverseRemove(InternalEObject, int, Class>, NotificationChain)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | EStructuralFeature.Internal feature = (EStructuralFeature.Internal)eClass().getEStructuralFeature(featureID);↵ | | 1 | EStructuralFeature.Internal feature = (EStructuralFeature.Internal)eClass().getEStructuralFeature(featureID);↵
|
2 | if (feature instanceof EReference && ((EReference)feature).isContainer())↵ | | 2 | if (feature instanceof EReference && ((EReference)feature).isContainer())↵
|
3 | {↵ | | 3 | {↵
|
4 | return eSettingDelegate(feature).dynamicInverseRemove(this, null, -1, otherEnd, notifications);↵ | | 4 | return eSettingDelegate(feature).dynamicInverseRemove(this, null, -1, otherEnd, notifications);↵
|
5 | }↵ | | 5 | }↵
|
6 | else↵ | | 6 | else↵
|
7 | {↵ | | 7 | {↵
|
8 | return featureMap.basicRemove(feature, otherEnd, notifications);↵ | | 8 | return featureMap.basicRemove(feature, otherEnd, notifications);↵
|
9 | } | | 9 | }
|
See real code fragment |
|
See real code fragment |
Summary
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 different classes having the same super class |
Number of node comparisons | 10 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 37.4 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | EStructuralFeature.Internal feature = (EStructuralFeature.Internal)eClass().getEStructuralFeature(featureID); | | 1 | EStructuralFeature.Internal feature = (EStructuralFeature.Internal)eClass().getEStructuralFeature(featureID); |
2 | if (feature instanceof EReference && ((EReference)feature).isContainer()) | | 2 | if (feature instanceof EReference && ((EReference)feature).isContainer()) |
3 | return eSettingDelegate(feature).dynamicInverseRemove(this, null, -1, otherEnd, notifications); | | 3 | return eSettingDelegate(feature).dynamicInverseRemove(this, null, -1, otherEnd, notifications); |
| | | | |
4 | return featureMap.basicRemove(feature, otherEnd, notifications); | | 4 | return featureMap.basicRemove(feature, otherEnd, notifications); |
Precondition Violations (1)
Row |
Violation |
1 | Expression featureMap cannot be unified with expression featureMap , because common superclass java.util.AbstractList<org.eclipse.emf.ecore.util.FeatureMap.Entry> does not declare member(s) public org.eclipse.emf.common.notify.NotificationChain basicRemove(org.eclipse.emf.ecore.EStructuralFeature, java.lang.Object, org.eclipse.emf.common.notify.NotificationChain) |