CloneSet257


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
18230.990class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11848
src/NHibernate/Loader/Collection/BatchingCollectionInitializer.cs
21869
src/NHibernate/Loader/Collection/BatchingCollectionInitializer.cs
Clone Instance
1
Line Count
18
Source Line
48
Source File
src/NHibernate/Loader/Collection/BatchingCollectionInitializer.cs

                public static ICollectionInitializer CreateBatchingOneToManyInitializer(OneToManyPersister persister, int maxBatchSize,
                                                                                        ISessionFactoryImplementor factory,
                                                                                        IDictionary<string, IFilter> enabledFilters)
                {
                        if (maxBatchSize > 1)
                        {
                                int[] batchSizesToCreate = ArrayHelper.GetBatchSizes(maxBatchSize);
                                Loader[] loadersToCreate = new Loader[batchSizesToCreate.Length];
                                for (int i = 0; i < batchSizesToCreate.Length; i++)
                                {
                                        loadersToCreate[i] = new OneToManyLoader(persister, batchSizesToCreate[i], factory, enabledFilters);
                                }

                                return new BatchingCollectionInitializer(persister, batchSizesToCreate, loadersToCreate);
                        }
                        else
                        {
                                return new OneToManyLoader(persister, factory, enabledFilters);
                        }
                }



Clone Instance
2
Line Count
18
Source Line
69
Source File
src/NHibernate/Loader/Collection/BatchingCollectionInitializer.cs

                public static ICollectionInitializer CreateBatchingCollectionInitializer(IQueryableCollection persister,
                                                                                         int maxBatchSize,
                                                                                         ISessionFactoryImplementor factory,
                                                                                         IDictionary<string, IFilter> enabledFilters)
                {
                        if (maxBatchSize > 1)
                        {
                                int[] batchSizesToCreate = ArrayHelper.GetBatchSizes(maxBatchSize);
                                Loader[] loadersToCreate = new Loader[batchSizesToCreate.Length];
                                for (int i = 0; i < batchSizesToCreate.Length; i++)
                                {
                                        loadersToCreate[i] = new BasicCollectionLoader(persister, batchSizesToCreate[i], factory, enabledFilters);
                                }
                                return new BatchingCollectionInitializer(persister, batchSizesToCreate, loadersToCreate);
                        }
                        else
                        {
                                return new BasicCollectionLoader(persister, factory, enabledFilters);
                        }
                }



Clone AbstractionParameter Count: 3Parameter Bindings

public static ICollectionInitializer [[#variable6e710220]]( [[#variable6e7101e0]]persister, int maxBatchSize, ISessionFactoryImplementor factory, IDictionary<string, IFilter> enabledFilters)
{
   if (maxBatchSize > 1)
   {
      int[] batchSizesToCreate = ArrayHelper.GetBatchSizes(maxBatchSize);
      Loader[] loadersToCreate = new Loader[batchSizesToCreate.Length];
      for (int i = 0; i < batchSizesToCreate.Length; i++)
      {
         loadersToCreate[i] = new [[#variable6e710180]](persister, batchSizesToCreate[i], factory, enabledFilters);
      }
      return new BatchingCollectionInitializer(persister, batchSizesToCreate, loadersToCreate);
   }
   else
   {
      return new [[#variable6e710180]](persister, factory, enabledFilters);
   }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6e710220]]
CreateBatchingCollectionInitializer 
12[[#6e710220]]
CreateBatchingOneToManyInitializer 
21[[#6e7101e0]]
IQueryableCollection 
22[[#6e7101e0]]
OneToManyPersister 
31[[#6e710180]]
BasicCollectionLoader 
32[[#6e710180]]
OneToManyLoader