CloneSet114


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
16550.981class_member_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
118268
src/NHibernate/Engine/CascadingAction.cs
217292
src/NHibernate/Engine/CascadingAction.cs
316314
src/NHibernate/Engine/CascadingAction.cs
416339
src/NHibernate/Engine/CascadingAction.cs
516397
src/NHibernate/Engine/CascadingAction.cs
Clone Instance
1
Line Count
18
Source Line
268
Source File
src/NHibernate/Engine/CascadingAction.cs

                        public override void Cascade(IEventSource session, object child, string entityName, object anything, bool isCascadeDeleteEnabled)
                        {
                                if (log.IsDebugEnabled)
                                {
                                        log.Debug("cascading to merge: " + entityName);
                                }
                                session.Merge(entityName, child, (IDictionary)anything);
                        }

                        public override IEnumerable GetCascadableChildrenIterator(IEventSource session, CollectionType collectionType, object collection)
                        {
                                // merges don't cascade to uninitialized collections
                                //TODO: perhaps this does need to cascade after all....
                                return GetLoadedElementsIterator(session, collectionType, collection);
                        }

                        public override bool DeleteOrphans
                        {
                                // orphans should not be deleted during merge??
                                get { return false;
                                    }
                        }



Clone Instance
2
Line Count
17
Source Line
292
Source File
src/NHibernate/Engine/CascadingAction.cs

                        // for deprecated saveOrUpdateCopy()
                        public override void Cascade(IEventSource session, object child, string entityName, object anything, bool isCascadeDeleteEnabled)
                        {
                                if (log.IsDebugEnabled)
                                {
                                        log.Debug("cascading to saveOrUpdateCopy: " + entityName);
                                }
                                session.SaveOrUpdateCopy(entityName, child, (IDictionary)anything);
                        }

                        public override IEnumerable GetCascadableChildrenIterator(IEventSource session, CollectionType collectionType, object collection)
                        {
                                // saves / updates don't cascade to uninitialized collections
                                return GetLoadedElementsIterator(session, collectionType, collection);
                        }

                        public override bool DeleteOrphans
                        {
                                // orphans should not be deleted during copy??
                                get { return false;
                                    }
                        }



Clone Instance
3
Line Count
16
Source Line
314
Source File
src/NHibernate/Engine/CascadingAction.cs

                        public override void Cascade(IEventSource session, object child, string entityName, object anything, bool isCascadeDeleteEnabled)
                        {
                                if (log.IsDebugEnabled)
                                {
                                        log.Debug("cascading to persist: " + entityName);
                                }
                                session.Persist(entityName, child, (IDictionary)anything);
                        }

                        public override IEnumerable GetCascadableChildrenIterator(IEventSource session, CollectionType collectionType, object collection)
                        {
                                // persists don't cascade to uninitialized collections
                                return GetAllElementsIterator(session, collectionType, collection);
                        }

                        public override bool DeleteOrphans
                        {
                                get { return false;
                                    }
                        }



Clone Instance
4
Line Count
16
Source Line
339
Source File
src/NHibernate/Engine/CascadingAction.cs

                        public override void Cascade(IEventSource session, object child, string entityName, object anything, bool isCascadeDeleteEnabled)
                        {
                                if (log.IsDebugEnabled)
                                {
                                        log.Debug("cascading to persistOnFlush: " + entityName);
                                }
                                session.PersistOnFlush(entityName, child, (IDictionary)anything);
                        }

                        public override IEnumerable GetCascadableChildrenIterator(IEventSource session, CollectionType collectionType, object collection)
                        {
                                // persists don't cascade to uninitialized collections
                                return GetLoadedElementsIterator(session, collectionType, collection);
                        }

                        public override bool DeleteOrphans
                        {
                                get { return true;
                                    }
                        }



Clone Instance
5
Line Count
16
Source Line
397
Source File
src/NHibernate/Engine/CascadingAction.cs

                        public override void Cascade(IEventSource session, object child, string entityName, object anything, bool isCascadeDeleteEnabled)
                        {
                                if (log.IsDebugEnabled)
                                {
                                        log.Debug("cascading to replicate: " + entityName);
                                }
                                session.Replicate(entityName, child, (ReplicationMode)anything);
                        }

                        public override IEnumerable GetCascadableChildrenIterator(IEventSource session, CollectionType collectionType, object collection)
                        {
                                // replicate does cascade to uninitialized collections
                                return GetLoadedElementsIterator(session, collectionType, collection);
                        }

                        public override bool DeleteOrphans
                        {
                                get { return false;
                                    }
                        }



Clone AbstractionParameter Count: 5Parameter Bindings

// for deprecated saveOrUpdateCopy()
public override void Cascade(IEventSource session, object child, string entityName, object anything, bool isCascadeDeleteEnabled)
{
   if (log.IsDebugEnabled)
   {
      log.Debug( [[#variable4dc51d00]]+ entityName);
   }
   session. [[#variable55365cc0]](entityName, child, ( [[#variable6bdb9640]])anything);
}

public override IEnumerable GetCascadableChildrenIterator(IEventSource session, CollectionType collectionType, object collection)
{
   // persists don't cascade to uninitialized collections
   // merges don't cascade to uninitialized collections
   //TODO: perhaps this does need to cascade after all....
   // saves / updates don't cascade to uninitialized collections
   // replicate does cascade to uninitialized collections
   return [[#variable6ff89540]](session, collectionType, collection);
}

public override bool DeleteOrphans
{
   // orphans should not be deleted during merge??
   // orphans should not be deleted during copy??
   get
   {
      return [[#variable28edc940]];
   }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#4dc51d00]]
"cascading to persistOnFlush: " 
12[[#4dc51d00]]
"cascading to merge: " 
13[[#4dc51d00]]
"cascading to saveOrUpdateCopy: " 
14[[#4dc51d00]]
"cascading to persist: " 
15[[#4dc51d00]]
"cascading to replicate: " 
21[[#55365cc0]]
PersistOnFlush 
22[[#55365cc0]]
Merge 
23[[#55365cc0]]
SaveOrUpdateCopy 
24[[#55365cc0]]
Persist 
25[[#55365cc0]]
Replicate 
31[[#6bdb9640]]
IDictionary 
32[[#6bdb9640]]
IDictionary 
33[[#6bdb9640]]
IDictionary 
34[[#6bdb9640]]
IDictionary 
35[[#6bdb9640]]
ReplicationMode 
41[[#6ff89540]]
GetLoadedElementsIterator 
42[[#6ff89540]]
GetLoadedElementsIterator 
43[[#6ff89540]]
GetLoadedElementsIterator 
44[[#6ff89540]]
GetAllElementsIterator 
45[[#6ff89540]]
GetLoadedElementsIterator 
51[[#28edc940]]
true 
52[[#28edc940]]
false 
53[[#28edc940]]
false 
54[[#28edc940]]
false 
55[[#28edc940]]
false