EObject referenceValue = basicGetReferenceValue(); if (referenceValue != null && referenceValue.eIsProxy()) { EObject oldReferenceValue = referenceValue; referenceValue = EcoreUtil.resolve(referenceValue, this); if (referenceValue != oldReferenceValue) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangePackage.FEATURE_CHANGE__REFERENCE_VALUE, oldReferenceValue, referenceValue)); } } return referenceValue;
EObject referenceValue = basicGetReferenceValue(); if (referenceValue != null && referenceValue.eIsProxy()) { EObject oldReferenceValue = referenceValue; referenceValue = EcoreUtil.resolve(referenceValue, this); if (referenceValue != oldReferenceValue) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangePackage.FEATURE_CHANGE__REFERENCE_VALUE, oldReferenceValue, referenceValue)); } } return referenceValue;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/impl/FeatureChangeImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/impl/FeatureMapEntryImpl.java
Method name: EObject getReferenceValue() Method name: EObject getReferenceValue()
Number of AST nodes: 8 Number of AST nodes: 8
1
EObject referenceValue = basicGetReferenceValue();
1
EObject referenceValue = basicGetReferenceValue();
2
    if (referenceValue != null && referenceValue.eIsProxy())
2
    if (referenceValue != null && referenceValue.eIsProxy())
3
    {
3
    {
4
      EObject oldReferenceValue = referenceValue;
4
      EObject oldReferenceValue = referenceValue;
5
      referenceValue = EcoreUtil.resolve(referenceValue, this);
5
      referenceValue = EcoreUtil.resolve(referenceValue, this);
6
      if (referenceValue != oldReferenceValue)
6
      if (referenceValue != oldReferenceValue)
7
      {
7
      {
8
        if (eNotificationRequired())
8
        if (eNotificationRequired())
9
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangePackage.FEATURE_CHANGE__REFERENCE_VALUE, oldReferenceValue, referenceValue));
9
          eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangePackage.FEATURE_CHANGE__REFERENCE_VALUE, oldReferenceValue, referenceValue));
10
      }
10
      }
11
    }
11
    }
12
    return referenceValue;
12
    return referenceValue;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
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 comparisons18
  1. {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.0
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    EObject referenceValue = basicGetReferenceValue();
    1
    EObject referenceValue = basicGetReferenceValue();
    2
    if (referenceValue != null && referenceValue.eIsProxy())
    2
    if (referenceValue != null && referenceValue.eIsProxy())
    3
    EObject oldReferenceValue = referenceValue;
    3
    EObject oldReferenceValue = referenceValue;
    4
    referenceValue = EcoreUtil.resolve(referenceValue, this);
    4
    referenceValue = EcoreUtil.resolve(referenceValue, this);
    5
    if (referenceValue != oldReferenceValue)
    5
    if (referenceValue != oldReferenceValue)
    6
    if (eNotificationRequired())
    6
    if (eNotificationRequired())
    7
    eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangePackage.FEATURE_CHANGE__REFERENCE_VALUE, oldReferenceValue, referenceValue));
    7
    eNotify(new ENotificationImpl(this, Notification.RESOLVE, ChangePackage.FEATURE_CHANGE__REFERENCE_VALUE, oldReferenceValue, referenceValue));
    8
    return referenceValue;
    8
    return referenceValue;
    Precondition Violations (0)
    Row Violation