CloneSet270


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
27201.000class_member_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
127470
src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs
227206
src/NHibernate.Test/QueryTest/MultipleQueriesFixture.cs
Clone Instance
1
Line Count
27
Source Line
470
Source File
src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs

                private void CreateItems()
                {
                        using (ISession s = OpenSession())
                        using (ITransaction t = s.BeginTransaction())
                        {
                                for (int i = 0; i < 150; i++)
                                {
                                        Item item = new Item();
                                        item.Id = i;
                                        s.Save(item);
                                }
                                t.Commit();
                        }
                }

                private Hashtable GetHashTableUsedAsQueryCache()
                {
                        ISessionFactoryImplementor factory = (ISessionFactoryImplementor)sessions;
                        //need the inner hashtable in the cache
                        HashtableCache cache = (HashtableCache)
                                                                   typeof(StandardQueryCache).
                                                                         GetField("queryCache", BindingFlags.Instance | BindingFlags.NonPublic).
                                                                         GetValue(factory.GetQueryCache(null));

                        return (Hashtable) typeof(HashtableCache).
                                                                  GetField("hashtable", BindingFlags.Instance | BindingFlags.NonPublic).
                                                                  GetValue(cache);
                }



Clone Instance
2
Line Count
27
Source Line
206
Source File
src/NHibernate.Test/QueryTest/MultipleQueriesFixture.cs

                private void CreateItems()
                {
                        using (ISession s = OpenSession())
                        using (ITransaction t = s.BeginTransaction())
                        {
                                for (int i = 0; i < 150; i++)
                                {
                                        Item item = new Item();
                                        item.Id = i;
                                        s.Save(item);
                                }
                                t.Commit();
                        }
                }

                private Hashtable GetHashTableUsedAsQueryCache()
                {
                        ISessionFactoryImplementor factory = (ISessionFactoryImplementor)sessions;
                        //need the inner hashtable in the cache
                        HashtableCache cache = (HashtableCache)
                                                                   typeof(StandardQueryCache).
                                                                            GetField("queryCache", BindingFlags.Instance | BindingFlags.NonPublic).
                                                                            GetValue(factory.GetQueryCache(null));

                        return (Hashtable) typeof(HashtableCache).
                                                                     GetField("hashtable", BindingFlags.Instance | BindingFlags.NonPublic).
                                                                     GetValue(cache);
                }



Clone AbstractionParameter Count: 0Parameter Bindings

private void CreateItems()
{
   using (ISession s = OpenSession())
      using (ITransaction t = s.BeginTransaction())
      {
         for (int i = 0; i < 150; i++)
         {
            Item item = new Item();
            item.Id = i;
            s.Save(item);
         }
         t.Commit();
      }
}

private Hashtable GetHashTableUsedAsQueryCache()
{
   ISessionFactoryImplementor factory = (ISessionFactoryImplementor)sessions;
   //need the inner hashtable in the cache
   HashtableCache cache = (HashtableCache) typeof(StandardQueryCache).GetField("queryCache", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(factory.GetQueryCache(null));
   return (Hashtable) typeof(HashtableCache).GetField("hashtable", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(cache);
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None