String dialectName = properties.getProperty( Environment.DIALECT );
if ( dialectName == null ) {
return determineDialect( connection );
}
else {
return constructDialect( dialectName );
}
if ( collectionIsInitialized(collection) ) {
// handles arrays and newly instantiated collections
return collectionType.getElementsIterator(collection, session);
}
else {
// does not handle arrays (thats ok, cos they can't be lazy)
// or newly instantiated collections, so we can do the cast
return ( (PersistentCollection) collection ).queuedAdditionIterator();
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/dialect/resolver/DialectFactory.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/CascadingAction.java
|
Method name: Dialect buildDialect(Properties, Connection)
|
|
Method name: Iterator getLoadedElementsIterator(SessionImplementor, CollectionType, Object)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 3
|
|
1 | String dialectName = properties.getProperty( Environment.DIALECT );↵ | | |
|
2 | if ( dialectName == null ) {↵ | | |
|
3 | return determineDialect( connection );↵ | | |
|
4 | }↵ | | |
|
5 | else {↵ | | |
|
6 | return constructDialect( dialectName ↵ | | 1 | if ( collectionIsInitialized(collection) ) {↵
|
| | | 2 | // handles arrays and newly instantiated collections↵
|
| | | 3 | return collectionType.getElementsIterator(collection, session);↵
|
| | | 4 | }↵
|
| | | 5 | else {↵
|
| | | 6 | // does not handle arrays (thats ok, cos they can't be lazy)↵
|
| | | 7 | // or newly instantiated collections, so we can do the cast↵
|
7 | );↵ | | 8 | return ( (PersistentCollection) collection ).queuedAdditionIterator();↵
|
8 | } | | 9 | }
|
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |