if (accts != null) { for (Iterator it = accts.iterator(); it.hasNext();) { try { Object acct = it.next(); log.info("Removing " + acct); session.delete(acct); } catch (Exception ignored) {} } }
if ( export ) { statement.executeUpdate( sql ); try { SQLWarning warnings = statement.getWarnings(); if ( warnings != null) { JDBCExceptionReporter.logAndClearWarnings( connectionHelper.getConnection() ); } } catch( SQLException sqle ) { log.warn( "unable to log SQLWarnings : " + sqle ); } }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/classloader/ClassLoaderTestDAO.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java
Method name: void internalCleanup() Method name: void execute(boolean, boolean, Writer, Statement, String)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (accts != null)
1
if (
2
             {
3
                for (Iterator it = accts.iterator(); it.hasNext();)
4
                {
5
                   try
6
                   {
7
                      Object acct = it.next();
8
                      log.info("Removing " + acct);
9
                      session.delete(acct);
10
                   }
11
                   catch (
2
 export ) {
3
			statement.executeUpdate( sql );
4
			try {
5
				SQLWarning warnings = statement.getWarnings();
6
				if ( warnings != null) {
7
					JDBCExceptionReporter.logAndClearWarnings( connectionHelper.getConnection() );
8
				}
9
			}
12
Exception ignored) {}
10
			catch( SQLException 
13
                }
14
             
11
sqle ) {
12
				log.warn( "unable to log SQLWarnings : " + sqle );
13
			}
15
}
14
		}
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.0
Clones locationClones are in different classes
Number of node comparisons1