Program: 7545
Project: 7545
Buggy source:
@BeforeClass public static void init() throws Exception {
  testAppDir=tmpFolder.newFolder();
  File appDir=new File(testAppDir,"String_Node_Str");
  File datasetDir=new File(testAppDir,"String_Node_Str");
  File tmpDir=new File(testAppDir,"String_Node_Str");
  appDir.mkdirs();
  datasetDir.mkdirs();
  tmpDir.mkdirs();
  CConfiguration configuration=CConfiguration.create();
  configuration.set(Constants.AppFabric.OUTPUT_DIR,appDir.getAbsolutePath());
  configuration.set(Constants.AppFabric.TEMP_DIR,tmpDir.getAbsolutePath());
  configuration.set(Constants.Dataset.Manager.OUTPUT_DIR,datasetDir.getAbsolutePath());
  configuration.set(Constants.Dataset.Manager.ADDRESS,"String_Node_Str");
  configuration.set(MetricsConstants.ConfigKeys.SERVER_PORT,Integer.toString(Networks.getRandomPort()));
  configuration.set(Constants.CFG_LOCAL_DATA_DIR,tmpFolder.newFolder("String_Node_Str").getAbsolutePath());
  configuration.setBoolean(Constants.Dangerous.UNRECOVERABLE_RESET,true);
  configuration.setBoolean(Constants.Explore.EXPLORE_ENABLED,true);
  configuration.set(Constants.Explore.LOCAL_DATA_DIR,tmpFolder.newFolder("String_Node_Str").getAbsolutePath());
  if (OSDetector.isWindows()) {
    File binDir=new File(tmpDir,"String_Node_Str");
    binDir.mkdir();
    copyTempFile("String_Node_Str",tmpDir);
    copyTempFile("String_Node_Str",binDir);
    System.setProperty("String_Node_Str",tmpDir.getAbsolutePath());
    System.load(new File(tmpDir,"String_Node_Str").getAbsolutePath());
  }
  injector=Guice.createInjector(createDataFabricModule(configuration),new DataSetsModules().getInMemoryModule(),new DataSetServiceModules().getInMemoryModule(),new ConfigModule(configuration),new IOModule(),new AuthModule(),new LocationRuntimeModule().getInMemoryModules(),new DiscoveryRuntimeModule().getInMemoryModules(),new AppFabricServiceRuntimeModule().getInMemoryModules(),new ServiceStoreModules().getInMemoryModule(),new ProgramRunnerRuntimeModule().getInMemoryModules(),new StreamServiceModule(){
    @Override protected void configure(){
      super.configure();
      bind(StreamHandler.class).in(Scopes.SINGLETON);
      bind(StreamFileJanitorService.class).to(LocalStreamFileJanitorService.class).in(Scopes.SINGLETON);
      expose(StreamHandler.class);
    }
  }
,new TestMetricsClientModule(),new MetricsHandlerModule(),new LoggingModules().getInMemoryModules(),new ExploreRuntimeModule().getInMemoryModules(),new AbstractModule(){
    @Override protected void configure(){
      install(new FactoryModuleBuilder().implement(ApplicationManager.class,DefaultApplicationManager.class).build(ApplicationManagerFactory.class));
      install(new FactoryModuleBuilder().implement(StreamWriter.class,DefaultStreamWriter.class).build(StreamWriterFactory.class));
      install(new FactoryModuleBuilder().implement(ProcedureClient.class,DefaultProcedureClient.class).build(ProcedureClientFactory.class));
    }
  }
);
  injector.getInstance(InMemoryTransactionManager.class).startAndWait();
  locationFactory=injector.getInstance(LocationFactory.class);
  metricsQueryService=injector.getInstance(MetricsQueryService.class);
  metricsQueryService.startAndWait();
  metricsCollectionService=injector.getInstance(MetricsCollectionService.class);
  metricsCollectionService.startAndWait();
  logAppenderInitializer=injector.getInstance(LogAppenderInitializer.class);
  logAppenderInitializer.initialize();
  httpHandler=injector.getInstance(AppFabricHttpHandler.class);
  datasetService=injector.getInstance(DatasetService.class);
  datasetService.startAndWait();
  DatasetFramework dsFramework=injector.getInstance(DatasetFramework.class);
  datasetFramework=new NamespacedDatasetFramework(dsFramework,new ReactorDatasetNamespace(configuration,DataSetAccessor.Namespace.USER));
  schedulerService=injector.getInstance(SchedulerService.class);
  schedulerService.startAndWait();
  discoveryClient=injector.getInstance(DiscoveryServiceClient.class);
  exploreExecutorService=injector.getInstance(ExploreExecutorService.class);
  exploreExecutorService.startAndWait();
}

