while ( iter.hasNext() ) {
EntityPersister p = (EntityPersister) iter.next();
if ( p.hasCache() ) {
p.getCacheAccessStrategy().getRegion().destroy();
}
}
while ( iter.hasNext() ) {
Table table = (Table) iter.next();
if ( table.isPhysicalTable() ) {
/*Iterator subIter = table.getIndexIterator();
while ( subIter.hasNext() ) {
Index index = (Index) subIter.next();
if ( !index.isForeignKey() || !dialect.hasImplicitIndexForForeignKey() ) {
script.add( index.sqlDropString(dialect) );
}
}*/
script.add(
table.sqlDropString(
dialect,
defaultCatalog,
defaultSchema
)
);
}
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/Configuration.java
|
Method name: void close()
|
|
Method name: String[] generateDropSchemaScript(Dialect)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | while ( iter.hasNext() ) {↵ | | 1 | while ( iter.hasNext() ) {↵
|
|
2 | EntityPersister p = (EntityPersister) i↵ | | 2 | Table table = (Table) iter.next();↵
|
| | | 3 | if ( table.isPhysicalTable() ) {↵
|
|
| | | 4 | /*Iterator subIter = table.getIndexIterator();↵
|
| | | 5 | while ( subIter.hasNext() ) {↵
|
3 | ter.next();↵ | | 6 | Index index = (Index) subIter.next();↵
|
4 | if ( p.hasCache() ) {↵ | | 7 | if ( !index.isForeignKey() || !dialect.hasImplicitIndexForForeignKey() ) {↵
|
5 | p.getCacheAccessStrategy().getRegion().destroy(↵ | | 8 | script.add( index.sqlDropString(dialect) );↵
|
| | | 9 | }↵
|
| | | 10 | }*/↵
|
|
| | | 11 | script.add(↵
|
| | | 12 | table.sqlDropString(↵
|
| | | 13 | dialect,↵
|
| | | 14 | defaultCatalog,↵
|
| | | 15 | defaultSchema↵
|
| | | 16 | )↵
|
6 | );↵ | | 17 | );↵
|
|
7 | }↵ | | 18 | }↵
|
|
8 | } | | 19 | }
|
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 |