CloneSet69


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
24250.984ExpressionStatement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
124617
Closure/closure/goog/i18n/datetimeformat.js
224537
Closure/closure/goog/locale/datetimeformat.js
Clone Instance
1
Line Count
24
Source Line
617
Source File
Closure/closure/goog/i18n/datetimeformat.js

/**
 * Formatting one date field.
 * @param {string} patternStr The pattern string for the field being formatted.
 * @param {Date} date represents the real date to be formatted.
 * @param {Date} dateForDate used to resolve date fields for formatting.
 * @param {Date} dateForTime used to resolve time fields for formatting.
 * @param {goog.i18n.TimeZone=} opt_timeZone This holds current time zone info.
 * @return {string} string representation for the given field.
 * @private
 */
goog.i18n.DateTimeFormat.prototype.formatField_=
    function (patternStr, date, dateForDate, dateForTime, opt_timeZone){
  var count=  patternStr.length;
  switch (patternStr.charAt(0))
  {case 'G': return this.formatEra_(count, dateForDate);
   case 'y': return this.formatYear_(count, dateForDate);
   case 'M': return this.formatMonth_(count, dateForDate);
   case 'k': return this.format24Hours_(count, dateForTime);
   case 'S': return this.formatFractionalSeconds_(count, dateForTime);
   case 'E': return this.formatDayOfWeek_(count, dateForDate);
   case 'a': return this.formatAmPm_(count, dateForTime);
   case 'h': return this.format1To12Hours_(count, dateForTime);
   case 'K': return this.format0To11Hours_(count, dateForTime);
   case 'H': return this.format0To23Hours_(count, dateForTime);
   case 'c': return this.formatStandaloneDay_(count, dateForDate);
   case 'L': return this.formatStandaloneMonth_(count, dateForDate);
   case 'Q': return this.formatQuarter_(count, dateForDate);
   case 'd': return this.formatDate_(count, dateForDate);
   case 'm': return this.formatMinutes_(count, dateForTime);
   case 's': return this.formatSeconds_(count, dateForTime);
   case 'v': return this.formatTimeZoneId_(date, opt_timeZone);
   case 'z': return this.formatTimeZone_(count, date, opt_timeZone);
   case 'Z': return this.formatTimeZoneRFC_(count, date, opt_timeZone);
   default: return ''; }
                                                                       } ;


Clone Instance
2
Line Count
24
Source Line
537
Source File
Closure/closure/goog/locale/datetimeformat.js

/**
 * Formatting one date field.
 * @param {string} patternStr The pattern string for the field being formatted.
 * @param {Date} date represents the real date to be formatted.
 * @param {Date} dateForDate used to resolve date fields for formatting.
 * @param {Date} dateForTime used to resolve time fields for formatting.
 * @param {goog.locale.TimeZone} timeZone holds time zone information.
 * @return {string} string representation for the given field.
 * @private
 */
goog.locale.DateTimeFormat.prototype.formatField_=
    function (patternStr, date, dateForDate, dateForTime, timeZone){
  var count=  patternStr.length;
  switch (patternStr.charAt(0))
  {case 'G': return this.formatEra_(count, dateForDate);
   case 'y': return this.formatYear_(count, dateForDate);
   case 'M': return this.formatMonth_(count, dateForDate);
   case 'k': return this.format24Hours_(count, dateForTime);
   case 'S': return this.formatFractionalSeconds_(count, dateForTime);
   case 'E': return this.formatDayOfWeek_(count, dateForDate);
   case 'a': return this.formatAmPm_(count, dateForTime);
   case 'h': return this.format1To12Hours_(count, dateForTime);
   case 'K': return this.format0To11Hours_(count, dateForTime);
   case 'H': return this.format0To23Hours_(count, dateForTime);
   case 'c': return this.formatStandaloneDay_(count, dateForDate);
   case 'L': return this.formatStandaloneMonth_(count, dateForDate);
   case 'Q': return this.formatQuarter_(count, dateForDate);
   case 'd': return this.formatDate_(count, dateForDate);
   case 'm': return this.formatMinutes_(count, dateForTime);
   case 's': return this.formatSeconds_(count, dateForTime);
   case 'v': return timeZone.getTimeZoneId( );
   case 'z': return this.formatTimeZone_(count, date, timeZone);
   case 'Z': return this.formatTimeZoneRFC_(count, date, timeZone);
   default: return ''; }
                                                                   } ;


