if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (data: "); result.append(data); result.append(", target: "); result.append(target); 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/ProcessingInstructionImpl.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(" (data: ");
3
    result.append(" (resourceURI: ");
4
    result.append(data);
4
    result.append(resourceURI);
5
    result.append(", target: ");
5
    result.append(", resource: ");
6
    result.append(target);
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(" (data: ");
    4
    result.append(" (data: ");
    4
    result.append(" (resourceURI: ");
    Differences
    Expression1Expression2Difference
    " (data: "" (resourceURI: "LITERAL_VALUE_MISMATCH
    4
    result.append(" (resourceURI: ");
    5
    result.append(data);
    5
    result.append(data);
    5
    result.append(resourceURI);
    Differences
    Expression1Expression2Difference
    dataresourceURIVARIABLE_NAME_MISMATCH
    5
    result.append(resourceURI);
    6
    result.append(", target: ");
    6
    result.append(", target: ");
    6
    result.append(", resource: ");
    Differences
    Expression1Expression2Difference
    ", target: "", resource: "LITERAL_VALUE_MISMATCH
    6
    result.append(", resource: ");
    7
    result.append(target);
    7
    result.append(target);
    7
    result.append(resource);
    Differences
    Expression1Expression2Difference
    targetresourceVARIABLE_NAME_MISMATCH
    java.lang.Stringorg.eclipse.emf.ecore.resource.ResourceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable target does not match with type org.eclipse.emf.ecore.resource.Resource of variable resource
    • Make classes java.lang.String 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 (1)
    Row Violation
    1Type java.lang.String of variable target does not match with type org.eclipse.emf.ecore.resource.Resource of variable resource