if (null != arg) { return formatFractionalDigitGroups(arg); } return 0;
if (null != arg) { return formatHasLeadingSpace(arg); } return false;
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/RubyBigDecimal.java File path: /jruby-1.4.0/src/org/jruby/RubyBigDecimal.java
Method name: int groups(String) Method name: boolean posSpace(String)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (null != arg) {
1
if (null != arg) {
2
            return formatFractionalDigitGroups(arg);
2
            return formatHasLeadingSpace(arg);
3
        }
3
        }
4
        return 0;
4
        return false;
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.1
Clones locationClones are declared in the same class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (null != arg)
    1
    if (null != arg)
                                                                              
    2
    return formatHasLeadingSpace(arg);
    Preondition Violations
    Unmatched return formatHasLeadingSpace(arg);
    2
    return formatHasLeadingSpace(arg);
    2
    return formatFractionalDigitGroups(arg);
    2
    return formatFractionalDigitGroups(arg);
    Preondition Violations
    Unmatched return formatFractionalDigitGroups(arg);
                                                                                          
                                    
    3
    return false;
    Preondition Violations
    Unmatched return false;
    3
    return false;
    3
    return 0;
    3
    return 0;
    Preondition Violations
    Unmatched return 0;
                            
    Precondition Violations (4)
    Row Violation
    1Unmatched return formatHasLeadingSpace(arg);
    2Unmatched return formatFractionalDigitGroups(arg);
    3Unmatched return false;
    4Unmatched return 0;