RubyClass clazz; if ((clazz = concreteProxyClass) != null) return clazz; return concreteProxyClass = runtime.fastGetClass("ConcreteJavaProxy");
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/JavaSupport.java File path: /jruby-1.4.0/src/org/jruby/ast/SymbolNode.java
Method name: RubyClass getConcreteProxyClass() Method name: RubySymbol getSymbol(Ruby)
Number of AST nodes: 4 Number of AST nodes: 4
1
RubyClass clazz;
1
RubySymbol sym;
2
        if ((clazz = concreteProxyClass) != null) return clazz;
2
        if ((sym = symbol) != null) return sym;
3
        return concreteProxyClass = runtime.fastGetClass("ConcreteJavaProxy");
3
        return symbol = runtime.fastNewSymbol(name);
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.2
Clones locationClones are in different classes
Number of node comparisons6
  1. {Non-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)1.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    RubyClass clazz;
    1
    RubyClass clazz;
    1
    RubySymbol sym;
    Differences
    Expression1Expression2Difference
    org.jruby.RubyClassorg.jruby.RubySymbolSUBCLASS_TYPE_MISMATCH
    clazzsymVARIABLE_NAME_MISMATCH
    org.jruby.RubyClassorg.jruby.RubySymbolSUBCLASS_TYPE_MISMATCH
    1
    RubySymbol sym;
    2
    if ((clazz = concreteProxyClass) != null)
    2
    if ((clazz = concreteProxyClass) != null)
    2
    if ((sym = symbol) != null)
    Differences
    Expression1Expression2Difference
    clazzsymVARIABLE_NAME_MISMATCH
    org.jruby.RubyClassorg.jruby.RubySymbolSUBCLASS_TYPE_MISMATCH
    concreteProxyClasssymbolVARIABLE_NAME_MISMATCH
    org.jruby.RubyClassorg.jruby.RubySymbolSUBCLASS_TYPE_MISMATCH
    2
    if ((sym = symbol) != null)
    3
    return clazz;
    3
    return clazz;
    3
    return sym;
    Differences
    Expression1Expression2Difference
    clazzsymVARIABLE_NAME_MISMATCH
    org.jruby.RubyClassorg.jruby.RubySymbolSUBCLASS_TYPE_MISMATCH
    3
    return sym;
    4
    return concreteProxyClass = runtime.fastGetClass("ConcreteJavaProxy");
    4
    return concreteProxyClass = runtime.fastGetClass("ConcreteJavaProxy");
    4
    return symbol = runtime.fastNewSymbol(name);
    Differences
    Expression1Expression2Difference
    concreteProxyClasssymbolVARIABLE_NAME_MISMATCH
    org.jruby.RubyClassorg.jruby.RubySymbolSUBCLASS_TYPE_MISMATCH
    fastGetClassfastNewSymbolMETHOD_INVOCATION_NAME_MISMATCH
    "ConcreteJavaProxy"nameTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression concreteProxyClass is a field being modified, and thus it cannot be parameterized
    Expression symbol is a field being modified, and thus it cannot be parameterized
    4
    return symbol = runtime.fastNewSymbol(name);
    Precondition Violations (2)
    Row Violation
    1Expression concreteProxyClass is a field being modified, and thus it cannot be parameterized
    2Expression symbol is a field being modified, and thus it cannot be parameterized