| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 13 | 2 | 3 | 0.973 | ExpressionStatement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 13 | 132 | Closure/closure/goog/debug/errorhandler.js |
| 2 | 13 | 154 | Closure/closure/goog/debug/errorhandler.js |
| ||||
/**
* Installs exception protection for window.setTimeout to handle exceptions.
* @param {boolean=} opt_tracers Whether to install tracers around the fn.
*/
goog.debug.ErrorHandler.prototype.protectWindowSetTimeout=
function (opt_tracers){
var win= goog.getObjectByName('window');
var originalSetTimeout= win.setTimeout;
var that= this ;
win.setTimeout= function (fn, time){
// IE doesn't support .call for setTimeout, but it also doesn't care
// what "this" is, so we can just call the original function directly
fn= that.protectEntryPoint(fn, opt_tracers);
if (originalSetTimeout.call) {
return originalSetTimeout.call(this, fn, time);
}
else {
return originalSetTimeout(fn, time);
}
} ;
} ;
|
| ||||
/**
* Install exception protection for window.setInterval to handle exceptions.
* @param {boolean=} opt_tracers Whether to install tracers around the fn.
*/
goog.debug.ErrorHandler.prototype.protectWindowSetInterval=
function (opt_tracers){
var win= goog.getObjectByName('window');
var originalSetInterval= win.setInterval;
var that= this ;
win.setInterval= function (fn, time){
// IE doesn't support .call for setInterval, but it also doesn't care
// what "this" is, so we can just call the original function directly
fn= that.protectEntryPoint(fn, opt_tracers);
if (originalSetInterval.call) {
return originalSetInterval.call(this, fn, time);
}
else {
return originalSetInterval(fn, time);
}
} ;
} ;
|
| |||
/**
* Install exception protection for window.setInterval to handle exceptions.
* @param {boolean=} opt_tracers Whether to install tracers around the fn.
*/
/**
* Installs exception protection for window.setTimeout to handle exceptions.
* @param {boolean=} opt_tracers Whether to install tracers around the fn.
*/
goog.debug.ErrorHandler.prototype. [[#variable5d7e54c0]]= function (opt_tracers)
{ var win=goog.getObjectByName('window');
var [[#variable5d7e5420]]=win. [[#variable5d7e53c0]];
var that=this ;
win. [[#variable5d7e53c0]]= function (fn,time)
{
// IE doesn't support .call for setInterval, but it also doesn't care
// IE doesn't support .call for setTimeout, but it also doesn't care
// what "this" is, so we can just call the original function directly
fn=that.protectEntryPoint(fn,opt_tracers);
if ( [[#variable5d7e5420]].call)
{ return [[#variable5d7e5420]].call(this,fn,time);
}
else
{ return [[#variable5d7e5420]](fn,time);
}
} ;
} ;
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#5d7e54c0]] | protectWindowSetInterval |
| 1 | 2 | [[#5d7e54c0]] | protectWindowSetTimeout |
| 2 | 1 | [[#5d7e5420]] | originalSetInterval |
| 2 | 2 | [[#5d7e5420]] | originalSetTimeout |
| 3 | 1 | [[#5d7e53c0]] | setInterval |
| 3 | 2 | [[#5d7e53c0]] | setTimeout |