for (int i = alphaSize; --i >= 0;) { final int l = len_t[i] & 0xff; if (l > maxLen) { maxLen = l; } if (l < minLen) { minLen = l; } }
for (int i = alphaSize; --i >= 0;) { final char lent = len_t[i]; if (lent > maxLen) { maxLen = lent; } if (lent < minLen) { minLen = lent; } }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/bzip2/CBZip2OutputStream.java File path: /apache-ant-1.7.0/src/org/apache/tools/bzip2/CBZip2InputStream.java
Method name: void sendMTFValues3(int, int) Method name: void createHuffmanDecodingTables(int, int)
Number of AST nodes: 6 Number of AST nodes: 6
1
for (int i = alphaSize; --i >= 0;) {
1
for (int i = alphaSize; --i >= 0;) {
2
                final int l = len_t[i] & 0xff;
2
                final char lent = len_t[i];
3
                if (l > maxLen) {
3
                if (lent > maxLen) {
4
                    maxLen = l;
4
                    maxLen = lent;
5
                }
5
                }
6
                if (l < minLen) {
6
                if (lent < minLen) {
7
                    minLen = l;
7
                    minLen = lent;
8
                }
8
                }
9
            }
9
            }
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.6
Clones locationClones are in different classes
Number of node comparisons19
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    for (int i = alphaSize; --i >= 0; )
    11
    for (int i = alphaSize; --i >= 0; )
    8
    final int l = len_t[i] & 0xff;
    8
    final int l = len_t[i] & 0xff;
    Preondition Violations
    Unmatched statement final int l=len_t[i] & 0xff; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                  
                                                              
    12
    final char lent = len_t[i];
    Preondition Violations
    Unmatched statement final char lent=len_t[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    12
    final char lent = len_t[i];
    9
    if (l > maxLen)
    9
    if (l > maxLen)
    13
    if (lent > maxLen)
    Differences
    Expression1Expression2Difference
    llentVARIABLE_NAME_MISMATCH
    intcharVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type int of variable l does not match with type char of variable lent
    13
    if (lent > maxLen)
    10
    maxLen = l;
    10
    maxLen = l;
    Preondition Violations
    Unmatched statement maxLen=l; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                              
                                    
    14
    maxLen = lent;
    Preondition Violations
    Unmatched statement maxLen=lent; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    14
    maxLen = lent;
    11
    if (l < minLen)
    11
    if (l < minLen)
    15
    if (lent < minLen)
    Differences
    Expression1Expression2Difference
    llentVARIABLE_NAME_MISMATCH
    intcharVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type int of variable l does not match with type char of variable lent
    15
    if (lent < minLen)
    12
    minLen = l;
    12
    minLen = l;
    Preondition Violations
    Unmatched statement minLen=l; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                              
                                    
    16
    minLen = lent;
    Preondition Violations
    Unmatched statement minLen=lent; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    16
    minLen = lent;
    Precondition Violations (8)
    Row Violation
    1Unmatched statement final int l=len_t[i] & 0xff; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement final char lent=len_t[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Type int of variable l does not match with type char of variable lent
    4Unmatched statement maxLen=l; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5Unmatched statement maxLen=lent; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6Type int of variable l does not match with type char of variable lent
    7Unmatched statement minLen=l; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    8Unmatched statement minLen=lent; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted