Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
54 | 2 | 4 | 0.978 | compilation_unit |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 54 | 1 | src/NHibernate/Dialect/Function/AnsiExtractFunction.cs |
2 | 31 | 1 | src/NHibernate/Dialect/Function/AnsiTrimFunction.cs |
| ||||
using System; using System.Text.RegularExpressions; namespace NHibernate.Dialect.Function { /// <summary> /// /// </summary> /// <remarks> /// <![CDATA[ /// <extract expression> ::= /// EXTRACT <left paren> <extract field> FROM <extract source> <right paren> /// ///<extract field > ::= /// <datetime field> | <time zone field > /// /// <datetime field> ::= /// YEAR | /// MONTH | /// DAY | /// HOUR | /// MINUTE | /// SECOND /// ///<time zone field> ::= /// TIMEZONE_HOUR | /// TIMEZONE_MINUTE /// ]]> /// </remarks> [Serializable] public class AnsiExtractFunction: SQLFunctionTemplate, IFunctionGrammar { public AnsiExtractFunction() : base(NHibernateUtil.Int32, "extract(?1 ?2 ?3)") { } #region IFunctionGrammar Members bool IFunctionGrammar.IsSeparator(string token) { return false; } bool IFunctionGrammar.IsKnownArgument(string token) { return Regex.IsMatch(token, "YEAR|MONTH|DAY|HOUR|MINUTE|SECOND|TIMEZONE_HOUR|TIMEZONE_MINUTE|FROM", RegexOptions.IgnoreCase | RegexOptions.CultureInvariant); } #endregion } } |
| ||||
using System; using System.Text.RegularExpressions; namespace NHibernate.Dialect.Function { [Serializable] public class AnsiTrimFunction : SQLFunctionTemplate, IFunctionGrammar { public AnsiTrimFunction() : base(NHibernateUtil.String, "trim(?1 ?2 ?3 ?4)") { } #region IFunctionGrammar Members bool IFunctionGrammar.IsSeparator(string token) { return false; } bool IFunctionGrammar.IsKnownArgument(string token) { return Regex.IsMatch(token, "LEADING|TRAILING|BOTH|FROM", RegexOptions.IgnoreCase | RegexOptions.CultureInvariant); } #endregion } } |
| |||
using System; using System.Text.RegularExpressions; namespace NHibernate.Dialect.Function { /// <summary> /// /// </summary> /// <remarks> /// <![CDATA[ /// <extract expression> ::= /// EXTRACT <left paren> <extract field> FROM <extract source> <right paren> /// ///<extract field > ::= /// <datetime field> | <time zone field > /// /// <datetime field> ::= /// YEAR | /// MONTH | /// DAY | /// HOUR | /// MINUTE | /// SECOND /// ///<time zone field> ::= /// TIMEZONE_HOUR | /// TIMEZONE_MINUTE /// ]]> /// </remarks> [Serializable] public class [[#variable6ff01480]]: SQLFunctionTemplate, IFunctionGrammar { public [[#variable6ff01480]](): base(NHibernateUtil. [[#variable6873bc20]], [[#variable6874b160]]) { } #region IFunctionGrammar Members bool IFunctionGrammar.IsSeparator(string token) { return false; } bool IFunctionGrammar.IsKnownArgument(string token) { return Regex.IsMatch(token, [[#variable6873b9e0]], RegexOptions.IgnoreCase | RegexOptions.CultureInvariant); } #endregion } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6ff01480]] | AnsiExtractFunction |
1 | 2 | [[#6ff01480]] | AnsiTrimFunction |
2 | 1 | [[#6873bc20]] | Int32 |
2 | 2 | [[#6873bc20]] | String |
3 | 1 | [[#6874b160]] | "extract(?1 ?2 ?3)" |
3 | 2 | [[#6874b160]] | "trim(?1 ?2 ?3 ?4)" |
4 | 1 | [[#6873b9e0]] | "YEAR|MONTH|DAY|HOUR|MINUTE|SECOND|TIMEZONE_HOUR|TIMEZONE_MINUTE|FROM" |
4 | 2 | [[#6873b9e0]] | "LEADING|TRAILING|BOTH|FROM" |