if (!staticAnnotatedMethods1_8.isEmpty()) { out.println(" if (compatVersion == CompatVersion.RUBY1_8 || compatVersion == CompatVersion.BOTH) {"); processMethodDeclarations(staticAnnotatedMethods1_8); out.println(" }"); }
if (!annotatedMethods1_8.isEmpty()) { out.println(" if (compatVersion == CompatVersion.RUBY1_8 || compatVersion == CompatVersion.BOTH) {"); processMethodDeclarations(annotatedMethods1_8); out.println(" }"); }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/anno/AnnotationBinder.java File path: /jruby-1.4.0/src/org/jruby/anno/AnnotationBinder.java
Method name: void visitClassDeclaration(ClassDeclaration) Method name: void visitClassDeclaration(ClassDeclaration)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (!staticAnnotatedMethods1_8.isEmpty()) {
1
if (!annotatedMethods1_8.isEmpty()) {
2
                        out.println("        if (compatVersion == CompatVersion.RUBY1_8 || compatVersion == CompatVersion.BOTH) {");
2
                        out.println("        if (compatVersion == CompatVersion.RUBY1_8 || compatVersion == CompatVersion.BOTH) {");
3
                        processMethodDeclarations(staticAnnotatedMethods1_8);
3
                        processMethodDeclarations(annotatedMethods1_8);
4
                        out.println("        }");
4
                        out.println("        }");
5
                    }
5
                    }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in the same method
Number of node comparisons18
  1. {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.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    69
    if (!staticAnnotatedMethods1_8.isEmpty())
    69
    if (!staticAnnotatedMethods1_8.isEmpty())
    78
    if (!annotatedMethods1_8.isEmpty())
    Differences
    Expression1Expression2Difference
    staticAnnotatedMethods1_8annotatedMethods1_8VARIABLE_NAME_MISMATCH
    78
    if (!annotatedMethods1_8.isEmpty())
    70
    out.println("        if (compatVersion == CompatVersion.RUBY1_8 || compatVersion == CompatVersion.BOTH) {");
    79
    out.println("        if (compatVersion == CompatVersion.RUBY1_8 || compatVersion == CompatVersion.BOTH) {");
    71
    processMethodDeclarations(staticAnnotatedMethods1_8);
    71
    processMethodDeclarations(staticAnnotatedMethods1_8);
    80
    processMethodDeclarations(annotatedMethods1_8);
    Differences
    Expression1Expression2Difference
    staticAnnotatedMethods1_8annotatedMethods1_8VARIABLE_NAME_MISMATCH
    80
    processMethodDeclarations(annotatedMethods1_8);
    72
    out.println("        }");
    81
    out.println("        }");
    Precondition Violations (0)
    Row Violation