CloneSet174


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
54320.983class_member_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
154488
src/NHibernate/Collection/PersistentBag.cs
253427
src/NHibernate/Collection/PersistentList.cs
353620
src/NHibernate/Collection/PersistentSet.cs
Clone Instance
1
Line Count
54
Source Line
488
Source File
src/NHibernate/Collection/PersistentBag.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);
                        }

                }



Clone Instance
2
Line Count
53
Source Line
427
Source File
src/NHibernate/Collection/PersistentList.cs

                #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);
                        }

                }



Clone Instance
3
Line Count
53
Source Line
620
Source File
src/NHibernate/Collection/PersistentSet.cs

                #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);
                        }

                }



Clone AbstractionParameter Count: 2Parameter Bindings

#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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#4f1ff480]]
PersistentBag 
12[[#4f1ff480]]
PersistentList 
13[[#4f1ff480]]
PersistentSet 
21[[#4f1ff360]]
bag 
22[[#4f1ff360]]
list 
23[[#4f1ff360]]
set