if (excludes != null) { for (int i = 0; i < excludes.length; i++) { defaultPatterns.createExclude().setName(excludes[i]); } directoryScanner = null; }
for (int i = 0; i < MAGIC.length; i++) { out.write(MAGIC[i]); } return new CBZip2OutputStream(out);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/AbstractFileSet.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/BZip2Resource.java
Method name: void appendExcludes(String[]) Method name: OutputStream wrapStream(OutputStream)
Number of AST nodes: 4 Number of AST nodes: 3
1
if (excludes != null) {
2
            for (int i = 0; i < excludes.length; i++) {
1
for (int i = 0; i < MAGIC.length; i++) {
3
                defaultPatterns.createExclude().setName(excludes[i]);
2
            out.write(MAGIC[i]);
4
            }
3
        
5
    
4
}
6
        directoryScanner = null;
5
        
7
        }
6
return new CBZip2OutputStream(out);
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 having the same super 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.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    4
    for (int i = 0; i < excludes.length; i++)
    4
    for (int i = 0; i < excludes.length; i++)
    1
    for (int i = 0; i < MAGIC.length; i++)
    Differences
    Expression1Expression2Difference
    excludesMAGICVARIABLE_NAME_MISMATCH
    1
    for (int i = 0; i < MAGIC.length; i++)
                                                  
    2
    out.write(MAGIC[i]);
    Preondition Violations
    Unmatched statement out.write(MAGIC[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2
    out.write(MAGIC[i]);
    5
    defaultPatterns.createExclude().setName(excludes[i]);
    5
    defaultPatterns.createExclude().setName(excludes[i]);
    Preondition Violations
    Unmatched statement defaultPatterns.createExclude().setName(excludes[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                    
                                                                                
    3
    return new CBZip2OutputStream(out);
    Preondition Violations
    Unmatched return new CBZip2OutputStream(out);
    3
    return new CBZip2OutputStream(out);
    6
    directoryScanner = null;
                                                      
    Precondition Violations (3)
    Row Violation
    1Unmatched statement out.write(MAGIC[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement defaultPatterns.createExclude().setName(excludes[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched return new CBZip2OutputStream(out);