super.afterSessionFactoryBuilt( sfi );
Session session = null;
try {
session = sfi.openSession();
Statement st = session.connection().createStatement();
try {
st.execute( "drop table Point");
}
catch( Throwable ignore ) {
// ignore
}
st.execute("create table Point (\"x\" number(19,2) not null, \"y\" number(19,2) not null, description varchar2(255) )");
super.afterSessionFactoryBuilt( sfi );
Session session = null;
try {
session = sfi.openSession();
Statement stat = session.connection().createStatement();
stat.execute("CREATE SCHEMA sb AUTHORIZATION DBA ");
stat.execute(" CREATE SCHEMA sa AUTHORIZATION DBA ");
stat.execute(" CREATE TABLE \"SA\".\"Team\" (test INTEGER) ");
stat.close();
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/rowid/RowIdTest.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/unmaintained/org/hibernate/test/tool/TestSchemaTools.java
|
Method name: void afterSessionFactoryBuilt(SessionFactoryImplementor)
|
|
Method name: void afterSessionFactoryBuilt(SessionFactoryImplementor)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 8
|
|
1 | super.afterSessionFactoryBuilt( sfi );↵ | | 1 | super.afterSessionFactoryBuilt( sfi );
↵
|
2 | Session session = null;↵ | | 2 | Session session = null;
↵
|
3 | try {↵ | | 3 | try {
↵
|
4 | session = sfi.openSession();↵ | | 4 | session = sfi.openSession();
↵
|
5 | Statement st = session.connection().createStatement();↵ | | 5 | Statement stat = session.connection().createStatement();
↵
|
6 | try {↵ | | |
|
7 | st.execute( "drop table Point");↵ | | 6 | stat.execute("CREATE SCHEMA sb AUTHORIZATION DBA ");
↵
|
8 | }↵ | | 7 | ↵
|
9 | catch( Throwable ignore ) {↵ | | |
|
10 | // ignore↵ | | |
|
11 | }↵ | | 8 | stat.execute(" CREATE SCHEMA sa AUTHORIZATION DBA ");
↵
|
12 | st.execute("create table Point (\"x\" number(19,2) not null, \"y\" number(19,2) not null, description varchar2(255) )"↵ | | 9 | stat.execute(" CREATE TABLE \"SA\".\"Team\" (test INTEGER) ");↵
|
13 | ); | | 10 | stat.close();
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 4 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
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) | 0.0 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | super.afterSessionFactoryBuilt(sfi); | | 1 | super.afterSessionFactoryBuilt(sfi); |
2 | Session session = null; | | 2 | Session session = null; |
Precondition Violations (2)
Row |
Violation |
1 | Super method call super.afterSessionFactoryBuilt(sfi); cannot be extracted from method |
2 | Super method call super.afterSessionFactoryBuilt(sfi); cannot be extracted from method |