Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
3 | 2 | 3 | 0.960 | ExpressionStatement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 3 | 121 | Closure/closure/goog/structs/linkedmap.js |
2 | 3 | 135 | Closure/closure/goog/structs/linkedmap.js |
| ||||
/** * Retrieves the value for a given key. If this is a caching LinkedMap, the * entry will become the most recently used. * @param {string} key The key to retrieve the value for. * @param {*=} opt_val A default value that will be returned if the key is * not found, defaults to undefined. * @return {*} The retrieved value. */ goog.structs.LinkedMap.prototype.get= function (key, opt_val){ var node= this.findAndMoveToTop_(key); return node ? node.value : opt_val; } ; |
| ||||
/** * Retrieves the value for a given key without updating the entry to be the * most recently used. * @param {string} key The key to retrieve the value for. * @param {*=} opt_val A default value that will be returned if the key is * not found. * @return {*} The retrieved value. */ goog.structs.LinkedMap.prototype.peekValue= function (key, opt_val){ var node= this.map_.get(key); return node ? node.value : opt_val; } ; |
| |||
/** * Retrieves the value for a given key without updating the entry to be the * most recently used. * @param {string} key The key to retrieve the value for. * @param {*=} opt_val A default value that will be returned if the key is * not found. * @return {*} The retrieved value. */ /** * Retrieves the value for a given key. If this is a caching LinkedMap, the * entry will become the most recently used. * @param {string} key The key to retrieve the value for. * @param {*=} opt_val A default value that will be returned if the key is * not found, defaults to undefined. * @return {*} The retrieved value. */ goog.structs.LinkedMap.prototype. [[#variable1e3da000]]= function (key,opt_val) { var node= [[#variable20ffffa0]]. [[#variable20ffff40]](key); return node ?node.value :opt_val; } ; |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#1e3da000]] | peekValue |
1 | 2 | [[#1e3da000]] | get |
2 | 1 | [[#20ffffa0]] | this.map_ |
2 | 2 | [[#20ffffa0]] | this |
3 | 1 | [[#20ffff40]] | get |
3 | 2 | [[#20ffff40]] | findAndMoveToTop_ |