public void setPreparedStatementValue(PreparedStatement pstmt, Object value, int position) throws SQLException { try { if (value == null) { pstmt.setNull(position, _colDef.getSqlType(), _colDef .getSqlTypeName()); } else { pstmt.setString(position, value.toString()); } } catch (Exception e) { s_log.error("setPreparedStatementValue: Unexpected exception - " + e.getMessage(), e);
public void setPreparedStatementValue(PreparedStatement pstmt, Object value, int position) throws SQLException { if (value == null) { pstmt.setNull(position, java.sql.Types.OTHER, typeName); } else { try { pstmt.setString(position, value.toString()); } catch (Exception e) { s_log.error("setPreparedStatementValue: Unexpected exception - " + e.getMessage(), e);
Clone fragments detected by clone detection tool
File path: /sql12/plugins/db2/src/net/sourceforge/squirrel_sql/plugins/db2/types/DB2XmlTypeDataTypeComponent.java File path: /sql12/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/types/PostgreSqlOtherTypeDataTypeComponent.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public void setPreparedStatementValue(PreparedStatement pstmt,
1
public void setPreparedStatementValue(PreparedStatement pstmt,
2
			Object value, int position) 
2
 Object value, int position)
3
throws SQLException {
3
		throws SQLException
4
		try 
5
{
4
	{
6
			if (value == null) {
5
		if (value == null)
7
		
6
		{
8
		pstmt.setNull(position, _colDef.getSqlType(), _colDef
7
			pstmt.setNull(position, java.sql.Type
9
						.getSqlTypeName());
8
s.OTHER, typeName);
10
			} else {
9
		} else
10
		{
11
			try
12
			{				
11
				pstmt.setString(position, value.toString());
13
				pstmt.setString(position, value.toString());
12
			}
13
		} catch (Exception e) 
14
			} catch (Exception e)
14
{
15
			{
15
			s_log.error("setPreparedStatementValue: Unexpected exception - "
16
				s_log.error("setPreparedStatementValue: Unexpected exception - "
16
					+ e.getMessage(), e);
17
 + e.getMessage(), e);
17
		
18
			
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