#vulnerable code 
                              public static int[] executeBatchSQL(String poolName, String sql, Object[][] params) {

    int[] returnIntArray = null;

    Connection con = null;

    try {
      con = DB_CONNECTION_MANAGER.getConnection(poolName);

      if (con == null) {
        throw new ConnectionException(poolName);
      }

      con.setAutoCommit(false);

      returnIntArray = new QueryRunner().batch(con, sql, params);

      con.commit();
    } catch (Exception e) {
      logger.error(QUERY_EXCEPTION_MESSAGE, e);
      try {
        con.rollback();
      } catch (SQLException e1) {
        logger.error(ROLLBACK_EXCEPTION_MESSAGE, e1);
      }
    } finally {
      DB_CONNECTION_MANAGER.freeConnection(con);
    }

    return returnIntArray;
  } 
                            #location 22 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                              public static int[] executeBatchSQL(String poolName, String sql, Object[][] params) {

    int[] returnIntArray = null;

    try {

      returnIntArray = new QueryRunner(DB_CONNECTION_MANAGER.getDataSource(poolName)).batch(sql, params);

    } catch (Exception e) {
      logger.error(QUERY_EXCEPTION_MESSAGE, e);
    }

    return returnIntArray;
  }