| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 22 | 2 | 5 | 0.966 | class_member_declarations[6] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 22 | 43 | src/NHibernate/Id/SequenceHiLoGenerator.cs |
| 2 | 22 | 47 | src/NHibernate/Id/TableHiLoGenerator.cs |
| ||||
/// <summary>
/// The name of the maximum low value parameter.
/// </summary>
public const string MaxLo = "max_lo";
private int maxLo;
private int lo;
private long hi;
private System.Type returnClass;
#region IConfigurable Members
/// <summary>
/// Configures the SequenceHiLoGenerator by reading the value of <c>sequence</c>, <c>max_lo</c>,
/// and <c>schema</c> from the <c>parms</c> parameter.
/// </summary>
/// <param name="type">The <see cref="IType"/> the identifier should be.</param>
/// <param name="parms">An <see cref="IDictionary"/> of Param values that are keyed by parameter name.</param>
/// <param name="dialect">The <see cref="Dialect.Dialect"/> to help with Configuration.</param>
public override void Configure(IType type, IDictionary<string, string> parms, Dialect.Dialect dialect)
{
base.Configure(type, parms, dialect);
maxLo = PropertiesHelper.GetInt32(MaxLo, parms, 9);
lo = maxLo + 1; // so we "clock over" on the first invocation
returnClass = type.ReturnedClass;
}
|
| ||||
/// <summary>
/// The name of the max lo parameter.
/// </summary>
public const string MaxLo = "max_lo";
private long hi;
private long lo;
private long maxLo;
private System.Type returnClass;
#region IConfigurable Members
/// <summary>
/// Configures the TableHiLoGenerator by reading the value of <c>table</c>,
/// <c>column</c>, <c>max_lo</c>, and <c>schema</c> from the <c>parms</c> parameter.
/// </summary>
/// <param name="type">The <see cref="IType"/> the identifier should be.</param>
/// <param name="parms">An <see cref="IDictionary"/> of Param values that are keyed by parameter name.</param>
/// <param name="dialect">The <see cref="Dialect.Dialect"/> to help with Configuration.</param>
public override void Configure(IType type, IDictionary<string, string> parms, Dialect.Dialect dialect)
{
base.Configure(type, parms, dialect);
maxLo = PropertiesHelper.GetInt64(MaxLo, parms, Int16.MaxValue);
lo = maxLo + 1; // so we "clock over" on the first invocation
returnClass = type.ReturnedClass;
}
|
| |||
/// <summary>
/// The name of the maximum low value parameter.
/// The name of the max lo parameter.
/// </summary>
public const string MaxLo = "max_lo";
private [[#variable584d3a00]] [[#variable584d3960]];
private [[#variable584d3a00]]lo;
private long [[#variable6e6a4fc0]];
private System.Type returnClass;
#region IConfigurable Members
/// <summary>
/// Configures the SequenceHiLoGenerator by reading the value of <c>sequence</c>, <c>max_lo</c>,
/// and <c>schema</c> from the <c>parms</c> parameter.
/// Configures the TableHiLoGenerator by reading the value of <c>table</c>,
/// <c>column</c>, <c>max_lo</c>, and <c>schema</c> from the <c>parms</c> parameter.
/// </summary>
/// <param name="type">The <see cref="IType"/> the identifier should be.</param>
/// <param name="parms">An <see cref="IDictionary"/> of Param values that are keyed by parameter name.</param>
/// <param name="dialect">The <see cref="Dialect.Dialect"/> to help with Configuration.</param>
public override void Configure(IType type, IDictionary<string, string> parms, Dialect.Dialect dialect)
{
base.Configure(type, parms, dialect);
maxLo = PropertiesHelper. [[#variable5e482f80]](MaxLo, parms, [[#variable584d38e0]]);
lo = maxLo + 1; // so we "clock over" on the first invocation
returnClass = type.ReturnedClass;
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#584d3a00]] | int |
| 1 | 2 | [[#584d3a00]] | long |
| 2 | 1 | [[#584d3960]] | maxLo |
| 2 | 2 | [[#584d3960]] | hi |
| 3 | 1 | [[#6e6a4fc0]] | hi |
| 3 | 2 | [[#6e6a4fc0]] | maxLo |
| 4 | 1 | [[#5e482f80]] | GetInt32 |
| 4 | 2 | [[#5e482f80]] | GetInt64 |
| 5 | 1 | [[#584d38e0]] | 9 |
| 5 | 2 | [[#584d38e0]] | Int16.MaxValue |