Program: 21164
Project: 21164
Buggy source:
public static BigtableOptions fromConfiguration(Configuration configuration) throws IOException {
  BigtableOptions.Builder optionsBuilder=new BigtableOptions.Builder();
  String projectId=configuration.get(PROJECT_ID_KEY);
  Preconditions.checkArgument(!Strings.isNullOrEmpty(projectId),String.format("String_Node_Str",PROJECT_ID_KEY));
  optionsBuilder.setProjectId(projectId);
  LOG.debug("String_Node_Str",projectId);
  String zone=configuration.get(ZONE_KEY);
  Preconditions.checkArgument(!Strings.isNullOrEmpty(zone),String.format("String_Node_Str",ZONE_KEY));
  optionsBuilder.setZone(zone);
  LOG.debug("String_Node_Str",zone);
  String cluster=configuration.get(CLUSTER_KEY);
  Preconditions.checkArgument(!Strings.isNullOrEmpty(cluster),String.format("String_Node_Str",CLUSTER_KEY));
  optionsBuilder.setCluster(cluster);
  LOG.debug("String_Node_Str",cluster);
  String overrideIp=configuration.get(IP_OVERRIDE_KEY);
  InetAddress overrideIpAddress=null;
  if (!Strings.isNullOrEmpty(overrideIp)) {
    LOG.debug("String_Node_Str",overrideIp);
    overrideIpAddress=InetAddress.getByName(overrideIp);
  }
  String dataHost=configuration.get(BIGTABLE_HOST_KEY,BIGTABLE_HOST_DEFAULT);
  Preconditions.checkArgument(!Strings.isNullOrEmpty(dataHost),String.format("String_Node_Str",BIGTABLE_HOST_KEY));
  if (overrideIpAddress == null) {
    LOG.debug("String_Node_Str",dataHost);
    optionsBuilder.setDataHost(InetAddress.getByName(dataHost));
  }
 else {
    LOG.debug("String_Node_Str",dataHost);
    optionsBuilder.setDataHost(InetAddress.getByAddress(dataHost,overrideIpAddress.getAddress()));
  }
  String tableAdminHost=configuration.get(BIGTABLE_TABLE_ADMIN_HOST_KEY,BIGTABLE_TABLE_ADMIN_HOST_DEFAULT);
  if (overrideIpAddress == null) {
    LOG.debug("String_Node_Str",tableAdminHost);
    optionsBuilder.setTableAdminHost(InetAddress.getByName(tableAdminHost));
  }
 else {
    LOG.debug("String_Node_Str",tableAdminHost);
    optionsBuilder.setTableAdminHost(InetAddress.getByAddress(tableAdminHost,overrideIpAddress.getAddress()));
  }
  String clusterAdminHost=configuration.get(BIGTABLE_CLUSTER_ADMIN_HOST_KEY,BIGTABLE_CLUSTER_ADMIN_HOST_DEFAULT);
  if (overrideIpAddress == null) {
    LOG.debug("String_Node_Str",clusterAdminHost);
    optionsBuilder.setClusterAdminHost(InetAddress.getByName(clusterAdminHost));
  }
 else {
    LOG.debug("String_Node_Str",clusterAdminHost);
    optionsBuilder.setClusterAdminHost(InetAddress.getByAddress(clusterAdminHost,overrideIpAddress.getAddress()));
  }
  int port=configuration.getInt(BIGTABLE_PORT_KEY,DEFAULT_BIGTABLE_PORT);
  optionsBuilder.setPort(port);
  try {
    if (configuration.getBoolean(BIGTABE_USE_SERVICE_ACCOUNTS_KEY,BIGTABLE_USE_SERVICE_ACCOUNTS_DEFAULT)) {
      LOG.debug("String_Node_Str");
      String serviceAccountJson=System.getenv().get(SERVICE_ACCOUNT_JSON_ENV_VARIABLE);
      String serviceAccountEmail=configuration.get(BIGTABLE_SERVICE_ACCOUNT_EMAIL_KEY);
      if (!Strings.isNullOrEmpty(serviceAccountJson)) {
        LOG.debug("String_Node_Str",serviceAccountJson);
        optionsBuilder.setCredential(CredentialFactory.getApplicationDefaultCredential());
      }
 else       if (!Strings.isNullOrEmpty(serviceAccountEmail)) {
        LOG.debug("String_Node_Str",serviceAccountEmail);
        String keyfileLocation=configuration.get(BIGTABLE_SERVICE_ACCOUNT_P12_KEYFILE_LOCATION_KEY);
        Preconditions.checkState(!Strings.isNullOrEmpty(keyfileLocation),"String_Node_Str");
        LOG.debug("String_Node_Str",keyfileLocation);
        optionsBuilder.setCredential(CredentialFactory.getCredentialFromPrivateKeyServiceAccount(serviceAccountEmail,keyfileLocation));
      }
 else {
        optionsBuilder.setCredential(CredentialFactory.getCredentialFromMetadataServiceAccount());
      }
    }
 else     if (configuration.getBoolean(BIGTABLE_NULL_CREDENTIAL_ENABLE_KEY,BIGTABLE_NULL_CREDENTIAL_ENABLE_DEFAULT)) {
      optionsBuilder.setCredential(null);
      LOG.info("String_Node_Str");
    }
 else {
      throw new IllegalStateException("String_Node_Str");
    }
  }
 catch (  GeneralSecurityException gse) {
    throw new IOException("String_Node_Str",gse);
  }
  ThreadFactory threadFactory=new ThreadFactoryBuilder().setDaemon(true).setNameFormat(GRPC_EVENTLOOP_GROUP_NAME + "String_Node_Str").build();
  EventLoopGroup elg=new NioEventLoopGroup(0,threadFactory);
  optionsBuilder.setCustomEventLoopGroup(elg);
  ScheduledExecutorService retryExecutor=Executors.newScheduledThreadPool(RETRY_THREAD_COUNT,new ThreadFactoryBuilder().setDaemon(true).setNameFormat(RETRY_THREADPOOL_NAME + "String_Node_Str").build());
  optionsBuilder.setRpcRetryExecutorService(retryExecutor);
  if (!Strings.isNullOrEmpty(configuration.get(CALL_REPORT_DIRECTORY_KEY))) {
    String reportDirectory=configuration.get(CALL_REPORT_DIRECTORY_KEY);
    Path reportDirectoryPath=FileSystems.getDefault().getPath(reportDirectory);
    if (Files.exists(reportDirectoryPath)) {
      Preconditions.checkState(Files.isDirectory(reportDirectoryPath),"String_Node_Str");
    }
 else {
      Files.createDirectories(reportDirectoryPath);
    }
    String callStatusReport=reportDirectoryPath.resolve("String_Node_Str").toAbsolutePath().toString();
    String callTimingReport=reportDirectoryPath.resolve("String_Node_Str").toAbsolutePath().toString();
    LOG.debug("String_Node_Str",callStatusReport);
    LOG.debug("String_Node_Str",callTimingReport);
    optionsBuilder.setCallStatusReportPath(callStatusReport);
    optionsBuilder.setCallTimingReportPath(callTimingReport);
  }
  RetryOptions.Builder retryOptionsBuilder=new RetryOptions.Builder();
  boolean enableRetries=configuration.getBoolean(ENABLE_GRPC_RETRIES_KEY,ENABLE_GRPC_RETRIES_DEFAULT);
  LOG.debug("String_Node_Str",enableRetries);
  retryOptionsBuilder.setEnableRetries(enableRetries);
  boolean retryOnDeadlineExceeded=configuration.getBoolean(ENABLE_GRPC_RETRY_DEADLINEEXCEEDED_KEY,ENABLE_GRPC_RETRY_DEADLINEEXCEEDED_DEFAULT);
  LOG.debug("String_Node_Str",retryOnDeadlineExceeded);
  retryOptionsBuilder.setRetryOnDeadlineExceeded(retryOnDeadlineExceeded);
  retryOptionsBuilder.setMaxElapsedBackoffMillis(180000);
  int channelCount=configuration.getInt(BIGTABLE_CHANNEL_COUNT_KEY,BIGTABLE_CHANNEL_COUNT_DEFAULT);
  optionsBuilder.setChannelCount(channelCount);
  long channelTimeout=configuration.getLong(BIGTABLE_CHANNEL_TIMEOUT_MS_KEY,BIGTABLE_CHANNEL_TIMEOUT_MS_DEFAULT);
  Preconditions.checkArgument(channelTimeout == 0 || channelTimeout >= 60000,BIGTABLE_CHANNEL_TIMEOUT_MS_KEY + "String_Node_Str");
  optionsBuilder.setChannelTimeoutMs(channelTimeout);
  optionsBuilder.setUserAgent(BigtableConstants.USER_AGENT);
  return optionsBuilder.build();
}

