CloneSet98


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
30310.998class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
13067
src/NHibernate.Test/GenericTest/BagGeneric/BagGenericFixture.cs
23070
src/NHibernate.Test/GenericTest/ListGeneric/ListGenericFixture.cs
33070
src/NHibernate.Test/GenericTest/SetGeneric/SetGenericFixture.cs
Clone Instance
1
Line Count
30
Source Line
67
Source File
src/NHibernate.Test/GenericTest/BagGeneric/BagGenericFixture.cs

                [Test]
                public void Copy()
                {
                        A a = new A();
                        a.Name = "original A";
                        a.Items = new List<B> ();

                        B b1 = new B();
                        b1.Name = "b1";
                        a.Items.Add( b1);

                        B b2 = new B();
                        b2.Name = "b2";
                        a.Items.Add( b2);

                        A copiedA;
                        using (ISession s = OpenSession())
                        using (ITransaction t = s.BeginTransaction())
                        {
                                copiedA = (A) s.SaveOrUpdateCopy( a);
                                t.Commit();
                        }

                        using (ISession s = OpenSession())
                        using (ITransaction t = s.BeginTransaction())
                        {
                                A loadedA = s.Get < A > (copiedA.Id);
                                Assert.IsNotNull( loadedA);
                                s.Delete( loadedA);
                                t.Commit();
                        }
                }



Clone Instance
2
Line Count
30
Source Line
70
Source File
src/NHibernate.Test/GenericTest/ListGeneric/ListGenericFixture.cs

                [Test]
                public void Copy()
                {
                        A a = new A();
                        a.Name = "original A";
                        a.Items = new List<B> ();

                        B b1 = new B();
                        b1.Name = "b1";
                        a.Items.Add( b1);

                        B b2 = new B();
                        b2.Name = "b2";
                        a.Items.Add( b2);

                        A copiedA;
                        using (ISession s = OpenSession())
                        using (ITransaction t = s.BeginTransaction())
                        {
                                copiedA = (A) s.SaveOrUpdateCopy( a);
                                t.Commit();
                        }

                        using (ISession s = OpenSession())
                        using (ITransaction t = s.BeginTransaction())
                        {
                                A loadedA = s.Get < A > ( copiedA.Id);
                                Assert.IsNotNull( loadedA);
                                s.Delete( loadedA);
                                t.Commit();
                        }
                }



Clone Instance
3
Line Count
30
Source Line
70
Source File
src/NHibernate.Test/GenericTest/SetGeneric/SetGenericFixture.cs

                [Test]
                public void Copy()
                {
                        A a = new A();
                        a.Name = "original A";
                        a.Items = new HashedSet<B> ();

                        B b1 = new B();
                        b1.Name = "b1";
                        a.Items.Add( b1);

                        B b2 = new B();
                        b2.Name = "b2";
                        a.Items.Add( b2);

                        A copiedA;
                        using (ISession s = OpenSession())
                        using (ITransaction t = s.BeginTransaction())
                        {
                                copiedA = (A) s.SaveOrUpdateCopy( a);
                                t.Commit();
                        }

                        using (ISession s = OpenSession())
                        using (ITransaction t = s.BeginTransaction())
                        {
                                A loadedA = s.Get < A > ( copiedA.Id);
                                Assert.IsNotNull( loadedA);
                                s.Delete( loadedA);
                                t.Commit();
                        }
                }



Clone AbstractionParameter Count: 1Parameter Bindings

[Test]
public void Copy()
{
   A a = new A();
   a.Name = "original A";
   a.Items = new [[#variable6e63d9e0]]<B> ();
   B b1 = new B();
   b1.Name = "b1";
   a.Items.Add(b1);
   B b2 = new B();
   b2.Name = "b2";
   a.Items.Add(b2);
   A copiedA;
   using (ISession s = OpenSession())
      using (ITransaction t = s.BeginTransaction())
      {
         copiedA = (A)s.SaveOrUpdateCopy(a);
         t.Commit();
      }
   using (ISession s = OpenSession())
      using (ITransaction t = s.BeginTransaction())
      {
         A loadedA = s.Get < A > (copiedA.Id);
         Assert.IsNotNull(loadedA);
         s.Delete(loadedA);
         t.Commit();
      }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6e63d9e0]]
List 
12[[#6e63d9e0]]
HashedSet 
13[[#6e63d9e0]]
List