CloneSet104


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
26201.000StatementList[9]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
126241
Closure/closure/goog/graphics/canvasgraphics.js
226412
Closure/closure/goog/graphics/svggraphics.js
Clone Instance
1
Line Count
26
Source Line
241
Source File
Closure/closure/goog/graphics/canvasgraphics.js

  var height=  this.height;
  var computeWidth=  goog.isString(width)
                     &&                      width.indexOf('%')!=  -1;
  var computeHeight=  goog.isString(height)
                      &&                       height.indexOf('%')!=  -1;
  if (!this.isInDocument( )
      &&                      (computeWidth
                               ||              computeHeight)) {
    return null;
                                                               }
  var parent;
  var parentSize;
  if (computeWidth) {
    parent=  /** @type {Element} */
                                    (this.getElement( ).parentNode);
    parentSize=  goog.style.getSize(parent);
    width=  parseFloat( /** @type {string} */
                                             (width))*  parentSize.width/  100;
                    }
  if (computeHeight) {
    parent=  parent
             ||        /** @type {Element} */
                                              (this.getElement( ).parentNode);
    parentSize=  parentSize
                 ||            goog.style.getSize(parent);
    height=  parseFloat( /** @type {string} */
                                              (height))*  parentSize.height/100;
                     }
  return new goog.math.Size( /** @type {number} */
                                                  (width),
      /** @type {number} */
                            (height));


Clone Instance
2
Line Count
26
Source Line
412
Source File
Closure/closure/goog/graphics/svggraphics.js

  var height=  this.height;
  var computeWidth=  goog.isString(width)
                     &&                      width.indexOf('%')!=  -1;
  var computeHeight=  goog.isString(height)
                      &&                       height.indexOf('%')!=  -1;
  if (!this.isInDocument( )
      &&                      (computeWidth
                               ||              computeHeight)) {
    return null;
                                                               }
  var parent;
  var parentSize;
  if (computeWidth) {
    parent=  /** @type {Element} */
                                    (this.getElement( ).parentNode);
    parentSize=  goog.style.getSize(parent);
    width=  parseFloat( /** @type {string} */
                                             (width))*  parentSize.width/  100;
                    }
  if (computeHeight) {
    parent=  parent
             ||        /** @type {Element} */
                                              (this.getElement( ).parentNode);
    parentSize=  parentSize
                 ||            goog.style.getSize(parent);
    height=  parseFloat( /** @type {string} */
                                              (height))*  parentSize.height/100;
                     }
  return new goog.math.Size( /** @type {number} */
                                                  (width),
      /** @type {number} */
                            (height));


Clone AbstractionParameter Count: 0Parameter Bindings

var height=this.height;
var computeWidth=goog.isString(width)
                 && width.indexOf('%')!=-1;
var computeHeight=goog.isString(height)
                  && height.indexOf('%')!=-1;
if (!this.isInDocument( )
    && (computeWidth
        || computeHeight))
  { return null;
  }
var parent;
var parentSize;
if (computeWidth)
  { parent= /** @type {Element} */
    (this.getElement( ).parentNode);
    parentSize=goog.style.getSize(parent);
    width=parseFloat( /** @type {string} */
                    (width))*parentSize.width/100;
  }
if (computeHeight)
  { parent=parent
           || /** @type {Element} */
           (this.getElement( ).parentNode);
    parentSize=parentSize
               || goog.style.getSize(parent);
    height=parseFloat( /** @type {string} */
                     (height))*parentSize.height/100;
  }
return new goog.math.Size( /** @type {number} */
                         (width),
                                 /** @type {number} */
                                 (height));
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None