if (!isSecurityRestricted()) { // Signal uses sun.misc.* classes, this is not allowed // in the security-sensitive environments if (profile.allowModule("Signal")) { RubySignal.createSignal(this); } }
if (!is1_9()) { if (profile.allowModule("Precision")) { RubyPrecision.createPrecisionModule(this); } }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/Ruby.java File path: /jruby-1.4.0/src/org/jruby/Ruby.java
Method name: void initCore() Method name: void initCore()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (!isSecurityRestricted()) {
1
if (!is
2
            // Signal uses sun.misc.* classes, this is not allowed
3
            // in the security-sensitive environments
2
1_9()) {
4
            if (profile.allowModule("Signal")) {
3
            if (profile.allowModule("Precision")) {
5
                RubySignal.createSignal(this);
4
                RubyPrecision.createPrecisionModule(this);
6
            }
5
            }
7
        }
6
        }
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 comparisons5
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    87
    if (!isSecurityRestricted())
    87
    if (!isSecurityRestricted())
    26
    if (!is1_9())
    Differences
    Expression1Expression2Difference
    isSecurityRestrictedis1_9METHOD_INVOCATION_NAME_MISMATCH
    26
    if (!is1_9())
    88
    if (profile.allowModule("Signal"))
    88
    if (profile.allowModule("Signal"))
    27
    if (profile.allowModule("Precision"))
    Differences
    Expression1Expression2Difference
    "Signal""Precision"LITERAL_VALUE_MISMATCH
    27
    if (profile.allowModule("Precision"))
                                                                                                
    28
    RubyPrecision.createPrecisionModule(this);
    89
    RubySignal.createSignal(this);
                                                                        
    Precondition Violations (0)
    Row Violation