StringBuffer buffer = new StringBuffer(); render( buffer, alias, enabledFilters ); return buffer.toString();
ArrayList parents = new ArrayList(); showAst( parents, pw, ast ); pw.flush();
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/util/FilterHelper.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/util/ASTPrinter.java
Method name: String render(String, Map) Method name: void showAst(AST, PrintWriter)
Number of AST nodes: 3 Number of AST nodes: 3
1
StringBuffer buffer = new StringBuffer();
2
		render( buffer, alias, enabledFilters );
3
		return buffer.toString
1
ArrayList parents = new ArrayList();
2
		showAst( parents, pw, ast );
4
();
3
		pw.flush();
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 comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                              
    1
    ArrayList parents = new ArrayList();
    1
    StringBuffer buffer = new StringBuffer();
                                                                                        
                                                          
    2
    showAst(parents, pw, ast);
    2
    render(buffer, alias, enabledFilters);
    2
    render(buffer, alias, enabledFilters);
    3
    pw.flush();
    Differences
    Expression1Expression2Difference
    renderflushMETHOD_INVOCATION_NAME_MISMATCH
    render(buffer,alias,enabledFilters)pw.flush()ARGUMENT_NUMBER_MISMATCH
    pwMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression render(buffer,alias,enabledFilters) is a void method call, and thus it cannot be parameterized
    Expression pw.flush() is a void method call, and thus it cannot be parameterized
    Expression render(buffer,alias,enabledFilters) is a void method call, and thus it cannot be parameterized
    Expression pw.flush() is a void method call, and thus it cannot be parameterized
    3
    pw.flush();
    3
    return buffer.toString();
    3
    return buffer.toString();
    Preondition Violations
    Unmatched return buffer.toString();
                                                            
    Precondition Violations (5)
    Row Violation
    1Expression render(buffer,alias,enabledFilters) is a void method call, and thus it cannot be parameterized
    2Expression pw.flush() is a void method call, and thus it cannot be parameterized
    3Expression render(buffer,alias,enabledFilters) is a void method call, and thus it cannot be parameterized
    4Expression pw.flush() is a void method call, and thus it cannot be parameterized
    5Unmatched return buffer.toString();