| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 77 | 7 | 5 | 0.964 | class_member_declarations[13] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 77 | 28 | src/NHibernate/Type/Int16Type.cs |
| 2 | 77 | 28 | src/NHibernate/Type/Int32Type.cs |
| 3 | 77 | 28 | src/NHibernate/Type/Int64Type.cs |
| 4 | 77 | 28 | src/NHibernate/Type/SByteType.cs |
| 5 | 77 | 28 | src/NHibernate/Type/UInt16Type.cs |
| 6 | 77 | 28 | src/NHibernate/Type/UInt32Type.cs |
| 7 | 77 | 27 | src/NHibernate/Type/UInt64Type.cs |
| ||||
private static readonly Int16 ZERO = 0;
public override object Get(IDataReader rs, int index)
{
try
{
return Convert.ToInt16(rs[index]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[index]), ex);
}
}
public override object Get(IDataReader rs, string name)
{
try
{
return Convert.ToInt16(rs[name]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[name]), ex);
}
}
public override System.Type ReturnedClass
{
get { return typeof(Int16);
}
}
public override void Set(IDbCommand rs, object value, int index)
{
((IDataParameter)rs.Parameters[index]).Value = value;
}
public object StringToObject(string xml)
{
return FromStringValue(xml);
}
public override object FromStringValue(string xml)
{
return Int16.Parse(xml);
}
#region IVersionType Members
public virtual object Next(object current, ISessionImplementor session)
{
return (Int16)((Int16)current + 1);
}
public virtual object Seed(ISessionImplementor session)
{
return (Int16)1;
}
public IComparer Comparator
{
get { return Comparer<Int16>.Default;
}
}
#endregion
public override System.Type PrimitiveClass
{
get { return typeof( Int16);
}
}
public override object DefaultValue
{
get { return ZERO;
}
}
public override string ObjectToSQLString(object value, Dialect.Dialect dialect)
{
return value.ToString();
}
|
| ||||
private static readonly Int32 ZERO = 0;
public override object Get(IDataReader rs, int index)
{
try
{
return Convert.ToInt32(rs[index]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[index]), ex);
}
}
public override object Get(IDataReader rs, string name)
{
try
{
return Convert.ToInt32(rs[name]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[name]), ex);
}
}
public override System.Type ReturnedClass
{
get { return typeof(Int32);
}
}
public override void Set(IDbCommand rs, object value, int index)
{
((IDataParameter)rs.Parameters[index]).Value = value;
}
public object StringToObject(string xml)
{
return FromStringValue(xml);
}
public override object FromStringValue(string xml)
{
return Int32.Parse(xml);
}
#region IVersionType Members
public virtual object Next(object current, ISessionImplementor session)
{
return (Int32)current + 1;
}
public virtual object Seed(ISessionImplementor session)
{
return 1;
}
public IComparer Comparator
{
get { return Comparer<Int32>.Default;
}
}
#endregion
public override System.Type PrimitiveClass
{
get { return typeof(Int32);
}
}
public override object DefaultValue
{
get { return ZERO;
}
}
public override string ObjectToSQLString(object value, Dialect.Dialect dialect)
{
return value.ToString();
}
|
| ||||
private static readonly Int64 ZERO = 0;
public override object Get(IDataReader rs, int index)
{
try
{
return Convert.ToInt64(rs[index]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[index]), ex);
}
}
public override object Get(IDataReader rs, string name)
{
try
{
return Convert.ToInt64(rs[name]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[name]), ex);
}
}
public override System.Type ReturnedClass
{
get { return typeof(Int64);
}
}
public override void Set(IDbCommand rs, object value, int index)
{
((IDataParameter)rs.Parameters[index]).Value = value;
}
public object StringToObject(string xml)
{
return FromStringValue(xml);
}
public override object FromStringValue(string xml)
{
return Int64.Parse(xml);
}
#region IVersionType Members
public virtual object Next(object current, ISessionImplementor session)
{
return (Int64)current + 1L;
}
public virtual object Seed(ISessionImplementor session)
{
return 1L;
}
public IComparer Comparator
{
get { return Comparer<Int64>.Default;
}
}
#endregion
public override System.Type PrimitiveClass
{
get { return typeof(Int64);
}
}
public override object DefaultValue
{
get { return ZERO;
}
}
public override string ObjectToSQLString(object value, Dialect.Dialect dialect)
{
return value.ToString();
}
|
| ||||
private static readonly SByte ZERO = 0;
public override object Get(IDataReader rs, int index)
{
try
{
return Convert.ToSByte(rs[index]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[index]), ex);
}
}
public override object Get(IDataReader rs, string name)
{
try
{
return Convert.ToSByte(rs[name]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[name]), ex);
}
}
public override System.Type ReturnedClass
{
get { return typeof(SByte);
}
}
public override void Set(IDbCommand rs, object value, int index)
{
((IDataParameter)rs.Parameters[index]).Value = value;
}
public object StringToObject(string xml)
{
return FromStringValue(xml);
}
public override object FromStringValue(string xml)
{
return SByte.Parse(xml);
}
#region IVersionType Members
public virtual object Next(object current, ISessionImplementor session)
{
return (SByte)((SByte)current + 1);
}
public virtual object Seed(ISessionImplementor session)
{
return (SByte)1;
}
public IComparer Comparator
{
get { return Comparer<SByte>.Default;
}
}
#endregion
public override System.Type PrimitiveClass
{
get { return typeof(SByte);
}
}
public override object DefaultValue
{
get { return ZERO;
}
}
public override string ObjectToSQLString(object value, Dialect.Dialect dialect)
{
return value.ToString();
}
|
| ||||
private static readonly UInt16 ZERO = 0;
public override object Get(IDataReader rs, int index)
{
try
{
return Convert.ToUInt16(rs[index]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[index]), ex);
}
}
public override object Get(IDataReader rs, string name)
{
try
{
return Convert.ToUInt16(rs[name]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[name]), ex);
}
}
public override System.Type ReturnedClass
{
get { return typeof(UInt16);
}
}
public override void Set(IDbCommand rs, object value, int index)
{
((IDataParameter)rs.Parameters[index]).Value = value;
}
public object StringToObject(string xml)
{
return FromStringValue(xml);
}
public override object FromStringValue(string xml)
{
return UInt16.Parse(xml);
}
#region IVersionType Members
public virtual object Next(object current, ISessionImplementor session)
{
return (UInt16)current + 1;
}
public virtual object Seed(ISessionImplementor session)
{
return 1;
}
public IComparer Comparator
{
get { return Comparer<UInt16>.Default;
}
}
#endregion
public override System.Type PrimitiveClass
{
get { return typeof(UInt16);
}
}
public override object DefaultValue
{
get { return ZERO;
}
}
public override string ObjectToSQLString(object value, Dialect.Dialect dialect)
{
return value.ToString();
}
|
| ||||
private static readonly UInt32 ZERO = 0;
public override object Get(IDataReader rs, int index)
{
try
{
return Convert.ToUInt32(rs[index]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[index]), ex);
}
}
public override object Get(IDataReader rs, string name)
{
try
{
return Convert.ToUInt32(rs[name]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[name]), ex);
}
}
public override System.Type ReturnedClass
{
get { return typeof(UInt32);
}
}
public override void Set(IDbCommand rs, object value, int index)
{
((IDataParameter)rs.Parameters[index]).Value = value;
}
public object StringToObject(string xml)
{
return FromStringValue(xml);
}
public override object FromStringValue(string xml)
{
return UInt32.Parse(xml);
}
#region IVersionType Members
public virtual object Next(object current, ISessionImplementor session)
{
return (UInt32)current + 1;
}
public virtual object Seed(ISessionImplementor session)
{
return 1;
}
public IComparer Comparator
{
get { return Comparer<UInt32>.Default;
}
}
#endregion
public override System.Type PrimitiveClass
{
get { return typeof(UInt32);
}
}
public override object DefaultValue
{
get { return ZERO;
}
}
public override string ObjectToSQLString(object value, Dialect.Dialect dialect)
{
return value.ToString();
}
|
| ||||
private static readonly UInt32 ZERO = 0;
public override object Get(IDataReader rs, int index)
{
try
{
return Convert.ToUInt64(rs[index]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[index]), ex);
}
}
public override object Get(IDataReader rs, string name)
{
try
{
return Convert.ToUInt64(rs[name]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[name]), ex);
}
}
public override System.Type ReturnedClass
{
get { return typeof(UInt64);
}
}
public override void Set(IDbCommand rs, object value, int index)
{
((IDataParameter)rs.Parameters[index]).Value = value;
}
public object StringToObject(string xml)
{
return FromStringValue(xml);
}
public override object FromStringValue(string xml)
{
return UInt64.Parse(xml);
}
#region IVersionType Members
public virtual object Next(object current, ISessionImplementor session)
{
return (UInt64)current + 1;
}
public virtual object Seed(ISessionImplementor session)
{
return 1;
}
public IComparer Comparator
{
get { return Comparer<UInt64>.Default;
}
}
#endregion
public override System.Type PrimitiveClass
{
get { return typeof(UInt64);
}
}
public override object DefaultValue
{
get { return ZERO;
}
}
public override string ObjectToSQLString(object value, Dialect.Dialect dialect)
{
return value.ToString();
}
|
| |||
private static readonly [[#variable6e525dc0]]ZERO = 0;
public override object Get(IDataReader rs, int index)
{
try
{
return Convert. [[#variable54a80220]](rs[index]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[index]), ex);
}
}
public override object Get(IDataReader rs, string name)
{
try
{
return Convert. [[#variable54a80220]](rs[name]);
}
catch (Exception ex)
{
throw new FormatException(string.Format("Input string '{0}' was not in the correct format.", rs[name]), ex);
}
}
public override System.Type ReturnedClass
{
get
{
return typeof( [[#variable6e525be0]]);
}
}
public override void Set(IDbCommand rs, object value, int index)
{
((IDataParameter)rs.Parameters[index]).Value = value;
}
public object StringToObject(string xml)
{
return FromStringValue(xml);
}
public override object FromStringValue(string xml)
{
return [[#variable6e525be0]].Parse(xml);
}
#region IVersionType Members
public virtual object Next(object current, ISessionImplementor session)
{
return [[#variable6e525c80]];
}
public virtual object Seed(ISessionImplementor session)
{
return [[#variable6e525b60]];
}
public IComparer Comparator
{
get
{
return Comparer< [[#variable6e525be0]]>.Default;
}
}
#endregion
public override System.Type PrimitiveClass
{
get
{
return typeof( [[#variable6e525be0]]);
}
}
public override object DefaultValue
{
get
{
return ZERO;
}
}
public override string ObjectToSQLString(object value, Dialect.Dialect dialect)
{
return value.ToString();
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#6e525dc0]] | UInt32 |
| 1 | 2 | [[#6e525dc0]] | Int16 |
| 1 | 3 | [[#6e525dc0]] | Int32 |
| 1 | 4 | [[#6e525dc0]] | Int64 |
| 1 | 5 | [[#6e525dc0]] | SByte |
| 1 | 6 | [[#6e525dc0]] | UInt16 |
| 1 | 7 | [[#6e525dc0]] | UInt32 |
| 2 | 1 | [[#54a80220]] | ToUInt32 |
| 2 | 2 | [[#54a80220]] | ToInt16 |
| 2 | 3 | [[#54a80220]] | ToInt32 |
| 2 | 4 | [[#54a80220]] | ToInt64 |
| 2 | 5 | [[#54a80220]] | ToSByte |
| 2 | 6 | [[#54a80220]] | ToUInt16 |
| 2 | 7 | [[#54a80220]] | ToUInt64 |
| 3 | 1 | [[#6e525be0]] | UInt32 |
| 3 | 2 | [[#6e525be0]] | Int16 |
| 3 | 3 | [[#6e525be0]] | Int32 |
| 3 | 4 | [[#6e525be0]] | Int64 |
| 3 | 5 | [[#6e525be0]] | SByte |
| 3 | 6 | [[#6e525be0]] | UInt16 |
| 3 | 7 | [[#6e525be0]] | UInt64 |
| 4 | 1 | [[#6e525c80]] | (UInt32)current + 1 |
| 4 | 2 | [[#6e525c80]] | (Int16)((Int16)current + 1) |
| 4 | 3 | [[#6e525c80]] | (Int32)current + 1 |
| 4 | 4 | [[#6e525c80]] | (Int64)current + 1L |
| 4 | 5 | [[#6e525c80]] | (SByte)((SByte)current + 1) |
| 4 | 6 | [[#6e525c80]] | (UInt16)current + 1 |
| 4 | 7 | [[#6e525c80]] | (UInt64)current + 1 |
| 5 | 1 | [[#6e525b60]] | 1 |
| 5 | 2 | [[#6e525b60]] | (Int16)1 |
| 5 | 3 | [[#6e525b60]] | 1 |
| 5 | 4 | [[#6e525b60]] | 1L |
| 5 | 5 | [[#6e525b60]] | (SByte)1 |
| 5 | 6 | [[#6e525b60]] | 1 |
| 5 | 7 | [[#6e525b60]] | 1 |