CloneSet548


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
10340.966class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
111345
src/NHibernate/Event/Default/AbstractSaveEventListener.cs
211364
src/NHibernate/Event/Default/AbstractSaveEventListener.cs
310393
src/NHibernate/Event/Default/DefaultMergeEventListener.cs
Clone Instance
1
Line Count
11
Source Line
345
Source File
src/NHibernate/Event/Default/AbstractSaveEventListener.cs

                /// <summary> Handles the calls needed to perform pre-save cascades for the given entity. </summary>
                /// <param name="source">The session from which the save event originated.</param>
                /// <param name="persister">The entity's persister instance. </param>
                /// <param name="entity">The entity to be saved. </param>
                /// <param name="anything">Generally cascade-specific data </param>
                protected virtual void CascadeBeforeSave(IEventSource source, IEntityPersister persister, object entity, object anything)
                {
                        // cascade-save to many-to-one BEFORE the parent is saved
                        source.PersistenceContext.IncrementCascadeLevel();
                        try
                        {
                                new Cascade(CascadeAction, CascadePoint.BeforeInsertAfterDelete, source).CascadeOn(persister, entity, anything);
                        }
                        finally
                        {
                                source.PersistenceContext.DecrementCascadeLevel();
                        }
                }



Clone Instance
2
Line Count
11
Source Line
364
Source File
src/NHibernate/Event/Default/AbstractSaveEventListener.cs

                /// <summary> Handles to calls needed to perform post-save cascades. </summary>
                /// <param name="source">The session from which the event originated. </param>
                /// <param name="persister">The entity's persister instance. </param>
                /// <param name="entity">The entity being saved. </param>
                /// <param name="anything">Generally cascade-specific data </param>
                protected virtual void CascadeAfterSave(IEventSource source, IEntityPersister persister, object entity, object anything)
                {
                        // cascade-save to collections AFTER the collection owner was saved
                        source.PersistenceContext.IncrementCascadeLevel();
                        try
                        {
                                new Cascade(CascadeAction, CascadePoint.AfterInsertBeforeDelete, source).CascadeOn(persister, entity, anything);
                        }
                        finally
                        {
                                source.PersistenceContext.DecrementCascadeLevel();
                        }
                }



Clone Instance
3
Line Count
10
Source Line
393
Source File
src/NHibernate/Event/Default/DefaultMergeEventListener.cs

                /// <summary> 
                /// Perform any cascades needed as part of this copy event.
                /// </summary>
                /// <param name="source">The merge event being processed. </param>
                /// <param name="persister">The persister of the entity being copied. </param>
                /// <param name="entity">The entity being copied. </param>
                /// <param name="copyCache">A cache of already copied instance. </param>
                protected virtual void CascadeOnMerge(IEventSource source, IEntityPersister persister, object entity, IDictionary copyCache)
                {
                        source.PersistenceContext.IncrementCascadeLevel();
                        try
                        {
                                new Cascade(CascadeAction, CascadePoint.BeforeMerge, source).CascadeOn(persister, entity, copyCache);
                        }
                        finally
                        {
                                source.PersistenceContext.DecrementCascadeLevel();
                        }
                }



Clone AbstractionParameter Count: 4Parameter Bindings

/// <summary> 
/// Perform any cascades needed as part of this copy event.
/// </summary>
/// <param name="source">The merge event being processed. </param>
/// <param name="persister">The persister of the entity being copied. </param>
/// <param name="entity">The entity being copied. </param>
/// <param name="copyCache">A cache of already copied instance. </param>
/// <summary> Handles the calls needed to perform pre-save cascades for the given entity. </summary>
/// <param name="source">The session from which the save event originated.</param>
/// <summary> Handles to calls needed to perform post-save cascades. </summary>
/// <param name="source">The session from which the event originated. </param>
/// <param name="persister">The entity's persister instance. </param>
/// <param name="entity">The entity to be saved. </param>
/// <param name="entity">The entity being saved. </param>
/// <param name="anything">Generally cascade-specific data </param>
protected virtual void [[#variable6e3e8220]](IEventSource source, IEntityPersister persister, object entity, [[#variable6e3e81c0]] [[#variable6e3e8160]])
{
   // cascade-save to many-to-one BEFORE the parent is saved
   // cascade-save to collections AFTER the collection owner was saved
   source.PersistenceContext.IncrementCascadeLevel();
   try
   {
      new Cascade(CascadeAction, CascadePoint. [[#variable6e3e80c0]], source).CascadeOn(persister, entity, [[#variable6e3e8160]]);
   }
   finally
   {
      source.PersistenceContext.DecrementCascadeLevel();
   }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6e3e8220]]
CascadeOnMerge 
12[[#6e3e8220]]
CascadeBeforeSave 
13[[#6e3e8220]]
CascadeAfterSave 
21[[#6e3e81c0]]
IDictionary 
22[[#6e3e81c0]]
object 
23[[#6e3e81c0]]
object 
31[[#6e3e8160]]
copyCache 
32[[#6e3e8160]]
anything 
33[[#6e3e8160]]
anything 
41[[#6e3e80c0]]
BeforeMerge 
42[[#6e3e80c0]]
BeforeInsertAfterDelete 
43[[#6e3e80c0]]
AfterInsertBeforeDelete