Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
7 | 2 | 3 | 0.985 | ExpressionStatement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 7 | 89 | Closure/closure/goog/color/alpha.js |
2 | 7 | 106 | Closure/closure/goog/color/alpha.js |
| ||||
/** * Gets the hex color part of an alpha hex color. For example, from '#abcdef55' * return '#abcdef'. * @param {string} colorWithAlpha The alpha hex color to get the hex color from. * @return {string} The hex color where the alpha part has been stripped off. */ goog.color.alpha.extractHexColor= function (colorWithAlpha){ if (goog.color.alpha.isValidAlphaHexColor_(colorWithAlpha)) { var fullColor= goog.color.prependPoundIfNecessary_(colorWithAlpha); var normalizedColor= goog.color.alpha.normalizeAlphaHex_(fullColor); return normalizedColor.substring(0, 7); } else { throw Error(colorWithAlpha+ ' is not a valid 8-hex color string'); } } ; |
| ||||
/** * Gets the alpha color part of an alpha hex color. For example, from * '#abcdef55' return '55'. The result is guaranteed to be two characters long. * @param {string} colorWithAlpha The alpha hex color to get the hex color from. * @return {string} The hex color where the alpha part has been stripped off. */ goog.color.alpha.extractAlpha= function (colorWithAlpha){ if (goog.color.alpha.isValidAlphaHexColor_(colorWithAlpha)) { var fullColor= goog.color.prependPoundIfNecessary_(colorWithAlpha); var normalizedColor= goog.color.alpha.normalizeAlphaHex_(fullColor); return normalizedColor.substring(7, 9); } else { throw Error(colorWithAlpha+ ' is not a valid 8-hex color string'); } } ; |
| |||
/** * Gets the alpha color part of an alpha hex color. For example, from * '#abcdef55' return '55'. The result is guaranteed to be two characters long. * @param {string} colorWithAlpha The alpha hex color to get the hex color from. * @return {string} The hex color where the alpha part has been stripped off. */ /** * Gets the hex color part of an alpha hex color. For example, from '#abcdef55' * return '#abcdef'. * @param {string} colorWithAlpha The alpha hex color to get the hex color from. * @return {string} The hex color where the alpha part has been stripped off. */ goog.color.alpha. [[#variable61671f60]]= function (colorWithAlpha) { if (goog.color.alpha.isValidAlphaHexColor_(colorWithAlpha)) { var fullColor=goog.color.prependPoundIfNecessary_(colorWithAlpha); var normalizedColor=goog.color.alpha.normalizeAlphaHex_(fullColor); return normalizedColor.substring( [[#variable61671f00]], [[#variable61671e80]]); } else { throw Error(colorWithAlpha+' is not a valid 8-hex color string'); } } ; |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#61671f60]] | extractAlpha |
1 | 2 | [[#61671f60]] | extractHexColor |
2 | 1 | [[#61671f00]] | 7 |
2 | 2 | [[#61671f00]] | 0 |
3 | 1 | [[#61671e80]] | 9 |
3 | 2 | [[#61671e80]] | 7 |