if (eFeature instanceof EReference && ((EReference)eFeature).isContainer())
{
eSettingDelegate(eFeature).dynamicUnset(this, null, -1);
}
else
{
featureMap.setting(eFeature).unset();
}
if (eFeature instanceof EReference && ((EReference)eFeature).isContainer())
{
eSettingDelegate(eFeature).dynamicUnset(this, null, -1);
}
else
{
featureMap.setting(eFeature).unset();
}
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: void eDynamicUnset(EStructuralFeature)
|
|
Method name: void eDynamicUnset(EStructuralFeature)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (eFeature instanceof EReference && ((EReference)eFeature).isContainer())↵ | | 1 | if (eFeature instanceof EReference && ((EReference)eFeature).isContainer())↵
|
2 | {↵ | | 2 | {↵
|
3 | eSettingDelegate(eFeature).dynamicUnset(this, null, -1);↵ | | 3 | eSettingDelegate(eFeature).dynamicUnset(this, null, -1);↵
|
4 | }↵ | | 4 | }↵
|
5 | else↵ | | 5 | else↵
|
6 | {↵ | | 6 | {↵
|
7 | featureMap.setting(eFeature).unset();↵ | | 7 | featureMap.setting(eFeature).unset();↵
|
8 | } | | 8 | }
|
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 | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 0.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (eFeature instanceof EReference && ((EReference)eFeature).isContainer()) | | 1 | if (eFeature instanceof EReference && ((EReference)eFeature).isContainer()) |
2 | eSettingDelegate(eFeature).dynamicUnset(this, null, -1); | | 2 | eSettingDelegate(eFeature).dynamicUnset(this, null, -1); |
| | | | |
3 | featureMap.setting(eFeature).unset(); | | 3 | featureMap.setting(eFeature).unset(); |
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.ecore.EStructuralFeature.Setting setting(org.eclipse.emf.ecore.EStructuralFeature) |