| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 14 | 2 | 1 | 0.975 | ExpressionStatement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 14 | 133 | Closure/closure/goog/net/xhrio.js |
| 2 | 15 | 97 | Closure/closure/goog/testing/net/xhrio.js |
| ||||
/**
* Static send that creates a short lived instance of XhrIo to send the
* request.
* @see goog.net.XhrIo.cleanupAllPendingStaticSends
* @param {string|goog.Uri} url Uri to make request to.
* @param {Function=} opt_callback Callback function for when request is
* complete.
* @param {string=} opt_method Send method, default: GET.
* @param {string|GearsBlob=} opt_content Post data. This can be a Gears blob
* if the underlying HTTP request object is a Gears HTTP request.
* @param {Object|goog.structs.Map=} opt_headers Map of headers to add to the
* request.
* @param {number=} opt_timeoutInterval Number of milliseconds after which an
* incomplete request will be aborted; 0 means no timeout is set.
*/
goog.net.XhrIo.send= function (url, opt_callback, opt_method, opt_content,
opt_headers, opt_timeoutInterval){
var x= new goog.net.XhrIo( );
goog.net.XhrIo.sendInstances_.push(x);
if (opt_callback) {
goog.events.listen(x, goog.net.EventType.COMPLETE, opt_callback);
}
goog.events.listen(x,
goog.net.EventType.READY,
goog.partial(goog.net.XhrIo.cleanupSend_, x));
if (opt_timeoutInterval) {
x.setTimeoutInterval(opt_timeoutInterval);
}
x.send(url, opt_method, opt_content, opt_headers);
} ;
|
| ||||
/**
* Simulates the static XhrIo send method.
* @param {string} url Uri to make request to.
* @param {Function=} opt_callback Callback function for when request is
* complete.
* @param {string=} opt_method Send method, default: GET.
* @param {string=} opt_content Post data.
* @param {Object|goog.structs.Map=} opt_headers Map of headers to add to the
* request.
* @param {number=} opt_timeoutInterval Number of milliseconds after which an
* incomplete request will be aborted; 0 means no timeout is set.
*/
goog.testing.net.XhrIo.send= function (url, opt_callback, opt_method,
opt_content, opt_headers,
opt_timeoutInterval){
var x= new goog.testing.net.XhrIo( );
goog.testing.net.XhrIo.sendInstances_.push(x);
if (opt_callback) {
goog.events.listen(x, goog.net.EventType.COMPLETE, opt_callback);
}
goog.events.listen(x,
goog.net.EventType.READY,
goog.partial(goog.testing.net.XhrIo.cleanupSend_, x));
if (opt_timeoutInterval) {
x.setTimeoutInterval(opt_timeoutInterval);
}
x.send(url, opt_method, opt_content, opt_headers);
} ;
|
| |||
[[#variable614916e0]].net.XhrIo.send= function (url,opt_callback,opt_method,opt_content,opt_headers,opt_timeoutInterval)
{ var x=new [[#variable614916e0]].net.XhrIo( );
[[#variable614916e0]].net.XhrIo.sendInstances_.push(x);
if (opt_callback)
{ goog.events.listen(x,goog.net.EventType.COMPLETE,opt_callback);
}
goog.events.listen(x,goog.net.EventType.READY,goog.partial( [[#variable614916e0]].net.XhrIo.cleanupSend_,x));
if (opt_timeoutInterval)
{ x.setTimeoutInterval(opt_timeoutInterval);
}
x.send(url,opt_method,opt_content,opt_headers);
} ;
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#614916e0]] | /**
* Static send that creates a short lived instance of XhrIo to send the
* request.
* @see goog.net.XhrIo.cleanupAllPendingStaticSends
* @param {string|goog.Uri} url Uri to make request to.
* @param {Function=} opt_callback Callback function for when request is
* complete.
* @param {string=} opt_method Send method, default: GET.
* @param {string|GearsBlob=} opt_content Post data. This can be a Gears blob
* if the underlying HTTP request object is a Gears HTTP request.
* @param {Object|goog.structs.Map=} opt_headers Map of headers to add to the
* request.
* @param {number=} opt_timeoutInterval Number of milliseconds after which an
* incomplete request will be aborted; 0 means no timeout is set.
*/
goog |
| 1 | 2 | [[#614916e0]] | /**
* Simulates the static XhrIo send method.
* @param {string} url Uri to make request to.
* @param {Function=} opt_callback Callback function for when request is
* complete.
* @param {string=} opt_method Send method, default: GET.
* @param {string=} opt_content Post data.
* @param {Object|goog.structs.Map=} opt_headers Map of headers to add to the
* request.
* @param {number=} opt_timeoutInterval Number of milliseconds after which an
* incomplete request will be aborted; 0 means no timeout is set.
*/
goog.testing |