for (int i = 0; i < splitClasses.length; i++) { if (simplename.equals(splitClasses[i]) || simplename.startsWith(splitClasses[i] + '$')) { return true; } }
if (null != implementationVersion) { if (null == otherImplementationVersion || !implementationVersion.equals(otherImplementationVersion)) { return REQUIRE_IMPLEMENTATION_CHANGE; } }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/extension/Specification.java
Method name: boolean isSplit(String) Method name: Compatibility getCompatibilityWith(Specification)
Number of AST nodes: 3 Number of AST nodes: 3
1
for (int i = 0; i < splitClasses.length; i++) {
1
if (null != implementationVersion) {
2
                if (simplename.equals(splitClasses[i])
2
            if (
3
     
3
null == otherImplementationVersion
4
                   || simplename.startsWith(splitClasses[i] + '$')) {
4
                || !implementationVersion.equals(otherImplementationVersion)) {
5
                    return true;
5
                return 
6
    
6
REQUIRE_IMPLEMENTATION_CHANGE;
7
            }
7
            }
8
            }
8
        }
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.3
Clones locationClones are in different classes
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    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.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (simplename.equals(splitClasses[i]) || simplename.startsWith(splitClasses[i] + '$'))
    3
    if (simplename.equals(splitClasses[i]) || simplename.startsWith(splitClasses[i] + '$'))
    13
    if (null == otherImplementationVersion || !implementationVersion.equals(otherImplementationVersion))
    Differences
    Expression1Expression2Difference
    simplename.startsWith(splitClasses[i] + '$')!implementationVersion.equals(otherImplementationVersion)TYPE_COMPATIBLE_REPLACEMENT
    simplename.equals(splitClasses[i])null == otherImplementationVersionINFIX_LEFT_OPERAND_MISMATCH
    13
    if (null == otherImplementationVersion || !implementationVersion.equals(otherImplementationVersion))
    4
    return true;
    4
    return true;
    Preondition Violations
    Unmatched return true;
                                  
                                                                                      
    14
    return REQUIRE_IMPLEMENTATION_CHANGE;
    Preondition Violations
    Unmatched return REQUIRE_IMPLEMENTATION_CHANGE;
    14
    return REQUIRE_IMPLEMENTATION_CHANGE;
    Precondition Violations (2)
    Row Violation
    1Unmatched return true;
    2Unmatched return REQUIRE_IMPLEMENTATION_CHANGE;