RubyArray ctors; if ((ctors = constructors) != null) return ctors; return constructors = buildConstructors(javaClass().getConstructors());
RubySymbol sym; if ((sym = symbol) != null) return sym; return symbol = runtime.fastNewSymbol(name);
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/javasupport/JavaClass.java File path: /jruby-1.4.0/src/org/jruby/ast/SymbolNode.java
Method name: RubyArray constructors() Method name: RubySymbol getSymbol(Ruby)
Number of AST nodes: 4 Number of AST nodes: 4
1
RubyArray ctors;
1
RubySymbol sym;
2
        if ((ctors = constructors) != null) return ctors;
2
        if ((sym = symbol) != null) return sym;
3
        return constructors = buildConstructors(javaClass().getConstructors());
3
        return symbol = runtime.fastNewSymbol(name);
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.2
Clones locationClones are in different classes
Number of node comparisons8
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    RubyArray ctors;
    1
    RubyArray ctors;
    1
    RubySymbol sym;
    Differences
    Expression1Expression2Difference
    org.jruby.RubyArrayorg.jruby.RubySymbolSUBCLASS_TYPE_MISMATCH
    ctorssymVARIABLE_NAME_MISMATCH
    org.jruby.RubyArrayorg.jruby.RubySymbolSUBCLASS_TYPE_MISMATCH
    1
    RubySymbol sym;
    2
    if ((ctors = constructors) != null)
    2
    if ((ctors = constructors) != null)
    2
    if ((sym = symbol) != null)
    Differences
    Expression1Expression2Difference
    ctorssymVARIABLE_NAME_MISMATCH
    org.jruby.RubyArrayorg.jruby.RubySymbolSUBCLASS_TYPE_MISMATCH
    constructorssymbolVARIABLE_NAME_MISMATCH
    org.jruby.RubyArrayorg.jruby.RubySymbolSUBCLASS_TYPE_MISMATCH
    2
    if ((sym = symbol) != null)
    3
    return ctors;
    3
    return ctors;
    3
    return sym;
    Differences
    Expression1Expression2Difference
    ctorssymVARIABLE_NAME_MISMATCH
    org.jruby.RubyArrayorg.jruby.RubySymbolSUBCLASS_TYPE_MISMATCH
    3
    return sym;
                                                                                              
    4
    return symbol = runtime.fastNewSymbol(name);
    4
    return constructors = buildConstructors(javaClass().getConstructors());
                                                                                                                                                    
    Precondition Violations (0)
    Row Violation