Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
22 | 3 | 1 | 0.997 | statement_list[16] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 22 | 36 | src/NHibernate.Test/GenericTest/BagGeneric/BagGenericFixture.cs |
2 | 22 | 37 | src/NHibernate.Test/GenericTest/ListGeneric/ListGenericFixture.cs |
3 | 22 | 38 | src/NHibernate.Test/GenericTest/SetGeneric/SetGenericFixture.cs |
| ||||
a.Items = new List<B> (); B firstB = new B(); firstB.Name = "first b"; B secondB = new B(); secondB.Name = "second b"; a.Items.Add( firstB); a.Items.Add( secondB); ISession s = OpenSession(); s.SaveOrUpdate(a); // this flush should test how NH wraps a generic collection with its // own persistent collection s.Flush(); s.Close(); Assert.IsNotNull(a.Id); // should have cascaded down to B Assert.IsNotNull(firstB.Id); Assert.IsNotNull(secondB.Id); s = OpenSession(); a = s.Load < A > (a.Id); |
| ||||
a.Items = new List<B> (); B firstB = new B(); firstB.Name = "first b"; B secondB = new B(); secondB.Name = "second b"; a.Items.Add(firstB); a.Items.Add(secondB); ISession s = OpenSession(); s.SaveOrUpdate(a); // this flush should test how NH wraps a generic collection with its // own persistent collection s.Flush(); s.Close(); Assert.IsNotNull(a.Id); // should have cascaded down to B Assert.IsNotNull(firstB.Id); Assert.IsNotNull(secondB.Id); s = OpenSession(); a = s.Load < A > (a.Id); |
| ||||
a.Items = new HashedSet<B> (); B firstB = new B(); firstB.Name = "first b"; B secondB = new B(); secondB.Name = "second b"; a.Items.Add(firstB); a.Items.Add(secondB); ISession s = OpenSession(); s.SaveOrUpdate(a); // this flush should test how NH wraps a generic collection with its // own persistent collection s.Flush(); s.Close(); Assert.IsNotNull(a.Id); // should have cascaded down to B Assert.IsNotNull(firstB.Id); Assert.IsNotNull(secondB.Id); s = OpenSession(); a = s.Load < A > (a.Id); |
| |||
a.Items = new [[#variable26ea9440]]<B> (); B firstB = new B(); firstB.Name = "first b"; B secondB = new B(); secondB.Name = "second b"; a.Items.Add(firstB); a.Items.Add(secondB); ISession s = OpenSession(); s.SaveOrUpdate(a); // this flush should test how NH wraps a generic collection with its // own persistent collection s.Flush(); s.Close(); Assert.IsNotNull(a.Id); // should have cascaded down to B Assert.IsNotNull(firstB.Id); Assert.IsNotNull(secondB.Id); s = OpenSession(); a = s.Load < A > (a.Id); |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#26ea9440]] | HashedSet |
1 | 2 | [[#26ea9440]] | List |
1 | 3 | [[#26ea9440]] | List |