Program: 7211
Project: 7211
Buggy source:
@BeforeClass public static void beforeClass() throws IOException {
  zkServer=InMemoryZKServer.builder().setDataDir(TEMP_FOLDER.newFolder()).build();
  zkServer.startAndWait();
  conf=CConfiguration.create();
  conf.set(Constants.Zookeeper.QUORUM,zkServer.getConnectionStr());
  conf.setInt(Constants.Stream.CONTAINER_INSTANCE_ID,0);
  conf.set(Constants.CFG_LOCAL_DATA_DIR,TEMP_FOLDER.newFolder().getAbsolutePath());
  injector=Guice.createInjector(Modules.override(new ZKClientModule(),new DataFabricModules().getInMemoryModules(),new ConfigModule(conf,new Configuration()),new AuthModule(),new DiscoveryRuntimeModule().getInMemoryModules(),new LocationRuntimeModule().getInMemoryModules(),new ExploreClientModule(),new DataSetServiceModules().getInMemoryModules(),new DataSetsModules().getStandaloneModules(),new NotificationFeedServiceRuntimeModule().getInMemoryModules(),new NotificationServiceRuntimeModule().getInMemoryModules(),new MetricsClientRuntimeModule().getInMemoryModules(),new StreamServiceRuntimeModule().getDistributedModules(),new StreamAdminModules().getInMemoryModules()).with(new AbstractModule(){
    @Override protected void configure(){
      bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class);
      bind(StreamConsumerStateStoreFactory.class).to(LevelDBStreamConsumerStateStoreFactory.class).in(Singleton.class);
      bind(StreamAdmin.class).to(FileStreamAdmin.class).in(Singleton.class);
      bind(StreamConsumerFactory.class).to(LevelDBStreamFileConsumerFactory.class).in(Singleton.class);
      bind(StreamFileWriterFactory.class).to(LocationStreamFileWriterFactory.class).in(Singleton.class);
      bind(StreamFileJanitorService.class).to(LocalStreamFileJanitorService.class).in(Scopes.SINGLETON);
      bind(StreamMetaStore.class).to(InMemoryStreamMetaStore.class).in(Scopes.SINGLETON);
      bind(HeartbeatPublisher.class).to(MockHeartbeatPublisher.class).in(Scopes.SINGLETON);
    }
  }
));
  zkClient=injector.getInstance(ZKClientService.class);
  zkClient.startAndWait();
  streamHttpService=injector.getInstance(StreamHttpService.class);
  streamHttpService.startAndWait();
  streamService=injector.getInstance(StreamService.class);
  streamService.startAndWait();
  heartbeatPublisher=(MockHeartbeatPublisher)injector.getInstance(HeartbeatPublisher.class);
  hostname=streamHttpService.getBindAddress().getHostName();
  port=streamHttpService.getBindAddress().getPort();
}

Fixed version (ground truth):
@BeforeClass public static void beforeClass() throws IOException {
  zkServer=InMemoryZKServer.builder().setDataDir(TEMP_FOLDER.newFolder()).build();
  zkServer.startAndWait();
  CConfiguration conf=CConfiguration.create();
  conf.set(Constants.Zookeeper.QUORUM,zkServer.getConnectionStr());
  conf.setInt(Constants.Stream.CONTAINER_INSTANCE_ID,0);
  conf.set(Constants.CFG_LOCAL_DATA_DIR,TEMP_FOLDER.newFolder().getAbsolutePath());
  Injector injector=Guice.createInjector(Modules.override(new ZKClientModule(),new DataFabricModules().getInMemoryModules(),new ConfigModule(conf,new Configuration()),new AuthModule(),new DiscoveryRuntimeModule().getInMemoryModules(),new LocationRuntimeModule().getInMemoryModules(),new ExploreClientModule(),new DataSetServiceModules().getInMemoryModules(),new DataSetsModules().getStandaloneModules(),new NotificationFeedServiceRuntimeModule().getInMemoryModules(),new NotificationServiceRuntimeModule().getInMemoryModules(),new MetricsClientRuntimeModule().getInMemoryModules(),new StreamServiceRuntimeModule().getDistributedModules(),new StreamAdminModules().getInMemoryModules()).with(new AbstractModule(){
    @Override protected void configure(){
      bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class);
      bind(StreamConsumerStateStoreFactory.class).to(LevelDBStreamConsumerStateStoreFactory.class).in(Singleton.class);
      bind(StreamAdmin.class).to(FileStreamAdmin.class).in(Singleton.class);
      bind(StreamConsumerFactory.class).to(LevelDBStreamFileConsumerFactory.class).in(Singleton.class);
      bind(StreamFileWriterFactory.class).to(LocationStreamFileWriterFactory.class).in(Singleton.class);
      bind(StreamFileJanitorService.class).to(LocalStreamFileJanitorService.class).in(Scopes.SINGLETON);
      bind(StreamMetaStore.class).to(InMemoryStreamMetaStore.class).in(Scopes.SINGLETON);
      bind(HeartbeatPublisher.class).to(MockHeartbeatPublisher.class).in(Scopes.SINGLETON);
    }
  }
));
  zkClient=injector.getInstance(ZKClientService.class);
  zkClient.startAndWait();
  streamHttpService=injector.getInstance(StreamHttpService.class);
  streamHttpService.startAndWait();
  streamService=injector.getInstance(StreamService.class);
  streamService.startAndWait();
  heartbeatPublisher=(MockHeartbeatPublisher)injector.getInstance(HeartbeatPublisher.class);
  hostname=streamHttpService.getBindAddress().getHostName();
  port=streamHttpService.getBindAddress().getPort();
  streamAdmin=injector.getInstance(StreamAdmin.class);
  streamHandler=injector.getInstance(StreamHandler.class);
  streamFetchHandler=injector.getInstance(StreamFetchHandler.class);
  streamMetaStore=injector.getInstance(StreamMetaStore.class);
  injector.getInstance(LocationFactory.class).create(Constants.DEFAULT_NAMESPACE).mkdirs();
}