Notification notification = new NotificationImpl(Notification.SET, oldIsTrackingModification, isTrackingModification) { @Override public Object getNotifier() { return ResourceImpl.this; } @Override public int getFeatureID(Class<?> expectedClass) { return RESOURCE__IS_TRACKING_MODIFICATION; } }; eNotify(notification);
Notification notification = new NotificationImpl(Notification.SET, oldIsModified, isModified) { @Override public Object getNotifier() { return ResourceImpl.this; } @Override public int getFeatureID(Class<?> expectedClass) { return RESOURCE__IS_MODIFIED; } }; eNotify(notification);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java
Method name: void setTrackingModification(boolean) Method name: void setModified(boolean)
Number of AST nodes: 2 Number of AST nodes: 2
1
Notification notification =
1
Notification notification =
2
        new NotificationImpl(Notification.SET, oldIsTrackingModification, isTrackingModification)
2
        new NotificationImpl(Notification.SET, oldIsModified, isModified)
3
        {
3
        {
4
          @Override
4
          @Override
5
          public Object getNotifier()
5
          public Object getNotifier()
6
          {
6
          {
7
            return ResourceImpl.this;
7
            return ResourceImpl.this;
8
          }
8
          }
9
          @Override
9
          @Override
10
          public int getFeatureID(Class<?> expectedClass)
10
          public int getFeatureID(Class<?> expectedClass)
11
          {
11
          {
12
            return RESOURCE__IS_TRACKING_MODIFICATION;
12
            return RESOURCE__IS_MODIFIED;
13
          }
13
          }
14
        };
14
        };
15
      eNotify(notification);
15
      eNotify(notification);
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.0
Clones locationClones are declared in the same class
Number of node comparisons4
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    14
    Notification notification = new NotificationImpl(Notification.SET, oldIsTrackingModification, isTrackingModification) {...};
    14
    Notification notification = new NotificationImpl(Notification.SET, oldIsTrackingModification, isTrackingModification) {...};
    4
    Notification notification = new NotificationImpl(Notification.SET, oldIsModified, isModified) {...};
    Differences
    Expression1Expression2Difference
    RESOURCE__IS_TRACKING_MODIFICATIONRESOURCE__IS_MODIFIEDVARIABLE_NAME_MISMATCH
    oldIsTrackingModificationoldIsModifiedVARIABLE_NAME_MISMATCH
    isTrackingModificationisModifiedVARIABLE_NAME_MISMATCH
    4
    Notification notification = new NotificationImpl(Notification.SET, oldIsModified, isModified) {...};
    15
    eNotify(notification);
    5
    eNotify(notification);
    Precondition Violations (0)
    Row Violation