| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 13 | 2 | 4 | 0.953 | ExpressionStatement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 13 | 775 | Closure/closure/goog/net/xhrio.js |
| 2 | 13 | 797 | Closure/closure/goog/net/xhrio.js |
| ||||
/**
* Get the status from the Xhr object
* Will only return correct result when called from the context of a callback
* @return {number} Http status.
*/
goog.net.XhrIo.prototype.getStatus= function ( )
{
/**
* IE doesn't like you checking status until the readystate is greater than 2
* (i.e. it is recieving or complete). The try/catch is used for when the
* page is unloading and an ERROR_NOT_AVAILABLE may occur when accessing xhr_.
* @preserveTry
*/
try {
return this.getReadyState( )> goog.net.XmlHttp.ReadyState.LOADED
?this.xhr_.status
: -1;
}
catch ( e) {
this.logger_.warning('Can not get status: '+ e.message);
return -1;
}
} ;
|
| ||||
/**
* Get the status text from the Xhr object
* Will only return correct result when called from the context of a callback
* @return {string} Status text.
*/
goog.net.XhrIo.prototype.getStatusText= function ( )
{
/**
* IE doesn't like you checking status until the readystate is greater than 2
* (i.e. it is recieving or complete). The try/catch is used for when the
* page is unloading and an ERROR_NOT_AVAILABLE may occur when accessing xhr_.
* @preserveTry
*/
try {
return this.getReadyState( )> goog.net.XmlHttp.ReadyState.LOADED
?this.xhr_.statusText
: '';
}
catch ( e) {
this.logger_.fine('Can not get status: '+ e.message);
return '';
}
} ;
|
| |||
/**
* Get the status text from the Xhr object
* Will only return correct result when called from the context of a callback
* @return {string} Status text.
*/
/**
* Get the status from the Xhr object
* Will only return correct result when called from the context of a callback
* @return {number} Http status.
*/
goog.net.XhrIo.prototype. [[#variable3df90fe0]]= function ( )
{
/**
* IE doesn't like you checking status until the readystate is greater than 2
* (i.e. it is recieving or complete). The try/catch is used for when the
* page is unloading and an ERROR_NOT_AVAILABLE may occur when accessing xhr_.
* @preserveTry
*/
try
{ return this.getReadyState( )>goog.net.XmlHttp.ReadyState.LOADED
?this.xhr_. [[#variable3df90f60]]
: [[#variable3df90f00]];
}
catch (e)
{ this.logger_. [[#variable3df90de0]]('Can not get status: '+e.message);
return [[#variable3df90f00]];
}
} ;
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#3df90fe0]] | getStatusText |
| 1 | 2 | [[#3df90fe0]] | getStatus |
| 2 | 1 | [[#3df90f60]] | statusText |
| 2 | 2 | [[#3df90f60]] | status |
| 3 | 1 | [[#3df90f00]] | '' |
| 3 | 2 | [[#3df90f00]] | -1 |
| 4 | 1 | [[#3df90de0]] | fine |
| 4 | 2 | [[#3df90de0]] | warning |