bits6 = (bits24 & 0x0003F000) >> 12; out[outIndex++] = ALPHABET[bits6]; bits6 = (bits24 & 0x00000FC0) >> 6; out[outIndex++] = ALPHABET[bits6]; // padding out[outIndex++] = '=';
bits6 = (bits24 & 0x00FC0000) >> 18; out[outIndex++] = ALPHABET[bits6]; bits6 = (bits24 & 0x0003F000) >> 12; out[outIndex++] = ALPHABET[bits6]; // padding out[outIndex++] = '=';
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/Base64Converter.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/Base64Converter.java
Method name: String encode(byte[]) Method name: String encode(byte[])
Number of AST nodes: 5 Number of AST nodes: 5
1
bits6 = (bits24 & 0x0003F000) >> 12;
1
bits6 = (bits24 & 0x00FC0000) >> 18;
2
            out[outIndex++] = ALPHABET[bits6];
2
            out[outIndex++] = ALPHABET[bits6];
3
            bits6 = (bits24 & 0x00000FC0) >> 6;
3
            bits6 = (bits24 & 0x0003F000) >> 12;
4
            out[outIndex++] = ALPHABET[bits6];
4
            out[outIndex++] = ALPHABET[bits6];
5
            // padding
5
            // padding
6
            out[outIndex++] = '=';
6
            out[outIndex++] = '=';
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 the same method
Number of node comparisons13
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    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
    23
    bits6 = (bits24 & 0x0003F000) >> 12;
    23
    bits6 = (bits24 & 0x0003F000) >> 12;
    30
    bits6 = (bits24 & 0x00FC0000) >> 18;
    Differences
    Expression1Expression2Difference
    0x0003F0000x00FC0000LITERAL_VALUE_MISMATCH
    1218LITERAL_VALUE_MISMATCH
    30
    bits6 = (bits24 & 0x00FC0000) >> 18;
    24
    out[outIndex++] = ALPHABET[bits6];
    31
    out[outIndex++] = ALPHABET[bits6];
    25
    bits6 = (bits24 & 0x00000FC0) >> 6;
    25
    bits6 = (bits24 & 0x00000FC0) >> 6;
    32
    bits6 = (bits24 & 0x0003F000) >> 12;
    Differences
    Expression1Expression2Difference
    0x00000FC00x0003F000LITERAL_VALUE_MISMATCH
    612LITERAL_VALUE_MISMATCH
    32
    bits6 = (bits24 & 0x0003F000) >> 12;
    26
    out[outIndex++] = ALPHABET[bits6];
    33
    out[outIndex++] = ALPHABET[bits6];
    27
    out[outIndex++] = '=';
    34
    out[outIndex++] = '=';
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables , while Clone fragment #2 returns variables outIndex