CloneSet330


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
28220.961statement_sequence[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1284860
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
2274900
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
Clone Instance
1
Line Count
28
Source Line
4860
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java

                while ((length < 65532) && (i < constantLength)) {
                        char current = constantChars[i];
                        // we resize the byte array immediately if necessary
                        if (length + 3 > (utf8encodingLength = utf8encoding.length)) {
                                System.arraycopy(utf8encoding, 0, utf8encoding = new byte[Math.min(utf8encodingLength + 100, 65535)], 0, length);
                        }
                        if ((current >= 0x0001) && (current <= 0x007f)) {
                                // we only need one byte: ASCII table
                                utf8encoding[length++ ] = (byte) current;
                        }
                        else   {
                                if (current > 0x07ff) {
                                        // we need 3 bytes
                                        utf8encoding[length++ ] = (byte) (0xe0|  ((current >> 12)&  0x0f)); // 0xE0 = 1110 0000
                                        utf8encoding[length++ ] = (byte) (0x80|  ((current >> 6)&  0x3f)); // 0x80 = 1000 0000
                                        utf8encoding[length++ ] = (byte) (0x80|  (current&  0x3f)); // 0x80 = 1000 0000
                                }
                                else   {
                                        // we can be 0 or between 0x0080 and 0x07FF
                                        // In that case we only need 2 bytes
                                        utf8encoding[length++ ] = (byte) (0xc0|  ((current >> 6)&  0x1f)); // 0xC0 = 1100 0000
                                        utf8encoding[length++ ] = (byte) (0x80|  (current&  0x3f)); // 0x80 = 1000 0000
                                }
                        }
                        i++;
                }
                // check if all the string is encoded (PR 1PR2DWJ)
                // the string is too big to be encoded in one pass
                newStringContatenation();
                dup();


Clone Instance
2
Line Count
27
Source Line
4900
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java

                        while ((length < 65532) && (i < constantLength)) {
                                char current = constantChars[i];
                                // we resize the byte array immediately if necessary
                                if (length + 3 > (utf8encodingLength = utf8encoding.length)) {
                                        System.arraycopy(utf8encoding, 0, utf8encoding = new byte[Math.min(utf8encodingLength + 100, 65535)], 0, length);
                                }
                                if ((current >= 0x0001) && (current <= 0x007f)) {
                                        // we only need one byte: ASCII table
                                        utf8encoding[length++ ] = (byte) current;
                                }
                                else   {
                                        if (current > 0x07ff) {
                                                // we need 3 bytes
                                                utf8encoding[length++ ] = (byte) (0xe0|  ((current >> 12)&  0x0f)); // 0xE0 = 1110 0000
                                                utf8encoding[length++ ] = (byte) (0x80|  ((current >> 6)&  0x3f)); // 0x80 = 1000 0000
                                                utf8encoding[length++ ] = (byte) (0x80|  (current&  0x3f)); // 0x80 = 1000 0000
                                        }
                                        else   {
                                                // we can be 0 or between 0x0080 and 0x07FF
                                                // In that case we only need 2 bytes
                                                utf8encoding[length++ ] = (byte) (0xc0|  ((current >> 6)&  0x1f)); // 0xC0 = 1100 0000
                                                utf8encoding[length++ ] = (byte) (0x80|  (current&  0x3f)); // 0x80 = 1000 0000
                                        }
                                }
                                i++;
                        }
                        // the next part is done
                        int newCharLength = i - startIndex;
                        subChars = new char[newCharLength];


Clone AbstractionParameter Count: 2Parameter Bindings

while ((length < 65532) && (i < constantLength)) {
  char current = constantChars[i];
  // we resize the byte array immediately if necessary
  if (length + 3 > (utf8encodingLength = utf8encoding.length)) {
    System.arraycopy(utf8encoding, 0, utf8encoding = new byte[Math.min(utf8encodingLength + 100, 65535)], 0, length);
  }
  if ((current >= 0x0001) && (current <= 0x007f)) {
    // we only need one byte: ASCII table
    utf8encoding[length++ ] = (byte) current;
  }
  else {
    if (current > 0x07ff) {
      // we need 3 bytes
      utf8encoding[length++ ] = (byte) (0xe0|((current >> 12)&0x0f)); // 0xE0 = 1110 0000
      utf8encoding[length++ ] = (byte) (0x80|((current >> 6)&0x3f)); // 0x80 = 1000 0000
      utf8encoding[length++ ] = (byte) (0x80|(current&0x3f)); // 0x80 = 1000 0000
    }
    else {
      // we can be 0 or between 0x0080 and 0x07FF
      // In that case we only need 2 bytes
      utf8encoding[length++ ] = (byte) (0xc0|((current >> 6)&0x1f)); // 0xC0 = 1100 0000
      utf8encoding[length++ ] = (byte) (0x80|(current&0x3f)); // 0x80 = 1000 0000
    }
  }
  i++;
}
 [[#variableb9690de0]]
 [[#variablebda5a540]];
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b9690de0]]
// check if all the string is encoded (PR 1PR2DWJ)
// the string is too big to be encoded in one pass
newStringContatenation(); 
12[[#b9690de0]]
// the next part is done
int newCharLength = i - startIndex; 
21[[#bda5a540]]
dup() 
22[[#bda5a540]]
subChars = new char[newCharLength]