| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 11 | 4 | 4 | 0.968 | block |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 13 | 51 | src/NHibernate/Event/Default/AbstractSaveEventListener.cs |
| 2 | 11 | 229 | src/NHibernate/Event/Default/DefaultDeleteEventListener.cs |
| 3 | 11 | 274 | src/NHibernate/Event/Default/DefaultMergeEventListener.cs |
| 4 | 11 | 269 | src/NHibernate/Event/Default/DefaultSaveOrUpdateEventListener.cs |
| ||||
{
// Sub-insertions should occur before containing insertion so
// Try to do the callback now
if (persister.ImplementsLifecycle(source.EntityMode))
{
log.Debug("calling OnSave()");
if (((ILifecycle)entity).OnSave(source) == LifecycleVeto.Veto)
{
log.Debug("insertion vetoed by OnSave()");
return true;
}
}
return false;
}
|
| ||||
{
if (persister.ImplementsLifecycle(session.EntityMode))
{
log.Debug("calling onDelete()");
if (((ILifecycle)entity).OnDelete(session) == LifecycleVeto.Veto)
{
log.Debug("deletion vetoed by onDelete()");
return true;
}
}
return false;
}
|
| ||||
{
if (persister.ImplementsLifecycle(source.EntityMode))
{
log.Debug("calling onUpdate()");
if (((ILifecycle)entity).OnUpdate(source) == LifecycleVeto.Veto)
{
log.Debug("update vetoed by onUpdate()");
return true;
}
}
return false;
}
|
| ||||
{
if (persister.ImplementsLifecycle(source.EntityMode))
{
log.Debug("calling onUpdate()");
if (((ILifecycle)entity).OnUpdate(source) == LifecycleVeto.Veto)
{
log.Debug("update vetoed by onUpdate()");
return true;
}
}
return false;
}
|
| |||
{
// Sub-insertions should occur before containing insertion so
// Try to do the callback now
if (persister.ImplementsLifecycle( [[#variable6bded140]].EntityMode))
{
log.Debug( [[#variable6bded100]]);
if (((ILifecycle)entity). [[#variable5f4c2740]]( [[#variable6bded140]]) == LifecycleVeto.Veto)
{
log.Debug( [[#variable5f4c25a0]]);
return true;
}
}
return false;
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#6bded140]] | source |
| 1 | 2 | [[#6bded140]] | session |
| 1 | 3 | [[#6bded140]] | source |
| 1 | 4 | [[#6bded140]] | source |
| 2 | 1 | [[#6bded100]] | "calling onUpdate()" |
| 2 | 2 | [[#6bded100]] | "calling onDelete()" |
| 2 | 3 | [[#6bded100]] | "calling OnSave()" |
| 2 | 4 | [[#6bded100]] | "calling onUpdate()" |
| 3 | 1 | [[#5f4c2740]] | OnUpdate |
| 3 | 2 | [[#5f4c2740]] | OnDelete |
| 3 | 3 | [[#5f4c2740]] | OnSave |
| 3 | 4 | [[#5f4c2740]] | OnUpdate |
| 4 | 1 | [[#5f4c25a0]] | "update vetoed by onUpdate()" |
| 4 | 2 | [[#5f4c25a0]] | "deletion vetoed by onDelete()" |
| 4 | 3 | [[#5f4c25a0]] | "insertion vetoed by OnSave()" |
| 4 | 4 | [[#5f4c25a0]] | "update vetoed by onUpdate()" |