public class BasicCollectionLoader extends CollectionLoader { private static final Logger log = LoggerFactory.getLogger(BasicCollectionLoader.class); public BasicCollectionLoader( QueryableCollection collectionPersister, SessionFactoryImplementor session, Map enabledFilters) throws MappingException { this(collectionPersister, 1, session, enabledFilters); } public BasicCollectionLoader( QueryableCollection collectionPersister, int batchSize, SessionFactoryImplementor factory, Map enabledFilters) throws MappingException { this(collectionPersister, batchSize, null, factory, enabledFilters); } protected BasicCollectionLoader( QueryableCollection collectionPersister, int batchSize, String subquery, SessionFactoryImplementor factory, Map enabledFilters) throws MappingException { super(collectionPersister, factory, enabledFilters); JoinWalker walker = new BasicCollectionJoinWalker( collectionPersister, batchSize, subquery, factory, enabledFilters ); initFromWalker( walker ); postInstantiate(); log.debug( "Static select for collection " + collectionPersister.getRole() + ": " + getSQLString() );
public class OneToManyLoader extends CollectionLoader { private static final Logger log = LoggerFactory.getLogger(OneToManyLoader.class); public OneToManyLoader( QueryableCollection oneToManyPersister, SessionFactoryImplementor session, Map enabledFilters) throws MappingException { this(oneToManyPersister, 1, session, enabledFilters); } public OneToManyLoader( QueryableCollection oneToManyPersister, int batchSize, SessionFactoryImplementor factory, Map enabledFilters) throws MappingException { this(oneToManyPersister, batchSize, null, factory, enabledFilters); } public OneToManyLoader( QueryableCollection oneToManyPersister, int batchSize, String subquery, SessionFactoryImplementor factory, Map enabledFilters) throws MappingException { super(oneToManyPersister, factory, enabledFilters); JoinWalker walker = new OneToManyJoinWalker( oneToManyPersister, batchSize, subquery, factory, enabledFilters ); initFromWalker( walker ); postInstantiate(); log.debug( "Static select for one-to-many " + oneToManyPersister.getRole() + ": " + getSQLString() );
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/loader/collection/BasicCollectionLoader.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/loader/collection/OneToManyLoader.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class BasicCollectionLoader extends CollectionLoader {
1
public class OneToManyLoader extends CollectionLoader {
2
	private static final Logger log = LoggerFactory.getLogger(BasicCollectionLoader.class);
2
	private static final Logger log = LoggerFactory.getLogger(OneToManyLoader.class);
3
	public BasicCollectionLoader(
3
	public OneToManyLoader(
4
			QueryableCollection collectionPersister, 
4
			QueryableCollection oneToManyPersister, 
5
			SessionFactoryImplementor session, 
5
			SessionFactoryImplementor session, 
6
			Map enabledFilters)
6
			Map enabledFilters)
7
	throws MappingException {
7
	throws MappingException {
8
		this(collectionPersister, 1, session, enabledFilters);
8
		this(oneToManyPersister, 1, session, enabledFilters);
9
	}
9
	}
10
	public BasicCollectionLoader(
10
	public OneToManyLoader(
11
			QueryableCollection collectionPersister, 
11
			QueryableCollection oneToManyPersister, 
12
			int batchSize, 
12
			int batchSize, 
13
			SessionFactoryImplementor factory, 
13
			SessionFactoryImplementor factory, 
14
			Map enabledFilters)
14
			Map enabledFilters)
15
	throws MappingException {
15
	throws MappingException {
16
		this(collectionPersister, batchSize, null, factory, enabledFilters);
16
		this(oneToManyPersister, batchSize, null, factory, enabledFilters);
17
	}
17
	}
18
	
19
	protected BasicCollectionLoader(
18
	public OneToManyLoader(
20
			QueryableCollection collectionPersister, 
19
			QueryableCollection oneToManyPersister, 
21
			int batchSize, 
20
			int batchSize, 
22
			String subquery, 
21
			String subquery, 
23
			SessionFactoryImplementor factory, 
22
			SessionFactoryImplementor factory, 
24
			Map enabledFilters)
23
			Map enabledFilters)
25
	throws MappingException {
24
	throws MappingException {
26
		
27
		super(collectionPersister, factory, enabledFilters);
25
		super(oneToManyPersister, factory, enabledFilters);
28
		
26
		
29
		JoinWalker walker = new BasicCollectionJoinWalker(
27
		JoinWalker walker = new OneToManyJoinWalker(
30
				collectionPersister, 
28
				oneToManyPersister, 
31
				batchSize, 
29
				batchSize, 
32
				subquery, 
30
				subquery, 
33
				factory, 
31
				factory, 
34
				enabledFilters
32
				enabledFilters
35
			);
33
			);
36
		initFromWalker( walker );
34
		initFromWalker( walker );
37
		postInstantiate();
35
		postInstantiate();
38
		log.debug( "Static select for collection " + collectionPersister.getRole() + ": " + getSQLString() );
36
		log.debug( "Static select for one-to-many " + oneToManyPersister.getRole() + ": " + getSQLString() );
39
	
37
	
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0