| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 2 | 3 | 4 | 0.951 | ExpressionStatement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 2 | 257 | Closure/third_party/closure/goog/mochikit/async/deferred.js |
| 2 | 2 | 268 | Closure/third_party/closure/goog/mochikit/async/deferred.js |
| 3 | 2 | 308 | Closure/third_party/closure/goog/mochikit/async/deferred.js |
| ||||
/**
* Register a callback function, to be called when a successful result
* is available.
* @param {!Function} cb The function to be called on a successful result.
* @param {Object=} opt_scope An optional scope to call the callback in.
* @return {!goog.async.Deferred} The deferred object itself.
*/
goog.async.Deferred.prototype.addCallback= function (cb, opt_scope){
return this.addCallbacks(cb, null, opt_scope);
} ;
|
| ||||
/**
* Register a callback function, to be called if this operation fails.
* @param {!Function} eb The function to be called on an unsuccessful result.
* @param {Object=} opt_scope An optional scope to call the errback in.
* @return {!goog.async.Deferred} The deferred object itself.
*/
goog.async.Deferred.prototype.addErrback= function (eb, opt_scope){
return this.addCallbacks(null, eb, opt_scope);
} ;
|
| ||||
/**
* Registers a function as both callback and errback.
* @param {!Function} f The function to be called on any result.
* @param {Object=} opt_scope An optional scope to call the callbacks in.
* @return {!goog.async.Deferred} The deferred object itself.
*/
goog.async.Deferred.prototype.addBoth= function (f, opt_scope){
return this.addCallbacks(f, f, opt_scope);
} ;
|
| |||
/**
* Registers a function as both callback and errback.
* @param {!Function} f The function to be called on any result.
* @param {Object=} opt_scope An optional scope to call the callbacks in.
* @return {!goog.async.Deferred} The deferred object itself.
*/
/**
* Register a callback function, to be called if this operation fails.
* @param {!Function} eb The function to be called on an unsuccessful result.
* @param {Object=} opt_scope An optional scope to call the errback in.
* @return {!goog.async.Deferred} The deferred object itself.
*/
/**
* Register a callback function, to be called when a successful result
* is available.
* @param {!Function} cb The function to be called on a successful result.
* @param {Object=} opt_scope An optional scope to call the callback in.
* @return {!goog.async.Deferred} The deferred object itself.
*/
goog.async.Deferred.prototype. [[#variable3edb69e0]]= function ( [[#variable3edb6860]],opt_scope)
{ return this.addCallbacks( [[#variable3edb6920]], [[#variable3edb6980]],opt_scope);
} ;
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#3edb69e0]] | addBoth |
| 1 | 2 | [[#3edb69e0]] | addErrback |
| 1 | 3 | [[#3edb69e0]] | addCallback |
| 2 | 1 | [[#3edb6860]] | f |
| 2 | 2 | [[#3edb6860]] | eb |
| 2 | 3 | [[#3edb6860]] | cb |
| 3 | 1 | [[#3edb6920]] | f |
| 3 | 2 | [[#3edb6920]] | null |
| 3 | 3 | [[#3edb6920]] | cb |
| 4 | 1 | [[#3edb6980]] | f |
| 4 | 2 | [[#3edb6980]] | eb |
| 4 | 3 | [[#3edb6980]] | null |