if (arguments != null && arguments.length != 0) { for (int i = 0; i < arguments.length; i++) { addArgument(arguments[i]); } }
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/taskdefs/optional/dotnet/NetCommand.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/BZip2Resource.java
Method name: void addArguments(String[]) Method name: OutputStream wrapStream(OutputStream)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (arguments != null && arguments.length != 0) {
2
            for (int i = 0; i < arguments.length; i++) {
1
for (int i = 0; i < MAGIC.length; i++) {
3
                addArgument(arguments[i]);
2
            out.write(MAGIC[i]);
4
            }
3
        }
5
        }
4
        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
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.2
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    2
    for (int i = 0; i < arguments.length; i++)
    2
    for (int i = 0; i < arguments.length; i++)
    1
    for (int i = 0; i < MAGIC.length; i++)
    Differences
    Expression1Expression2Difference
    argumentsMAGICVARIABLE_NAME_MISMATCH
    1
    for (int i = 0; i < MAGIC.length; i++)
    3
    addArgument(arguments[i]);
    3
    addArgument(arguments[i]);
    2
    out.write(MAGIC[i]);
    Differences
    Expression1Expression2Difference
    addArgumentwriteMETHOD_INVOCATION_NAME_MISMATCH
    argumentsMAGICVARIABLE_NAME_MISMATCH
    outMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression addArgument(arguments[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression out.write(MAGIC[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addArgument(arguments[i]) is a void method call, and thus it cannot be parameterized
    Expression out.write(MAGIC[i]) is a void method call, and thus it cannot be parameterized
    Expression addArgument(arguments[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression out.write(MAGIC[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addArgument(arguments[i]) is a void method call, and thus it cannot be parameterized
    Expression out.write(MAGIC[i]) is a void method call, and thus it cannot be parameterized
    2
    out.write(MAGIC[i]);
                                                                                
    3
    return new CBZip2OutputStream(out);
    Preondition Violations
    Unmatched return new CBZip2OutputStream(out);
    3
    return new CBZip2OutputStream(out);
    Precondition Violations (9)
    Row Violation
    1Expression addArgument(arguments[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression out.write(MAGIC[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression addArgument(arguments[i]) is a void method call, and thus it cannot be parameterized
    4Expression out.write(MAGIC[i]) is a void method call, and thus it cannot be parameterized
    5Expression addArgument(arguments[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression out.write(MAGIC[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression addArgument(arguments[i]) is a void method call, and thus it cannot be parameterized
    8Expression out.write(MAGIC[i]) is a void method call, and thus it cannot be parameterized
    9Unmatched return new CBZip2OutputStream(out);