CloneSet336


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
21201.000statement_list[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12133
src/NHibernate.Test/NHSpecificTest/CollectionFixture.cs
22164
src/NHibernate.Test/NHSpecificTest/LazyLoadBugTest.cs
Clone Instance
1
Line Count
21
Source Line
33
Source File
src/NHibernate.Test/NHSpecificTest/CollectionFixture.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);
                        }


Clone Instance
2
Line Count
21
Source Line
64
Source File
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);
                        }


Clone AbstractionParameter Count: 0Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None