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
)
);
}
}
while ( subIter.hasNext() ) {
ForeignKey fk = (ForeignKey) subIter.next();
if ( fk.isPhysicalConstraint() ) {
script.add(
fk.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/cfg/Configuration.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/Configuration.java
|
Method name: String[] generateDropSchemaScript(Dialect)
|
|
Method name: String[] generateDropSchemaScript(Dialect)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | while ( iter.hasNext() ) {↵ | | 1 | while ( subIter.hasNext() ) {↵
|
|
2 | Table table = (Table) iter.next();↵ | | 2 | ↵
|
3 | if ( table.isPhysicalTable() ) {↵ | | |
|
|
4 | /*Iterator subIter = table.getIndexIterator();↵ | | |
|
5 | while ( subIter.hasNext() ) {↵ | | |
|
6 | Index index = (Index) subIter.next();↵ | | 3 | ForeignKey fk = (ForeignKey) subIter.next();↵
|
7 | if ( !index.isForeignKey() || !dialect.hasImplicitIndexForForeignKey() ) {↵ | | 4 | if ( ↵
|
8 | script.add( index.sqlDropString(dialect) );↵ | | 5 | fk.isPhysicalConstraint() ) {↵
|
9 | }↵ | | 6 | ↵
|
10 | }*/↵ | | |
|
|
11 | script.add(↵ | | 7 | script.add(↵
|
12 | table.sqlDropString(↵ | | 8 | fk.sqlDropString(↵
|
13 | dialect,↵ | | 9 | dialect,↵
|
14 | defaultCatalog,↵ | | 10 | defaultCatalog,↵
|
15 | defaultSchema↵ | | 11 | defaultSchema↵
|
16 | )↵ | | 12 | )↵
|
17 | );↵ | | 13 | );↵
|
|
18 | }↵ | | 14 | }↵
|
|
19 | } | | 15 | }
|
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 the same method |
Number of node comparisons | 1 |