XMLInfo oldValue = value; value = newValue; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE, oldValue, newValue); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs;
EGenericType oldELowerBound = eLowerBound; eLowerBound = newELowerBound; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, oldELowerBound, newELowerBound); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/impl/ENamedElementToXMLInfoMapEntryImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EGenericTypeImpl.java
Method name: NotificationChain basicSetTypedValue(XMLInfo, NotificationChain) Method name: NotificationChain basicSetELowerBound(EGenericType, NotificationChain)
Number of AST nodes: 8 Number of AST nodes: 8
1
XMLInfo oldValue = value;
2
    value = newValue
1
EGenericType oldELowerBound = eLowerBound;
3
;
2
    eLowerBound = newELowerBound;
4
    if (eNotificationRequired())
3
    if (eNotificationRequired())
5
    {
4
    {
6
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE, oldValue, newValue);
5
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, oldELowerBound, newELowerBound);
7
      if (msgs == null) msgs = notification; else msgs.add(notification);
6
      if (msgs == null) msgs = notification; else msgs.add(notification);
8
    }
7
    }
9
    return msgs;
8
    return msgs;
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 comparisons22
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                          
    1
    EGenericType oldELowerBound = eLowerBound;
    1
    XMLInfo oldValue = value;
                                                        
                                                                
    2
    eLowerBound = newELowerBound;
    2
    value = newValue;
                                        
    3
    if (eNotificationRequired())
    3
    if (eNotificationRequired())
    4
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE, oldValue, newValue);
    4
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE, oldValue, newValue);
    4
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, oldELowerBound, newELowerBound);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackageorg.eclipse.emf.ecore.EcorePackageVARIABLE_TYPE_MISMATCH
    ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUEEGENERIC_TYPE__ELOWER_BOUNDVARIABLE_NAME_MISMATCH
    oldValueoldELowerBoundVARIABLE_NAME_MISMATCH
    org.eclipse.emf.mapping.ecore2xml.XMLInfoorg.eclipse.emf.ecore.EGenericTypeVARIABLE_TYPE_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
    Type org.eclipse.emf.mapping.ecore2xml.XMLInfo of variable oldValue does not match with type org.eclipse.emf.ecore.EGenericType of variable oldELowerBound
    • Make classes org.eclipse.emf.mapping.ecore2xml.XMLInfo and org.eclipse.emf.ecore.EGenericType extend a common superclass
    4
    ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, oldELowerBound, newELowerBound);
    5
    if (msgs == null)
    5
    if (msgs == null)
    6
    msgs = notification;
    6
    msgs = notification;
    else
    else
    7
    msgs.add(notification);
    7
    msgs.add(notification);
    8
    return msgs;
    8
    return msgs;
    Precondition Violations (2)
    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.XMLInfo of variable oldValue does not match with type org.eclipse.emf.ecore.EGenericType of variable oldELowerBound