Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
35 | 2 | 1 | 0.993 | statement_sequence[5] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 35 | 309 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/FloatUtil.java |
2 | 35 | 366 | plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/FloatUtil.java |
| ||||
long fraction; if (mantissaBits > DOUBLE_PRECISION) { // more bits than we can keep int extraBits = mantissaBits - DOUBLE_PRECISION; // round to DOUBLE_PRECISION bits fraction = mantissa >>> (extraBits - 1); long lowBit = fraction& 0x1; fraction += lowBit; fraction = fraction >>> 1; if ((fraction& (1L << DOUBLE_PRECISION)) != 0) { fraction = fraction >>> 1; scaleFactorCompensation -= 1; } } else { // less bits than the faction can hold - pad on right with 0s fraction = mantissa << (DOUBLE_PRECISION - mantissaBits); } int scaleFactor = 0; // how many bits to move '.' to before leading hex digit if (mantissaBits > 0) { if (leadingDigitPosition < binaryPointPosition) { // e.g., 0x80.0p0 has scaleFactor == +8 scaleFactor = 4 * (binaryPointPosition - leadingDigitPosition); // e.g., 0x10.0p0 has scaleFactorCompensation == +3 scaleFactor -= scaleFactorCompensation; } else { // e.g., 0x0.08p0 has scaleFactor == -4 scaleFactor = -4 * (leadingDigitPosition - binaryPointPosition - 1); // e.g., 0x0.01p0 has scaleFactorCompensation == +3 scaleFactor -= scaleFactorCompensation; } } int e = (exponentSign * exponent) + scaleFactor; |
| ||||
// Step 10: convert float literals to IEEE single long fraction; if (mantissaBits > SINGLE_PRECISION) { // more bits than we can keep int extraBits = mantissaBits - SINGLE_PRECISION; // round to DOUBLE_PRECISION bits fraction = mantissa >>> (extraBits - 1); long lowBit = fraction& 0x1; fraction += lowBit; fraction = fraction >>> 1; if ((fraction& (1L << SINGLE_PRECISION)) != 0) { fraction = fraction >>> 1; scaleFactorCompensation -= 1; } } else { // less bits than the faction can hold - pad on right with 0s fraction = mantissa << (SINGLE_PRECISION - mantissaBits); } int scaleFactor = 0; // how many bits to move '.' to before leading hex digit if (mantissaBits > 0) { if (leadingDigitPosition < binaryPointPosition) { // e.g., 0x80.0p0 has scaleFactor == +8 scaleFactor = 4 * (binaryPointPosition - leadingDigitPosition); // e.g., 0x10.0p0 has scaleFactorCompensation == +3 scaleFactor -= scaleFactorCompensation; } else { // e.g., 0x0.08p0 has scaleFactor == -4 scaleFactor = -4 * (leadingDigitPosition - binaryPointPosition - 1); // e.g., 0x0.01p0 has scaleFactorCompensation == +3 scaleFactor -= scaleFactorCompensation; } } int e = (exponentSign * exponent) + scaleFactor; |
| |||
// Step 10: convert float literals to IEEE single long fraction; if (mantissaBits > [[#variable98ed4980]]) { // more bits than we can keep int extraBits = mantissaBits - [[#variable98ed4980]]; // round to DOUBLE_PRECISION bits fraction = mantissa >>> (extraBits - 1); long lowBit = fraction&0x1; fraction += lowBit; fraction = fraction >>> 1; if ((fraction&(1L << [[#variable98ed4980]])) != 0) { fraction = fraction >>> 1; scaleFactorCompensation -= 1; } } else { // less bits than the faction can hold - pad on right with 0s fraction = mantissa << ( [[#variable98ed4980]] - mantissaBits); } int scaleFactor = 0; // how many bits to move '.' to before leading hex digit if (mantissaBits > 0) { if (leadingDigitPosition < binaryPointPosition) { // e.g., 0x80.0p0 has scaleFactor == +8 scaleFactor = 4 * (binaryPointPosition - leadingDigitPosition); // e.g., 0x10.0p0 has scaleFactorCompensation == +3 scaleFactor -= scaleFactorCompensation; } else { // e.g., 0x0.08p0 has scaleFactor == -4 scaleFactor = -4 * (leadingDigitPosition - binaryPointPosition - 1); // e.g., 0x0.01p0 has scaleFactorCompensation == +3 scaleFactor -= scaleFactorCompensation; } } int e = (exponentSign * exponent) + scaleFactor; |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#98ed4980]] | SINGLE_PRECISION |
1 | 2 | [[#98ed4980]] | DOUBLE_PRECISION |