if (isNotificationRequired()) { dispatchNotification(createNotification(Notification.RESOLVE, object, resolved, index, false)); } return resolved;
if (isNotificationRequired()) { dispatchNotification(createNotification(Notification.RESOLVE, eObject, resolved, index, false)); } return resolved;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingEcoreEList.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreEList.java
Method name: E resolve(int, E) Method name: EObject resolve(int, EObject)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (isNotificationRequired())
1
if (isNotificationRequired())
2
        {
2
      
3
  
3
{
4
        dispatchNotification(createNotification(Notification.RESOLVE, object, resolved, index, false));
4
        dispatchNotification(createNotification(Notification.RESOLVE, eObject, resolved, index, false));
5
        }
5
      }
6
        return resolved;
6
      return resolved;
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    13
    if (isNotificationRequired())
    15
    if (isNotificationRequired())
    14
    dispatchNotification(createNotification(Notification.RESOLVE, object, resolved, index, false));
    14
    dispatchNotification(createNotification(Notification.RESOLVE, object, resolved, index, false));
    16
    dispatchNotification(createNotification(Notification.RESOLVE, eObject, resolved, index, false));
    Differences
    Expression1Expression2Difference
    objecteObjectVARIABLE_NAME_MISMATCH
    Eorg.eclipse.emf.ecore.EObjectVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type E of variable object does not match with type org.eclipse.emf.ecore.EObject of variable eObject
    • Make classes E and org.eclipse.emf.ecore.EObject extend a common superclass
    16
    dispatchNotification(createNotification(Notification.RESOLVE, eObject, resolved, index, false));
    15
    return resolved;
    15
    return resolved;
    Preondition Violations
    Unmatched return resolved;
                                            
                                            
    17
    return resolved;
    Preondition Violations
    Unmatched return resolved;
    17
    return resolved;
    Precondition Violations (3)
    Row Violation
    1Type E of variable object does not match with type org.eclipse.emf.ecore.EObject of variable eObject
    2Unmatched return resolved;
    3Unmatched return resolved;