StringBuffer result = new StringBuffer(super.toString()); result.append(" (domain: " + domain + ")"); result.append(" (oldClipboard: " + oldClipboard + ")"); return result.toString();
StringBuffer result = new StringBuffer(super.toString()); result.append(" (domain: " + domain + ")"); result.append(" (removeCommand: " + removeCommand + ")"); return result.toString();
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/command/CutToClipboardCommand.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/command/RestoreInitialStateCommand.java
Method name: String toString() Method name: String toString()
Number of AST nodes: 4 Number of AST nodes: 4
1
StringBuffer result = new StringBuffer(super.toString());
1
StringBuffer result = new StringBuffer(super.toString());
2
    result.append(" (domain: " + domain + ")");
2
    result.append(" (domain: " + domain + ")");
3
    result.append(" (oldClipboard: " + oldClipboard + ")");
3
    result.append(" (removeCommand: " + removeCommand + ")");
4
    return result.toString();
4
    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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    StringBuffer result = new StringBuffer(super.toString());
    1
    StringBuffer result = new StringBuffer(super.toString());
    2
    result.append(" (domain: " + domain + ")");
    2
    result.append(" (domain: " + domain + ")");
    2
    result.append(" (domain: " + domain + ")");
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.edit.domain.EditingDomainorg.eclipse.emf.mapping.domain.MappingDomainVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.edit.domain.EditingDomain of variable domain does not match with type org.eclipse.emf.mapping.domain.MappingDomain of variable domain
    • Make classes org.eclipse.emf.edit.domain.EditingDomain and org.eclipse.emf.mapping.domain.MappingDomain extend a common superclass
    2
    result.append(" (domain: " + domain + ")");
                                                                                                                            
    3
    result.append(" (removeCommand: " + removeCommand + ")");
    Preondition Violations
    Unmatched statement result.append(" (removeCommand: " + removeCommand + ")"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3
    result.append(" (removeCommand: " + removeCommand + ")");
    3
    result.append(" (oldClipboard: " + oldClipboard + ")");
    3
    result.append(" (oldClipboard: " + oldClipboard + ")");
    Preondition Violations
    Unmatched statement result.append(" (oldClipboard: " + oldClipboard + ")"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                        
    4
    return result.toString();
    4
    return result.toString();
    Precondition Violations (3)
    Row Violation
    1Type org.eclipse.emf.edit.domain.EditingDomain of variable domain does not match with type org.eclipse.emf.mapping.domain.MappingDomain of variable domain
    2Unmatched statement result.append(" (removeCommand: " + removeCommand + ")"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched statement result.append(" (oldClipboard: " + oldClipboard + ")"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted