| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 24 | 2 | 3 | 0.984 | class_member_declarations[5] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 24 | 63 | src/NHibernate/Id/Enhanced/OptimizerFactory.cs |
| 2 | 24 | 198 | src/NHibernate/Id/Enhanced/OptimizerFactory.cs |
| ||||
private long lastSourceValue = - 1;
private long value_Renamed;
public HiLoOptimizer(System.Type returnClass, int incrementSize) : base(returnClass, incrementSize)
{
if (incrementSize < 1)
{
throw new HibernateException("increment size cannot be less than 1");
}
if (log.IsDebugEnabled)
{
log.Debug("creating hilo optimizer with [incrementSize=" + incrementSize + "; returnClass=" + returnClass.FullName +
"]");
}
}
public override long LastSourceValue
{
get { return lastSourceValue;
}
}
public long LastValue
{
get { return value_Renamed - 1;
}
}
|
| ||||
private long hiValue = - 1;
private long value_Renamed;
public PooledOptimizer(System.Type returnClass, int incrementSize) : base(returnClass, incrementSize)
{
if (incrementSize < 1)
{
throw new HibernateException("increment size cannot be less than 1");
}
if (log.IsDebugEnabled)
{
log.Debug("creating pooled optimizer with [incrementSize=" + incrementSize + "; returnClass=" +
returnClass.FullName + "]");
}
}
public override long LastSourceValue
{
get { return hiValue;
}
}
public long LastValue
{
get { return value_Renamed - 1;
}
}
|
| |||
private long [[#variable5e478be0]]= - 1;
private long value_Renamed;
public [[#variable5e478bc0]](System.Type returnClass, int incrementSize): base(returnClass, incrementSize)
{
if (incrementSize < 1)
{
throw new HibernateException("increment size cannot be less than 1");
}
if (log.IsDebugEnabled)
{
log.Debug( [[#variable5e478b60]]+ incrementSize + "; returnClass=" + returnClass.FullName + "]");
}
}
public override long LastSourceValue
{
get
{
return [[#variable5e478be0]];
}
}
public long LastValue
{
get
{
return value_Renamed - 1;
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#5e478be0]] | lastSourceValue |
| 1 | 2 | [[#5e478be0]] | hiValue |
| 2 | 1 | [[#5e478bc0]] | HiLoOptimizer |
| 2 | 2 | [[#5e478bc0]] | PooledOptimizer |
| 3 | 1 | [[#5e478b60]] | "creating hilo optimizer with [incrementSize=" |
| 3 | 2 | [[#5e478b60]] | "creating pooled optimizer with [incrementSize=" |