updateChildren(notification); switch (notification.getFeatureID(EEnumLiteral.class)) { case EcorePackage.EENUM_LITERAL__VALUE: case EcorePackage.EENUM_LITERAL__INSTANCE: case EcorePackage.EENUM_LITERAL__LITERAL: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification);
updateChildren(notification); switch (notification.getFeatureID(FeatureMapEntry.class)) { case ChangePackage.FEATURE_MAP_ENTRY__FEATURE_NAME: case ChangePackage.FEATURE_MAP_ENTRY__DATA_VALUE: case ChangePackage.FEATURE_MAP_ENTRY__VALUE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EEnumLiteralItemProvider.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/provider/FeatureMapEntryItemProvider.java
Method name: void notifyChanged(Notification) Method name: void notifyChanged(Notification)
Number of AST nodes: 8 Number of AST nodes: 8
1
updateChildren(notification);
1
updateChildren(notification);
2
    switch (notification.getFeatureID(EEnumLiteral.class))
2
    switch (notification.getFeatureID(FeatureMapEntry.class))
3
    {
3
    {
4
      case EcorePackage.EENUM_LITERAL__VALUE:
4
      case ChangePackage.FEATURE_MAP_ENTRY__FEATURE_NAME:
5
      case EcorePackage.EENUM_LITERAL__INSTANCE:
5
      case ChangePackage.FEATURE_MAP_ENTRY__DATA_VALUE:
6
      case EcorePackage.EENUM_LITERAL__LITERAL:
6
      case ChangePackage.FEATURE_MAP_ENTRY__VALUE:
7
        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
7
        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
8
        return;
8
        return;
9
    }
9
    }
10
    super.notifyChanged(notification);
10
    super.notifyChanged(notification);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes having the same super class
Number of node comparisons23
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    updateChildren(notification);
    1
    updateChildren(notification);
    2
    switch (notification.getFeatureID(EEnumLiteral.class))
    2
    switch (notification.getFeatureID(FeatureMapEntry.class))
    3
    case EcorePackage.EENUM_LITERAL__VALUE:
    3
    case EcorePackage.EENUM_LITERAL__VALUE:
    3
    case ChangePackage.FEATURE_MAP_ENTRY__FEATURE_NAME:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EcorePackageorg.eclipse.emf.ecore.change.ChangePackageVARIABLE_TYPE_MISMATCH
    EENUM_LITERAL__VALUEFEATURE_MAP_ENTRY__FEATURE_NAMEVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
    • Make classes org.eclipse.emf.ecore.EcorePackage and org.eclipse.emf.ecore.change.ChangePackage extend a common superclass
    3
    case ChangePackage.FEATURE_MAP_ENTRY__FEATURE_NAME:
    4
    case EcorePackage.EENUM_LITERAL__INSTANCE:
    4
    case EcorePackage.EENUM_LITERAL__INSTANCE:
    4
    case ChangePackage.FEATURE_MAP_ENTRY__DATA_VALUE:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EcorePackageorg.eclipse.emf.ecore.change.ChangePackageVARIABLE_TYPE_MISMATCH
    EENUM_LITERAL__INSTANCEFEATURE_MAP_ENTRY__DATA_VALUEVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
    • Make classes org.eclipse.emf.ecore.EcorePackage and org.eclipse.emf.ecore.change.ChangePackage extend a common superclass
    4
    case ChangePackage.FEATURE_MAP_ENTRY__DATA_VALUE:
    5
    case EcorePackage.EENUM_LITERAL__LITERAL:
    5
    case EcorePackage.EENUM_LITERAL__LITERAL:
    5
    case ChangePackage.FEATURE_MAP_ENTRY__VALUE:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.EcorePackageorg.eclipse.emf.ecore.change.ChangePackageVARIABLE_TYPE_MISMATCH
    EENUM_LITERAL__LITERALFEATURE_MAP_ENTRY__VALUEVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
    • Make classes org.eclipse.emf.ecore.EcorePackage and org.eclipse.emf.ecore.change.ChangePackage extend a common superclass
    5
    case ChangePackage.FEATURE_MAP_ENTRY__VALUE:
    6
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
    6
    fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
    7
    return;
    7
    return;
    8
    super.notifyChanged(notification);
    8
    super.notifyChanged(notification);
    Precondition Violations (3)
    Row Violation
    1Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
    2Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
    3Type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage