super.eSetProxyURI(uri); if (uri != null) { eFlags |= EPROXY; } else { eFlags &= ~EPROXY; }
setTypedKeyGen(newKey); if (key != null) { eFlags |= EPROXY_KEY; } else { eFlags &= ~EPROXY_KEY; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EObjectImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/impl/EObjectToChangesMapEntryImpl.java
Method name: void eSetProxyURI(URI) Method name: void setTypedKey(EObject)
Number of AST nodes: 4 Number of AST nodes: 4
1
super.eSetProxyURI(uri);
1
setTypedKeyGen(newKey);
2
    if (uri != null)
2
    if (key != null)
3
    {
3
    {
4
      eFlags |= EPROXY;
4
      eFlags |= EPROXY_KEY;
5
    }
5
    }
6
    else
6
    else
7
    {
7
    {
8
      eFlags &= ~EPROXY;
8
      eFlags &= ~EPROXY_KEY;
9
    }
9
    }
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons10
  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
    1
    super.eSetProxyURI(uri);
    1
    super.eSetProxyURI(uri);
    1
    setTypedKeyGen(newKey);
    Differences
    Expression1Expression2Difference
    super.eSetProxyURI(uri)setTypedKeyGen(newKey)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression super.eSetProxyURI(uri) is a void method call, and thus it cannot be parameterized
    Expression setTypedKeyGen(newKey) is a void method call, and thus it cannot be parameterized
    1
    setTypedKeyGen(newKey);
    2
    if (uri != null)
    2
    if (uri != null)
    2
    if (key != null)
    Differences
    Expression1Expression2Difference
    urikeyVARIABLE_NAME_MISMATCH
    org.eclipse.emf.common.util.URIorg.eclipse.emf.ecore.EObjectVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression key cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.eclipse.emf.common.util.URI of variable uri does not match with type org.eclipse.emf.ecore.EObject of variable key
    • Make classes org.eclipse.emf.common.util.URI and org.eclipse.emf.ecore.EObject extend a common superclass
    2
    if (key != null)
    3
    eFlags |= EPROXY;
    3
    eFlags |= EPROXY;
    3
    eFlags |= EPROXY_KEY;
    Differences
    Expression1Expression2Difference
    EPROXYEPROXY_KEYVARIABLE_NAME_MISMATCH
    3
    eFlags |= EPROXY_KEY;
    else
    else
    4
    eFlags &= ~EPROXY;
    4
    eFlags &= ~EPROXY;
    4
    eFlags &= ~EPROXY_KEY;
    Differences
    Expression1Expression2Difference
    EPROXYEPROXY_KEYVARIABLE_NAME_MISMATCH
    4
    eFlags &= ~EPROXY_KEY;
    Precondition Violations (4)
    Row Violation
    1Expression super.eSetProxyURI(uri) is a void method call, and thus it cannot be parameterized
    2Expression setTypedKeyGen(newKey) is a void method call, and thus it cannot be parameterized
    3Expression key cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Type org.eclipse.emf.common.util.URI of variable uri does not match with type org.eclipse.emf.ecore.EObject of variable key