Program: 6695
Project: 6695
Buggy source:
@BeforeClass public static void init() throws IOException {
  zkServer=InMemoryZKServer.builder().setDataDir(tmpFolder.newFolder()).build();
  zkServer.startAndWait();
  Configuration hConf=new Configuration();
  hConf.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR,tmpFolder.newFolder().getAbsolutePath());
  dfsCluster=new MiniDFSCluster.Builder(hConf).numDataNodes(1).build();
  FileSystem fileSystem=dfsCluster.getFileSystem();
  final HDFSLocationFactory lf=new HDFSLocationFactory(fileSystem);
  final NamespacedLocationFactory nlf=new DefaultNamespacedLocationFactory(cConf,lf);
  cConf.set(Constants.Zookeeper.QUORUM,zkServer.getConnectionStr());
  Injector injector=Guice.createInjector(new ConfigModule(cConf),new ZKClientModule(),new DiscoveryRuntimeModule().getDistributedModules(),new DataFabricModules().getDistributedModules(),new DataSetsModules().getDistributedModules(false),new TransactionMetricsModule(),new NotificationFeedServiceRuntimeModule().getInMemoryModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(LocationFactory.class).toInstance(lf);
      bind(NamespacedLocationFactory.class).toInstance(nlf);
    }
  }
,Modules.override(new StreamAdminModules().getDistributedModules()).with(new AbstractModule(){
    @Override protected void configure(){
      bind(StreamMetaStore.class).to(InMemoryStreamMetaStore.class);
    }
  }
));
  zkClient=injector.getInstance(ZKClientService.class);
  zkClient.startAndWait();
  setupNamespaces(injector.getInstance(NamespacedLocationFactory.class));
  streamAdmin=injector.getInstance(StreamAdmin.class);
  coordinatorClient=injector.getInstance(StreamCoordinatorClient.class);
  coordinatorClient.startAndWait();
}

Fixed version (ground truth):
@BeforeClass public static void init() throws IOException {
  zkServer=InMemoryZKServer.builder().setDataDir(tmpFolder.newFolder()).build();
  zkServer.startAndWait();
  Configuration hConf=new Configuration();
  hConf.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR,tmpFolder.newFolder().getAbsolutePath());
  dfsCluster=new MiniDFSCluster.Builder(hConf).numDataNodes(1).build();
  FileSystem fileSystem=dfsCluster.getFileSystem();
  final HDFSLocationFactory lf=new HDFSLocationFactory(fileSystem);
  final NamespacedLocationFactory nlf=new DefaultNamespacedLocationFactory(cConf,lf);
  cConf.set(Constants.Zookeeper.QUORUM,zkServer.getConnectionStr());
  Injector injector=Guice.createInjector(new ConfigModule(cConf),new ZKClientModule(),new DiscoveryRuntimeModule().getDistributedModules(),new DataFabricModules().getDistributedModules(),new DataSetsModules().getDistributedModules(),new TransactionMetricsModule(),new NotificationFeedServiceRuntimeModule().getInMemoryModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(LocationFactory.class).toInstance(lf);
      bind(NamespacedLocationFactory.class).toInstance(nlf);
    }
  }
,Modules.override(new StreamAdminModules().getDistributedModules()).with(new AbstractModule(){
    @Override protected void configure(){
      bind(StreamMetaStore.class).to(InMemoryStreamMetaStore.class);
    }
  }
));
  zkClient=injector.getInstance(ZKClientService.class);
  zkClient.startAndWait();
  setupNamespaces(injector.getInstance(NamespacedLocationFactory.class));
  streamAdmin=injector.getInstance(StreamAdmin.class);
  coordinatorClient=injector.getInstance(StreamCoordinatorClient.class);
  coordinatorClient.startAndWait();
}