script.add( table.sqlCreateString( dialect, mapping, defaultCatalog, defaultSchema ) ); Iterator comments = table.sqlCommentStrings( dialect, defaultCatalog, defaultSchema ); while ( comments.hasNext() ) { script.add( comments.next() ); }
joinFragment.addCrossJoin( rootJoinable.getTableName(), rootAlias ); String filterCondition = rootJoinable.filterFragment( rootAlias, enabledFilters ); // JoinProcessor needs to know if the where clause fragment came from a dynamic filter or not so it // can put the where clause fragment in the right place in the SQL AST. 'hasFilterCondition' keeps track // of that fact. joinFragment.setHasFilterCondition( joinFragment.addCondition( filterCondition ) ); if (includeExtraJoins) { //TODO: not quite sure about the full implications of this! addExtraJoins( joinFragment, rootAlias, rootJoinable, true ); }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/Configuration.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/JoinSequence.java
Method name: String[] generateSchemaCreationScript(Dialect) Method name: JoinFragment toJoinFragment(Map, boolean, String, String)
Number of AST nodes: 4 Number of AST nodes: 5
1
script.add(
2
						table.sqlCreateString(
3
								dialect,
4
								mapping,
5
								defaultCatalog,
6
								defaultSchema
7
							)
8
					);
9
				Iterator comments = table.sqlCommentStrings( dialect, defaultCatalog, defaultSchema );
10
				while ( comments.hasNext(
1
joinFragment.addCrossJoin( rootJoinable.getTableName(), rootAlias );
2
			String filterCondition = rootJoinable.filterFragment( rootAlias, enabledFilters );
3
			// JoinProcessor needs to know if the where clause fragment came from a dynamic filter or not so it
4
			// can put the where clause fragment in the right place in the SQL AST.   'hasFilterCondition' keeps track
5
			// of that fact.
11
) ) {
6
			joinFragment.setHasFilterCondition( joinFragment.addCondition( filterCondition ) );
12
					script.add( comments.next()
7
			if (includeExtraJoins) { //TODO: not quite sure about the full implications of this!
13
 );
8
				addExtraJoins( joinFragment, rootAlias, rootJoinable, true );
14
				}
9
			}
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 locationClones are in different classes
Number of node comparisons1