| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 6 | 2 | 1 | 0.993 | IfStatement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 6 | 87 | Closure/closure/goog/array/array.js |
| 2 | 6 | 129 | Closure/closure/goog/array/array.js |
| ||||
if (goog.isString(arr)) {
// Array.prototype.indexOf uses === so only strings should be found.
if (!goog.isString(obj)
|| obj.length!= 1) {
return -1;
}
return arr.indexOf(obj, fromIndex);
}
|
| ||||
if (goog.isString(arr)) {
// Array.prototype.lastIndexOf uses === so only strings should be found.
if (!goog.isString(obj)
|| obj.length!= 1) {
return -1;
}
return arr.lastIndexOf(obj, fromIndex);
}
|
| |||
if (goog.isString(arr))
{
// Array.prototype.indexOf uses === so only strings should be found.
// Array.prototype.lastIndexOf uses === so only strings should be found.
if (!goog.isString(obj)
|| obj.length!=1)
{ return -1;
}
return arr. [[#variable1eee3bc0]](obj,fromIndex);
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#1eee3bc0]] | indexOf |
| 1 | 2 | [[#1eee3bc0]] | lastIndexOf |