EStructuralFeature oldFeature = basicGetFeature();
feature = newFeature;
featureName = null;
if (feature != null && feature.eIsProxy())
eFlags |= EPROXY_FEATURECHANGE;
else
eFlags &= ~EPROXY_FEATURECHANGE;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ChangePackage.FEATURE_CHANGE__FEATURE, oldFeature, newFeature));
EStructuralFeature oldFeature = basicGetFeature();
feature = newFeature;
featureName = null;
if (feature != null && feature.eIsProxy())
eFlags |= EPROXY_FEATURECHANGE;
else
eFlags &= ~EPROXY_FEATURECHANGE;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ChangePackage.FEATURE_CHANGE__FEATURE, oldFeature, newFeature));
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/impl/FeatureChangeImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/impl/FeatureMapEntryImpl.java
|
Method name: void setFeature(EStructuralFeature)
|
|
Method name: void setFeature(EStructuralFeature)
|
Number of AST nodes: 8
|
|
Number of AST nodes: 8
|
|
1 | EStructuralFeature oldFeature = basicGetFeature();↵ | | 1 | EStructuralFeature oldFeature = basicGetFeature();↵
|
2 | feature = newFeature;↵ | | 2 | feature = newFeature;↵
|
3 | featureName = null;↵ | | 3 | featureName = null;↵
|
4 | if (feature != null && feature.eIsProxy())↵ | | 4 | if (feature != null && feature.eIsProxy())↵
|
5 | eFlags |= EPROXY_FEATURECHANGE;↵ | | 5 | eFlags |= EPROXY_FEATURECHANGE;↵
|
6 | else ↵ | | 6 | else ↵
|
7 | eFlags &= ~EPROXY_FEATURECHANGE;↵ | | 7 | eFlags &= ~EPROXY_FEATURECHANGE;↵
|
8 | if (eNotificationRequired())↵ | | 8 | if (eNotificationRequired())↵
|
9 | eNotify(new ENotificationImpl(this, Notification.SET, ChangePackage.FEATURE_CHANGE__FEATURE, oldFeature, newFeature)); | | 9 | eNotify(new ENotificationImpl(this, Notification.SET, ChangePackage.FEATURE_CHANGE__FEATURE, oldFeature, newFeature));
|
See real code fragment |
|
See real code fragment |
Summary
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 | 24 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 8 |
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.1 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | EStructuralFeature oldFeature = basicGetFeature(); | | 1 | EStructuralFeature oldFeature = basicGetFeature(); |
2 | feature = newFeature; | | 2 | feature = newFeature; |
3 | featureName = null; | | 3 | featureName = null; |
4 | if (feature != null && feature.eIsProxy()) | | 4 | if (feature != null && feature.eIsProxy()) |
5 | eFlags |= EPROXY_FEATURECHANGE; | | 5 | eFlags |= EPROXY_FEATURECHANGE; |
| | | | |
6 | eFlags &= ~EPROXY_FEATURECHANGE; | | 6 | eFlags &= ~EPROXY_FEATURECHANGE; |
7 | if (eNotificationRequired()) | | 7 | if (eNotificationRequired()) |
8 | eNotify(new ENotificationImpl(this, Notification.SET, ChangePackage.FEATURE_CHANGE__FEATURE, oldFeature, newFeature)); | | 8 | eNotify(new ENotificationImpl(this, Notification.SET, ChangePackage.FEATURE_CHANGE__FEATURE, oldFeature, newFeature)); |
Precondition Violations (0)
Row |
Violation |