if (options != null) { for (int i = 0; i < options.length; i++) { cmd.createArgument().setValue(options[i]); } }
if (nestedExcludes != null) { for (int i = 0; i < nestedExcludes.length; i++) { createExclude().setName(nestedExcludes[i]); } }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/PatternSet.java
Method name: Commandline setupRmicCommand(String[]) Method name: void addConfiguredPatternset(PatternSet)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (options != null) {
1
if (nestedExcludes != null) {
2
            for (int i = 0; i < options.length; i++) {
2
            for (int i = 0; i < nestedExcludes.length; i++) {
3
                cmd.createArgument().setValue(options[i]);
3
                createExclude().setName(nestedExcludes[i]);
4
            }
4
            }
5
        }
5
        }
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 comparisons5
  1. {Non-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)0.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    if (options != null)
    2
    if (options != null)
    8
    if (nestedExcludes != null)
    Differences
    Expression1Expression2Difference
    optionsnestedExcludesVARIABLE_NAME_MISMATCH
    8
    if (nestedExcludes != null)
    3
    for (int i = 0; i < options.length; i++)
    3
    for (int i = 0; i < options.length; i++)
    9
    for (int i = 0; i < nestedExcludes.length; i++)
    Differences
    Expression1Expression2Difference
    optionsnestedExcludesVARIABLE_NAME_MISMATCH
    9
    for (int i = 0; i < nestedExcludes.length; i++)
    4
    cmd.createArgument().setValue(options[i]);
    4
    cmd.createArgument().setValue(options[i]);
    Preondition Violations
    Unmatched statement cmd.createArgument().setValue(options[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                              
                                                                                                  
    10
    createExclude().setName(nestedExcludes[i]);
    Preondition Violations
    Unmatched statement createExclude().setName(nestedExcludes[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    10
    createExclude().setName(nestedExcludes[i]);
    Precondition Violations (2)
    Row Violation
    1Unmatched statement cmd.createArgument().setValue(options[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement createExclude().setName(nestedExcludes[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted