CloneSet144


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
40210.996class_member_declarations[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
14024
src/NHibernate.DomainModel/NHSpecific/NullInt32UserType.cs
24022
src/NHibernate.Test/TypeParameters/DefaultValueIntegerType.cs
Clone Instance
1
Line Count
40
Source Line
24
Source File
src/NHibernate.DomainModel/NHSpecific/NullInt32UserType.cs

                #region IUserType Members
                public new bool Equals(object x, object y)
                {
                        if (x == y) return true;

                        int lhs = (x == null) ? 0:  (int) x;
                        int rhs = (y == null) ? 0:  (int) y;

                        return _int32Type.IsEqual(lhs, rhs);
                }

                public int GetHashCode(object x)
                {
                        return (x == null) ? 0:  x.GetHashCode();
                }

                public SqlType[] SqlTypes
                {
                        get { return new SqlType[] { _int32Type.SqlType
                                                   } ;
                            }
                }

                public object DeepCopy(object value)
                {
                        return value;
                }

                public void NullSafeSet(IDbCommand cmd, object value, int index)
                {
                        if (value.Equals(0))
                        {
                                ((IDbDataParameter) cmd.Parameters[index]).Value = DBNull.Value;
                        }
                        else
                        {
                                _int32Type.Set(cmd, value, index);
                        }
                }

                public System.Type ReturnedType
                {
                        get { return typeof(Int32);
                            }
                }



Clone Instance
2
Line Count
40
Source Line
22
Source File
src/NHibernate.Test/TypeParameters/DefaultValueIntegerType.cs

                #region IUserType Members
                public new bool Equals(object x, object y)
                {
                        if (x == y) return true;

                        int lhs = (x == null) ? 0:  (int) x;
                        int rhs = (y == null) ? 0:  (int) y;

                        return _int32Type.IsEqual(lhs, rhs);
                }

                public int GetHashCode(object x)
                {
                        return (x == null) ? 0:  x.GetHashCode();
                }

                public SqlType[] SqlTypes
                {
                        get { return new SqlType[] { _int32Type.SqlType
                                                   } ;
                            }
                }

                public object DeepCopy(object value)
                {
                        return value;
                }

                public void NullSafeSet(IDbCommand cmd, object value, int index)
                {
                        if (value.Equals(defaultValue))
                        {
                                ((IDbDataParameter) cmd.Parameters[index]).Value = DBNull.Value;
                        }
                        else
                        {
                                _int32Type.Set(cmd, value, index);
                        }
                }

                public System.Type ReturnedType
                {
                        get { return typeof(Int32);
                            }
                }



Clone AbstractionParameter Count: 1Parameter Bindings

#region IUserType Members
public new bool Equals(object x, object y)
{
   if (x == y)
      return true;
   int lhs = (x == null) ?
             0: (int)x;
   int rhs = (y == null) ?
             0: (int)y;
   return _int32Type.IsEqual(lhs, rhs);
}

public int GetHashCode(object x)
{
   return (x == null) ?
          0: x.GetHashCode();
}

public SqlType[] SqlTypes
{
   get
   {
      return new SqlType[]
             {
                _int32Type.SqlType
             } ;
   }
}

public object DeepCopy(object value)
{
   return value;
}

public void NullSafeSet(IDbCommand cmd, object value, int index)
{
   if (value.Equals( [[#variable6ffbca20]]))
   {
      ((IDbDataParameter)cmd.Parameters[index]).Value = DBNull.Value;
   }
   else
   {
      _int32Type.Set(cmd, value, index);
   }
}

public System.Type ReturnedType
{
   get
   {
      return typeof(Int32);
   }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6ffbca20]]
defaultValue 
12[[#6ffbca20]]
0