Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
18 | 2 | 3 | 0.990 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 18 | 48 | src/NHibernate/Loader/Collection/BatchingCollectionInitializer.cs |
2 | 18 | 69 | 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); } } |
| ||||
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); } } |
| |||
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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6e710220]] | CreateBatchingCollectionInitializer |
1 | 2 | [[#6e710220]] | CreateBatchingOneToManyInitializer |
2 | 1 | [[#6e7101e0]] | IQueryableCollection |
2 | 2 | [[#6e7101e0]] | OneToManyPersister |
3 | 1 | [[#6e710180]] | BasicCollectionLoader |
3 | 2 | [[#6e710180]] | OneToManyLoader |