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(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);
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/provider/EEnumLiteralItemProvider.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(EEnumLiteral.class))
3
    {
3
    {
4
      case Ecore2XMLPackage.XML_INFO__NAME:
4
      case EcorePackage.EENUM_LITERAL__VALUE:
5
      case Ecore2XMLPackage.XML_INFO__TARGET_NAMESPACE:
5
      case EcorePackage.EENUM_LITERAL__INSTANCE:
6
      case Ecore2XMLPackage.XML_INFO__XML_REPRESENTATION:
6
      case EcorePackage.EENUM_LITERAL__LITERAL:
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.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(EEnumLiteral.class))
    3
    case Ecore2XMLPackage.XML_INFO__NAME:
    3
    case Ecore2XMLPackage.XML_INFO__NAME:
    3
    case EcorePackage.EENUM_LITERAL__VALUE:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackageorg.eclipse.emf.ecore.EcorePackageVARIABLE_TYPE_MISMATCH
    XML_INFO__NAMEEENUM_LITERAL__VALUEVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    • Make classes org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass
    3
    case EcorePackage.EENUM_LITERAL__VALUE:
    4
    case Ecore2XMLPackage.XML_INFO__TARGET_NAMESPACE:
    4
    case Ecore2XMLPackage.XML_INFO__TARGET_NAMESPACE:
    4
    case EcorePackage.EENUM_LITERAL__INSTANCE:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackageorg.eclipse.emf.ecore.EcorePackageVARIABLE_TYPE_MISMATCH
    XML_INFO__TARGET_NAMESPACEEENUM_LITERAL__INSTANCEVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    • Make classes org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass
    4
    case EcorePackage.EENUM_LITERAL__INSTANCE:
    5
    case Ecore2XMLPackage.XML_INFO__XML_REPRESENTATION:
    5
    case Ecore2XMLPackage.XML_INFO__XML_REPRESENTATION:
    5
    case EcorePackage.EENUM_LITERAL__LITERAL:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackageorg.eclipse.emf.ecore.EcorePackageVARIABLE_TYPE_MISMATCH
    XML_INFO__XML_REPRESENTATIONEENUM_LITERAL__LITERALVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    • Make classes org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage and org.eclipse.emf.ecore.EcorePackage extend a common superclass
    5
    case EcorePackage.EENUM_LITERAL__LITERAL:
    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.EcorePackage of variable EcorePackage
    2Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    3Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage