if (options != null) { for (int i = 0; i < options.length; i++) { cmd.createArgument().setValue(options[i]); } }
if (includes != null) { for (int i = 0; i < includes.length; i++) { defaultPatterns.createInclude().setName(includes[i]); } directoryScanner = null; }
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/AbstractFileSet.java
Method name: Commandline setupRmicCommand(String[]) Method name: void appendIncludes(String[])
Number of AST nodes: 3 Number of AST nodes: 4
1
if (options != null) {
1
if (includes != null) {
2
            for (int i = 0; i < options.length; i++) {
2
            for (int i = 0; i < includes.length; i++) {
3
                cmd.createArgument().setValue(options[i]);
3
                
4
            }
4
defaultPatterns.createInclude().setName(includes[i]);
5
            }
6
            directoryScanner = null;
5
        }
7
        }
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 statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    2
    if (options != null)
    2
    if (options != null)
    3
    if (includes != null)
    Differences
    Expression1Expression2Difference
    optionsincludesVARIABLE_NAME_MISMATCH
    3
    if (includes != null)
    3
    for (int i = 0; i < options.length; i++)
    3
    for (int i = 0; i < options.length; i++)
    4
    for (int i = 0; i < includes.length; i++)
    Differences
    Expression1Expression2Difference
    optionsincludesVARIABLE_NAME_MISMATCH
    4
    for (int i = 0; i < includes.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
                                                                                              
                                                                                                                    
    5
    defaultPatterns.createInclude().setName(includes[i]);
    Preondition Violations
    Unmatched statement defaultPatterns.createInclude().setName(includes[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5
    defaultPatterns.createInclude().setName(includes[i]);
                                                      
    6
    directoryScanner = null;
    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 defaultPatterns.createInclude().setName(includes[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted