output.write(CRLF); output.write("Content-Transfer-Encoding: 8bit".getBytes(ISO_8859_1)); output.write(CRLF); output.write(CRLF); if(contentEncoding != null) { output.write(titleValue.getBytes(contentEncoding)); } else { output.write(titleValue.getBytes()); } output.write(CRLF); output.write(DASH_DASH); output.write(boundaryString.getBytes(ISO_8859_1));
output.write(CRLF); output.write("Content-Transfer-Encoding: 8bit".getBytes(HTTP_ENCODING)); output.write(CRLF); output.write(CRLF); if(contentEncoding != null) { output.write(descriptionValue.getBytes(contentEncoding)); } else { output.write(descriptionValue.getBytes()); } output.write(CRLF); output.write(DASH_DASH); output.write(boundaryString.getBytes(HTTP_ENCODING));
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java
Method name: byte[] createExpectedFormdataOutput(String, String, String, String, String, String, boolean, boolean) Method name: byte[] createExpectedFormdataOutput(String, String, String, String, String, String, boolean, boolean)
Number of AST nodes: 10 Number of AST nodes: 10
1
output.write(CRLF);
1
output.write(CRLF);
2
        output.write("Content-Transfer-Encoding: 8bit".getBytes(ISO_8859_1));
2
        output.write("Content-Transfer-Encoding: 8bit".getBytes(HTTP_ENCODING));
3
        output.write(CRLF);
3
        output.write(CRLF);
4
        output.write(CRLF);
4
        output.write(CRLF);
5
        if(contentEncoding != null) {
5
        if(contentEncoding != null) {
6
            output.write(titleValue.getBytes(contentEncoding));
6
            output.write(descriptionValue.getBytes(contentEncoding));
7
        }
7
        }
8
        else {
8
        else {
9
            output.write(titleValue.getBytes());
9
            output.write(descriptionValue.getBytes());
10
        }
10
        }
11
        output.write(CRLF);
11
        output.write(CRLF);
12
        output.write(DASH_DASH);
12
        output.write(DASH_DASH);
13
        output.write(boundaryString.getBytes(ISO_8859_1));
13
        output.write(boundaryString.getBytes(HTTP_ENCODING));
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 different classes having the same super class
Number of node comparisons34
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements10
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)6.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    15
    output.write(CRLF);
    35
    output.write(CRLF);
    16
    output.write("Content-Transfer-Encoding: 8bit".getBytes(ISO_8859_1));
    16
    output.write("Content-Transfer-Encoding: 8bit".getBytes(ISO_8859_1));
    36
    output.write("Content-Transfer-Encoding: 8bit".getBytes(HTTP_ENCODING));
    Differences
    Expression1Expression2Difference
    ISO_8859_1HTTP_ENCODINGVARIABLE_NAME_MISMATCH
    36
    output.write("Content-Transfer-Encoding: 8bit".getBytes(HTTP_ENCODING));
    17
    output.write(CRLF);
    37
    output.write(CRLF);
    18
    output.write(CRLF);
    38
    output.write(CRLF);
    19
    if (contentEncoding != null)
    39
    if (contentEncoding != null)
    20
    output.write(titleValue.getBytes(contentEncoding));
    20
    output.write(titleValue.getBytes(contentEncoding));
    40
    output.write(descriptionValue.getBytes(contentEncoding));
    Differences
    Expression1Expression2Difference
    titleValuedescriptionValueVARIABLE_NAME_MISMATCH
    40
    output.write(descriptionValue.getBytes(contentEncoding));
    else
    else
    21
    output.write(titleValue.getBytes());
    21
    output.write(titleValue.getBytes());
    41
    output.write(descriptionValue.getBytes());
    Differences
    Expression1Expression2Difference
    titleValuedescriptionValueVARIABLE_NAME_MISMATCH
    41
    output.write(descriptionValue.getBytes());
    22
    output.write(CRLF);
    42
    output.write(CRLF);
    23
    output.write(DASH_DASH);
    43
    output.write(DASH_DASH);
    24
    output.write(boundaryString.getBytes(ISO_8859_1));
    24
    output.write(boundaryString.getBytes(ISO_8859_1));
    44
    output.write(boundaryString.getBytes(HTTP_ENCODING));
    Differences
    Expression1Expression2Difference
    ISO_8859_1HTTP_ENCODINGVARIABLE_NAME_MISMATCH
    44
    output.write(boundaryString.getBytes(HTTP_ENCODING));
    Precondition Violations (0)
    Row Violation