CloneSet224


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
23240.978statement_list[19]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12328
src/NHibernate.Test/Unconstrained/UnconstrainedNoLazyTest.cs
223106
src/NHibernate.Test/Unconstrained/UnconstrainedNoLazyTest.cs
Clone Instance
1
Line Count
23
Source Line
28
Source File
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));


Clone Instance
2
Line Count
23
Source Line
106
Source File
src/NHibernate.Test/Unconstrained/UnconstrainedNoLazyTest.cs

                        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));


Clone AbstractionParameter Count: 4Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6fd65120]]
sessions 
12[[#6fd65120]]
log 
21[[#6fd64fc0]]
Evict 
22[[#6fd64fc0]]
Info 
31[[#28d76780]]
typeof(Person) 
32[[#28d76780]]
"Loading Person#gavin and associating it with a new Employee#123456" 
41[[#6fd64b40]]
typeof(Person) 
42[[#6fd64b40]]
"Reloading Person#gavin and checking that its Employee is not null"