InternalEObject oldEClassifier = (InternalEObject)eClassifier; eClassifier = (EClassifier)eResolveProxy(oldEClassifier); if (eClassifier != oldEClassifier) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, EcorePackage.EGENERIC_TYPE__ECLASSIFIER, oldEClassifier, eClassifier)); }
InternalEObject oldEType = (InternalEObject)eType; eType = (EClassifier)eResolveProxy(oldEType); if (eType != oldEType) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, EcorePackage.ETYPED_ELEMENT__ETYPE, oldEType, eType)); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EGenericTypeImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/ETypedElementImpl.java
Method name: EClassifier getEClassifier() Method name: EClassifier getEType()
Number of AST nodes: 5 Number of AST nodes: 5
1
InternalEObject oldEClassifier = (InternalEObject)eClassifier;
1
InternalEObject oldEType = (InternalEObject)e
2
      eClassifier
2
Type;
3
 = (EClassifier)eResolveProxy(oldEClassifier);
3
      eType = (EClassifier)eResolveProxy(oldEType);
4
      if (eClassifier != oldEClassifier)
4
      if (eType != oldEType)
5
      {
5
      {
6
        if (eNotificationRequired())
6
        if (eNotificationRequired())
7
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, EcorePackage.EGENERIC_TYPE__ECLASSIFIER, oldEClassifier, eClassifier));
7
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, EcorePackage.ETYPED_ELEMENT__ETYPE, oldEType, eType));
8
      }
8
      }
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.3
Clones locationClones are in different classes having the same super class
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    InternalEObject oldEClassifier = (InternalEObject)eClassifier;
    2
    InternalEObject oldEClassifier = (InternalEObject)eClassifier;
    2
    InternalEObject oldEType = (InternalEObject)eType;
    Differences
    Expression1Expression2Difference
    oldEClassifieroldETypeVARIABLE_NAME_MISMATCH
    eClassifiereTypeVARIABLE_NAME_MISMATCH
    2
    InternalEObject oldEType = (InternalEObject)eType;
    3
    eClassifier = (EClassifier)eResolveProxy(oldEClassifier);
    3
    eClassifier = (EClassifier)eResolveProxy(oldEClassifier);
    3
    eType = (EClassifier)eResolveProxy(oldEType);
    Differences
    Expression1Expression2Difference
    eClassifiereTypeVARIABLE_NAME_MISMATCH
    oldEClassifieroldETypeVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression eClassifier is a field being modified, and thus it cannot be parameterized
    Expression eType is a field being modified, and thus it cannot be parameterized
    3
    eType = (EClassifier)eResolveProxy(oldEType);
    4
    if (eClassifier != oldEClassifier)
    4
    if (eClassifier != oldEClassifier)
    4
    if (eType != oldEType)
    Differences
    Expression1Expression2Difference
    eClassifiereTypeVARIABLE_NAME_MISMATCH
    oldEClassifieroldETypeVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression eClassifier cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression eType cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    if (eType != oldEType)
    5
    if (eNotificationRequired())
    5
    if (eNotificationRequired())
    6
    eNotify(new ENotificationImpl(this, Notification.RESOLVE, EcorePackage.EGENERIC_TYPE__ECLASSIFIER, oldEClassifier, eClassifier));
    6
    eNotify(new ENotificationImpl(this, Notification.RESOLVE, EcorePackage.EGENERIC_TYPE__ECLASSIFIER, oldEClassifier, eClassifier));
    6
    eNotify(new ENotificationImpl(this, Notification.RESOLVE, EcorePackage.ETYPED_ELEMENT__ETYPE, oldEType, eType));
    Differences
    Expression1Expression2Difference
    EGENERIC_TYPE__ECLASSIFIERETYPED_ELEMENT__ETYPEVARIABLE_NAME_MISMATCH
    oldEClassifieroldETypeVARIABLE_NAME_MISMATCH
    eClassifiereTypeVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression eClassifier cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression eType cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6
    eNotify(new ENotificationImpl(this, Notification.RESOLVE, EcorePackage.ETYPED_ELEMENT__ETYPE, oldEType, eType));
    Precondition Violations (6)
    Row Violation
    1Expression eClassifier is a field being modified, and thus it cannot be parameterized
    2Expression eType is a field being modified, and thus it cannot be parameterized
    3Expression eClassifier cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression eType cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression eClassifier cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression eType cannot be parameterized, because it has dependencies to/from statements that will be extracted