Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
6 | 2 | 2 | 0.983 | ExpressionStatement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 6 | 254 | Closure/closure/goog/proto2/message.js |
2 | 6 | 274 | Closure/closure/goog/proto2/message.js |
| ||||
/** * Returns the value stored at the field specified by the * given field descriptor. * * @param {goog.proto2.FieldDescriptor} field The field for which to get the * value. * @param {number=} opt_index If the field is repeated, the index to use when * looking up the value. * * @return {*} The value found or undefined if none. */ goog.proto2.Message.prototype.get= function (field, opt_index){ goog.proto2.Util.assert( field.getContainingType( )== this.descriptor_, 'The current message does not contain the given field'); return this.get$Value(field.getTag( ),opt_index); } ; |
| ||||
/** * Returns the value stored at the field specified by the * given field descriptor or the default value if none exists. * * @param {goog.proto2.FieldDescriptor} field The field for which to get the * value. * @param {number=} opt_index If the field is repeated, the index to use when * looking up the value. * * @return {*} The value found or the default if none. */ goog.proto2.Message.prototype.getOrDefault= function (field, opt_index){ goog.proto2.Util.assert( field.getContainingType( )== this.descriptor_, 'The current message does not contain the given field'); return this.get$ValueOrDefault(field.getTag( ),opt_index); } ; |
| |||
/** * Returns the value stored at the field specified by the * given field descriptor or the default value if none exists. * * @param {goog.proto2.FieldDescriptor} field The field for which to get the * value. * @param {number=} opt_index If the field is repeated, the index to use when * looking up the value. * * @return {*} The value found or the default if none. */ /** * Returns the value stored at the field specified by the * given field descriptor. * * @param {goog.proto2.FieldDescriptor} field The field for which to get the * value. * @param {number=} opt_index If the field is repeated, the index to use when * looking up the value. * * @return {*} The value found or undefined if none. */ goog.proto2.Message.prototype. [[#variable3c406d20]]= function (field,opt_index) { goog.proto2.Util.assert(field.getContainingType( )==this.descriptor_,'The current message does not contain the given field'); return this. [[#variable3c406c80]](field.getTag( ),opt_index); } ; |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#3c406d20]] | getOrDefault |
1 | 2 | [[#3c406d20]] | get |
2 | 1 | [[#3c406c80]] | get$ValueOrDefault |
2 | 2 | [[#3c406c80]] | get$Value |