Program: 93039
Project: 93039
Buggy source:
public GrpcLoggingRpc(LoggingOptions options) throws IOException {
  GrpcTransportOptions transportOptions=(GrpcTransportOptions)options.getTransportOptions();
  executorFactory=transportOptions.getExecutorFactory();
  executor=executorFactory.get();
  try {
    ExecutorProvider executorProvider=FixedExecutorProvider.create(executor);
    ChannelProvider channelProvider;
    if (options.getHost().contains("String_Node_Str") || options.getCredentials().equals(NoCredentials.getInstance())) {
      ManagedChannel managedChannel=ManagedChannelBuilder.forTarget(options.getHost()).usePlaintext(true).executor(executor).build();
      channelProvider=FixedChannelProvider.create(managedChannel);
    }
 else {
      channelProvider=GrpcTransportOptions.setUpChannelProvider(LoggingSettings.defaultChannelProviderBuilder(),options);
    }
    providerManager=ProviderManager.newBuilder().setChannelProvider(channelProvider).setExecutorProvider(executorProvider).build();
    UnaryCallSettings.Builder callSettingsBuilder=transportOptions.getApiCallSettings(options.getRetrySettings());
    ConfigSettings.Builder confBuilder=ConfigSettings.defaultBuilder().setExecutorProvider(providerManager).setChannelProvider(providerManager).applyToAllUnaryMethods(callSettingsBuilder);
    LoggingSettings.Builder logBuilder=LoggingSettings.defaultBuilder().setExecutorProvider(providerManager).setChannelProvider(providerManager).applyToAllUnaryMethods(callSettingsBuilder);
    MetricsSettings.Builder metricsBuilder=MetricsSettings.defaultBuilder().setExecutorProvider(providerManager).setChannelProvider(providerManager).applyToAllUnaryMethods(callSettingsBuilder);
    configClient=ConfigClient.create(confBuilder.build());
    loggingClient=LoggingClient.create(logBuilder.build());
    metricsClient=MetricsClient.create(metricsBuilder.build());
  }
 catch (  Exception ex) {
    throw new IOException(ex);
  }
}

Fixed version (ground truth):
public GrpcLoggingRpc(LoggingOptions options) throws IOException {
  GrpcTransportOptions transportOptions=(GrpcTransportOptions)options.getTransportOptions();
  executorFactory=transportOptions.getExecutorFactory();
  executor=executorFactory.get();
  try {
    ExecutorProvider executorProvider=FixedExecutorProvider.create(executor);
    ChannelProvider channelProvider;
    if (options.getHost().contains("String_Node_Str") || NoCredentials.getInstance().equals(options.getCredentials())) {
      ManagedChannel managedChannel=ManagedChannelBuilder.forTarget(options.getHost()).usePlaintext(true).executor(executor).build();
      channelProvider=FixedChannelProvider.create(managedChannel);
    }
 else {
      channelProvider=GrpcTransportOptions.setUpChannelProvider(LoggingSettings.defaultChannelProviderBuilder(),options);
    }
    providerManager=ProviderManager.newBuilder().setChannelProvider(channelProvider).setExecutorProvider(executorProvider).build();
    UnaryCallSettings.Builder callSettingsBuilder=transportOptions.getApiCallSettings(options.getRetrySettings());
    ConfigSettings.Builder confBuilder=ConfigSettings.defaultBuilder().setExecutorProvider(providerManager).setChannelProvider(providerManager).applyToAllUnaryMethods(callSettingsBuilder);
    LoggingSettings.Builder logBuilder=LoggingSettings.defaultBuilder().setExecutorProvider(providerManager).setChannelProvider(providerManager).applyToAllUnaryMethods(callSettingsBuilder);
    MetricsSettings.Builder metricsBuilder=MetricsSettings.defaultBuilder().setExecutorProvider(providerManager).setChannelProvider(providerManager).applyToAllUnaryMethods(callSettingsBuilder);
    configClient=ConfigClient.create(confBuilder.build());
    loggingClient=LoggingClient.create(logBuilder.build());
    metricsClient=MetricsClient.create(metricsBuilder.build());
  }
 catch (  Exception ex) {
    throw new IOException(ex);
  }
}