﻿ CloneSet 107

# CloneSet107

 Previous CloneSet Next CloneSet Back to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
30210.994StatementList[2]
 Clone Abstraction Parameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
130607
`Closure/closure/goog/math/integer.js`
230648
`Closure/closure/goog/math/long.js`
 Clone Instance1 Line Count30 Source Line607 Source File`Closure/closure/goog/math/integer.js`

```  while (rem.greaterThanOrEqual(other)) {
// Approximate the result of division. This may be a little greater or
// smaller than the actual value.
var approx=  Math.max(1, Math.floor(rem.toNumber( )/ other.toNumber( )));

// We will tweak the approximate result by changing it in the 48-th digit or
// the smallest non-fractional digit, whichever is larger.
var log2=  Math.ceil(Math.log(approx)/  Math.LN2);
var delta=  (log2<=  48)
?              1
:                  Math.pow(2, log2-  48);
// Decrease the approximation until it is smaller than the remainder.  Note
// that if it is too large, the product overflows and is negative.
var approxRes=  goog.math.Integer.fromNumber(approx);
var approxRem=  approxRes.multiply(other);
while (approxRem.isNegative( )
||                        approxRem.greaterThan(rem)) {
approx-=  delta;
approxRes=  goog.math.Integer.fromNumber(approx);
approxRem=  approxRes.multiply(other);
}
// We know the answer can't be zero... and actually, zero would cause
// infinite recursion since we would make no progress.
if (approxRes.isZero( )){
approxRes=  goog.math.Integer.ONE;
}
rem=  rem.subtract(approxRem);
}
return res;

```

 Clone Instance2 Line Count30 Source Line648 Source File`Closure/closure/goog/math/long.js`

```  while (rem.greaterThanOrEqual(other)) {
// Approximate the result of division. This may be a little greater or
// smaller than the actual value.
var approx=  Math.max(1, Math.floor(rem.toNumber( )/ other.toNumber( )));

// We will tweak the approximate result by changing it in the 48-th digit or
// the smallest non-fractional digit, whichever is larger.
var log2=  Math.ceil(Math.log(approx)/  Math.LN2);
var delta=  (log2<=  48)
?              1
:                  Math.pow(2, log2-  48);
// Decrease the approximation until it is smaller than the remainder.  Note
// that if it is too large, the product overflows and is negative.
var approxRes=  goog.math.Long.fromNumber(approx);
var approxRem=  approxRes.multiply(other);
while (approxRem.isNegative( )
||                        approxRem.greaterThan(rem)) {
approx-=  delta;
approxRes=  goog.math.Long.fromNumber(approx);
approxRem=  approxRes.multiply(other);
}
// We know the answer can't be zero... and actually, zero would cause
// infinite recursion since we would make no progress.
if (approxRes.isZero( )){
approxRes=  goog.math.Long.ONE;
}
rem=  rem.subtract(approxRem);
}
return res;

```

 Clone Abstraction Parameter Count: 1 Parameter Bindings

```while (rem.greaterThanOrEqual(other))
{
// Approximate the result of division. This may be a little greater or
// smaller than the actual value.
var approx=Math.max(1,Math.floor(rem.toNumber( )/other.toNumber( )));
// We will tweak the approximate result by changing it in the 48-th digit or
// the smallest non-fractional digit, whichever is larger.
var log2=Math.ceil(Math.log(approx)/Math.LN2);
var delta=(log2<=48)
?1
:Math.pow(2,log2-48);
// Decrease the approximation until it is smaller than the remainder.  Note
// that if it is too large, the product overflows and is negative.
var approxRes=goog.math. [[#variable60d04d40]].fromNumber(approx);
var approxRem=approxRes.multiply(other);
while (approxRem.isNegative( )
|| approxRem.greaterThan(rem))
{ approx-=delta;
approxRes=goog.math. [[#variable60d04d40]].fromNumber(approx);
approxRem=approxRes.multiply(other);
}
// We know the answer can't be zero... and actually, zero would cause
// infinite recursion since we would make no progress.
if (approxRes.isZero( ))
{ approxRes=goog.math. [[#variable60d04d40]].ONE;
}
rem=rem.subtract(approxRem);
}
return res;
```

 CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#60d04d40]]
`Long `
12[[#60d04d40]]
`Integer `