Object notifier = getNotifier(); if (notifier != null && getEventType() != -1) { ((IChangeNotifier)notifier).fireNotifyChanged(this); } if (next != null) { next.dispatch(); }
Object notifier = getNotifier(); if (notifier != null && getEventType() != -1) { ((Notifier)notifier).eNotify(this); } if (next != null) { next.dispatch(); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ItemProvider.java File path: /emf-2.4.1/src/org/eclipse/emf/common/notify/impl/NotificationImpl.java
Method name: void dispatch() Method name: void dispatch()
Number of AST nodes: 5 Number of AST nodes: 5
1
Object notifier = getNotifier();
1
Object notifier = getNotifier();
2
      if (notifier != null && getEventType() != -1)
2
    if (notifier != null && getEventType() != -1)
3
      {
3
    
4
  
4
{
5
      ((IChangeNotifier)notifier).fireNotifyChanged(this);
5
      ((Notifier)notifier).eNotify(this);
6
      }
6
    }
7
      if (next != null)
7
    if (next != null)
8
      {
8
    {
9
        next.dispatch();
9
      next.dispatch();
10
      }
10
    }
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 comparisons14
  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)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    Object notifier = getNotifier();
    1
    Object notifier = getNotifier();
    2
    if (notifier != null && getEventType() != -1)
    2
    if (notifier != null && getEventType() != -1)
    3
    ((IChangeNotifier)notifier).fireNotifyChanged(this);
    3
    ((IChangeNotifier)notifier).fireNotifyChanged(this);
    3
    ((Notifier)notifier).eNotify(this);
    Differences
    Expression1Expression2Difference
    fireNotifyChangedeNotifyMETHOD_INVOCATION_NAME_MISMATCH
    org.eclipse.emf.edit.provider.IChangeNotifierorg.eclipse.emf.common.notify.NotifierVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression ((IChangeNotifier)notifier).fireNotifyChanged(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ((Notifier)notifier).eNotify(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ((IChangeNotifier)notifier).fireNotifyChanged(this) is a void method call, and thus it cannot be parameterized
    Expression ((Notifier)notifier).eNotify(this) is a void method call, and thus it cannot be parameterized
    Expression (IChangeNotifier)notifier cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression (Notifier)notifier cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.eclipse.emf.edit.provider.IChangeNotifier of variable (IChangeNotifier)notifier does not match with type org.eclipse.emf.common.notify.Notifier of variable (Notifier)notifier
    • Make classes org.eclipse.emf.edit.provider.IChangeNotifier and org.eclipse.emf.common.notify.Notifier extend a common superclass
    3
    ((Notifier)notifier).eNotify(this);
    4
    if (next != null)
    4
    if (next != null)
    5
    next.dispatch();
    5
    next.dispatch();
    Precondition Violations (7)
    Row Violation
    1Expression ((IChangeNotifier)notifier).fireNotifyChanged(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression ((Notifier)notifier).eNotify(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression ((IChangeNotifier)notifier).fireNotifyChanged(this) is a void method call, and thus it cannot be parameterized
    4Expression ((Notifier)notifier).eNotify(this) is a void method call, and thus it cannot be parameterized
    5Expression (IChangeNotifier)notifier cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression (Notifier)notifier cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Type org.eclipse.emf.edit.provider.IChangeNotifier of variable (IChangeNotifier)notifier does not match with type org.eclipse.emf.common.notify.Notifier of variable (Notifier)notifier