| 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.955 | ExpressionStatement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 4 | 248 | Closure/closure/goog/ui/dimensionpickerrenderer.js |
| 2 | 3 | 261 | Closure/closure/goog/ui/dimensionpickerrenderer.js |
| ||||
/**
* Returns the x offset in to the grid for the given mouse x position.
* @param {goog.ui.DimensionPicker} palette The table size palette.
* @param {number} x The mouse event x position.
* @return {number} The x offset in to the grid.
*/
goog.ui.DimensionPickerRenderer.prototype.getGridOffsetX= function (
palette, x) {
// TODO: Don't rely on magic 18 - measure each palette's em size.
return Math.min(palette.maxColumns, Math.ceil(x/ 18));
} ;
|
| ||||
/**
* Returns the y offset in to the grid for the given mouse y position.
* @param {goog.ui.DimensionPicker} palette The table size palette.
* @param {number} y The mouse event y position.
* @return {number} The y offset in to the grid.
*/
goog.ui.DimensionPickerRenderer.prototype.getGridOffsetY= function (
palette, y) {
return Math.min(palette.maxRows, Math.ceil(y/ 18));
} ;
|
| |||
/**
* Returns the y offset in to the grid for the given mouse y position.
* @param {goog.ui.DimensionPicker} palette The table size palette.
* @param {number} y The mouse event y position.
* @return {number} The y offset in to the grid.
*/
/**
* Returns the x offset in to the grid for the given mouse x position.
* @param {goog.ui.DimensionPicker} palette The table size palette.
* @param {number} x The mouse event x position.
* @return {number} The x offset in to the grid.
*/
goog.ui.DimensionPickerRenderer.prototype. [[#variable48137500]]= function (palette, [[#variable48137440]])
{
// TODO: Don't rely on magic 18 - measure each palette's em size.
return Math.min(palette. [[#variable48137360]],Math.ceil( [[#variable48137440]]/18));
} ;
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#48137500]] | getGridOffsetY |
| 1 | 2 | [[#48137500]] | getGridOffsetX |
| 2 | 1 | [[#48137440]] | y |
| 2 | 2 | [[#48137440]] | x |
| 3 | 1 | [[#48137360]] | maxRows |
| 3 | 2 | [[#48137360]] | maxColumns |