if (newValue != value) { NotificationChain msgs = null; if (value != null) msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE, null, msgs); if (newValue != null) msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE, null, msgs); msgs = basicSetTypedValue(newValue, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE, newValue, newValue));
if (newELowerBound != eLowerBound) { NotificationChain msgs = null; if (eLowerBound != null) msgs = ((InternalEObject)eLowerBound).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs); if (newELowerBound != null) msgs = ((InternalEObject)newELowerBound).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs); msgs = basicSetELowerBound(newELowerBound, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, newELowerBound, newELowerBound));
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: void setTypedValue(XMLInfo) Method name: void setELowerBound(EGenericType)
Number of AST nodes: 11 Number of AST nodes: 11
1
if (newValue != value)
1
if (newELowerBound != eLowerBound)
2
    {
2
    {
3
      NotificationChain msgs = null;
3
      NotificationChain msgs = null;
4
      if (value != null)
4
      if (eLowerBound != null)
5
        msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE, null, msgs);
5
        msgs = ((InternalEObject)eLowerBound).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs);
6
      if (newValue != null)
6
      if (newELowerBound != null)
7
        msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE, null, msgs);
7
        msgs = ((InternalEObject)newELowerBound).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs);
8
      msgs = basicSetTypedValue(newValue, msgs);
8
      msgs = basicSetELowerBound(newELowerBound, msgs);
9
      if (msgs != null) msgs.dispatch();
9
      if (msgs != null) msgs.dispatch();
10
    }
10
    }
11
    else if (eNotificationRequired())
11
    else if (eNotificationRequired())
12
      eNotify(new ENotificationImpl(this, Notification.SET, Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE, newValue, newValue));
12
      eNotify(new ENotificationImpl(this, Notification.SET, EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, newELowerBound, newELowerBound));
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.4
Clones locationClones are in different classes having the same super class
Number of node comparisons32
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    NotificationChain msgs = null;
    2
    NotificationChain msgs = null;
    3
    if (value != null)
    3
    if (value != null)
    3
    if (eLowerBound != null)
    Differences
    Expression1Expression2Difference
    valueeLowerBoundVARIABLE_NAME_MISMATCH
    org.eclipse.emf.mapping.ecore2xml.XMLInfoorg.eclipse.emf.ecore.EGenericTypeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.mapping.ecore2xml.XMLInfo of variable value does not match with type org.eclipse.emf.ecore.EGenericType of variable eLowerBound
    • Make classes org.eclipse.emf.mapping.ecore2xml.XMLInfo and org.eclipse.emf.ecore.EGenericType extend a common superclass
    3
    if (eLowerBound != null)
    4
    msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE, null, msgs);
    4
    msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE, null, msgs);
    4
    msgs = ((InternalEObject)eLowerBound).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs);
    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
    valueeLowerBoundVARIABLE_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 value does not match with type org.eclipse.emf.ecore.EGenericType of variable eLowerBound
    • Make classes org.eclipse.emf.mapping.ecore2xml.XMLInfo and org.eclipse.emf.ecore.EGenericType extend a common superclass
    4
    msgs = ((InternalEObject)eLowerBound).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs);
    5
    if (newValue != null)
    5
    if (newValue != null)
    5
    if (newELowerBound != null)
    Differences
    Expression1Expression2Difference
    newValuenewELowerBoundVARIABLE_NAME_MISMATCH
    org.eclipse.emf.mapping.ecore2xml.XMLInfoorg.eclipse.emf.ecore.EGenericTypeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.mapping.ecore2xml.XMLInfo of variable newValue does not match with type org.eclipse.emf.ecore.EGenericType of variable newELowerBound
    • Make classes org.eclipse.emf.mapping.ecore2xml.XMLInfo and org.eclipse.emf.ecore.EGenericType extend a common superclass
    5
    if (newELowerBound != null)
    6
    msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE, null, msgs);
    6
    msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE, null, msgs);
    6
    msgs = ((InternalEObject)newELowerBound).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs);
    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
    newValuenewELowerBoundVARIABLE_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 newValue does not match with type org.eclipse.emf.ecore.EGenericType of variable newELowerBound
    • Make classes org.eclipse.emf.mapping.ecore2xml.XMLInfo and org.eclipse.emf.ecore.EGenericType extend a common superclass
    6
    msgs = ((InternalEObject)newELowerBound).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EcorePackage.EGENERIC_TYPE__ELOWER_BOUND, null, msgs);
                                                                                                      
    7
    msgs = basicSetELowerBound(newELowerBound, msgs);
    Preondition Violations
    Unmatched statement msgs=basicSetELowerBound(newELowerBound,msgs); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    7
    msgs = basicSetELowerBound(newELowerBound, msgs);
    7
    msgs = basicSetTypedValue(newValue, msgs);
    7
    msgs = basicSetTypedValue(newValue, msgs);
    Preondition Violations
    Unmatched statement msgs=basicSetTypedValue(newValue,msgs); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                        
    8
    if (msgs != null)
    8
    if (msgs != null)
    9
    msgs.dispatch();
    9
    msgs.dispatch();
    Precondition Violations (8)
    Row Violation
    1Type org.eclipse.emf.mapping.ecore2xml.XMLInfo of variable value does not match with type org.eclipse.emf.ecore.EGenericType of variable eLowerBound
    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.XMLInfo of variable value does not match with type org.eclipse.emf.ecore.EGenericType of variable eLowerBound
    4Type org.eclipse.emf.mapping.ecore2xml.XMLInfo of variable newValue does not match with type org.eclipse.emf.ecore.EGenericType of variable newELowerBound
    5Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.ecore.EcorePackage of variable EcorePackage
    6Type org.eclipse.emf.mapping.ecore2xml.XMLInfo of variable newValue does not match with type org.eclipse.emf.ecore.EGenericType of variable newELowerBound
    7Unmatched statement msgs=basicSetELowerBound(newELowerBound,msgs); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    8Unmatched statement msgs=basicSetTypedValue(newValue,msgs); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted