CloneSet394


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
17250.974SourceElements[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
117529
Closure/closure/goog/i18n/bidi.js
217559
Closure/closure/goog/i18n/bidi.js
Clone Instance
1
Line Count
17
Source Line
529
Source File
Closure/closure/goog/i18n/bidi.js

/**
 * Enforce the html snippet in RTL directionality regardless overall context.
 * If the html piece was enclosed by tag, dir will be applied to existing
 * tag, otherwise a span tag will be added as wrapper. For this reason, if
 * html snippet start with with tag, this tag must enclose the whole piece. If
 * the tag already has a dir specified, this new one will override existing
 * one in behavior (tested on FF and IE).
 * @param {string} html The string that need to be processed.
 * @return {string} The processed string, with directionality enforced to RTL.
 */
goog.i18n.bidi.enforceRtlInHtml=  function (html){
  if (html.charAt(0)==  '<') {
    return html.replace(/<\w+/, '$& dir=rtl');
                             }
  // '\n' is important for FF so that it won't incorrectly merge span groups
  return '\n\x3cspan dir=rtl>'+html+ '</span>';
                                                 } ;


/**
 * Enforce RTL on both end of the given text piece using unicode BiDi formatting
 * characters RLE and PDF.
 * @param {string} text The piece of text that need to be wrapped.
 * @return {string} The wrapped string after process.
 */
goog.i18n.bidi.enforceRtlInText=  function (text){
  return goog.i18n.bidi.Format.RLE+  text+  goog.i18n.bidi.Format.PDF;
                                                 } ;


Clone Instance
2
Line Count
17
Source Line
559
Source File
Closure/closure/goog/i18n/bidi.js

/**
 * Enforce the html snippet in RTL directionality regardless overall context.
 * If the html piece was enclosed by tag, dir will be applied to existing
 * tag, otherwise a span tag will be added as wrapper. For this reason, if
 * html snippet start with with tag, this tag must enclose the whole piece. If
 * the tag already has a dir specified, this new one will override existing
 * one in behavior (tested on FF and IE).
 * @param {string} html The string that need to be processed.
 * @return {string} The processed string, with directionality enforced to RTL.
 */
goog.i18n.bidi.enforceLtrInHtml=  function (html){
  if (html.charAt(0)==  '<') {
    return html.replace(/<\w+/, '$& dir=ltr');
                             }
  // '\n' is important for FF so that it won't incorrectly merge span groups
  return '\n\x3cspan dir=ltr>'+html+ '</span>';
                                                 } ;


/**
 * Enforce LTR on both end of the given text piece using unicode BiDi formatting
 * characters LRE and PDF.
 * @param {string} text The piece of text that need to be wrapped.
 * @return {string} The wrapped string after process.
 */
goog.i18n.bidi.enforceLtrInText=  function (text){
  return goog.i18n.bidi.Format.LRE+  text+  goog.i18n.bidi.Format.PDF;
                                                 } ;


Clone AbstractionParameter Count: 5Parameter Bindings

/**
 * Enforce the html snippet in RTL directionality regardless overall context.
 * If the html piece was enclosed by tag, dir will be applied to existing
 * tag, otherwise a span tag will be added as wrapper. For this reason, if
 * html snippet start with with tag, this tag must enclose the whole piece. If
 * the tag already has a dir specified, this new one will override existing
 * one in behavior (tested on FF and IE).
 * @param {string} html The string that need to be processed.
 * @return {string} The processed string, with directionality enforced to RTL.
 */
goog.i18n.bidi. [[#variable62b662e0]]= function (html)
                                       { if (html.charAt(0)=='<')
                                           { return html.replace(/<\w+/, [[#variable62a5dde0]]);
                                           }
                                         // '\n' is important for FF so that it won't incorrectly merge span groups
                                         return [[#variable62b66140]]+html+'</span>';
                                       } ;
/**
 * Enforce RTL on both end of the given text piece using unicode BiDi formatting
 * characters RLE and PDF.
 * @param {string} text The piece of text that need to be wrapped.
 * @return {string} The wrapped string after process.
 */
/**
 * Enforce LTR on both end of the given text piece using unicode BiDi formatting
 * characters LRE and PDF.
 * @param {string} text The piece of text that need to be wrapped.
 * @return {string} The wrapped string after process.
 */
goog.i18n.bidi. [[#variable5ce758a0]]= function (text)
                                       { return goog.i18n.bidi.Format. [[#variable62b662a0]]+text+goog.i18n.bidi.Format.PDF;
                                       } ;
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#62b662e0]]
enforceRtlInHtml 
12[[#62b662e0]]
enforceLtrInHtml 
21[[#62a5dde0]]
'$& dir=rtl' 
22[[#62a5dde0]]
'$& dir=ltr' 
31[[#62b66140]]
'\n\x3cspan dir=rtl>' 
32[[#62b66140]]
'\n\x3cspan dir=ltr>' 
41[[#5ce758a0]]
enforceRtlInText 
42[[#5ce758a0]]
enforceLtrInText 
51[[#62b662a0]]
RLE 
52[[#62b662a0]]
LRE