| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 4 | 2 | 1 | 0.960 | IfStatement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 4 | 182 | Closure/closure/goog/timer/timer.js |
| 2 | 16 | 206 | Closure/closure/goog/timer/timer.js |
| ||||
// The timer could be stopped in the timer event handler.
if (this.enabled) {
this.timer_= this.timerObject_.setTimeout(this.boundTick_,
this.interval_);
this.last_= goog.now( );
}
|
| ||||
// If there is no interval already registered, start it now
if (!this.timer_) {
// IMPORTANT!
// window.setInterval in FireFox has a bug - it fires based on
// absolute time, rather than on relative time. What this means
// is that if a computer is sleeping/hibernating for 24 hours
// and the timer interval was configured to fire every 1000ms,
// then after the PC wakes up the timer will fire, in rapid
// succession, 3600*24 times.
// This bug is described here and is already fixed, but it will
// take time to propagate, so for now I am switching this over
// to setTimeout logic.
// https://bugzilla.mozilla.org/show_bug.cgi?id=376643
//
this.timer_= this.timerObject_.setTimeout(this.boundTick_,
this.interval_);
this.last_= goog.now( );
}
|
| |||
// The timer could be stopped in the timer event handler.
// If there is no interval already registered, start it now
if ( [[#variable6319a6a0]])
{
// IMPORTANT!
// window.setInterval in FireFox has a bug - it fires based on
// absolute time, rather than on relative time. What this means
// is that if a computer is sleeping/hibernating for 24 hours
// and the timer interval was configured to fire every 1000ms,
// then after the PC wakes up the timer will fire, in rapid
// succession, 3600*24 times.
// This bug is described here and is already fixed, but it will
// take time to propagate, so for now I am switching this over
// to setTimeout logic.
// https://bugzilla.mozilla.org/show_bug.cgi?id=376643
//
this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_);
this.last_=goog.now( );
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#6319a6a0]] | this.enabled |
| 1 | 2 | [[#6319a6a0]] | !this.timer_ |