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.954 | ExpressionStatement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 3 | 662 | Closure/closure/goog/color/color.js |
2 | 3 | 678 | Closure/closure/goog/color/color.js |
| ||||
/** * Adds black to the specified color, darkening it * @param {Array.<number>} rgb Color represented by a 3-element array with * red, green, and blue values respectively, in the range [0, 255]. * @param {number} factor Number in the range [0, 1]. 0 will do nothing, while * 1 will return black. If less than 0, factor will be set to 0. If greater * than 1, factor will be set to 1. * @return {!Array.<number>} Combined color represented by a 3-element array * with red, green, and blue values respectively, in the range [0, 255]. */ goog.color.darken= function (rgb, factor){ var black= [0, 0, 0]; return goog.color.blend(black, rgb, factor); } ; |
| ||||
/** * Adds white to the specified color, lightening it * @param {Array.<number>} rgb Color represented by a 3-element array with * red, green, and blue values respectively, in the range [0, 255]. * @param {number} factor Number in the range [0, 1]. 0 will do nothing, while * 1 will return white. If less than 0, factor will be set to 0. If greater * than 1, factor will be set to 1. * @return {!Array.<number>} Combined color represented by a 3-element array * with red, green, and blue values respectively, in the range [0, 255]. */ goog.color.lighten= function (rgb, factor){ var white= [255, 255, 255]; return goog.color.blend(white, rgb, factor); } ; |
| |||
/** * Adds white to the specified color, lightening it * @param {Array.<number>} rgb Color represented by a 3-element array with * red, green, and blue values respectively, in the range [0, 255]. * @param {number} factor Number in the range [0, 1]. 0 will do nothing, while * 1 will return white. If less than 0, factor will be set to 0. If greater * than 1, factor will be set to 1. * @return {!Array.<number>} Combined color represented by a 3-element array * with red, green, and blue values respectively, in the range [0, 255]. */ /** * Adds black to the specified color, darkening it * @param {Array.<number>} rgb Color represented by a 3-element array with * red, green, and blue values respectively, in the range [0, 255]. * @param {number} factor Number in the range [0, 1]. 0 will do nothing, while * 1 will return black. If less than 0, factor will be set to 0. If greater * than 1, factor will be set to 1. * @return {!Array.<number>} Combined color represented by a 3-element array * with red, green, and blue values respectively, in the range [0, 255]. */ goog.color. [[#variable3b1f2460]]= function (rgb,factor) { var [[#variable3b1f23c0]]=[ [[#variable3b1f2360]], [[#variable3b1f2360]], [[#variable3b1f2360]]]; return goog.color.blend( [[#variable3b1f23c0]],rgb,factor); } ; |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#3b1f2460]] | lighten |
1 | 2 | [[#3b1f2460]] | darken |
2 | 1 | [[#3b1f23c0]] | white |
2 | 2 | [[#3b1f23c0]] | black |
3 | 1 | [[#3b1f2360]] | 255 |
3 | 2 | [[#3b1f2360]] | 0 |