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) )"); } catch ( SQLException e ) { throw new RuntimeException( "Unable to build actual schema : " + e.getMessage() ); } finally { if ( session != null ) { try { session.close(); } catch( Throwable ignore ) { // ignore } } }
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(); } catch ( SQLException e ) { throw new RuntimeException( "could not prepare additional schemas" ); } finally { if ( session != null ) { try { session.close(); } catch( Throwable ignore ) { } } }
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: 8 Number of AST nodes: 9
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 {
6
			
7
				st.execute( "drop table Point");
7
stat.execute("CREATE SCHEMA sb AUTHORIZATION DBA ");
8
			}
8
			
9
			catch( Throwable ignore ) {
10
				// ignore
11
			}
9
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) )"
10
			stat.execute(" CREATE TABLE \"SA\".\"Team\" (test INTEGER) ");
13
);
11
			stat.close();
14
		}
12
		}
15
		catch ( SQLException e ) {
13
		catch ( SQLException e ) {
16
			throw new RuntimeException( "Unable to build actual schema : " + e.getMessage() );
14
			throw new RuntimeException( "could not prepare additional schemas" );
17
		}
15
		}
18
		finally {
16
		finally {
19
			if ( session != null ) {
17
			if ( session != null ) {
20
				try {
18
				try {
21
					session.close();
19
					session.close();
22
				}
20
				}
23
				catch( Throwable ignore ) {
21
				catch( Throwable ignore ) {
24
					// ignore
22

25
				}
23
				}
26
			}
24
			}
27
		}
25
		}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes having the same super class
Number of node comparisons1