Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
30 | 3 | 1 | 0.998 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 30 | 67 | src/NHibernate.Test/GenericTest/BagGeneric/BagGenericFixture.cs |
2 | 30 | 70 | src/NHibernate.Test/GenericTest/ListGeneric/ListGenericFixture.cs |
3 | 30 | 70 | src/NHibernate.Test/GenericTest/SetGeneric/SetGenericFixture.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(); } } |
| ||||
[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(); } } |
| ||||
[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(); } } |
| |||
[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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6e63d9e0]] | List |
1 | 2 | [[#6e63d9e0]] | HashedSet |
1 | 3 | [[#6e63d9e0]] | List |