Vector vec = new Vector(); getEditPanes(vec,splitPane); EditPane[] ep = new EditPane[vec.size()]; vec.copyInto(ep); return ep;
StringBuffer sb = new StringBuffer(); dump(sb); return sb.toString();
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/View.java File path: /jEdit-4.2/src/gnu/regexp/RE.java
Method name: EditPane[] getEditPanes() Method name: String toString()
Number of AST nodes: 5 Number of AST nodes: 3
1
Vector vec = new Vector();
2
			getEditPanes(vec,splitPane);
3
			EditPane[] ep = new EditPane[vec.size()];
4
			vec.copyInto(ep);
5
			return ep
1
StringBuffer sb = new StringBuffer();
2
     dump(sb);
6
;
3
     return sb.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
Number of node comparisons11
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment4
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
                                                                                
    1
    StringBuffer sb = new StringBuffer();
    4
    Vector vec = new Vector();
                                                          
    5
    getEditPanes(vec, splitPane);
    5
    getEditPanes(vec, splitPane);
    2
    dump(sb);
    Differences
    Expression1Expression2Difference
    getEditPanesdumpMETHOD_INVOCATION_NAME_MISMATCH
    getEditPanes(vec,splitPane)dump(sb)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression getEditPanes(vec,splitPane) is a void method call, and thus it cannot be parameterized
    Expression dump(sb) is a void method call, and thus it cannot be parameterized
    Expression getEditPanes(vec,splitPane) is a void method call, and thus it cannot be parameterized
    Expression dump(sb) is a void method call, and thus it cannot be parameterized
    2
    dump(sb);
                                                    
    3
    return sb.toString();
    Preondition Violations
    Unmatched statement return sb.toString(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    Unmatched return sb.toString();
    3
    return sb.toString();
    6
    EditPane[] ep = new EditPane[vec.size()];
    6
    EditPane[] ep = new EditPane[vec.size()];
    Preondition Violations
    Unmatched statement EditPane[] ep=new EditPane[vec.size()]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                        
    7
    vec.copyInto(ep);
    7
    vec.copyInto(ep);
    Preondition Violations
    Unmatched statement vec.copyInto(ep); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                            
    8
    return ep;
    8
    return ep;
    Preondition Violations
    Unmatched return ep;
                              
    Precondition Violations (9)
    Row Violation
    1Expression getEditPanes(vec,splitPane) is a void method call, and thus it cannot be parameterized
    2Expression dump(sb) is a void method call, and thus it cannot be parameterized
    3Expression getEditPanes(vec,splitPane) is a void method call, and thus it cannot be parameterized
    4Expression dump(sb) is a void method call, and thus it cannot be parameterized
    5Unmatched statement return sb.toString(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6Unmatched return sb.toString();
    7Unmatched statement EditPane[] ep=new EditPane[vec.size()]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    8Unmatched statement vec.copyInto(ep); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    9Unmatched return ep;