if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (mixed: "); result.append(mixed); result.append(", anyAttribute: "); result.append(anyAttribute); result.append(')'); return result.toString();
if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (resourceURI: "); result.append(resourceURI); result.append(", resource: "); result.append(resource); result.append(')'); return result.toString();
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/impl/AnyTypeImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/impl/ResourceChangeImpl.java
Method name: String toString() Method name: String toString()
Number of AST nodes: 9 Number of AST nodes: 9
1
if (eIsProxy()) return super.toString();
1
if (eIsProxy()) return super.toString();
2
    StringBuffer result = new StringBuffer(super.toString());
2
    StringBuffer result = new StringBuffer(super.toString());
3
    result.append(" (mixed: ");
3
    result.append(" (resourceURI: ");
4
    result.append(mixed);
4
    result.append(resourceURI);
5
    result.append(", anyAttribute: ");
5
    result.append(", resource: ");
6
    result.append(anyAttribute);
6
    result.append(resource);
7
    result.append(')');
7
    result.append(')');
8
    return result.toString();
8
    return result.toString();
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 comparisons41
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (eIsProxy())
    1
    if (eIsProxy())
    2
    return super.toString();
    2
    return super.toString();
    3
    StringBuffer result = new StringBuffer(super.toString());
    3
    StringBuffer result = new StringBuffer(super.toString());
    4
    result.append(" (mixed: ");
    4
    result.append(" (mixed: ");
    4
    result.append(" (resourceURI: ");
    Differences
    Expression1Expression2Difference
    " (mixed: "" (resourceURI: "LITERAL_VALUE_MISMATCH
    4
    result.append(" (resourceURI: ");
    5
    result.append(mixed);
    5
    result.append(mixed);
    5
    result.append(resourceURI);
    Differences
    Expression1Expression2Difference
    mixedresourceURIVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.util.FeatureMapjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.util.FeatureMap of variable mixed does not match with type java.lang.String of variable resourceURI
    • Make classes org.eclipse.emf.ecore.util.FeatureMap and java.lang.String extend a common superclass
    5
    result.append(resourceURI);
    6
    result.append(", anyAttribute: ");
    6
    result.append(", anyAttribute: ");
    6
    result.append(", resource: ");
    Differences
    Expression1Expression2Difference
    ", anyAttribute: "", resource: "LITERAL_VALUE_MISMATCH
    6
    result.append(", resource: ");
    7
    result.append(anyAttribute);
    7
    result.append(anyAttribute);
    7
    result.append(resource);
    Differences
    Expression1Expression2Difference
    anyAttributeresourceVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.util.FeatureMaporg.eclipse.emf.ecore.resource.ResourceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.util.FeatureMap of variable anyAttribute does not match with type org.eclipse.emf.ecore.resource.Resource of variable resource
    • Make classes org.eclipse.emf.ecore.util.FeatureMap and org.eclipse.emf.ecore.resource.Resource extend a common superclass
    7
    result.append(resource);
    8
    result.append(')');
    8
    result.append(')');
    9
    return result.toString();
    9
    return result.toString();
    Precondition Violations (2)
    Row Violation
    1Type org.eclipse.emf.ecore.util.FeatureMap of variable mixed does not match with type java.lang.String of variable resourceURI
    2Type org.eclipse.emf.ecore.util.FeatureMap of variable anyAttribute does not match with type org.eclipse.emf.ecore.resource.Resource of variable resource