CloneSet406


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
21220.987class_member_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12191
src/NHibernate/Type/DateTimeOffSetType.cs
221114
src/NHibernate/Type/DateTimeType.cs
Clone Instance
1
Line Count
21
Source Line
91
Source File
src/NHibernate/Type/DateTimeOffSetType.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();
                }



Clone Instance
2
Line Count
21
Source Line
114
Source File
src/NHibernate/Type/DateTimeType.cs

                #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();
                }



Clone AbstractionParameter Count: 2Parameter Bindings

#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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#28eeb7e0]]
// Custom hash code implementation because DateTimeType is only accurate
// up to seconds.
DateTime 
12[[#28eeb7e0]]
// Custom hash code implementation because DateTimeType is only accurate
// up to seconds.
var 
21[[#2b79dde0]]
DateTime 
22[[#2b79dde0]]
DateTimeOffset