if (((InternalEObject)resolved).eInternalContainer() == null) { notificationChain = inverseAdd(resolved, notificationChain); } if (notificationChain != null) { notificationChain.dispatch(); }
if (((InternalEObject)resolved).eInternalContainer() == null) { notificationChain = inverseAdd(resolvedElement, notificationChain); } if (notificationChain != null) { notificationChain.dispatch(); }
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: 4 Number of AST nodes: 4
1
if (((InternalEObject)resolved).eInternalContainer() == null)
1
if (((InternalEObject)resolved).eInternalContainer() == null)
2
          {
2
        
3
  
3
{
4
          notificationChain = inverseAdd(resolved, notificationChain);
4
          notificationChain = inverseAdd(resolvedElement, notificationChain);
5
          }
5
        
6
  
6
}
7
        if (notificationChain != null)
7
        if (notificationChain != null)
8
          {
8
        {
9
            notificationChain.dispatch();
9
          notificationChain.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.4
Clones locationClones are in different classes having the same super class
Number of node comparisons14
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    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.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    9
    if (((InternalEObject)resolved).eInternalContainer() == null)
    9
    if (((InternalEObject)resolved).eInternalContainer() == null)
    11
    if (((InternalEObject)resolved).eInternalContainer() == null)
    Differences
    Expression1Expression2Difference
    Eorg.eclipse.emf.ecore.EObjectVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type E of variable resolved does not match with type org.eclipse.emf.ecore.EObject of variable resolved
    • Make classes E and org.eclipse.emf.ecore.EObject extend a common superclass
    11
    if (((InternalEObject)resolved).eInternalContainer() == null)
    10
    notificationChain = inverseAdd(resolved, notificationChain);
    10
    notificationChain = inverseAdd(resolved, notificationChain);
    12
    notificationChain = inverseAdd(resolvedElement, notificationChain);
    Differences
    Expression1Expression2Difference
    resolvedresolvedElementVARIABLE_NAME_MISMATCH
    12
    notificationChain = inverseAdd(resolvedElement, notificationChain);
    11
    if (notificationChain != null)
    13
    if (notificationChain != null)
    12
    notificationChain.dispatch();
    14
    notificationChain.dispatch();
    Precondition Violations (1)
    Row Violation
    1Type E of variable resolved does not match with type org.eclipse.emf.ecore.EObject of variable resolved