| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 40 | 2 | 6 | 0.964 | class_member_declarations[3] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 40 | 16 | src/NHibernate.Test/NHSpecificTest/NH372/Fixture.cs |
| 2 | 40 | 116 | src/NHibernate.Test/NHSpecificTest/NH372/Fixture.cs |
| ||||
private void ComponentFieldNotInserted_Generic(System.Type type)
{
int id;
using (ISession session = OpenSession())
using (ITransaction tx = session.BeginTransaction())
{
BaseParent p = (BaseParent) Activator.CreateInstance(type);
p.Component.FieldNotInserted = 10;
session.Save(p);
tx.Commit();
id = p.Id;
}
using (ISession session = OpenSession())
using (ITransaction tx = session.BeginTransaction())
{
BaseParent p = (BaseParent) session.Get(type, id);
Assert.AreEqual(0, p.Component.FieldNotInserted,
"Field should not have been inserted.");
tx.Commit();
}
}
[Test]
public void ComponentFieldNotInserted()
{
isDynamic = false;
ComponentFieldNotInserted_Generic( typeof(Parent));
}
[Test]
public void ComponentFieldNotInserted_Dynamic()
{
isDynamic = true;
ComponentFieldNotInserted_Generic( typeof(DynamicParent));
}
|
| ||||
private void SubComponentFieldNotInserted_Generic(System.Type type)
{
int id;
using (ISession session = OpenSession())
using (ITransaction tx = session.BeginTransaction())
{
BaseParent p = (BaseParent) Activator.CreateInstance(type);
p.Component.SubComponent.FieldNotInserted = 10;
session.Save(p);
tx.Commit();
id = p.Id;
}
using (ISession session = OpenSession())
using (ITransaction tx = session.BeginTransaction())
{
BaseParent p = (BaseParent) session.Get(type, id);
Assert.AreEqual(0, p.Component.SubComponent.FieldNotInserted,
"Field should not have been inserted.");
tx.Commit();
}
}
[Test]
public void SubComponentFieldNotInserted()
{
isDynamic = false;
SubComponentFieldNotInserted_Generic( typeof(Parent));
}
[Test]
public void SubComponentFieldNotInserted_Dynamic()
{
isDynamic = false;
SubComponentFieldNotInserted_Generic( typeof(DynamicParent));
}
|
| |||
private void [[#variable6c7899a0]](System.Type type)
{
int id;
using (ISession session = OpenSession())
using (ITransaction tx = session.BeginTransaction())
{
BaseParent p = (BaseParent)Activator.CreateInstance(type);
[[#variable6c789a00]]. [[#variable6c789a20]].FieldNotInserted = 10;
session.Save(p);
tx.Commit();
id = p.Id;
}
using (ISession session = OpenSession())
using (ITransaction tx = session.BeginTransaction())
{
BaseParent p = (BaseParent)session.Get(type, id);
Assert.AreEqual(0, [[#variable6c789a00]]. [[#variable6c789a20]].FieldNotInserted, "Field should not have been inserted.");
tx.Commit();
}
}
[Test]
public void [[#variable54ba1420]]()
{
isDynamic = false;
[[#variable6c7899a0]]( typeof(Parent));
}
[Test]
public void [[#variable6c789900]]()
{
isDynamic = [[#variable6c7898c0]];
[[#variable6c7899a0]]( typeof(DynamicParent));
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#6c7899a0]] | ComponentFieldNotInserted_Generic |
| 1 | 2 | [[#6c7899a0]] | SubComponentFieldNotInserted_Generic |
| 2 | 1 | [[#6c789a00]] | p |
| 2 | 2 | [[#6c789a00]] | p.Component |
| 3 | 1 | [[#6c789a20]] | Component |
| 3 | 2 | [[#6c789a20]] | SubComponent |
| 4 | 1 | [[#54ba1420]] | ComponentFieldNotInserted |
| 4 | 2 | [[#54ba1420]] | SubComponentFieldNotInserted |
| 5 | 1 | [[#6c789900]] | ComponentFieldNotInserted_Dynamic |
| 5 | 2 | [[#6c789900]] | SubComponentFieldNotInserted_Dynamic |
| 6 | 1 | [[#6c7898c0]] | true |
| 6 | 2 | [[#6c7898c0]] | false |