CloneSet196


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
37260.980class_member_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
13765
src/NHibernate/Type/DateType.cs
23772
src/NHibernate/Type/TimeType.cs
Clone Instance
1
Line Count
37
Source Line
65
Source File
src/NHibernate/Type/DateType.cs

                public override bool IsEqual(object x, object y)
                {
                        if (x == y)
                        {
                                return true;
                        }
                        if (x == null || y == null)
                        {
                                return false;
                        }

                        DateTime date1 = (DateTime)x;
                        DateTime date2 = (DateTime)y;
                        if (date1.Equals(date2))
                                return true;

                        return date1.Day == date2.Day &&
                                                    date1.Month == date2.Month &&
                                                    date1.Year == date2.Year;
                }

                public override int GetHashCode(object x, EntityMode entityMode)
                {
                        DateTime date = (DateTime)x;
                        int hashCode = 1;
                        unchecked
                        {
                                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).ToShortDateString();
                }



Clone Instance
2
Line Count
37
Source Line
72
Source File
src/NHibernate/Type/TimeType.cs

                public override bool IsEqual(object x, object y)
                {
                        if (x == y)
                        {
                                return true;
                        }
                        if (x == null || y == null)
                        {
                                return false;
                        }

                        DateTime date1 = (DateTime)x;
                        DateTime date2 = (DateTime)y;
                        if (date1.Equals(date2))
                                return true;

                        return date1.Hour == date2.Hour &&
                                                    date1.Minute == date2.Minute &&
                                                    date1.Second == date2.Second;
                }

                public override int GetHashCode(object x, EntityMode entityMode)
                {
                        DateTime date = (DateTime)x;
                        int hashCode = 1;
                        unchecked
                        {
                                hashCode = 31 * hashCode + date.Second;
                                hashCode = 31 * hashCode + date.Minute;
                                hashCode = 31 * hashCode + date.Hour;
                        }
                        return hashCode;
                }

                public override string ToString(object val)
                {
                        return ((DateTime) val).ToShortTimeString();
                }



Clone AbstractionParameter Count: 6Parameter Bindings

public override bool IsEqual(object x, object y)
{
   if (x == y)
   {
      return true;
   }
   if (x == null || y == null)
   {
      return false;
   }
   DateTime date1 = (DateTime)x;
   DateTime date2 = (DateTime)y;
   if (date1.Equals(date2))
      return true;
   return date1. [[#variable652f4760]]== date2. [[#variable652f4760]]&& date1. [[#variable652f46a0]]== date2. [[#variable652f46a0]]&& date1. [[#variable550c1cc0]]== date2. [[#variable550c1cc0]];
}

public override int GetHashCode(object x, EntityMode entityMode)
{
   DateTime date = (DateTime)x;
   int hashCode = 1;
   unchecked
   {
      hashCode = 31 * hashCode + date. [[#variable652f46e0]];
      hashCode = 31 * hashCode + date. [[#variable652f46a0]];
      hashCode = 31 * hashCode + date. [[#variable550c1c80]];
   }
   return hashCode;
}

public override string ToString(object val)
{
   return ((DateTime)val). [[#variable652f4620]]();
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#652f4760]]
Hour 
12[[#652f4760]]
Day 
21[[#652f46a0]]
Minute 
22[[#652f46a0]]
Month 
31[[#550c1cc0]]
Second 
32[[#550c1cc0]]
Year 
41[[#652f46e0]]
Second 
42[[#652f46e0]]
Day 
51[[#550c1c80]]
Hour 
52[[#550c1c80]]
Year 
61[[#652f4620]]
ToShortTimeString 
62[[#652f4620]]
ToShortDateString