test_class.declarator: TEST_CODE = 222
test_class.modifier: private static final
test_class.original_string: private static final int TEST_CODE = 222;
test_class.type: int
test_class.var_name: TEST_CODE
test_class.declarator: TEST_STATE = 555
test_class.modifier: private static final
test_class.original_string: private static final int TEST_STATE = 555;
test_class.type: int
test_class.var_name: TEST_STATE
test_class.declarator: TEST_MESSAGE = "a Test message"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_MESSAGE = "a Test message";
test_class.type: String
test_class.var_name: TEST_MESSAGE
test_class.file: sql12/plugins/db2/src/test/java/net/sourceforge/squirrel_sql/plugins/db2/DB2JCCExceptionFormatterTest.java
test_class.identifier: DB2JCCExceptionFormatterTest
test_class.superclass: extends AbstractExceptionFormatterTest
test_case.body: @Test
  	public void testFormatJccException() throws Exception
  	{
  		
  		SqlException testException = new SqlException(TEST_MESSAGE, TEST_CODE, TEST_STATE);
  		String formattedMessage = classUnderTest.format(testException);
  		System.err.println("Formatted message = "+formattedMessage);
  		
  		assertTrue(formattedMessage.contains(formattedMessage));
  		assertTrue(formattedMessage.contains(""+TEST_CODE));
  		assertTrue(formattedMessage.contains(""+TEST_STATE));
  	}
test_case.class_method_signature: DB2JCCExceptionFormatterTest.testFormatJccException()
test_case.full_signature: @Test public void testFormatJccException()
test_case.identifier: testFormatJccException
test_case.invocations: format println assertTrue contains assertTrue contains assertTrue contains
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFormatJccException()
focal_class.declarator: JCC_EXCEPTION_PREFIX = "com.ibm.db2.jcc"
focal_class.modifier: public static final
focal_class.original_string: public static final String JCC_EXCEPTION_PREFIX = "com.ibm.db2.jcc";
focal_class.type: String
focal_class.var_name: JCC_EXCEPTION_PREFIX
focal_class.declarator: JCC_EXCEPTION_CLASS = "SqlException"
focal_class.modifier: public static final
focal_class.original_string: public static final String JCC_EXCEPTION_CLASS = "SqlException";
focal_class.type: String
focal_class.var_name: JCC_EXCEPTION_CLASS
focal_class.declarator: METHOD_GET_SQLCA = "getSqlca"
focal_class.modifier: private static final
focal_class.original_string: private static final String METHOD_GET_SQLCA = "getSqlca";
focal_class.type: String
focal_class.var_name: METHOD_GET_SQLCA
focal_class.declarator: METHOD_GET_SQL_STATE = "getSqlState"
focal_class.modifier: private static final
focal_class.original_string: private static final String METHOD_GET_SQL_STATE = "getSqlState";
focal_class.type: String
focal_class.var_name: METHOD_GET_SQL_STATE
focal_class.declarator: METHOD_GET_SQL_CODE = "getSqlCode"
focal_class.modifier: private static final
focal_class.original_string: private static final String METHOD_GET_SQL_CODE = "getSqlCode";
focal_class.type: String
focal_class.var_name: METHOD_GET_SQL_CODE
focal_class.declarator: METHOD_GET_MESSAGE = "getMessage"
focal_class.modifier: private static final
focal_class.original_string: private static final String METHOD_GET_MESSAGE = "getMessage";
focal_class.type: String
focal_class.var_name: METHOD_GET_MESSAGE
focal_class.file: sql12/plugins/db2/src/main/java/net/sourceforge/squirrel_sql/plugins/db2/DB2JCCExceptionFormatter.java
focal_class.identifier: DB2JCCExceptionFormatter
focal_class.interfaces: implements ExceptionFormatter
focal_class.class_method_signature: DB2JCCExceptionFormatter.formatsException(Throwable t)
focal_class.full_signature: public boolean formatsException(Throwable t)
focal_class.identifier: formatsException
focal_class.modifiers: public
focal_class.parameters: (Throwable t)
focal_class.return: boolean
focal_class.signature: boolean formatsException(Throwable t)
focal_class.class_method_signature: DB2JCCExceptionFormatter.format(Throwable t)
focal_class.full_signature: public String format(Throwable t)
focal_class.identifier: format
focal_class.modifiers: public
focal_class.parameters: (Throwable t)
focal_class.return: String
focal_class.signature: String format(Throwable t)
focal_method.body: public String format(Throwable t) throws Exception
  	{
  		Utilities.checkNull("format", "t", t);
  
  		StringBuilder builder = new StringBuilder();
  		// DB2Sqlca sqlca = ((DB2Diagnosable) t).getSqlca();
  		Method getSqlca = t.getClass().getMethod(METHOD_GET_SQLCA, (Class[]) null);
  		Object sqlca = getSqlca.invoke(t, (Object[]) null);
  
  		// String msg = sqlca.getMessage();
  		Method getMessage = sqlca.getClass().getMethod(METHOD_GET_MESSAGE, (Class[]) null);
  		String msg = getMessage.invoke(sqlca, (Object[]) null).toString();
  
  		// int sqlCode = sqlca.getSqlCode();
  		Method getSqlCode = sqlca.getClass().getMethod(METHOD_GET_SQL_CODE, (Class[]) null);
  		int sqlCode = (Integer) getSqlCode.invoke(sqlca, (Object[]) null);
  
  		// int sqlstate = sqlca.getSqlState();
  		Method getSqlState = sqlca.getClass().getMethod(METHOD_GET_SQL_STATE, (Class[]) null);
  		String sqlState = getSqlState.invoke(sqlca, (Object[]) null).toString();
  
  		builder.append(msg).append(" SQL Code: ").append(sqlCode).append(", SQL State: ").append(sqlState);
  		return builder.toString();
  	}
focal_method.class_method_signature: DB2JCCExceptionFormatter.format(Throwable t)
focal_method.full_signature: public String format(Throwable t)
focal_method.identifier: format
focal_method.invocations: checkNull getMethod getClass invoke getMethod getClass toString invoke getMethod getClass invoke getMethod getClass toString invoke append append append append append toString
focal_method.modifiers: public
focal_method.parameters: (Throwable t)
focal_method.return: String
focal_method.signature: String format(Throwable t)