Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
24 | 2 | 5 | 0.984 | ExpressionStatement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 24 | 617 | Closure/closure/goog/i18n/datetimeformat.js |
2 | 24 | 537 | 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.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 ''; } } ; |
| ||||
/** * 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 ''; } } ; |
| |||
/** * 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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#57511440]] | i18n |
1 | 2 | [[#57511440]] | locale |
2 | 1 | [[#57511380]] | opt_timeZone |
2 | 2 | [[#57511380]] | timeZone |
3 | 1 | [[#57511300]] | this |
3 | 2 | [[#57511300]] | timeZone |
4 | 1 | [[#575112a0]] | formatTimeZoneId_ |
4 | 2 | [[#575112a0]] | getTimeZoneId |
5 | 1 | [[#57511240]] | (date,opt_timeZone) |
5 | 2 | [[#57511240]] | ( ) |