Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
21 | 2 | 0 | 1.000 | statement_list[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 21 | 33 | src/NHibernate.Test/NHSpecificTest/CollectionFixture.cs |
2 | 21 | 64 | src/NHibernate.Test/NHSpecificTest/LazyLoadBugTest.cs |
| ||||
using (ISession s1 = OpenSession()) using (ITransaction t1 = s1.BeginTransaction()) { // create a new LLParent parent = new LLParent(); LLChildNoAdd child = new LLChildNoAdd(); parent.ChildrenNoAdd.Add(child); child.Parent = parent; s1.Save(parent); parentId = (int) s1.GetIdentifier(parent); t1.Commit(); } // try to Load the object to make sure the save worked using (ISession s2 = OpenSession()) using (ITransaction t2 = s2.BeginTransaction()) { LLParent parent2 = (LLParent) s2.Load( typeof(LLParent), parentId); Assert.AreEqual(1, parent2.ChildrenNoAdd.Count); } |
| ||||
using (ISession s1 = OpenSession()) using (ITransaction t1 = s1.BeginTransaction()) { // create a new LLParent parent = new LLParent(); LLChildNoAdd child = new LLChildNoAdd(); parent.ChildrenNoAdd.Add(child); child.Parent = parent; s1.Save(parent); parentId = (int) s1.GetIdentifier(parent); t1.Commit(); } // try to Load the object to make sure the save worked using (ISession s2 = OpenSession()) using (ITransaction t2 = s2.BeginTransaction()) { LLParent parent2 = (LLParent) s2.Load( typeof(LLParent), parentId); Assert.AreEqual(1, parent2.ChildrenNoAdd.Count); } |
| |||
using (ISession s1 = OpenSession()) using (ITransaction t1 = s1.BeginTransaction()) { // create a new LLParent parent = new LLParent(); LLChildNoAdd child = new LLChildNoAdd(); parent.ChildrenNoAdd.Add(child); child.Parent = parent; s1.Save(parent); parentId = (int)s1.GetIdentifier(parent); t1.Commit(); } // try to Load the object to make sure the save worked using (ISession s2 = OpenSession()) using (ITransaction t2 = s2.BeginTransaction()) { LLParent parent2 = (LLParent)s2.Load( typeof(LLParent), parentId); Assert.AreEqual(1, parent2.ChildrenNoAdd.Count); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
None |