| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 23 | 2 | 4 | 0.978 | statement_list[19] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 23 | 28 | src/NHibernate.Test/Unconstrained/UnconstrainedNoLazyTest.cs |
| 2 | 23 | 106 | src/NHibernate.Test/Unconstrained/UnconstrainedNoLazyTest.cs |
| ||||
Person p = new Person("gavin");
p.EmployeeId = "123456";
session.Save(p);
tx.Commit();
session.Close();
sessions.Evict( typeof(Person));
session = OpenSession();
tx = session.BeginTransaction();
p = (Person) session.Get( typeof(Person), "gavin");
Assert.IsNull(p.Employee);
p.Employee = new Employee("123456");
tx.Commit();
session.Close();
sessions.Evict( typeof(Person));
session = OpenSession();
tx = session.BeginTransaction();
p = (Person) session.Get( typeof(Person), "gavin");
Assert.IsNotNull(p.Employee);
Assert.IsTrue(NHibernateUtil.IsInitialized(p.Employee));
|
| ||||
Person p = new Person("gavin");
p.EmployeeId = "123456";
session.Save(p);
tx.Commit();
session.Close();
log.Info("Loading Person#gavin and associating it with a new Employee#123456");
session = OpenSession();
tx = session.BeginTransaction();
p = (Person) session.Get( typeof(Person), "gavin");
Assert.IsNull(p.Employee);
p.Employee = new Employee("123456");
tx.Commit();
session.Close();
log.Info("Reloading Person#gavin and checking that its Employee is not null");
session = OpenSession();
tx = session.BeginTransaction();
p = (Person) session.Get( typeof(Person), "gavin");
Assert.IsNotNull(p.Employee);
Assert.IsTrue(NHibernateUtil.IsInitialized(p.Employee));
|
| |||
Person p = new Person("gavin");
p.EmployeeId = "123456";
session.Save(p);
tx.Commit();
session.Close();
[[#variable6fd65120]]. [[#variable6fd64fc0]]( [[#variable28d76780]]);
session = OpenSession();
tx = session.BeginTransaction();
p = (Person)session.Get( typeof(Person), "gavin");
Assert.IsNull(p.Employee);
p.Employee = new Employee("123456");
tx.Commit();
session.Close();
[[#variable6fd65120]]. [[#variable6fd64fc0]]( [[#variable6fd64b40]]);
session = OpenSession();
tx = session.BeginTransaction();
p = (Person)session.Get( typeof(Person), "gavin");
Assert.IsNotNull(p.Employee);
Assert.IsTrue(NHibernateUtil.IsInitialized(p.Employee));
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#6fd65120]] | sessions |
| 1 | 2 | [[#6fd65120]] | log |
| 2 | 1 | [[#6fd64fc0]] | Evict |
| 2 | 2 | [[#6fd64fc0]] | Info |
| 3 | 1 | [[#28d76780]] | typeof(Person) |
| 3 | 2 | [[#28d76780]] | "Loading Person#gavin and associating it with a new Employee#123456" |
| 4 | 1 | [[#6fd64b40]] | typeof(Person) |
| 4 | 2 | [[#6fd64b40]] | "Reloading Person#gavin and checking that its Employee is not null" |