Iterator subIter = table.getForeignKeyIterator();
while ( subIter.hasNext() ) {
ForeignKey fk = (ForeignKey) subIter.next();
if ( fk.isPhysicalConstraint() ) {
script.add(
fk.sqlDropString(
dialect,
defaultCatalog,
defaultSchema
)
);
}
}
if ( Proxy.isProxyClass( object.getClass() ) ) {
InvocationHandler handler = Proxy.getInvocationHandler( object );
if ( DataProxyHandler.class.isAssignableFrom( handler.getClass() ) ) {
DataProxyHandler myHandler = ( DataProxyHandler ) handler;
return myHandler.getEntityName();
}
}
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/testsuite/src/test/java/org/hibernate/test/dynamicentity/ProxyHelper.java
|
Method name: String[] generateDropSchemaScript(Dialect)
|
|
Method name: String extractEntityName(Object)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | Iterator subIter = table.getForeignKeyIterator();↵ | | |
|
2 | while ( subIter.hasNext() ) {↵ | | |
|
3 | ForeignKey fk = (ForeignKey) subIter.next(↵ | | 1 | if ( Proxy.isProxyClass( object.getClass() ) ) {↵
|
4 | );↵ | | 2 | InvocationHandler handler = Proxy.getInvocationHandler( object );↵
|
5 | if ( fk.isPhysicalConstraint() ) {↵ | | 3 | if ( DataProxyHandler.class.isAssignableFrom( handler.getClass() ) ) {↵
|
6 | script.add(↵ | | 4 | ↵
|
7 | fk.sqlDropString(↵ | | |
|
8 | dialect,↵ | | |
|
9 | defaultCatalog,↵ | | |
|
10 | defaultSchema↵ | | |
|
11 | )↵ | | |
|
12 | );↵ | | |
|
13 | }↵ | | |
|
14 | ↵ | | 5 | DataProxyHandler myHandler = ( DataProxyHandler ) handler;↵
|
| | | 6 | return myHandler.getEntityName();↵
|
| | | 7 | }↵
|
15 | } | | 8 | }
|
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 |