Program: 6376
Project: 6376
Buggy source:
@BeforeClass public static void init() throws IOException {
  Configuration hConf=new Configuration();
  hConf.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR,tmpFolder.newFolder().getAbsolutePath());
  dfsCluster=new MiniDFSCluster.Builder(hConf).numDataNodes(1).build();
  final LocationFactory lf=new FileContextLocationFactory(dfsCluster.getFileSystem().getConf());
  final NamespacedLocationFactory nlf=new DefaultNamespacedLocationFactory(cConf,lf);
  Injector injector=Guice.createInjector(new ConfigModule(cConf,hConf),new ZKClientModule(),new AbstractModule(){
    @Override protected void configure(){
      bind(LocationFactory.class).toInstance(lf);
      bind(NamespacedLocationFactory.class).toInstance(nlf);
    }
  }
,new TransactionMetricsModule(),new DiscoveryRuntimeModule().getInMemoryModules(),new DataFabricModules().getDistributedModules(),Modules.override(new DataSetsModules().getDistributedModules()).with(new AbstractModule(){
    @Override protected void configure(){
      bind(MetadataStore.class).to(NoOpMetadataStore.class);
    }
  }
),new ExploreClientModule(),new ViewAdminModules().getInMemoryModules(),Modules.override(new StreamAdminModules().getDistributedModules()).with(new AbstractModule(){
    @Override protected void configure(){
      bind(StreamCoordinatorClient.class).to(InMemoryStreamCoordinatorClient.class).in(Scopes.SINGLETON);
      bind(StreamMetaStore.class).to(InMemoryStreamMetaStore.class);
    }
  }
),new AbstractModule(){
    @Override protected void configure(){
      bind(NotificationFeedManager.class).to(NoOpNotificationFeedManager.class);
    }
  }
);
  locationFactory=injector.getInstance(LocationFactory.class);
  namespacedLocationFactory=injector.getInstance(NamespacedLocationFactory.class);
  streamAdmin=injector.getInstance(StreamAdmin.class);
  fileWriterFactory=injector.getInstance(StreamFileWriterFactory.class);
  streamCoordinatorClient=injector.getInstance(StreamCoordinatorClient.class);
  streamCoordinatorClient.startAndWait();
}

Fixed version (ground truth):
@BeforeClass public static void init() throws IOException {
  Configuration hConf=new Configuration();
  hConf.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR,tmpFolder.newFolder().getAbsolutePath());
  dfsCluster=new MiniDFSCluster.Builder(hConf).numDataNodes(1).build();
  final LocationFactory lf=new FileContextLocationFactory(dfsCluster.getFileSystem().getConf());
  final NamespacedLocationFactory nlf=new DefaultNamespacedLocationFactory(cConf,lf);
  Injector injector=Guice.createInjector(new ConfigModule(cConf,hConf),new ZKClientModule(),new AbstractModule(){
    @Override protected void configure(){
      bind(LocationFactory.class).toInstance(lf);
      bind(NamespacedLocationFactory.class).toInstance(nlf);
    }
  }
,new TransactionMetricsModule(),new DiscoveryRuntimeModule().getInMemoryModules(),new DataFabricModules().getDistributedModules(),Modules.override(new DataSetsModules().getDistributedModules()).with(new AbstractModule(){
    @Override protected void configure(){
      bind(MetadataStore.class).to(NoOpMetadataStore.class);
    }
  }
),new ExploreClientModule(),new ViewAdminModules().getInMemoryModules(),Modules.override(new StreamAdminModules().getDistributedModules()).with(new AbstractModule(){
    @Override protected void configure(){
      bind(StreamCoordinatorClient.class).to(InMemoryStreamCoordinatorClient.class).in(Scopes.SINGLETON);
      bind(StreamMetaStore.class).to(InMemoryStreamMetaStore.class);
    }
  }
),new AbstractModule(){
    @Override protected void configure(){
      bind(NotificationFeedManager.class).to(NoOpNotificationFeedManager.class);
      bind(NamespaceStore.class).to(DefaultNamespaceStore.class);
    }
  }
);
  locationFactory=injector.getInstance(LocationFactory.class);
  namespacedLocationFactory=injector.getInstance(NamespacedLocationFactory.class);
  namespaceStore=injector.getInstance(NamespaceStore.class);
  streamAdmin=injector.getInstance(StreamAdmin.class);
  fileWriterFactory=injector.getInstance(StreamFileWriterFactory.class);
  streamCoordinatorClient=injector.getInstance(StreamCoordinatorClient.class);
  streamCoordinatorClient.startAndWait();
}