| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 54 | 3 | 2 | 0.983 | class_member_declarations[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 54 | 488 | src/NHibernate/Collection/PersistentBag.cs |
| 2 | 53 | 427 | src/NHibernate/Collection/PersistentList.cs |
| 3 | 53 | 620 | src/NHibernate/Collection/PersistentSet.cs |
| ||||
#region DelayedOperations
protected sealed class ClearDelayedOperation : IDelayedOperation
{
private readonly PersistentBag enclosingInstance;
public ClearDelayedOperation(PersistentBag enclosingInstance)
{
this.enclosingInstance = enclosingInstance;
}
public object AddedInstance
{
get { return null;
}
}
public object Orphan
{
get { throw new NotSupportedException("queued clear cannot be used with orphan delete");
}
}
public void Operate()
{
enclosingInstance.bag.Clear();
}
}
protected sealed class SimpleAddDelayedOperation : IDelayedOperation
{
private readonly PersistentBag enclosingInstance;
private readonly object value;
public SimpleAddDelayedOperation(PersistentBag enclosingInstance, object value)
{
this.enclosingInstance = enclosingInstance;
this.value = value;
}
public object AddedInstance
{
get { return value;
}
}
public object Orphan
{
get { return null;
}
}
public void Operate()
{
enclosingInstance.bag.Add(value);
}
}
|
| ||||
#endregion
#region DelayedOperations
protected sealed class ClearDelayedOperation : IDelayedOperation
{
private readonly PersistentList enclosingInstance;
public ClearDelayedOperation(PersistentList enclosingInstance)
{
this.enclosingInstance = enclosingInstance;
}
public object AddedInstance
{
get { return null;
}
}
public object Orphan
{
get { throw new NotSupportedException("queued clear cannot be used with orphan delete");
}
}
public void Operate()
{
enclosingInstance.list.Clear();
}
}
protected sealed class SimpleAddDelayedOperation : IDelayedOperation
{
private readonly PersistentList enclosingInstance;
private readonly object value;
public SimpleAddDelayedOperation(PersistentList enclosingInstance, object value)
{
this.enclosingInstance = enclosingInstance;
this.value = value;
}
public object AddedInstance
{
get { return value;
}
}
public object Orphan
{
get { return null;
}
}
public void Operate()
{
enclosingInstance.list.Add(value);
}
}
|
| ||||
#endregion
#region DelayedOperations
protected sealed class ClearDelayedOperation : IDelayedOperation
{
private readonly PersistentSet enclosingInstance;
public ClearDelayedOperation(PersistentSet enclosingInstance)
{
this.enclosingInstance = enclosingInstance;
}
public object AddedInstance
{
get { return null;
}
}
public object Orphan
{
get { throw new NotSupportedException("queued clear cannot be used with orphan delete");
}
}
public void Operate()
{
enclosingInstance.set.Clear();
}
}
protected sealed class SimpleAddDelayedOperation : IDelayedOperation
{
private readonly PersistentSet enclosingInstance;
private readonly object value;
public SimpleAddDelayedOperation(PersistentSet enclosingInstance, object value)
{
this.enclosingInstance = enclosingInstance;
this.value = value;
}
public object AddedInstance
{
get { return value;
}
}
public object Orphan
{
get { return null;
}
}
public void Operate()
{
enclosingInstance.set.Add(value);
}
}
|
| |||
#endregion
#region DelayedOperations
protected sealed class ClearDelayedOperation: IDelayedOperation
{
private readonly [[#variable4f1ff480]]enclosingInstance;
public ClearDelayedOperation( [[#variable4f1ff480]]enclosingInstance)
{
this.enclosingInstance = enclosingInstance;
}
public object AddedInstance
{
get
{
return null;
}
}
public object Orphan
{
get
{
throw new NotSupportedException("queued clear cannot be used with orphan delete");
}
}
public void Operate()
{
enclosingInstance. [[#variable4f1ff360]].Clear();
}
}
protected sealed class SimpleAddDelayedOperation: IDelayedOperation
{
private readonly [[#variable4f1ff480]]enclosingInstance;
private readonly object value;
public SimpleAddDelayedOperation( [[#variable4f1ff480]]enclosingInstance, object value)
{
this.enclosingInstance = enclosingInstance;
this.value = value;
}
public object AddedInstance
{
get
{
return value;
}
}
public object Orphan
{
get
{
return null;
}
}
public void Operate()
{
enclosingInstance. [[#variable4f1ff360]].Add(value);
}
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#4f1ff480]] | PersistentBag |
| 1 | 2 | [[#4f1ff480]] | PersistentList |
| 1 | 3 | [[#4f1ff480]] | PersistentSet |
| 2 | 1 | [[#4f1ff360]] | bag |
| 2 | 2 | [[#4f1ff360]] | list |
| 2 | 3 | [[#4f1ff360]] | set |