Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
21 | 2 | 2 | 0.987 | class_member_declarations[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 21 | 91 | src/NHibernate/Type/DateTimeOffSetType.cs |
2 | 21 | 114 | src/NHibernate/Type/DateTimeType.cs |
| ||||
public override int GetHashCode(object x, EntityMode entityMode) { // Custom hash code implementation because DateTimeType is only accurate // up to seconds. var date = (DateTimeOffset) x; int hashCode = 1; unchecked { hashCode = 31 * hashCode + date.Second; hashCode = 31 * hashCode + date.Minute; hashCode = 31 * hashCode + date.Hour; hashCode = 31 * hashCode + date.Day; hashCode = 31 * hashCode + date.Month; hashCode = 31 * hashCode + date.Year; } return hashCode; } public override string ToString(object val) { return ((DateTimeOffset) val).ToString(); } |
| ||||
#endregion public override int GetHashCode(object x, EntityMode entityMode) { // Custom hash code implementation because DateTimeType is only accurate // up to seconds. DateTime date = (DateTime) x; int hashCode = 1; unchecked { hashCode = 31 * hashCode + date.Second; hashCode = 31 * hashCode + date.Minute; hashCode = 31 * hashCode + date.Hour; hashCode = 31 * hashCode + date.Day; hashCode = 31 * hashCode + date.Month; hashCode = 31 * hashCode + date.Year; } return hashCode; } public override string ToString(object val) { return ((DateTime) val).ToString(); } |
| |||
#endregion public override int GetHashCode(object x, EntityMode entityMode) { [[#variable28eeb7e0]]date = ( [[#variable2b79dde0]])x; int hashCode = 1; unchecked { hashCode = 31 * hashCode + date.Second; hashCode = 31 * hashCode + date.Minute; hashCode = 31 * hashCode + date.Hour; hashCode = 31 * hashCode + date.Day; hashCode = 31 * hashCode + date.Month; hashCode = 31 * hashCode + date.Year; } return hashCode; } public override string ToString(object val) { return (( [[#variable2b79dde0]])val).ToString(); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#28eeb7e0]] | // Custom hash code implementation because DateTimeType is only accurate // up to seconds. DateTime |
1 | 2 | [[#28eeb7e0]] | // Custom hash code implementation because DateTimeType is only accurate // up to seconds. var |
2 | 1 | [[#2b79dde0]] | DateTime |
2 | 2 | [[#2b79dde0]] | DateTimeOffset |