CloneSet391


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
24230.987class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
124206
src/NHibernate.Test/SecondLevelCacheTest/SecondLevelCacheTest.cs
224233
src/NHibernate.Test/SecondLevelCacheTest/SecondLevelCacheTest.cs
Clone Instance
1
Line Count
24
Source Line
206
Source File
src/NHibernate.Test/SecondLevelCacheTest/SecondLevelCacheTest.cs

                [Test]
                public void SecondLevelCacheWithHqlQueriesForItemWithCollections()
                {
                        using (ISession session = OpenSession())
                        {
                                IList list = session.CreateQuery("from Item i where i.Id > 2").
                                         SetCacheable(true).
                                         List();
                                Assert.AreEqual(3, list.Count);

                                using (IDbCommand cmd = session.Connection.CreateCommand())
                                {
                                        cmd.CommandText = "DELETE FROM Item";
                                        cmd.ExecuteNonQuery();
                                }
                        }

                        using (ISession session = OpenSession())
                        {
                                //should bring from cache
                                IList list = session.CreateQuery("from Item i where i.Id > 2").
                                         SetCacheable(true).
                                         List();
                                Assert.AreEqual(3, list.Count);
                        }
                }



Clone Instance
2
Line Count
24
Source Line
233
Source File
src/NHibernate.Test/SecondLevelCacheTest/SecondLevelCacheTest.cs

                [Test]
                public void SecondLevelCacheWithHqlQueries()
                {
                        using (ISession session = OpenSession())
                        {
                                IList list = session.CreateQuery("from AnotherItem i where i.Id > 2").
                                         SetCacheable(true).
                                         List();
                                Assert.AreEqual(3, list.Count);

                                using (IDbCommand cmd = session.Connection.CreateCommand())
                                {
                                        cmd.CommandText = "DELETE FROM AnotherItem";
                                        cmd.ExecuteNonQuery();
                                }
                        }

                        using (ISession session = OpenSession())
                        {
                                //should bring from cache
                                IList list = session.CreateQuery("from AnotherItem i where i.Id > 2").
                                         SetCacheable(true).
                                         List();
                                Assert.AreEqual(3, list.Count);
                        }
                }



Clone AbstractionParameter Count: 3Parameter Bindings

[Test]
public void [[#variable4b22fd60]]()
{
   using (ISession session = OpenSession())
   {
      IList list = session.CreateQuery( [[#variable4b22fca0]]).SetCacheable(true).List();
      Assert.AreEqual(3, list.Count);
      using (IDbCommand cmd = session.Connection.CreateCommand())
      {
         cmd.CommandText = [[#variable4b22fc00]];
         cmd.ExecuteNonQuery();
      }
   }
   using (ISession session = OpenSession())
   {
      //should bring from cache
      IList list = session.CreateQuery( [[#variable4b22fca0]]).SetCacheable(true).List();
      Assert.AreEqual(3, list.Count);
   }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#4b22fd60]]
SecondLevelCacheWithHqlQueriesForItemWithCollections 
12[[#4b22fd60]]
SecondLevelCacheWithHqlQueries 
21[[#4b22fca0]]
"from Item i where i.Id > 2" 
22[[#4b22fca0]]
"from AnotherItem i where i.Id > 2" 
31[[#4b22fc00]]
"DELETE FROM Item" 
32[[#4b22fc00]]
"DELETE FROM AnotherItem"