if ( shouldIsolateTemporaryTableDDL() ) {
if ( getFactory().getSettings().isDataDefinitionInTransactionSupported() ) {
Isolater.doIsolatedWork( work, session );
}
else {
Isolater.doNonTransactedWork( work, session );
}
}
else {
work.doWork( session.getJDBCContext().getConnectionManager().getConnection() );
session.getJDBCContext().getConnectionManager().afterStatement();
}
if ( shouldIsolateTemporaryTableDDL() ) {
if ( getFactory().getSettings().isDataDefinitionInTransactionSupported() ) {
Isolater.doIsolatedWork( work, session );
}
else {
Isolater.doNonTransactedWork( work, session );
}
}
else {
work.doWork( session.getJDBCContext().getConnectionManager().getConnection() );
session.getJDBCContext().getConnectionManager().afterStatement();
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/exec/AbstractStatementExecutor.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/exec/AbstractStatementExecutor.java
|
Method name: void createTemporaryTableIfNecessary(Queryable, SessionImplementor)
|
|
Method name: void dropTemporaryTableIfNecessary(Queryable, SessionImplementor)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if ( shouldIsolateTemporaryTableDDL() ) {↵ | | 1 | if ( shouldIsolateTemporaryTableDDL() ) {↵
|
2 | if ( getFactory().getSettings().isDataDefinitionInTransactionSupported() ) {↵ | | 2 | if ( getFactory().getSettings().isDataDefinitionInTransactionSupported() ) {↵
|
3 | Isolater.doIsolatedWork( work, session );↵ | | 3 | Isolater.doIsolatedWork( work, session );↵
|
4 | }↵ | | 4 | }↵
|
5 | else {↵ | | 5 | else {↵
|
6 | Isolater.doNonTransactedWork( work, session );↵ | | 6 | Isolater.doNonTransactedWork( work, session );↵
|
7 | }↵ | | 7 | }↵
|
8 | }↵ | | 8 | }↵
|
9 | else {↵ | | 9 | else {↵
|
10 | work.doWork( session.getJDBCContext().getConnectionManager().getConnection() );↵ | | 10 | work.doWork( session.getJDBCContext().getConnectionManager().getConnection() );↵
|
11 | session.getJDBCContext().getConnectionManager().afterStatement();↵ | | 11 | session.getJDBCContext().getConnectionManager().afterStatement();↵
|
12 | } | | 12 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 18 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.3 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | if (shouldIsolateTemporaryTableDDL()) | | 3 | if (shouldIsolateTemporaryTableDDL()) |
3 | if (getFactory().getSettings().isDataDefinitionInTransactionSupported()) | | 4 | if (getFactory().getSettings().isDataDefinitionInTransactionSupported()) |
4 | Isolater.doIsolatedWork(work, session); | | 5 | Isolater.doIsolatedWork(work, session); |
| | | | |
5 | Isolater.doNonTransactedWork(work, session); | | 6 | Isolater.doNonTransactedWork(work, session); |
| | | | |
6 | work.doWork(session.getJDBCContext().getConnectionManager().getConnection()); | | 7 | work.doWork(session.getJDBCContext().getConnectionManager().getConnection()); |
7 | session.getJDBCContext().getConnectionManager().afterStatement(); | | 8 | session.getJDBCContext().getConnectionManager().afterStatement(); |
Precondition Violations (0)
Row |
Violation |