if ( table.isPhysicalTable() ) {
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: 5
|
|
Number of AST nodes: 5
|
|
1 | if ( table.isPhysicalTable() ) {↵ | | 1 | joinFragment.addCrossJoin( rootJoinable.getTable↵
|
2 | script.add(↵ | | |
|
3 | table.sqlCreateString(↵ | | |
|
4 | dialect,↵ | | |
|
5 | mapping,↵ | | |
|
6 | defaultCatalog,↵ | | |
|
7 | defaultSchema↵ | | |
|
8 | )↵ | | |
|
9 | );↵ | | |
|
10 | Iterator comments = table.sqlCommentStrings( dialect, defaultCatalog, defaultSchema );↵ | | |
|
11 | while ( comments.hasNext() ) {↵ | | |
|
12 | script.add( comments.next() );↵ | | |
|
13 | }↵ | | 2 | Name(), rootAlias );↵
|
| | | 3 | String filterCondition = rootJoinable.filterFragment( rootAlias, enabledFilters );↵
|
| | | 4 | // JoinProcessor needs to know if the where clause fragment came from a dynamic filter or not so it↵
|
| | | 5 | // can put the where clause fragment in the right place in the SQL AST. 'hasFilterCondition' keeps track↵
|
| | | 6 | // of that fact.↵
|
| | | 7 | joinFragment.setHasFilterCondition( joinFragment.addCondition( filterCondition ) );↵
|
| | | 8 | if (includeExtraJoins) { //TODO: not quite sure about the full implications of this!↵
|
| | | 9 | addExtraJoins( joinFragment, rootAlias, rootJoinable, true );↵
|
14 | } | | 10 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |