redirector.setErrorFilterChains(errorFilterChains); } if (inputEncoding != null) { redirector.setInputEncoding(inputEncoding); } if (outputEncoding != null) { redirector.setOutputEncoding(outputEncoding); }
redirector.setOutputProperty(outputProperty); } if (errorProperty != null) { redirector.setErrorProperty(errorProperty); } if (inputString != null) { redirector.setInputString(inputString); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/RedirectorElement.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/RedirectorElement.java
Method name: void configure(Redirector, String) Method name: void configure(Redirector, String)
Number of AST nodes: 5 Number of AST nodes: 5
1
redirector.setErrorFilterChains(errorFilterChains);
1
redirector.setOutputProperty(outputProperty);
2
        }
2
        }
3
        if (inputEncoding != null) {
3
        if (errorProperty != null) {
4
            redirector.setInputEncoding(inputEncoding);
4
            redirector.setErrorProperty(errorProperty);
5
        }
5
        }
6
        if (outputEncoding != null) {
6
        if (inputString != null) {
7
            redirector.setOutputEncoding(outputEncoding);
7
            redirector.setInputString(inputString);
8
        }
8
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in the same method
Number of node comparisons13
  1. {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)18.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    44
    if (inputEncoding != null)
    44
    if (inputEncoding != null)
    16
    if (inputString != null)
    Differences
    Expression1Expression2Difference
    inputEncodinginputStringVARIABLE_NAME_MISMATCH
    16
    if (inputString != null)
    45
    redirector.setInputEncoding(inputEncoding);
    45
    redirector.setInputEncoding(inputEncoding);
    17
    redirector.setInputString(inputString);
    Differences
    Expression1Expression2Difference
    inputEncodinginputStringVARIABLE_NAME_MISMATCH
    setInputEncodingsetInputStringMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression redirector.setInputEncoding(inputEncoding) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression redirector.setInputString(inputString) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression redirector.setInputEncoding(inputEncoding) is a void method call, and thus it cannot be parameterized
    Expression redirector.setInputString(inputString) is a void method call, and thus it cannot be parameterized
    17
    redirector.setInputString(inputString);
    46
    if (outputEncoding != null)
    46
    if (outputEncoding != null)
    14
    if (errorProperty != null)
    Differences
    Expression1Expression2Difference
    outputEncodingerrorPropertyVARIABLE_NAME_MISMATCH
    14
    if (errorProperty != null)
    47
    redirector.setOutputEncoding(outputEncoding);
    47
    redirector.setOutputEncoding(outputEncoding);
    15
    redirector.setErrorProperty(errorProperty);
    Differences
    Expression1Expression2Difference
    outputEncodingerrorPropertyVARIABLE_NAME_MISMATCH
    setOutputEncodingsetErrorPropertyMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression redirector.setOutputEncoding(outputEncoding) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression redirector.setErrorProperty(errorProperty) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression redirector.setOutputEncoding(outputEncoding) is a void method call, and thus it cannot be parameterized
    Expression redirector.setErrorProperty(errorProperty) is a void method call, and thus it cannot be parameterized
    15
    redirector.setErrorProperty(errorProperty);
    Precondition Violations (8)
    Row Violation
    1Expression redirector.setInputEncoding(inputEncoding) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression redirector.setInputString(inputString) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression redirector.setInputEncoding(inputEncoding) is a void method call, and thus it cannot be parameterized
    4Expression redirector.setInputString(inputString) is a void method call, and thus it cannot be parameterized
    5Expression redirector.setOutputEncoding(outputEncoding) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression redirector.setErrorProperty(errorProperty) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression redirector.setOutputEncoding(outputEncoding) is a void method call, and thus it cannot be parameterized
    8Expression redirector.setErrorProperty(errorProperty) is a void method call, and thus it cannot be parameterized