CloneSet694


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
35210.993statement_sequence[5]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
135309
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/FloatUtil.java
235366
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/FloatUtil.java
Clone Instance
1
Line Count
35
Source Line
309
Source File
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;


Clone Instance
2
Line Count
35
Source Line
366
Source File
plugins/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/FloatUtil.java

                // 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;


Clone AbstractionParameter Count: 1Parameter Bindings

// 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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#98ed4980]]
SINGLE_PRECISION 
12[[#98ed4980]]
DOUBLE_PRECISION