Fixed version (ground truth):
@BeforeClass public static void init() throws Exception {
  testAppDir=tmpFolder.newFolder();
  File appDir=new File(testAppDir,"String_Node_Str");
  File datasetDir=new File(testAppDir,"String_Node_Str");
  File tmpDir=new File(testAppDir,"String_Node_Str");
  appDir.mkdirs();
  datasetDir.mkdirs();
  tmpDir.mkdirs();
  CConfiguration configuration=CConfiguration.create();
  configuration.set(Constants.AppFabric.OUTPUT_DIR,appDir.getAbsolutePath());
  configuration.set(Constants.AppFabric.TEMP_DIR,tmpDir.getAbsolutePath());
  configuration.set(Constants.Dataset.Manager.OUTPUT_DIR,datasetDir.getAbsolutePath());
  configuration.set(Constants.Dataset.Manager.ADDRESS,"String_Node_Str");
  configuration.set(MetricsConstants.ConfigKeys.SERVER_PORT,Integer.toString(Networks.getRandomPort()));
  configuration.set(Constants.CFG_LOCAL_DATA_DIR,tmpFolder.newFolder("String_Node_Str").getAbsolutePath());
  configuration.setBoolean(Constants.Dangerous.UNRECOVERABLE_RESET,true);
  configuration.setBoolean(Constants.Explore.EXPLORE_ENABLED,true);
  configuration.set(Constants.Explore.LOCAL_DATA_DIR,tmpFolder.newFolder("String_Node_Str").getAbsolutePath());
  if (OSDetector.isWindows()) {
    File binDir=new File(tmpDir,"String_Node_Str");
    binDir.mkdir();
    copyTempFile("String_Node_Str",tmpDir);
    copyTempFile("String_Node_Str",binDir);
    System.setProperty("String_Node_Str",tmpDir.getAbsolutePath());
    System.load(new File(tmpDir,"String_Node_Str").getAbsolutePath());
  }
  injector=Guice.createInjector(createDataFabricModule(configuration),new DataSetsModules().getInMemoryModule(),new DataSetServiceModules().getInMemoryModule(),new ConfigModule(configuration),new IOModule(),new AuthModule(),new LocationRuntimeModule().getInMemoryModules(),new DiscoveryRuntimeModule().getInMemoryModules(),new AppFabricServiceRuntimeModule().getInMemoryModules(),new ServiceStoreModules().getInMemoryModule(),new ProgramRunnerRuntimeModule().getInMemoryModules(),new StreamServiceModule(){
    @Override protected void configure(){
      super.configure();
      bind(StreamHandler.class).in(Scopes.SINGLETON);
      bind(StreamFileJanitorService.class).to(LocalStreamFileJanitorService.class).in(Scopes.SINGLETON);
      expose(StreamHandler.class);
    }
  }
,new TestMetricsClientModule(),new MetricsHandlerModule(),new LoggingModules().getInMemoryModules(),new ExploreRuntimeModule().getInMemoryModules(),new ExploreClientModule(),new AbstractModule(){
    @Override protected void configure(){
      install(new FactoryModuleBuilder().implement(ApplicationManager.class,DefaultApplicationManager.class).build(ApplicationManagerFactory.class));
      install(new FactoryModuleBuilder().implement(StreamWriter.class,DefaultStreamWriter.class).build(StreamWriterFactory.class));
      install(new FactoryModuleBuilder().implement(ProcedureClient.class,DefaultProcedureClient.class).build(ProcedureClientFactory.class));
    }
  }
);
  injector.getInstance(InMemoryTransactionManager.class).startAndWait();
  locationFactory=injector.getInstance(LocationFactory.class);
  metricsQueryService=injector.getInstance(MetricsQueryService.class);
  metricsQueryService.startAndWait();
  metricsCollectionService=injector.getInstance(MetricsCollectionService.class);
  metricsCollectionService.startAndWait();
  logAppenderInitializer=injector.getInstance(LogAppenderInitializer.class);
  logAppenderInitializer.initialize();
  httpHandler=injector.getInstance(AppFabricHttpHandler.class);
  datasetService=injector.getInstance(DatasetService.class);
  datasetService.startAndWait();
  DatasetFramework dsFramework=injector.getInstance(DatasetFramework.class);
  datasetFramework=new NamespacedDatasetFramework(dsFramework,new ReactorDatasetNamespace(configuration,DataSetAccessor.Namespace.USER));
  schedulerService=injector.getInstance(SchedulerService.class);
  schedulerService.startAndWait();
  discoveryClient=injector.getInstance(DiscoveryServiceClient.class);
  exploreExecutorService=injector.getInstance(ExploreExecutorService.class);
  exploreExecutorService.startAndWait();
}