if (!staticAnnotatedMethods1_8.isEmpty()) { out.println(" if (compatVersion == CompatVersion.RUBY1_8 || compatVersion == CompatVersion.BOTH) {"); processMethodDeclarations(staticAnnotatedMethods1_8); out.println(" }"); }
if (!staticAnnotatedMethods1_9.isEmpty()) { out.println(" if (compatVersion == CompatVersion.RUBY1_9 || compatVersion == CompatVersion.BOTH) {"); processMethodDeclarations(staticAnnotatedMethods1_9); 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 (!staticAnnotatedMethods1_9.isEmpty()) {
2
                        out.println("        if (compatVersion == CompatVersion.RUBY1_8 || compatVersion == CompatVersion.BOTH) {");
2
                        out.println("        if (compatVersion == CompatVersion.RUBY1_9 || compatVersion == CompatVersion.BOTH) {");
3
                        processMethodDeclarations(staticAnnotatedMethods1_8);
3
                        processMethodDeclarations(staticAnnotatedMethods1_9);
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.4
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.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    69
    if (!staticAnnotatedMethods1_8.isEmpty())
    69
    if (!staticAnnotatedMethods1_8.isEmpty())
    73
    if (!staticAnnotatedMethods1_9.isEmpty())
    Differences
    Expression1Expression2Difference
    staticAnnotatedMethods1_8staticAnnotatedMethods1_9VARIABLE_NAME_MISMATCH
    73
    if (!staticAnnotatedMethods1_9.isEmpty())
    70
    out.println("        if (compatVersion == CompatVersion.RUBY1_8 || compatVersion == CompatVersion.BOTH) {");
    70
    out.println(" if (compatVersion == CompatVersion.RUBY1_8 || compatVersion == CompatVersion.BOTH) {");
    74
    out.println(" if (compatVersion == CompatVersion.RUBY1_9 || compatVersion == CompatVersion.BOTH) {");
    Differences
    Expression1Expression2Difference
    " if (compatVersion == CompatVersion.RUBY1_8 || compatVersion == CompatVersion.BOTH) {"" if (compatVersion == CompatVersion.RUBY1_9 || compatVersion == CompatVersion.BOTH) {"LITERAL_VALUE_MISMATCH
    74
    out.println("        if (compatVersion == CompatVersion.RUBY1_9 || compatVersion == CompatVersion.BOTH) {");
    71
    processMethodDeclarations(staticAnnotatedMethods1_8);
    71
    processMethodDeclarations(staticAnnotatedMethods1_8);
    75
    processMethodDeclarations(staticAnnotatedMethods1_9);
    Differences
    Expression1Expression2Difference
    staticAnnotatedMethods1_8staticAnnotatedMethods1_9VARIABLE_NAME_MISMATCH
    75
    processMethodDeclarations(staticAnnotatedMethods1_9);
    72
    out.println("        }");
    76
    out.println("        }");
    Precondition Violations (0)
    Row Violation