test_class.declarator: preparedStatementMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private PreparedStatement preparedStatementMock;
test_class.type: PreparedStatement
test_class.var_name: preparedStatementMock
test_class.declarator: connectionMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Connection connectionMock;
test_class.type: Connection
test_class.var_name: connectionMock
test_class.declarator: loggerMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Logger loggerMock;
test_class.type: Logger
test_class.var_name: loggerMock
test_class.declarator: dao = new DatabaseAccessObject()
test_class.modifier: private final
test_class.original_string: private final DatabaseAccessObject dao = new DatabaseAccessObject();
test_class.type: DatabaseAccessObject
test_class.var_name: dao
test_class.file: engine/schema/src/test/java/com/cloud/upgrade/dao/DatabaseAccessObjectTest.java
test_class.identifier: DatabaseAccessObjectTest
test_case.body: @SuppressWarnings("static-access")
      @Test
      public void testClosePreparedStatementWhenPreparedStatementIsNotNullAndThereIsNoException() throws Exception {
          PreparedStatement preparedStatement = preparedStatementMock;
          String errorMessage = "some message";
  
          dao.closePreparedStatement(preparedStatement, errorMessage);
  
          verify(preparedStatement, times(1)).close();
          verify(loggerMock, times(0)).warn(anyString(), any(Throwable.class));
      }
test_case.class_method_signature: DatabaseAccessObjectTest.testClosePreparedStatementWhenPreparedStatementIsNotNullAndThereIsNoException()
test_case.full_signature: @SuppressWarnings("static-access") @Test public void testClosePreparedStatementWhenPreparedStatementIsNotNullAndThereIsNoException()
test_case.identifier: testClosePreparedStatementWhenPreparedStatementIsNotNullAndThereIsNoException
test_case.invocations: closePreparedStatement close verify times warn verify times anyString any
test_case.modifiers: @SuppressWarnings("static-access") @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testClosePreparedStatementWhenPreparedStatementIsNotNullAndThereIsNoException()
focal_class.declarator: s_logger = LoggerFactory.getLogger(DatabaseAccessObject.class)
focal_class.modifier: private static
focal_class.original_string: private static Logger s_logger = LoggerFactory.getLogger(DatabaseAccessObject.class);
focal_class.type: Logger
focal_class.var_name: s_logger
focal_class.file: engine/schema/src/main/java/com/cloud/upgrade/dao/DatabaseAccessObject.java
focal_class.identifier: DatabaseAccessObject
focal_class.class_method_signature: DatabaseAccessObject.dropKey(Connection conn, String tableName, String key, boolean isForeignKey)
focal_class.full_signature: public void dropKey(Connection conn, String tableName, String key, boolean isForeignKey)
focal_class.identifier: dropKey
focal_class.modifiers: public
focal_class.parameters: (Connection conn, String tableName, String key, boolean isForeignKey)
focal_class.return: void
focal_class.signature: void dropKey(Connection conn, String tableName, String key, boolean isForeignKey)
focal_class.class_method_signature: DatabaseAccessObject.dropPrimaryKey(Connection conn, String tableName)
focal_class.full_signature: public void dropPrimaryKey(Connection conn, String tableName)
focal_class.identifier: dropPrimaryKey
focal_class.modifiers: public
focal_class.parameters: (Connection conn, String tableName)
focal_class.return: void
focal_class.signature: void dropPrimaryKey(Connection conn, String tableName)
focal_class.class_method_signature: DatabaseAccessObject.dropColumn(Connection conn, String tableName, String columnName)
focal_class.full_signature: public void dropColumn(Connection conn, String tableName, String columnName)
focal_class.identifier: dropColumn
focal_class.modifiers: public
focal_class.parameters: (Connection conn, String tableName, String columnName)
focal_class.return: void
focal_class.signature: void dropColumn(Connection conn, String tableName, String columnName)
focal_class.class_method_signature: DatabaseAccessObject.columnExists(Connection conn, String tableName, String columnName)
focal_class.full_signature: public boolean columnExists(Connection conn, String tableName, String columnName)
focal_class.identifier: columnExists
focal_class.modifiers: public
focal_class.parameters: (Connection conn, String tableName, String columnName)
focal_class.return: boolean
focal_class.signature: boolean columnExists(Connection conn, String tableName, String columnName)
focal_class.class_method_signature: DatabaseAccessObject.closePreparedStatement(PreparedStatement pstmt, String errorMessage)
focal_class.full_signature: protected static void closePreparedStatement(PreparedStatement pstmt, String errorMessage)
focal_class.identifier: closePreparedStatement
focal_class.modifiers: protected static
focal_class.parameters: (PreparedStatement pstmt, String errorMessage)
focal_class.return: void
focal_class.signature: void closePreparedStatement(PreparedStatement pstmt, String errorMessage)
focal_method.body: protected static void closePreparedStatement(PreparedStatement pstmt, String errorMessage) {
          try {
              if (pstmt != null) {
                  pstmt.close();
              }
          } catch (SQLException e) {
              s_logger.warn(errorMessage, e);
          }
      }
focal_method.class_method_signature: DatabaseAccessObject.closePreparedStatement(PreparedStatement pstmt, String errorMessage)
focal_method.full_signature: protected static void closePreparedStatement(PreparedStatement pstmt, String errorMessage)
focal_method.identifier: closePreparedStatement
focal_method.invocations: close warn
focal_method.modifiers: protected static
focal_method.parameters: (PreparedStatement pstmt, String errorMessage)
focal_method.return: void
focal_method.signature: void closePreparedStatement(PreparedStatement pstmt, String errorMessage)