Fixed version (ground truth):
public static BigtableOptions fromConfiguration(Configuration configuration) throws IOException {
  BigtableOptions.Builder optionsBuilder=new BigtableOptions.Builder();
  String projectId=configuration.get(PROJECT_ID_KEY);
  Preconditions.checkArgument(!Strings.isNullOrEmpty(projectId),String.format("String_Node_Str",PROJECT_ID_KEY));
  optionsBuilder.setProjectId(projectId);
  LOG.debug("String_Node_Str",projectId);
  String zone=configuration.get(ZONE_KEY);
  Preconditions.checkArgument(!Strings.isNullOrEmpty(zone),String.format("String_Node_Str",ZONE_KEY));
  optionsBuilder.setZone(zone);
  LOG.debug("String_Node_Str",zone);
  String cluster=configuration.get(CLUSTER_KEY);
  Preconditions.checkArgument(!Strings.isNullOrEmpty(cluster),String.format("String_Node_Str",CLUSTER_KEY));
  optionsBuilder.setCluster(cluster);
  LOG.debug("String_Node_Str",cluster);
  String overrideIp=configuration.get(IP_OVERRIDE_KEY);
  InetAddress overrideIpAddress=null;
  if (!Strings.isNullOrEmpty(overrideIp)) {
    LOG.debug("String_Node_Str",overrideIp);
    overrideIpAddress=InetAddress.getByName(overrideIp);
  }
  String dataHost=configuration.get(BIGTABLE_HOST_KEY,BIGTABLE_HOST_DEFAULT);
  Preconditions.checkArgument(!Strings.isNullOrEmpty(dataHost),String.format("String_Node_Str",BIGTABLE_HOST_KEY));
  if (overrideIpAddress == null) {
    LOG.debug("String_Node_Str",dataHost);
    optionsBuilder.setDataHost(InetAddress.getByName(dataHost));
  }
 else {
    LOG.debug("String_Node_Str",dataHost);
    optionsBuilder.setDataHost(InetAddress.getByAddress(dataHost,overrideIpAddress.getAddress()));
  }
  String tableAdminHost=configuration.get(BIGTABLE_TABLE_ADMIN_HOST_KEY,BIGTABLE_TABLE_ADMIN_HOST_DEFAULT);
  if (overrideIpAddress == null) {
    LOG.debug("String_Node_Str",tableAdminHost);
    optionsBuilder.setTableAdminHost(InetAddress.getByName(tableAdminHost));
  }
 else {
    LOG.debug("String_Node_Str",tableAdminHost);
    optionsBuilder.setTableAdminHost(InetAddress.getByAddress(tableAdminHost,overrideIpAddress.getAddress()));
  }
  String clusterAdminHost=configuration.get(BIGTABLE_CLUSTER_ADMIN_HOST_KEY,BIGTABLE_CLUSTER_ADMIN_HOST_DEFAULT);
  if (overrideIpAddress == null) {
    LOG.debug("String_Node_Str",clusterAdminHost);
    optionsBuilder.setClusterAdminHost(InetAddress.getByName(clusterAdminHost));
  }
 else {
    LOG.debug("String_Node_Str",clusterAdminHost);
    optionsBuilder.setClusterAdminHost(InetAddress.getByAddress(clusterAdminHost,overrideIpAddress.getAddress()));
  }
  int port=configuration.getInt(BIGTABLE_PORT_KEY,DEFAULT_BIGTABLE_PORT);
  optionsBuilder.setPort(port);
  try {
    if (configuration.getBoolean(BIGTABE_USE_SERVICE_ACCOUNTS_KEY,BIGTABLE_USE_SERVICE_ACCOUNTS_DEFAULT)) {
      LOG.debug("String_Node_Str");
      String serviceAccountJson=System.getenv().get(SERVICE_ACCOUNT_JSON_ENV_VARIABLE);
      String serviceAccountEmail=configuration.get(BIGTABLE_SERVICE_ACCOUNT_EMAIL_KEY);
      if (!Strings.isNullOrEmpty(serviceAccountJson)) {
        LOG.debug("String_Node_Str",serviceAccountJson);
        optionsBuilder.setCredential(CredentialFactory.getApplicationDefaultCredential());
      }
 else       if (!Strings.isNullOrEmpty(serviceAccountEmail)) {
        LOG.debug("String_Node_Str",serviceAccountEmail);
        String keyfileLocation=configuration.get(BIGTABLE_SERVICE_ACCOUNT_P12_KEYFILE_LOCATION_KEY);
        Preconditions.checkState(!Strings.isNullOrEmpty(keyfileLocation),"String_Node_Str");
        LOG.debug("String_Node_Str",keyfileLocation);
        optionsBuilder.setCredential(CredentialFactory.getCredentialFromPrivateKeyServiceAccount(serviceAccountEmail,keyfileLocation));
      }
 else {
        optionsBuilder.setCredential(CredentialFactory.getCredentialFromMetadataServiceAccount());
      }
    }
 else     if (configuration.getBoolean(BIGTABLE_NULL_CREDENTIAL_ENABLE_KEY,BIGTABLE_NULL_CREDENTIAL_ENABLE_DEFAULT)) {
      optionsBuilder.setCredential(null);
      LOG.info("String_Node_Str");
    }
 else {
      throw new IllegalStateException("String_Node_Str");
    }
  }
 catch (  GeneralSecurityException gse) {
    throw new IOException("String_Node_Str",gse);
  }
  ThreadFactory threadFactory=new ThreadFactoryBuilder().setDaemon(true).setNameFormat(GRPC_EVENTLOOP_GROUP_NAME + "String_Node_Str").build();
  EventLoopGroup elg=new NioEventLoopGroup(0,threadFactory);
  optionsBuilder.setCustomEventLoopGroup(elg);
  ScheduledExecutorService retryExecutor=Executors.newScheduledThreadPool(RETRY_THREAD_COUNT,new ThreadFactoryBuilder().setDaemon(true).setNameFormat(RETRY_THREADPOOL_NAME + "String_Node_Str").build());
  optionsBuilder.setRpcRetryExecutorService(retryExecutor);
  if (!Strings.isNullOrEmpty(configuration.get(CALL_REPORT_DIRECTORY_KEY))) {
    String reportDirectory=configuration.get(CALL_REPORT_DIRECTORY_KEY);
    Path reportDirectoryPath=FileSystems.getDefault().getPath(reportDirectory);
    if (Files.exists(reportDirectoryPath)) {
      Preconditions.checkState(Files.isDirectory(reportDirectoryPath),"String_Node_Str");
    }
 else {
      Files.createDirectories(reportDirectoryPath);
    }
    String callStatusReport=reportDirectoryPath.resolve("String_Node_Str").toAbsolutePath().toString();
    String callTimingReport=reportDirectoryPath.resolve("String_Node_Str").toAbsolutePath().toString();
    LOG.debug("String_Node_Str",callStatusReport);
    LOG.debug("String_Node_Str",callTimingReport);
    optionsBuilder.setCallStatusReportPath(callStatusReport);
    optionsBuilder.setCallTimingReportPath(callTimingReport);
  }
  RetryOptions.Builder retryOptionsBuilder=new RetryOptions.Builder();
  boolean enableRetries=configuration.getBoolean(ENABLE_GRPC_RETRIES_KEY,ENABLE_GRPC_RETRIES_DEFAULT);
  LOG.debug("String_Node_Str",enableRetries);
  retryOptionsBuilder.setEnableRetries(enableRetries);
  boolean retryOnDeadlineExceeded=configuration.getBoolean(ENABLE_GRPC_RETRY_DEADLINEEXCEEDED_KEY,ENABLE_GRPC_RETRY_DEADLINEEXCEEDED_DEFAULT);
  LOG.debug("String_Node_Str",retryOnDeadlineExceeded);
  retryOptionsBuilder.setRetryOnDeadlineExceeded(retryOnDeadlineExceeded);
  retryOptionsBuilder.setMaxElapsedBackoffMillis(180000);
  optionsBuilder.setRetryOptions(retryOptionsBuilder.build());
  int channelCount=configuration.getInt(BIGTABLE_CHANNEL_COUNT_KEY,BIGTABLE_CHANNEL_COUNT_DEFAULT);
  optionsBuilder.setChannelCount(channelCount);
  long channelTimeout=configuration.getLong(BIGTABLE_CHANNEL_TIMEOUT_MS_KEY,BIGTABLE_CHANNEL_TIMEOUT_MS_DEFAULT);
  Preconditions.checkArgument(channelTimeout == 0 || channelTimeout >= 60000,BIGTABLE_CHANNEL_TIMEOUT_MS_KEY + "String_Node_Str");
  optionsBuilder.setChannelTimeoutMs(channelTimeout);
  optionsBuilder.setUserAgent(BigtableConstants.USER_AGENT);
  return optionsBuilder.build();
}