CloneSet1499


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
2220.976ExpressionStatement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12221
Closure/closure/goog/i18n/bidiformatter.js
22254
Closure/closure/goog/i18n/bidiformatter.js
Clone Instance
1
Line Count
2
Source Line
221
Source File
Closure/closure/goog/i18n/bidiformatter.js

/**
 * Returns "rtl" if {@code str}'s estimated directionality is RTL, and "ltr" if
 * it is LTR. In case it's UNKNOWN, returns "rtl" if the context directionality
 * is RTL, and "ltr" otherwise.
 * Needed for GXP, which can't handle dirAttr.
 * Example use case:
 * <td expr:dir='bidiFormatter.dirAttrValue(foo)'><gxp:eval expr='foo'></td>
 *
 * @param {string} str Text whose directionality is to be estimated.
 * @param {boolean=} opt_isHtml Whether {@code str} is HTML / HTML-escaped.
 *     Default: false.
 * @return {string} "rtl" or "ltr", according to the logic described above.
 */
goog.i18n.BidiFormatter.prototype.dirAttrValue=  function (str, opt_isHtml){
  return this.knownDirAttrValue(this.estimateDirection(str, opt_isHtml));
                                                                           } ;


Clone Instance
2
Line Count
2
Source Line
254
Source File
Closure/closure/goog/i18n/bidiformatter.js

/**
 * Returns "dir=ltr" or "dir=rtl", depending on {@code str}'s estimated
 * directionality, if it is not the same as the context directionality.
 * Otherwise, returns the empty string.
 *
 * @param {string} str Text whose directionality is to be estimated.
 * @param {boolean=} opt_isHtml Whether {@code str} is HTML / HTML-escaped.
 *     Default: false.
 * @return {string} "dir=rtl" for RTL text in non-RTL context; "dir=ltr" for LTR
 *     text in non-LTR context; else, the empty string.
 */
goog.i18n.BidiFormatter.prototype.dirAttr=  function (str, opt_isHtml){
  return this.knownDirAttr(this.estimateDirection(str, opt_isHtml));
                                                                      } ;


Clone AbstractionParameter Count: 2Parameter Bindings

/**
 * Returns "dir=ltr" or "dir=rtl", depending on {@code str}'s estimated
 * directionality, if it is not the same as the context directionality.
 * Otherwise, returns the empty string.
 *
 * @param {string} str Text whose directionality is to be estimated.
 * @param {boolean=} opt_isHtml Whether {@code str} is HTML / HTML-escaped.
 *     Default: false.
 * @return {string} "dir=rtl" for RTL text in non-RTL context; "dir=ltr" for LTR
 *     text in non-LTR context; else, the empty string.
 */
/**
 * Returns "rtl" if {@code str}'s estimated directionality is RTL, and "ltr" if
 * it is LTR. In case it's UNKNOWN, returns "rtl" if the context directionality
 * is RTL, and "ltr" otherwise.
 * Needed for GXP, which can't handle dirAttr.
 * Example use case:
 * <td expr:dir='bidiFormatter.dirAttrValue(foo)'><gxp:eval expr='foo'></td>
 *
 * @param {string} str Text whose directionality is to be estimated.
 * @param {boolean=} opt_isHtml Whether {@code str} is HTML / HTML-escaped.
 *     Default: false.
 * @return {string} "rtl" or "ltr", according to the logic described above.
 */
goog.i18n.BidiFormatter.prototype. [[#variable634769a0]]= function (str,opt_isHtml)
                                                          { return this. [[#variable634768a0]](this.estimateDirection(str,opt_isHtml));
                                                          } ;
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#634769a0]]
dirAttr 
12[[#634769a0]]
dirAttrValue 
21[[#634768a0]]
knownDirAttr 
22[[#634768a0]]
knownDirAttrValue