updateChildren(notification); switch (notification.getFeatureID(XMLInfo.class)) { case Ecore2XMLPackage.XML_INFO__NAME: case Ecore2XMLPackage.XML_INFO__TARGET_NAMESPACE: case Ecore2XMLPackage.XML_INFO__XML_REPRESENTATION: 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/mapping/ecore2xml/provider/XMLInfoItemProvider.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(XMLInfo.class))
2
    switch (notification.getFeatureID(FeatureMapEntry.class))
3
    {
3
    {
4
      case Ecore2XMLPackage.XML_INFO__NAME:
4
      case 
5
      case Ecore2XMLPackage.XML_INFO__TARGET_NAMESPAC
5
ChangePackage.FEATURE_MAP_ENTRY__FEATURE_NAME:
6
E:
6
      case ChangePackage.FEATURE_MAP_ENTRY__DATA_VALUE:
7
      case Ecore2XMLPackage.XML_INFO__XML_REPRESENTATION:
7
      case ChangePackage.FEATURE_MAP_ENTRY__VALUE:
8
        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
8
        fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
9
        return;
9
        return;
10
    }
10
    }
11
    super.notifyChanged(notification);
11
    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.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    updateChildren(notification);
    1
    updateChildren(notification);
    2
    switch (notification.getFeatureID(XMLInfo.class))
    2
    switch (notification.getFeatureID(FeatureMapEntry.class))
    3
    case Ecore2XMLPackage.XML_INFO__NAME:
    3
    case Ecore2XMLPackage.XML_INFO__NAME:
    3
    case ChangePackage.FEATURE_MAP_ENTRY__FEATURE_NAME:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackageorg.eclipse.emf.ecore.change.ChangePackageVARIABLE_TYPE_MISMATCH
    XML_INFO__NAMEFEATURE_MAP_ENTRY__FEATURE_NAMEVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
    • Make classes org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage and org.eclipse.emf.ecore.change.ChangePackage extend a common superclass
    3
    case ChangePackage.FEATURE_MAP_ENTRY__FEATURE_NAME:
    4
    case Ecore2XMLPackage.XML_INFO__TARGET_NAMESPACE:
    4
    case Ecore2XMLPackage.XML_INFO__TARGET_NAMESPACE:
    4
    case ChangePackage.FEATURE_MAP_ENTRY__DATA_VALUE:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackageorg.eclipse.emf.ecore.change.ChangePackageVARIABLE_TYPE_MISMATCH
    XML_INFO__TARGET_NAMESPACEFEATURE_MAP_ENTRY__DATA_VALUEVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
    • Make classes org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage and org.eclipse.emf.ecore.change.ChangePackage extend a common superclass
    4
    case ChangePackage.FEATURE_MAP_ENTRY__DATA_VALUE:
    5
    case Ecore2XMLPackage.XML_INFO__XML_REPRESENTATION:
    5
    case Ecore2XMLPackage.XML_INFO__XML_REPRESENTATION:
    5
    case ChangePackage.FEATURE_MAP_ENTRY__VALUE:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackageorg.eclipse.emf.ecore.change.ChangePackageVARIABLE_TYPE_MISMATCH
    XML_INFO__XML_REPRESENTATIONFEATURE_MAP_ENTRY__VALUEVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
    • Make classes org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage 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.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
    2Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage
    3Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.ecore.change.ChangePackage of variable ChangePackage