Clone AbstractionParameter Count: 5Parameter Bindings

/**
 * Formatting one date field.
 * @param {string} patternStr The pattern string for the field being formatted.
 * @param {Date} date represents the real date to be formatted.
 * @param {Date} dateForDate used to resolve date fields for formatting.
 * @param {Date} dateForTime used to resolve time fields for formatting.
 * @param {goog.i18n.TimeZone=} opt_timeZone This holds current time zone info.
 * @return {string} string representation for the given field.
 * @private
 */
/**
 * Formatting one date field.
 * @param {string} patternStr The pattern string for the field being formatted.
 * @param {Date} date represents the real date to be formatted.
 * @param {Date} dateForDate used to resolve date fields for formatting.
 * @param {Date} dateForTime used to resolve time fields for formatting.
 * @param {goog.locale.TimeZone} timeZone holds time zone information.
 * @return {string} string representation for the given field.
 * @private
 */
goog. [[#variable57511440]].DateTimeFormat.prototype.formatField_= function (patternStr,date,dateForDate,dateForTime, [[#variable57511380]])
                                                                   { var count=patternStr.length;
                                                                     switch (patternStr.charAt(0))
                                                                     { case 'G':
                                                                         return this.formatEra_(count,dateForDate);
                                                                       case 'y':
                                                                         return this.formatYear_(count,dateForDate);
                                                                       case 'M':
                                                                         return this.formatMonth_(count,dateForDate);
                                                                       case 'k':
                                                                         return this.format24Hours_(count,dateForTime);
                                                                       case 'S':
                                                                         return this.formatFractionalSeconds_(count,dateForTime);
                                                                       case 'E':
                                                                         return this.formatDayOfWeek_(count,dateForDate);
                                                                       case 'a':
                                                                         return this.formatAmPm_(count,dateForTime);
                                                                       case 'h':
                                                                         return this.format1To12Hours_(count,dateForTime);
                                                                       case 'K':
                                                                         return this.format0To11Hours_(count,dateForTime);
                                                                       case 'H':
                                                                         return this.format0To23Hours_(count,dateForTime);
                                                                       case 'c':
                                                                         return this.formatStandaloneDay_(count,dateForDate);
                                                                       case 'L':
                                                                         return this.formatStandaloneMonth_(count,dateForDate);
                                                                       case 'Q':
                                                                         return this.formatQuarter_(count,dateForDate);
                                                                       case 'd':
                                                                         return this.formatDate_(count,dateForDate);
                                                                       case 'm':
                                                                         return this.formatMinutes_(count,dateForTime);
                                                                       case 's':
                                                                         return this.formatSeconds_(count,dateForTime);
                                                                       case 'v':
                                                                         return [[#variable57511300]]. [[#variable575112a0]] [[#variable57511240]];
                                                                       case 'z':
                                                                         return this.formatTimeZone_(count,date, [[#variable57511380]]);
                                                                       case 'Z':
                                                                         return this.formatTimeZoneRFC_(count,date, [[#variable57511380]]);
                                                                       default:
                                                                         return ''; }
                                                                   } ;
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#57511440]]
i18n 
12[[#57511440]]
locale 
21[[#57511380]]
opt_timeZone 
22[[#57511380]]
timeZone 
31[[#57511300]]
this 
32[[#57511300]]
timeZone 
41[[#575112a0]]
formatTimeZoneId_ 
42[[#575112a0]]
getTimeZoneId 
51[[#57511240]]
(date,opt_timeZone) 
52[[#57511240]]
( )