CloneSet269


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
25220.995class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12511
src/NHibernate.Test/NHSpecificTest/NH1920/Fixture.cs
22539
src/NHibernate.Test/NHSpecificTest/NH1920/Fixture.cs
Clone Instance
1
Line Count
25
Source Line
11
Source File
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();
                        }
                }



Clone Instance
2
Line Count
25
Source Line
39
Source File
src/NHibernate.Test/NHSpecificTest/NH1920/Fixture.cs

                [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();
                        }
                }



Clone AbstractionParameter Count: 2Parameter Bindings

[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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6ff8f6c0]]
Can_Query_Without_Collection_Size_Condition 
12[[#6ff8f6c0]]
Can_Query_With_Collection_Size_Condition 
21[[#6ff8f660]]
"from Customer c join c.Orders o where c.id > :cid" 
22[[#6ff8f660]]
"from Customer c join c.Orders o where c.id > :cid and c.Orders.size > 0"