Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
25 | 2 | 2 | 0.995 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 25 | 11 | src/NHibernate.Test/NHSpecificTest/NH1920/Fixture.cs |
2 | 25 | 39 | src/NHibernate.Test/NHSpecificTest/NH1920/Fixture.cs |
| ||||
[Test] public void Can_Query_Without_Collection_Size_Condition() { using (ISession sess = OpenSession()) using (ITransaction tx = sess.BeginTransaction()) { sess.SaveOrUpdate(new Customer() { IsDeleted = false } ); tx.Commit(); } using (ISession sess = OpenSession()) using (ITransaction tx = sess.BeginTransaction()) { sess.EnableFilter("state").SetParameter("deleted", false); var result = sess. CreateQuery("from Customer c join c.Orders o where c.id > :cid"). SetParameter("cid", 0). List(); Assert.That(result.Count == 0); tx.Commit(); } using (ISession sess = OpenSession()) using (ITransaction tx = sess.BeginTransaction()) { sess.Delete("from System.Object"); tx.Commit(); } } |
| ||||
[Test] public void Can_Query_With_Collection_Size_Condition() { using (ISession sess = OpenSession()) using (ITransaction tx = sess.BeginTransaction()) { sess.SaveOrUpdate(new Customer() { IsDeleted = false } ); tx.Commit(); } using (ISession sess = OpenSession()) using (ITransaction tx = sess.BeginTransaction()) { sess.EnableFilter("state").SetParameter("deleted", false); var result = sess. CreateQuery("from Customer c join c.Orders o where c.id > :cid and c.Orders.size > 0"). SetParameter("cid", 0). List(); Assert.That(result.Count == 0); tx.Commit(); } using (ISession sess = OpenSession()) using (ITransaction tx = sess.BeginTransaction()) { sess.Delete("from System.Object"); tx.Commit(); } } |
| |||
[Test] public void [[#variable6ff8f6c0]]() { using (ISession sess = OpenSession()) using (ITransaction tx = sess.BeginTransaction()) { sess.SaveOrUpdate(new Customer() { IsDeleted = false } ); tx.Commit(); } using (ISession sess = OpenSession()) using (ITransaction tx = sess.BeginTransaction()) { sess.EnableFilter("state").SetParameter("deleted", false); var result = sess.CreateQuery( [[#variable6ff8f660]]).SetParameter("cid", 0).List(); Assert.That(result.Count == 0); tx.Commit(); } using (ISession sess = OpenSession()) using (ITransaction tx = sess.BeginTransaction()) { sess.Delete("from System.Object"); tx.Commit(); } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6ff8f6c0]] | Can_Query_Without_Collection_Size_Condition |
1 | 2 | [[#6ff8f6c0]] | Can_Query_With_Collection_Size_Condition |
2 | 1 | [[#6ff8f660]] | "from Customer c join c.Orders o where c.id > :cid" |
2 | 2 | [[#6ff8f660]] | "from Customer c join c.Orders o where c.id > :cid and c.Orders.size > 0" |