Vector vec = new Vector(); getEditPanes(vec,splitPane); EditPane[] ep = new EditPane[vec.size()]; vec.copyInto(ep); return ep;
StringBuffer buf = new StringBuffer(); getDescriptor(buf, c); return buf.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/org/objectweb/asm/Type.java
Method name: EditPane[] getEditPanes() Method name: String getDescriptor(Class)
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 buf = new StringBuffer();
2
    getDescriptor(buf, c);
6
;
3
    return buf.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 comparisons15
  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 buf = new StringBuffer();
                                                      
    3
    return buf.toString();
    Preondition Violations
    Unmatched statement return buf.toString(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    Unmatched return buf.toString();
    3
    return buf.toString();
    4
    Vector vec = new Vector();
                                                          
    5
    getEditPanes(vec, splitPane);
                                                                  
    6
    EditPane[] ep = new EditPane[vec.size()];
                                                                                        
    7
    vec.copyInto(ep);
    7
    vec.copyInto(ep);
    2
    getDescriptor(buf, c);
    Differences
    Expression1Expression2Difference
    copyIntogetDescriptorMETHOD_INVOCATION_NAME_MISMATCH
    vec.copyInto(ep)getDescriptor(buf,c)ARGUMENT_NUMBER_MISMATCH
    vecMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression vec.copyInto(ep) is a void method call, and thus it cannot be parameterized
    Expression getDescriptor(buf,c) is a void method call, and thus it cannot be parameterized
    Expression vec.copyInto(ep) is a void method call, and thus it cannot be parameterized
    Expression getDescriptor(buf,c) is a void method call, and thus it cannot be parameterized
    2
    getDescriptor(buf, c);
    8
    return ep;
    8
    return ep;
    Preondition Violations
    Unmatched return ep;
                              
    Precondition Violations (7)
    Row Violation
    1Unmatched statement return buf.toString(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched return buf.toString();
    3Expression vec.copyInto(ep) is a void method call, and thus it cannot be parameterized
    4Expression getDescriptor(buf,c) is a void method call, and thus it cannot be parameterized
    5Expression vec.copyInto(ep) is a void method call, and thus it cannot be parameterized
    6Expression getDescriptor(buf,c) is a void method call, and thus it cannot be parameterized
    7Unmatched return ep;