private static void execute(Connection con, String sql, boolean printError) { Statement stmt = null; try { stmt = con.createStatement(); System.out.println("Executing sql: "+sql); stmt.execute(sql); } catch (SQLException e ) { if (printError) { e.printStackTrace(); } } finally { if (stmt != null) try { stmt.close(); } catch (SQLException e) {}
private static void execute(Connection con, String sql, boolean printError) { Statement stmt = null; try { stmt = con.createStatement(); System.out.println("Executing sql: " + sql); stmt.execute(sql); } catch (SQLException e) { if (printError) { e.printStackTrace(); } } finally { if (stmt != null) try { stmt.close(); } catch (SQLException e)
Clone fragments detected by clone detection tool
File path: /sql12/test/adhoc/test/H2IdentifierQuoteTest.java File path: /sql12/test/adhoc/test/IngresMoneyTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
private static void execute(Connection con, String sql, boolean printError) {
1
private static void execute(Connection con, String sql, boolean printError)
2
        
2
	{
3
Statement stmt = null;
3
		Statement stmt = null;
4
        try {
5
            
4
		try
5
		{
6
stmt = con.createStatement();
6
			stmt = con.createStatement();
7
            System.out.println("Executing sql: "+sql);
7
			System.out.println("Executing sql: " + sql);
8
            stmt.execute(sql);
8
			stmt.execute(sql);
9
        } catch (SQLException e ) {
9
		} catch (SQLException e
10
            if (printError) {
11
                e.printStackTrace();
12
            }
13
        } finally {
14
            if (stmt != null) try { 
10
)
11
		{
12
			if (printError)
13
			{
14
				e.printStackTrace();
15
			}
16
		} finally
17
		{
18
			if (stmt != null)
19
				try
20
				{
15
stmt.close(); 
21
					stmt.close();
16
} catch (SQLException e) {}
22
				} catch (SQLException e)
17
        
23
				
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 location
Number of node comparisons0