| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 6 | 5 | 3 | 0.985 | ExpressionStatement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 6 | 161 | Closure/closure/goog/asserts/asserts.js |
| 2 | 6 | 178 | Closure/closure/goog/asserts/asserts.js |
| 3 | 6 | 196 | Closure/closure/goog/asserts/asserts.js |
| 4 | 6 | 213 | Closure/closure/goog/asserts/asserts.js |
| 5 | 6 | 230 | Closure/closure/goog/asserts/asserts.js |
| ||||
/**
* Checks if the value is a number if goog.asserts.ENABLE_ASSERTS is true.
* @param {*} value The value to check.
* @param {string=} opt_message Error message in case of failure.
* @param {...*} var_args The items to substitute into the failure message.
* @return {number} The value, guaranteed to be a number when asserts enabled.
* @throws {goog.asserts.AssertionError} When the value is not a number.
*/
goog.asserts.assertNumber= function (value, opt_message, var_args){
if (goog.asserts.ENABLE_ASSERTS
&& !goog.isNumber(value)) {
goog.asserts.doAssertFailure_('Expected number but got %s.', [value],
opt_message, Array.prototype.slice.call(arguments, 2));
}
return /** @type {number} */
(value);
} ;
|
| ||||
/**
* Checks if the value is a string if goog.asserts.ENABLE_ASSERTS is true.
* @param {*} value The value to check.
* @param {string=} opt_message Error message in case of failure.
* @param {...*} var_args The items to substitute into the failure message.
* @return {string} The value, guaranteed to be a string when asserts enabled.
* @throws {goog.asserts.AssertionError} When the value is not a string.
*/
goog.asserts.assertString= function (value, opt_message, var_args){
if (goog.asserts.ENABLE_ASSERTS
&& !goog.isString(value)) {
goog.asserts.doAssertFailure_('Expected string but got %s.', [value],
opt_message, Array.prototype.slice.call(arguments, 2));
}
return /** @type {string} */
(value);
} ;
|
| ||||
/**
* Checks if the value is a function if goog.asserts.ENABLE_ASSERTS is true.
* @param {*} value The value to check.
* @param {string=} opt_message Error message in case of failure.
* @param {...*} var_args The items to substitute into the failure message.
* @return {!Function} The value, guaranteed to be a function when asserts
* enabled.
* @throws {goog.asserts.AssertionError} When the value is not a function.
*/
goog.asserts.assertFunction= function (value, opt_message, var_args){
if (goog.asserts.ENABLE_ASSERTS
&& !goog.isFunction(value)) {
goog.asserts.doAssertFailure_('Expected function but got %s.', [value],
opt_message, Array.prototype.slice.call(arguments, 2));
}
return /** @type {!Function} */
(value);
} ;
|
| ||||
/**
* Checks if the value is an Object if goog.asserts.ENABLE_ASSERTS is true.
* @param {*} value The value to check.
* @param {string=} opt_message Error message in case of failure.
* @param {...*} var_args The items to substitute into the failure message.
* @return {!Object} The value, guaranteed to be a non-null object.
* @throws {goog.asserts.AssertionError} When the value is not an object.
*/
goog.asserts.assertObject= function (value, opt_message, var_args){
if (goog.asserts.ENABLE_ASSERTS
&& !goog.isObject(value)) {
goog.asserts.doAssertFailure_('Expected object but got %s.', [value],
opt_message, Array.prototype.slice.call(arguments, 2));
}
return /** @type {!Object} */
(value);
} ;
|
| ||||
/**
* Checks if the value is an Array if goog.asserts.ENABLE_ASSERTS is true.
* @param {*} value The value to check.
* @param {string=} opt_message Error message in case of failure.
* @param {...*} var_args The items to substitute into the failure message.
* @return {!Array} The value, guaranteed to be a non-null array.
* @throws {goog.asserts.AssertionError} When the value is not an array.
*/
goog.asserts.assertArray= function (value, opt_message, var_args){
if (goog.asserts.ENABLE_ASSERTS
&& !goog.isArray(value)) {
goog.asserts.doAssertFailure_('Expected array but got %s.', [value],
opt_message, Array.prototype.slice.call(arguments, 2));
}
return /** @type {!Array} */
(value);
} ;
|
| |||
/**
* Checks if the value is an Array if goog.asserts.ENABLE_ASSERTS is true.
* @param {*} value The value to check.
* @param {string=} opt_message Error message in case of failure.
* @param {...*} var_args The items to substitute into the failure message.
* @return {!Array} The value, guaranteed to be a non-null array.
* @throws {goog.asserts.AssertionError} When the value is not an array.
*/
/**
* Checks if the value is an Object if goog.asserts.ENABLE_ASSERTS is true.
* @param {*} value The value to check.
* @param {string=} opt_message Error message in case of failure.
* @param {...*} var_args The items to substitute into the failure message.
* @return {!Object} The value, guaranteed to be a non-null object.
* @throws {goog.asserts.AssertionError} When the value is not an object.
*/
/**
* Checks if the value is a function if goog.asserts.ENABLE_ASSERTS is true.
* @param {*} value The value to check.
* @param {string=} opt_message Error message in case of failure.
* @param {...*} var_args The items to substitute into the failure message.
* @return {!Function} The value, guaranteed to be a function when asserts
* enabled.
* @throws {goog.asserts.AssertionError} When the value is not a function.
*/
/**
* Checks if the value is a string if goog.asserts.ENABLE_ASSERTS is true.
* @param {*} value The value to check.
* @param {string=} opt_message Error message in case of failure.
* @param {...*} var_args The items to substitute into the failure message.
* @return {string} The value, guaranteed to be a string when asserts enabled.
* @throws {goog.asserts.AssertionError} When the value is not a string.
*/
/**
* Checks if the value is a number if goog.asserts.ENABLE_ASSERTS is true.
* @param {*} value The value to check.
* @param {string=} opt_message Error message in case of failure.
* @param {...*} var_args The items to substitute into the failure message.
* @return {number} The value, guaranteed to be a number when asserts enabled.
* @throws {goog.asserts.AssertionError} When the value is not a number.
*/
goog.asserts. [[#variable5ef15820]]= function (value,opt_message,var_args)
{ if (goog.asserts.ENABLE_ASSERTS
&& !goog. [[#variable5ef157c0]](value))
{ goog.asserts.doAssertFailure_( [[#variable5ef15760]],[value],opt_message,Array.prototype.slice.call(arguments,2));
}
return /** @type {!Array} */ /** @type {!Object} */ /** @type {!Function} */ /** @type {string} */ /** @type {number} */
(value);
} ;
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#5ef15820]] | assertArray |
| 1 | 2 | [[#5ef15820]] | assertObject |
| 1 | 3 | [[#5ef15820]] | assertFunction |
| 1 | 4 | [[#5ef15820]] | assertString |
| 1 | 5 | [[#5ef15820]] | assertNumber |
| 2 | 1 | [[#5ef157c0]] | isArray |
| 2 | 2 | [[#5ef157c0]] | isObject |
| 2 | 3 | [[#5ef157c0]] | isFunction |
| 2 | 4 | [[#5ef157c0]] | isString |
| 2 | 5 | [[#5ef157c0]] | isNumber |
| 3 | 1 | [[#5ef15760]] | 'Expected array but got %s.' |
| 3 | 2 | [[#5ef15760]] | 'Expected object but got %s.' |
| 3 | 3 | [[#5ef15760]] | 'Expected function but got %s.' |
| 3 | 4 | [[#5ef15760]] | 'Expected string but got %s.' |
| 3 | 5 | [[#5ef15760]] | 'Expected number but got %s.' |