OutputStream out = channel.getOutputStream(); InputStream in = channel.getInputStream(); channel.connect(); sendAck(out);
OutputStream out = channel.getOutputStream(); InputStream in = channel.getInputStream(); channel.connect(); waitForAck(in);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ssh/ScpToMessage.java
Method name: void execute() Method name: void doSingleTransfer()
Number of AST nodes: 4 Number of AST nodes: 4
1
OutputStream out = channel.getOutputStream();
1
OutputStream out = channel.getOutputStream();
2
            InputStream in = channel.getInputStream();
2
            InputStream in = channel.getInputStream();
3
            channel.connect();
3
            channel.connect();
4
            sendAck(out);
4
            waitForAck(in);
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    OutputStream out = channel.getOutputStream();
    7
    OutputStream out = channel.getOutputStream();
    5
    InputStream in = channel.getInputStream();
    Differences
    Expression1Expression2Difference
    java.io.OutputStreamjava.io.InputStreamSUBCLASS_TYPE_MISMATCH
    outinVARIABLE_NAME_MISMATCH
    java.io.OutputStreamjava.io.InputStreamSUBCLASS_TYPE_MISMATCH
    getOutputStreamgetInputStreamMETHOD_INVOCATION_NAME_MISMATCH
    5
    InputStream in = channel.getInputStream();
    8
    InputStream in = channel.getInputStream();
    8
    InputStream in = channel.getInputStream();
    4
    OutputStream out = channel.getOutputStream();
    Differences
    Expression1Expression2Difference
    java.io.InputStreamjava.io.OutputStreamSUBCLASS_TYPE_MISMATCH
    inoutVARIABLE_NAME_MISMATCH
    java.io.InputStreamjava.io.OutputStreamSUBCLASS_TYPE_MISMATCH
    getInputStreamgetOutputStreamMETHOD_INVOCATION_NAME_MISMATCH
    4
    OutputStream out = channel.getOutputStream();
    9
    channel.connect();
    6
    channel.connect();
    10
    sendAck(out);
    10
    sendAck(out);
    7
    waitForAck(in);
    Differences
    Expression1Expression2Difference
    outinVARIABLE_NAME_MISMATCH
    java.io.OutputStreamjava.io.InputStreamSUBCLASS_TYPE_MISMATCH
    sendAckwaitForAckMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression sendAck(out) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression waitForAck(in) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression sendAck(out) is a void method call, and thus it cannot be parameterized
    Expression waitForAck(in) is a void method call, and thus it cannot be parameterized
    7
    waitForAck(in);
    Precondition Violations (5)
    Row Violation
    1Expression sendAck(out) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression waitForAck(in) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression sendAck(out) is a void method call, and thus it cannot be parameterized
    4Expression waitForAck(in) is a void method call, and thus it cannot be parameterized
    5Clone fragment #1 returns variables out, in , while Clone fragment #2 returns variables out, in