Vector vec = new Vector(); getAllNamesAux( vec ); String [] names = new String [ vec.size() ]; vec.copyInto( names ); return names;
StringBuffer buf = new StringBuffer(); getDescriptor(buf, c); return buf.toString();
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/bsh/NameSpace.java File path: /jEdit-4.2/src/org/objectweb/asm/Type.java
Method name: String[] getAllNames() Method name: String getDescriptor(Class)
Number of AST nodes: 5 Number of AST nodes: 3
1
Vector vec = new Vector();
2
		getAllNamesAux( vec );
3
		String [] names = new String [ vec.size() ];
4
		vec.copyInto( names );
5
		return names
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 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 buf = new StringBuffer();
    1
    Vector vec = new Vector();
                                                          
    2
    getAllNamesAux(vec);
    2
    getAllNamesAux(vec);
    2
    getDescriptor(buf, c);
    Differences
    Expression1Expression2Difference
    getAllNamesAuxgetDescriptorMETHOD_INVOCATION_NAME_MISMATCH
    getAllNamesAux(vec)getDescriptor(buf,c)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression getAllNamesAux(vec) 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 getAllNamesAux(vec) 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);
                                                      
    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();
    3
    String[] names = new String[vec.size()];
    3
    String[] names = new String[vec.size()];
    Preondition Violations
    Unmatched statement String[] names=new String[vec.size()]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                      
    4
    vec.copyInto(names);
    4
    vec.copyInto(names);
    Preondition Violations
    Unmatched statement vec.copyInto(names); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                  
    5
    return names;
    5
    return names;
    Preondition Violations
    Unmatched return names;
                                    
    Precondition Violations (9)
    Row Violation
    1Expression getAllNamesAux(vec) is a void method call, and thus it cannot be parameterized
    2Expression getDescriptor(buf,c) is a void method call, and thus it cannot be parameterized
    3Expression getAllNamesAux(vec) 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
    5Unmatched statement return buf.toString(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6Unmatched return buf.toString();
    7Unmatched statement String[] names=new String[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(names); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    9Unmatched return names;