Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
8 | 2 | 2 | 0.990 | ExpressionStatement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 8 | 69 | Closure/closure/goog/dom/classes.js |
2 | 8 | 87 | Closure/closure/goog/dom/classes.js |
| ||||
/** * Adds a class or classes to an element. Does not add multiples of class names. * @param {Node} element DOM node to add class to. * @param {...string} var_args Class names to add. * @return {boolean} Whether class was added (or all classes were added). */ goog.dom.classes.add= function (element, var_args){ var classes= goog.dom.classes.get(element); var args= goog.array.slice(arguments, 1); var b= goog.dom.classes.add_(classes, args); element.className= classes.join(' '); return b; } ; |
| ||||
/** * Removes a class or classes from an element. * @param {Node} element DOM node to remove class from. * @param {...string} var_args Class name(s) to remove. * @return {boolean} Whether all classes in {@code var_args} were found and * removed. */ goog.dom.classes.remove= function (element, var_args){ var classes= goog.dom.classes.get(element); var args= goog.array.slice(arguments, 1); var b= goog.dom.classes.remove_(classes, args); element.className= classes.join(' '); return b; } ; |
| |||
/** * Removes a class or classes from an element. * @param {Node} element DOM node to remove class from. * @param {...string} var_args Class name(s) to remove. * @return {boolean} Whether all classes in {@code var_args} were found and * removed. */ /** * Adds a class or classes to an element. Does not add multiples of class names. * @param {Node} element DOM node to add class to. * @param {...string} var_args Class names to add. * @return {boolean} Whether class was added (or all classes were added). */ goog.dom.classes. [[#variable61adc4a0]]= function (element,var_args) { var classes=goog.dom.classes.get(element); var args=goog.array.slice(arguments,1); var b=goog.dom.classes. [[#variable61adc3a0]](classes,args); element.className=classes.join(' '); return b; } ; |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#61adc4a0]] | remove |
1 | 2 | [[#61adc4a0]] | add |
2 | 1 | [[#61adc3a0]] | remove_ |
2 | 2 | [[#61adc3a0]] | add_ |