code: public static Bucket openBucket(CouchbaseCluster cluster, String name, String password)
      {
          if (cluster == null)
          {
              throw new KunderaException("CouchbaseCluster object can't be null");
          }
          try
          {
              Bucket bucket;
              if (password != null && !password.trim().isEmpty())
              {
                  bucket = cluster.openBucket(name, password);
              }
              else
              {
                  bucket = cluster.openBucket(name);
              }
              LOGGER.debug("Bucket [" + name + "] is opened!");
              return bucket;
          }
          catch (CouchbaseException ex)
          {
              LOGGER.error("Not able to open bucket [" + name + "].", ex);
              throw new KunderaException("Not able to open bucket [" + name + "].", ex);
          }
  
      }
docs: Open bucket.
  
  @param cluster
  the cluster
  @param name
  the name
  @param password
  the password
  @return the bucket