CloneSet130


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
18260.963LogicalORExpression
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
118361
Closure/closure/goog/color/alpha.js
218391
Closure/closure/goog/color/alpha.js
Clone Instance
1
Line Count
18
Source Line
361
Source File
Closure/closure/goog/color/alpha.js

                                     function (str){
  // Each component is separate (rather than using a repeater) so we can
  // capture the match. Also, we explicitly set each component to be either 0,
  // or start with a non-zero, to prevent octal numbers from slipping through.
  var regExpResultArray=  str.match(goog.color.alpha.rgbaColorRe_);
  if (regExpResultArray) {
    var r=  Number(regExpResultArray[1]);
    var g=  Number(regExpResultArray[2]);
    var b=  Number(regExpResultArray[3]);
    var a=  Number(regExpResultArray[4]);
    if (r>=  0
        &&        r<=  255
        &&g>=  0
        &&        g<=  255
        &&b>=  0
        &&        b<=  255
        &&a>=  0
        &&        a<=  1) {
      return [r, g, b, a];
                          }
                         }
  return [ ];
                                                   }


Clone Instance
2
Line Count
18
Source Line
391
Source File
Closure/closure/goog/color/alpha.js

                                     function (str){
  // Each component is separate (rather than using a repeater) so we can
  // capture the match. Also, we explicitly set each component to be either 0,
  // or start with a non-zero, to prevent octal numbers from slipping through.
  var regExpResultArray=  str.match(goog.color.alpha.hslaColorRe_);
  if (regExpResultArray) {
    var h=  Number(regExpResultArray[1]);
    var s=  Number(regExpResultArray[2]);
    var l=  Number(regExpResultArray[3]);
    var a=  Number(regExpResultArray[4]);
    if (h>=  0
        &&        h<=  360
        &&s>=  0
        &&        s<=  100
        &&l>=  0
        &&        l<=  100
        &&a>=  0
        &&        a<=  1) {
      return [h, s, l, a];
                          }
                         }
  return [ ];
                                                   }


Clone AbstractionParameter Count: 6Parameter Bindings

function (str)
{
  // Each component is separate (rather than using a repeater) so we can
  // capture the match. Also, we explicitly set each component to be either 0,
  // or start with a non-zero, to prevent octal numbers from slipping through.
  var regExpResultArray=str.match(goog.color.alpha. [[#variable6157f2a0]]);
  if (regExpResultArray)
    { var [[#variable6157f240]]=Number(regExpResultArray[1]);
      var [[#variable6157f1a0]]=Number(regExpResultArray[2]);
      var [[#variable6157f100]]=Number(regExpResultArray[3]);
      var a=Number(regExpResultArray[4]);
      if ( [[#variable6157f240]]>=0
          && [[#variable6157f240]]<= [[#variable6157f080]]
          && [[#variable6157f1a0]]>=0
          && [[#variable6157f1a0]]<= [[#variable6157f000]]
          && [[#variable6157f100]]>=0
          && [[#variable6157f100]]<= [[#variable6157f000]]
          && a>=0
          && a<=1)
        { return [ [[#variable6157f240]], [[#variable6157f1a0]], [[#variable6157f100]],a];
        }
    }
  return [ ];
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6157f2a0]]
hslaColorRe_ 
12[[#6157f2a0]]
rgbaColorRe_ 
21[[#6157f240]]
h 
22[[#6157f240]]
r 
31[[#6157f1a0]]
s 
32[[#6157f1a0]]
g 
41[[#6157f100]]
l 
42[[#6157f100]]
b 
51[[#6157f080]]
360 
52[[#6157f080]]
255 
61[[#6157f000]]
100 
62[[#6157f000]]
255