Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
24 | 2 | 2 | 0.989 | StatementList[5] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 24 | 171 | Closure/closure/goog/i18n/numberformat.js |
2 | 24 | 135 | Closure/closure/goog/locale/numberformat.js |
| ||||
var gotPositive= text.indexOf(this.positivePrefix_, pos[0])== pos[0]; var gotNegative= text.indexOf(this.negativePrefix_, pos[0])== pos[0]; // check for the longest match if (gotPositive && gotNegative) { if (this.positivePrefix_.length> this.negativePrefix_.length) { gotNegative= false; } else if (this.positivePrefix_.length< this.negativePrefix_.length) { gotPositive= false; } } if (gotPositive) { pos[0]+= this.positivePrefix_.length; } else if (gotNegative) { pos[0]+= this.negativePrefix_.length; } // process digits or Inf, find decimal position if (text.indexOf(goog.i18n.NumberFormatSymbols.INFINITY, pos[0])== pos[0]) { pos[0]+= goog.i18n.NumberFormatSymbols.INFINITY.length; ret= Infinity; } else { ret= this.parseNumber_(text, pos); } |
| ||||
var gotPositive= text.indexOf(this.positivePrefix_, pos[0])== pos[0]; var gotNegative= text.indexOf(this.negativePrefix_, pos[0])== pos[0]; // check for the longest match if (gotPositive && gotNegative) { if (this.positivePrefix_.length> this.negativePrefix_.length) { gotNegative= false; } else if (this.positivePrefix_.length< this.negativePrefix_.length) { gotPositive= false; } } if (gotPositive) { pos[0]+= this.positivePrefix_.length; } else if (gotNegative) { pos[0]+= this.negativePrefix_.length; } // process digits or Inf, find decimal position if (text.indexOf(this.symbols_.INFINITY, pos[0])== pos[0]) { pos[0]+= this.symbols_.INFINITY.length; ret= Infinity; } else { ret= this.parseNumber_(text, pos); } |
| |||
var gotPositive=text.indexOf(this.positivePrefix_,pos[0])==pos[0]; var gotNegative=text.indexOf(this.negativePrefix_,pos[0])==pos[0]; // check for the longest match if (gotPositive && gotNegative) { if (this.positivePrefix_.length>this.negativePrefix_.length) { gotNegative= false; } else if (this.positivePrefix_.length<this.negativePrefix_.length) { gotPositive= false; } } if (gotPositive) { pos[0]+=this.positivePrefix_.length; } else if (gotNegative) { pos[0]+=this.negativePrefix_.length; } // process digits or Inf, find decimal position if (text.indexOf( [[#variable611827c0]]. [[#variable462eeaa0]].INFINITY,pos[0])==pos[0]) { pos[0]+= [[#variable611827c0]]. [[#variable462eeaa0]].INFINITY.length; ret=Infinity; } else { ret=this.parseNumber_(text,pos); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#611827c0]] | this |
1 | 2 | [[#611827c0]] | goog.i18n |
2 | 1 | [[#462eeaa0]] | symbols_ |
2 | 2 | [[#462eeaa0]] | NumberFormatSymbols |