super.printStackTrace(w); if (rootCause != null) { w.print("Root cause: "); rootCause.printStackTrace(w); }
super.printStackTrace(s); if (rootCause != null) { s.print("Root cause: "); rootCause.printStackTrace(s); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/spellcheck/cswilly/SpellException.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/spellcheck/cswilly/SpellException.java
Method name: void printStackTrace(PrintWriter) Method name: void printStackTrace(PrintStream)
Number of AST nodes: 4 Number of AST nodes: 4
1
super.printStackTrace(w);
1
super.printStackTrace(s);
2
        if (rootCause != null) {
2
        if (rootCause != null) {
3
            w.print("Root cause: ");
3
            s.print("Root cause: ");
4
            rootCause.printStackTrace(w);
4
            rootCause.printStackTrace(s);
5
        }
5
        }
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 declared in the same 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)2.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    super.printStackTrace(w);
    1
    super.printStackTrace(w);
    1
    super.printStackTrace(s);
    Differences
    Expression1Expression2Difference
    wsVARIABLE_NAME_MISMATCH
    java.io.PrintWriterjava.io.PrintStreamSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Super method call super.printStackTrace(w); cannot be extracted from method
    Super method call super.printStackTrace(s); cannot be extracted from method
    1
    super.printStackTrace(s);
    2
    if (rootCause != null)
    2
    if (rootCause != null)
    3
    w.print("Root cause: ");
    3
    w.print("Root cause: ");
    3
    s.print("Root cause: ");
    Differences
    Expression1Expression2Difference
    wsVARIABLE_NAME_MISMATCH
    java.io.PrintWriterjava.io.PrintStreamSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression w cannot be unified with expression s , because common superclass java.io.Closeable does not declare member(s) public void print(java.lang.String)
    3
    s.print("Root cause: ");
    4
    rootCause.printStackTrace(w);
    4
    rootCause.printStackTrace(w);
    4
    rootCause.printStackTrace(s);
    Differences
    Expression1Expression2Difference
    wsVARIABLE_NAME_MISMATCH
    java.io.PrintWriterjava.io.PrintStreamSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression w cannot be unified with expression s , because common superclass type java.io.Closeable cannot be passed as an argument to public void printStackTrace(java.io.PrintWriter)
    4
    rootCause.printStackTrace(s);
    Precondition Violations (4)
    Row Violation
    1Super method call super.printStackTrace(w); cannot be extracted from method
    2Super method call super.printStackTrace(s); cannot be extracted from method
    3Expression w cannot be unified with expression s , because common superclass java.io.Closeable does not declare member(s) public void print(java.lang.String)
    4Expression w cannot be unified with expression s , because common superclass type java.io.Closeable cannot be passed as an argument to public void printStackTrace(java.io.PrintWriter)