Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
28 | 2 | 2 | 0.961 | statement_sequence[3] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 28 | 4860 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java |
2 | 27 | 4900 | 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(); |
| ||||
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]; |
| |||
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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b9690de0]] | // check if all the string is encoded (PR 1PR2DWJ) // the string is too big to be encoded in one pass newStringContatenation(); |
1 | 2 | [[#b9690de0]] | // the next part is done int newCharLength = i - startIndex; |
2 | 1 | [[#bda5a540]] | dup() |
2 | 2 | [[#bda5a540]] | subChars = new char[newCharLength] |