nus-yam/ex-repair huggingface dataset:
Program: 7547
Project: 7547
Buggy source:
@Override protected StreamConsumer create(String tableName,StreamConfig streamConfig,ConsumerConfig consumerConfig,StreamConsumerStateStore stateStore,StreamConsumerState beginConsumerState,FileReader<StreamEventOffset,Iterable<StreamFileOffset>> reader,@Nullable ReadFilter extraFilter) throws IOException {
  String hBaseTableName=HBaseTableUtil.getHBaseTableName(tableName);
  HTableDescriptor htd=new HTableDescriptor(hBaseTableName);
  HColumnDescriptor hcd=new HColumnDescriptor(QueueEntryRow.COLUMN_FAMILY);
  htd.addFamily(hcd);
  hcd.setMaxVersions(1);
  int splits=cConf.getInt(Constants.Stream.CONSUMER_TABLE_PRESPLITS,1);
  byte[][] splitKeys=HBaseTableUtil.getSplitKeys(splits);
  tableUtil.createTableIfNotExists(getAdmin(),Bytes.toBytes(hBaseTableName),htd,splitKeys,QueueConstants.MAX_CREATE_TABLE_WAIT,TimeUnit.MILLISECONDS);
  HTable hTable=new HTable(hConf,hBaseTableName);
  hTable.setWriteBufferSize(Constants.Stream.HBASE_WRITE_BUFFER_SIZE);
  hTable.setAutoFlush(false);
  return new HBaseStreamFileConsumer(streamConfig,consumerConfig,hTable,reader,stateStore,beginConsumerState,extraFilter,HBaseQueueAdmin.ROW_KEY_DISTRIBUTOR);
}

Fixed version (ground truth):
@Override protected StreamConsumer create(String tableName,StreamConfig streamConfig,ConsumerConfig consumerConfig,StreamConsumerStateStore stateStore,StreamConsumerState beginConsumerState,FileReader<StreamEventOffset,Iterable<StreamFileOffset>> reader,@Nullable ReadFilter extraFilter) throws IOException {
  String hBaseTableName=HBaseTableUtil.getHBaseTableName(tableName);
  HTableDescriptor htd=new HTableDescriptor(hBaseTableName);
  HColumnDescriptor hcd=new HColumnDescriptor(QueueEntryRow.COLUMN_FAMILY);
  htd.addFamily(hcd);
  hcd.setMaxVersions(1);
  int splits=cConf.getInt(Constants.Stream.CONSUMER_TABLE_PRESPLITS,1);
  byte[][] splitKeys=HBaseTableUtil.getSplitKeys(splits);
  tableUtil.createTableIfNotExists(getAdmin(),Bytes.toBytes(hBaseTableName),htd,splitKeys,QueueConstants.MAX_CREATE_TABLE_WAIT,TimeUnit.MILLISECONDS);
  HTable hTable=new HTable(hConf,hBaseTableName);
  hTable.setWriteBufferSize(Constants.Stream.HBASE_WRITE_BUFFER_SIZE);
  hTable.setAutoFlush(false);
  return new HBaseStreamFileConsumer(cConf,streamConfig,consumerConfig,hTable,reader,stateStore,beginConsumerState,extraFilter,HBaseQueueAdmin.ROW_KEY_DISTRIBUTOR);
}
Program: 7549
Project: 7549
Buggy source:
@Override public Module getInMemoryModules(){
  return Modules.combine(new AppFabricServiceModule(),new ServiceStoreModules().getInMemoryModule(),new AbstractModule(){
    @Override protected void configure(){
      bind(SchedulerService.class).to(LocalSchedulerService.class).in(Scopes.SINGLETON);
      bind(Scheduler.class).to(SchedulerService.class);
      MapBinder<String,ReactorServiceManager> mapBinder=MapBinder.newMapBinder(binder(),String.class,ReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.LOGSAVER).to(InMemoryLogSaverServiceMananger.class);
      mapBinder.addBinding(Constants.Service.TRANSACTION).to(InMemoryTransactionServiceManager.class);
      mapBinder.addBinding(Constants.Service.METRICS_PROCESSOR).to(InMemoryLogSaverServiceMananger.class);
      mapBinder.addBinding(Constants.Service.METRICS).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.APP_FABRIC_HTTP).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.STREAMS).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.DATASET_EXECUTOR).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.EXPLORE_HTTP_USER_SERVICE).to(InMemoryReactorServiceManager.class);
    }
  }
);
}

Fixed version (ground truth):
@Override public Module getInMemoryModules(){
  return Modules.combine(new AppFabricServiceModule(),new AbstractModule(){
    @Override protected void configure(){
      bind(SchedulerService.class).to(LocalSchedulerService.class).in(Scopes.SINGLETON);
      bind(Scheduler.class).to(SchedulerService.class);
      MapBinder<String,ReactorServiceManager> mapBinder=MapBinder.newMapBinder(binder(),String.class,ReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.LOGSAVER).to(InMemoryLogSaverServiceMananger.class);
      mapBinder.addBinding(Constants.Service.TRANSACTION).to(InMemoryTransactionServiceManager.class);
      mapBinder.addBinding(Constants.Service.METRICS_PROCESSOR).to(InMemoryLogSaverServiceMananger.class);
      mapBinder.addBinding(Constants.Service.METRICS).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.APP_FABRIC_HTTP).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.STREAMS).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.DATASET_EXECUTOR).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.EXPLORE_HTTP_USER_SERVICE).to(InMemoryReactorServiceManager.class);
    }
  }
);
}
Program: 7550
Project: 7550
Buggy source:
private Injector createPersistentModules(){
  ImmutableList<Module> singleNodeModules=ImmutableList.of(new ConfigModule(cConf),new LocalConfigModule(),new IOModule(),new AuthModule(),new LocationRuntimeModule().getSingleNodeModules(),new DiscoveryRuntimeModule().getSingleNodeModules(),new ProgramRunnerRuntimeModule().getSingleNodeModules(),new DataFabricModules().getSingleNodeModules(),new MetricsClientRuntimeModule().getMapReduceModules(taskContext),new LoggingModules().getSingleNodeModules());
  return Guice.createInjector(singleNodeModules);
}

Fixed version (ground truth):
private Injector createPersistentModules(){
  ImmutableList<Module> singleNodeModules=ImmutableList.of(new ConfigModule(cConf),new LocalConfigModule(),new IOModule(),new AuthModule(),new LocationRuntimeModule().getSingleNodeModules(),new DiscoveryRuntimeModule().getSingleNodeModules(),new ProgramRunnerRuntimeModule().getSingleNodeModules(),new DataFabricModules().getSingleNodeModules(),new MetricsClientRuntimeModule().getMapReduceModules(taskContext),new LoggingModules().getSingleNodeModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(ProgramServiceDiscovery.class).to(DistributedProgramServiceDiscovery.class).in(Scopes.SINGLETON);
    }
  }
);
  return Guice.createInjector(singleNodeModules);
}
Program: 7551
Project: 7551
Buggy source:
private Injector createInMemoryModules(){
  ImmutableList<Module> inMemoryModules=ImmutableList.of(new ConfigModule(cConf),new LocalConfigModule(),new IOModule(),new AuthModule(),new LocationRuntimeModule().getInMemoryModules(),new DiscoveryRuntimeModule().getInMemoryModules(),new ProgramRunnerRuntimeModule().getInMemoryModules(),new DataFabricModules().getInMemoryModules(),new MetricsClientRuntimeModule().getNoopModules(),new LoggingModules().getInMemoryModules());
  return Guice.createInjector(inMemoryModules);
}

Fixed version (ground truth):
private Injector createInMemoryModules(){
  ImmutableList<Module> inMemoryModules=ImmutableList.of(new ConfigModule(cConf),new LocalConfigModule(),new IOModule(),new AuthModule(),new LocationRuntimeModule().getInMemoryModules(),new DiscoveryRuntimeModule().getInMemoryModules(),new ProgramRunnerRuntimeModule().getInMemoryModules(),new DataFabricModules().getInMemoryModules(),new MetricsClientRuntimeModule().getNoopModules(),new LoggingModules().getInMemoryModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(ProgramServiceDiscovery.class).to(DistributedProgramServiceDiscovery.class).in(Scopes.SINGLETON);
    }
  }
);
  return Guice.createInjector(inMemoryModules);
}
Program: 7552
Project: 7552
Buggy source:
/** 
 * Executes an HTTP request to the url provided.
 * @param requestMethod HTTP method of the request.
 * @param url URL of the request.
 * @param headers Headers of the request.
 * @param body Body of the request. If provided, bodySrc must be null.
 * @param bodySrc Body of the request as an {@link InputStream}. If provided, body must be null.
 * @return repsonse of the request
 * @throws IOException
 */
public static HttpResponse doRequest(String requestMethod,URL url,@Nullable Map<String,String> headers,@Nullable byte[] body,@Nullable InputStream bodySrc) throws IOException {
  Preconditions.checkArgument(!(body != null && bodySrc != null),"String_Node_Str");
  HttpURLConnection conn=(HttpURLConnection)url.openConnection();
  conn.setRequestMethod(requestMethod);
  if (headers != null) {
    for (    Map.Entry<String,String> header : headers.entrySet()) {
      conn.setRequestProperty(header.getKey(),header.getValue());
    }
  }
  if (body != null || bodySrc != null) {
    conn.setDoOutput(true);
  }
  conn.connect();
  try {
    if (body != null || bodySrc != null) {
      OutputStream os=conn.getOutputStream();
      if (body != null) {
        os.write(body);
      }
 else {
        ByteStreams.copy(bodySrc,os);
      }
    }
    try {
      if (isSuccessful(conn.getResponseCode())) {
        return new HttpResponse(conn.getResponseCode(),conn.getResponseMessage(),ByteStreams.toByteArray(conn.getInputStream()));
      }
    }
 catch (    FileNotFoundException e) {
    }
    InputStream es=conn.getErrorStream();
    byte[] content=(es == null) ? new byte[0] : ByteStreams.toByteArray(es);
    return new HttpResponse(conn.getResponseCode(),conn.getResponseMessage(),content);
  }
  finally {
    conn.disconnect();
  }
}

Fixed version (ground truth):
/** 
 * Executes an HTTP request to the url provided.
 * @param requestMethod HTTP method of the request.
 * @param url URL of the request.
 * @param headers Headers of the request.
 * @param body Body of the request. If provided, bodySrc must be null.
 * @param bodySrc Body of the request as an {@link InputStream}. If provided, body must be null.
 * @return repsonse of the request
 * @throws IOException
 */
public static HttpResponse doRequest(String requestMethod,URL url,@Nullable Map<String,String> headers,@Nullable String body,@Nullable InputStream bodySrc) throws IOException {
  return doRequest(requestMethod,url,headers,body != null ? body.getBytes(Charsets.UTF_8) : null,bodySrc);
}
Program: 7553
Project: 7553
Buggy source:
/** 
 * Executes a GET request to the url provided.
 * @param url URL of the request.
 * @return response of the request
 * @throws IOException
 */
public static HttpResponse get(URL url) throws IOException {
  return doRequest("String_Node_Str",url,null,null,null);
}

Fixed version (ground truth):
/** 
 * Executes a GET request to the url provided.
 * @param url URL of the request.
 * @return response of the request
 * @throws IOException
 */
public static HttpResponse get(URL url) throws IOException {
  return doRequest("String_Node_Str",url,null,(byte[])null,null);
}
Program: 7554
Project: 7554
Buggy source:
/** 
 * Executes a DELETE request to the url provided.
 * @param url URL of the request.
 * @return response of the request
 * @throws IOException
 */
public static HttpResponse delete(URL url) throws IOException {
  return doRequest("String_Node_Str",url,null,null,null);
}

Fixed version (ground truth):
/** 
 * Executes a DELETE request to the url provided.
 * @param url URL of the request.
 * @return response of the request
 * @throws IOException
 */
public static HttpResponse delete(URL url) throws IOException {
  return doRequest("String_Node_Str",url,null,(byte[])null,null);
}
Program: 7555
Project: 7555
Buggy source:
@Override public Module getInMemoryModules(){
  return Modules.combine(new AppFabricServiceModule(),new AbstractModule(){
    @Override protected void configure(){
      bind(SchedulerService.class).to(LocalSchedulerService.class).in(Scopes.SINGLETON);
      bind(Scheduler.class).to(SchedulerService.class);
      MapBinder<String,ReactorServiceManager> mapBinder=MapBinder.newMapBinder(binder(),String.class,ReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.LOGSAVER).to(InMemoryLogSaverServiceMananger.class);
      mapBinder.addBinding(Constants.Service.TRANSACTION).to(InMemoryTransactionServiceManager.class);
      mapBinder.addBinding(Constants.Service.METRICS_PROCESSOR).to(InMemoryLogSaverServiceMananger.class);
      mapBinder.addBinding(Constants.Service.METRICS).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.APP_FABRIC_HTTP).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.STREAMS).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.DATASET_EXECUTOR).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.EXPLORE_HTTP_USER_SERVICE).to(InMemoryReactorServiceManager.class);
    }
  }
);
}

Fixed version (ground truth):
@Override public Module getInMemoryModules(){
  return Modules.combine(new AppFabricServiceModule(),new ServiceStoreModules().getInMemoryModule(),new AbstractModule(){
    @Override protected void configure(){
      bind(SchedulerService.class).to(LocalSchedulerService.class).in(Scopes.SINGLETON);
      bind(Scheduler.class).to(SchedulerService.class);
      MapBinder<String,ReactorServiceManager> mapBinder=MapBinder.newMapBinder(binder(),String.class,ReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.LOGSAVER).to(InMemoryLogSaverServiceMananger.class);
      mapBinder.addBinding(Constants.Service.TRANSACTION).to(InMemoryTransactionServiceManager.class);
      mapBinder.addBinding(Constants.Service.METRICS_PROCESSOR).to(InMemoryLogSaverServiceMananger.class);
      mapBinder.addBinding(Constants.Service.METRICS).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.APP_FABRIC_HTTP).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.STREAMS).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.DATASET_EXECUTOR).to(InMemoryReactorServiceManager.class);
      mapBinder.addBinding(Constants.Service.EXPLORE_HTTP_USER_SERVICE).to(InMemoryReactorServiceManager.class);
    }
  }
);
}
Program: 7557
Project: 7557
Buggy source:
/** 
 * Receives an input containing application specification and location and verifies both.
 * @param input An instance of {@link com.continuuity.internal.app.deploy.pipeline.ApplicationSpecLocation}
 */
@Override public void process(ApplicationSpecLocation input) throws Exception {
  ApplicationSpecification specification=input.getSpecification();
  for (  Map.Entry<String,String> moduleEntry : specification.getDatasetModules().entrySet()) {
    JarClassLoader classLoader=new JarClassLoader(input.getArchive());
    @SuppressWarnings("String_Node_Str") Class<?> clazz=classLoader.loadClass(moduleEntry.getValue());
    String moduleName=moduleEntry.getKey();
    try {
      if (DatasetModule.class.isAssignableFrom(clazz)) {
        datasetFramework.addModule(moduleName,(DatasetModule)clazz.newInstance());
      }
 else       if (Dataset.class.isAssignableFrom(clazz)) {
        datasetFramework.addModule(moduleName,new SingleTypeModule((Class<Dataset>)clazz));
      }
 else {
        String msg=String.format("String_Node_Str",clazz.getName());
        throw new IllegalArgumentException(msg);
      }
    }
 catch (    ModuleConflictException e) {
      LOG.info("String_Node_Str" + moduleName + "String_Node_Str");
    }
  }
  emit(input);
}

Fixed version (ground truth):
/** 
 * Receives an input containing application specification and location and verifies both.
 * @param input An instance of {@link com.continuuity.internal.app.deploy.pipeline.ApplicationSpecLocation}
 */
@Override public void process(ApplicationSpecLocation input) throws Exception {
  ApplicationSpecification specification=input.getSpecification();
  for (  Map.Entry<String,String> moduleEntry : specification.getDatasetModules().entrySet()) {
    JarClassLoader classLoader=new JarClassLoader(input.getArchive());
    @SuppressWarnings("String_Node_Str") Class<?> clazz=classLoader.loadClass(moduleEntry.getValue());
    String moduleName=moduleEntry.getKey();
    try {
      if (DatasetModule.class.isAssignableFrom(clazz)) {
        datasetFramework.addModule(moduleName,(DatasetModule)clazz.newInstance());
      }
 else       if (Dataset.class.isAssignableFrom(clazz)) {
        if (!datasetFramework.hasType(clazz.getName())) {
          datasetFramework.addModule(moduleName,new SingleTypeModule((Class<Dataset>)clazz));
        }
      }
 else {
        String msg=String.format("String_Node_Str",clazz.getName());
        throw new IllegalArgumentException(msg);
      }
    }
 catch (    ModuleConflictException e) {
      LOG.info("String_Node_Str" + moduleName + "String_Node_Str");
    }
  }
  emit(input);
}
Program: 7558
Project: 7558
Buggy source:
private void writeToObjectStore(byte[] key,T object) throws Exception {
  objectStore.write(key,object);
}

Fixed version (ground truth):
private void writeToObjectStore(byte[] key,T object){
  objectStore.write(key,object);
}
Program: 7559
Project: 7559
Buggy source:
/** 
 * Read all the objects from objectStore via index. Returns all the objects that match the secondaryKey. Returns an empty list if no value is found. Never returns null.
 * @param secondaryKey for the lookup.
 * @return List of Objects matching the secondaryKey.
 */
public List<T> readAllByIndex(byte[] secondaryKey) throws Exception {
  ImmutableList.Builder<T> resultList=ImmutableList.builder();
  Row row=index.get(secondaryKey);
  if (!row.isEmpty()) {
    for (    byte[] column : row.getColumns().keySet()) {
      T obj=objectStore.read(column);
      resultList.add(obj);
    }
  }
  return resultList.build();
}

Fixed version (ground truth):
/** 
 * Read all the objects from objectStore via index. Returns all the objects that match the secondaryKey. Returns an empty list if no value is found. Never returns null.
 * @param secondaryKey for the lookup.
 * @return List of Objects matching the secondaryKey.
 */
public List<T> readAllByIndex(byte[] secondaryKey){
  ImmutableList.Builder<T> resultList=ImmutableList.builder();
  Row row=index.get(secondaryKey);
  if (!row.isEmpty()) {
    for (    byte[] column : row.getColumns().keySet()) {
      T obj=objectStore.read(column);
      resultList.add(obj);
    }
  }
  return resultList.build();
}
Program: 7560
Project: 7560
Buggy source:
public void write(byte[] key,T object) throws Exception {
  Row row=index.get(getPrefixedPrimaryKey(key));
  if (!row.isEmpty()) {
    Set<byte[]> columnsToDelete=row.getColumns().keySet();
    deleteSecondaryKeys(key,columnsToDelete.toArray(new byte[columnsToDelete.size()][]));
  }
  writeToObjectStore(key,object);
}

Fixed version (ground truth):
public void write(byte[] key,T object){
  Row row=index.get(getPrefixedPrimaryKey(key));
  if (!row.isEmpty()) {
    Set<byte[]> columnsToDelete=row.getColumns().keySet();
    deleteSecondaryKeys(key,columnsToDelete.toArray(new byte[columnsToDelete.size()][]));
  }
  writeToObjectStore(key,object);
}
Program: 7561
Project: 7561
Buggy source:
/** 
 * Adds   {@link ObjectStore} data set to be created at application deploy if not exists.
 * @param configurer application configurer
 * @param datasetName data set name
 * @param type type of objects to be stored in {@link ObjectStore}
 * @param props any additional data set properties
 * @throws UnsupportedTypeException
 */
public static void createObjectStore(ApplicationConfigurer configurer,String datasetName,Type type,DatasetProperties props) throws UnsupportedTypeException {
  configurer.createDataSet(datasetName,ObjectStore.class,objectStoreProperties(type,props));
}

Fixed version (ground truth):
/** 
 * Same as   {@link #createObjectStore(ApplicationConfigurer,String,Type,DatasetProperties)} but with emptyproperties.
 */
public static void createObjectStore(ApplicationConfigurer configurer,String datasetName,Type type) throws UnsupportedTypeException {
  createObjectStore(configurer,datasetName,type,DatasetProperties.EMPTY);
}
Program: 7562
Project: 7562
Buggy source:
/** 
 * Adds   {@link MultiObjectStore} data set to be created at application deploy if not exists.
 * @param configurer application configurer
 * @param datasetName data set name
 * @param type type of objects to be stored in {@link ObjectStore}
 * @param props any additional data set properties
 * @throws UnsupportedTypeException
 */
public static void createMultiObjectStore(ApplicationConfigurer configurer,String datasetName,Type type,DatasetProperties props) throws UnsupportedTypeException {
  configurer.createDataSet(datasetName,MultiObjectStore.class,objectStoreProperties(type,props));
}

Fixed version (ground truth):
/** 
 * Same as   {@link #createMultiObjectStore(ApplicationConfigurer,String,Type,DatasetProperties)} but with emptyproperties.
 */
public static void createMultiObjectStore(ApplicationConfigurer configurer,String datasetName,Type type) throws UnsupportedTypeException {
  createMultiObjectStore(configurer,datasetName,type,DatasetProperties.EMPTY);
}
Program: 7563
Project: 7563
Buggy source:
/** 
 * Adds   {@link IndexedObjectStore} data set to be created at application deploy if not exists.
 * @param configurer application configurer
 * @param datasetName data set name
 * @param type type of objects to be stored in {@link IndexedObjectStore}
 * @param props any additional data set properties
 * @throws UnsupportedTypeException
 */
public static void createIndexedObjectStore(ApplicationConfigurer configurer,String datasetName,Type type,DatasetProperties props) throws UnsupportedTypeException {
  configurer.createDataSet(datasetName,IndexedObjectStore.class,objectStoreProperties(type,props));
}

Fixed version (ground truth):
/** 
 * Same as   {@link #createIndexedObjectStore(ApplicationConfigurer,String,Type,DatasetProperties)} but with emptyproperties.
 */
public static void createIndexedObjectStore(ApplicationConfigurer configurer,String datasetName,Type type) throws UnsupportedTypeException {
  createIndexedObjectStore(configurer,datasetName,type,DatasetProperties.EMPTY);
}
Program: 7564
Project: 7564
Buggy source:
@Override public DatasetInstanceSpec configure(String instanceName,DatasetInstanceProperties properties){
  return new DatasetInstanceSpec.Builder(instanceName,getName()).properties(properties.getProperties()).datasets(tableDef.configure("String_Node_Str",properties.getProperties("String_Node_Str"))).build();
}

Fixed version (ground truth):
@Override public DatasetSpecification configure(String instanceName,DatasetProperties properties){
  return DatasetSpecification.builder(instanceName,getName()).properties(properties.getProperties()).datasets(tableDef.configure("String_Node_Str",properties)).build();
}
Program: 7565
Project: 7565
Buggy source:
@Override public KeyStructValueTable getDataset(DatasetInstanceSpec spec) throws IOException {
  Table table=tableDef.getDataset(spec.getSpecification("String_Node_Str"));
  return new KeyStructValueTable(spec.getName(),table);
}

Fixed version (ground truth):
@Override public KeyStructValueTable getDataset(DatasetSpecification spec) throws IOException {
  Table table=tableDef.getDataset(spec.getSpecification("String_Node_Str"));
  return new KeyStructValueTable(spec.getName(),table);
}
Program: 7566
Project: 7566
Buggy source:
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  Value that=(Value)o;
  return Objects.equal(this.name,that.name) && Objects.equal(this.ints,that.ints);
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  Value that=(Value)o;
  return Objects.equal(this.name,that.name) && Objects.equal(this.ints,that.ints);
}
Program: 7567
Project: 7567
Buggy source:
@Override public DatasetAdmin getAdmin(DatasetInstanceSpec spec) throws IOException {
  return tableDef.getAdmin(spec.getSpecification("String_Node_Str"));
}

Fixed version (ground truth):
@Override public DatasetAdmin getAdmin(DatasetSpecification spec) throws IOException {
  return tableDef.getAdmin(spec.getSpecification("String_Node_Str"));
}
Program: 7568
Project: 7568
Buggy source:
static TransactionService createTxService(String zkConnectionString,int txServicePort,Configuration hConf,final File outPath){
  final CConfiguration cConf=CConfiguration.create();
  cConf.unset(Constants.CFG_HDFS_USER);
  cConf.set(Constants.Zookeeper.QUORUM,zkConnectionString);
  cConf.set(Constants.Transaction.Service.CFG_DATA_TX_BIND_PORT,Integer.toString(txServicePort));
  cConf.setBoolean(Constants.Transaction.Manager.CFG_DO_PERSIST,true);
  final DataFabricDistributedModule dfModule=new DataFabricDistributedModule();
  final Injector injector=Guice.createInjector(dfModule,new ConfigModule(cConf,hConf),new ZKClientModule(),new DiscoveryRuntimeModule().getDistributedModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(LocationFactory.class).toInstance(new LocalLocationFactory(outPath));
    }
  }
);
  injector.getInstance(ZKClientService.class).startAndWait();
  return injector.getInstance(TransactionService.class);
}

Fixed version (ground truth):
static TransactionService createTxService(String zkConnectionString,int txServicePort,Configuration hConf,final File outPath){
  final CConfiguration cConf=CConfiguration.create();
  cConf.unset(Constants.CFG_HDFS_USER);
  cConf.set(Constants.Zookeeper.QUORUM,zkConnectionString);
  cConf.set(Constants.Transaction.Service.CFG_DATA_TX_BIND_PORT,Integer.toString(txServicePort));
  cConf.setBoolean(Constants.Transaction.Manager.CFG_DO_PERSIST,true);
  final DataFabricDistributedModule dfModule=new DataFabricDistributedModule();
  final Injector injector=Guice.createInjector(dfModule,new ConfigModule(cConf,hConf),new ZKClientModule(),new DiscoveryRuntimeModule().getDistributedModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(LocationFactory.class).toInstance(new LocalLocationFactory(outPath));
      bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class);
    }
  }
);
  injector.getInstance(ZKClientService.class).startAndWait();
  return injector.getInstance(TransactionService.class);
}
Program: 7569
Project: 7569
Buggy source:
@Override protected void configure(){
  bind(LocationFactory.class).toInstance(new LocalLocationFactory(outPath));
}

Fixed version (ground truth):
@Override protected void configure(){
  bind(LocationFactory.class).toInstance(new LocalLocationFactory(outPath));
  bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class);
}
Program: 7571
Project: 7571
Buggy source:
@Override public void configure(){
  bind(MetaDataTable.class).to(SerializingMetaDataTable.class).in(Singleton.class);
  bind(LevelDBOcTableService.class).toInstance(LevelDBOcTableService.getInstance());
  bind(TransactionStateStorage.class).annotatedWith(Names.named("String_Node_Str")).to(LocalFileTransactionStateStorage.class).in(Singleton.class);
  bind(TransactionStateStorage.class).toProvider(TransactionStateStorageProvider.class).in(Singleton.class);
  bind(InMemoryTransactionManager.class).in(Singleton.class);
  bind(TransactionSystemClient.class).to(InMemoryTxSystemClient.class).in(Singleton.class);
  bind(DataSetAccessor.class).to(LocalDataSetAccessor.class).in(Singleton.class);
  bind(QueueClientFactory.class).to(LevelDBQueueClientFactory.class).in(Singleton.class);
  bind(QueueAdmin.class).to(LevelDBQueueAdmin.class).in(Singleton.class);
  bind(StreamCoordinator.class).to(InMemoryStreamCoordinator.class).in(Singleton.class);
  bind(StreamConsumerStateStoreFactory.class).to(LevelDBStreamConsumerStateStoreFactory.class).in(Singleton.class);
  bind(StreamAdmin.class).to(LevelDBStreamFileAdmin.class).in(Singleton.class);
  bind(StreamConsumerFactory.class).to(LevelDBStreamFileConsumerFactory.class).in(Singleton.class);
  bind(StreamFileWriterFactory.class).to(LocationStreamFileWriterFactory.class).in(Singleton.class);
  install(new FactoryModuleBuilder().implement(TransactionExecutor.class,DefaultTransactionExecutor.class).build(TransactionExecutorFactory.class));
}

Fixed version (ground truth):
@Override public void configure(){
  bind(MetaDataTable.class).to(SerializingMetaDataTable.class).in(Singleton.class);
  bind(LevelDBOcTableService.class).toInstance(LevelDBOcTableService.getInstance());
  bind(TransactionStateStorage.class).annotatedWith(Names.named("String_Node_Str")).to(LocalFileTransactionStateStorage.class).in(Singleton.class);
  bind(TransactionStateStorage.class).toProvider(TransactionStateStorageProvider.class).in(Singleton.class);
  bind(InMemoryTransactionManager.class).in(Singleton.class);
  bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class);
  bind(TransactionSystemClient.class).to(InMemoryTxSystemClient.class).in(Singleton.class);
  bind(DataSetAccessor.class).to(LocalDataSetAccessor.class).in(Singleton.class);
  bind(QueueClientFactory.class).to(LevelDBQueueClientFactory.class).in(Singleton.class);
  bind(QueueAdmin.class).to(LevelDBQueueAdmin.class).in(Singleton.class);
  bind(StreamCoordinator.class).to(InMemoryStreamCoordinator.class).in(Singleton.class);
  bind(StreamConsumerStateStoreFactory.class).to(LevelDBStreamConsumerStateStoreFactory.class).in(Singleton.class);
  bind(StreamAdmin.class).to(LevelDBStreamFileAdmin.class).in(Singleton.class);
  bind(StreamConsumerFactory.class).to(LevelDBStreamFileConsumerFactory.class).in(Singleton.class);
  bind(StreamFileWriterFactory.class).to(LocationStreamFileWriterFactory.class).in(Singleton.class);
  install(new FactoryModuleBuilder().implement(TransactionExecutor.class,DefaultTransactionExecutor.class).build(TransactionExecutorFactory.class));
}
Program: 7572
Project: 7572
Buggy source:
@BeforeClass public static void beforeClass() throws Exception {
  NamespacingDataSetAccessorTest.beforeClass();
  Injector injector=Guice.createInjector(new ConfigModule(conf),new DataFabricModules().getInMemoryModules(),new DiscoveryRuntimeModule().getInMemoryModules(),new LocationRuntimeModule().getInMemoryModules());
  dsAccessor=injector.getInstance(DataSetAccessor.class);
}

Fixed version (ground truth):
@BeforeClass public static void beforeClass() throws Exception {
  NamespacingDataSetAccessorTest.beforeClass();
  Injector injector=Guice.createInjector(new ConfigModule(conf),new DataFabricModules().getInMemoryModules(),new DiscoveryRuntimeModule().getInMemoryModules(),new LocationRuntimeModule().getInMemoryModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class);
    }
  }
);
  dsAccessor=injector.getInstance(DataSetAccessor.class);
}
Program: 7573
Project: 7573
Buggy source:
/** 
 * Sets up the in-memory data fabric.
 */
@BeforeClass public static void setupDataFabric(){
  final Injector injector=Guice.createInjector(new DataFabricModules().getInMemoryModules(),new DiscoveryRuntimeModule().getInMemoryModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(LocationFactory.class).to(LocalLocationFactory.class);
    }
  }
);
  injector.getInstance(InMemoryTransactionManager.class).startAndWait();
  txSystemClient=injector.getInstance(TransactionSystemClient.class);
  LocationFactory locationFactory=injector.getInstance(LocationFactory.class);
  DataSetAccessor dataSetAccessor=injector.getInstance(DataSetAccessor.class);
  fabric=new DataFabric2Impl(locationFactory,dataSetAccessor);
  datasetFramework=injector.getInstance(DatasetFramework.class);
}

Fixed version (ground truth):
/** 
 * Sets up the in-memory data fabric.
 */
@BeforeClass public static void setupDataFabric(){
  final Injector injector=Guice.createInjector(new DataFabricModules().getInMemoryModules(),new DiscoveryRuntimeModule().getInMemoryModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(LocationFactory.class).to(LocalLocationFactory.class);
      bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class);
    }
  }
);
  injector.getInstance(InMemoryTransactionManager.class).startAndWait();
  txSystemClient=injector.getInstance(TransactionSystemClient.class);
  LocationFactory locationFactory=injector.getInstance(LocationFactory.class);
  DataSetAccessor dataSetAccessor=injector.getInstance(DataSetAccessor.class);
  fabric=new DataFabric2Impl(locationFactory,dataSetAccessor);
  datasetFramework=injector.getInstance(DatasetFramework.class);
}
Program: 7574
Project: 7574
Buggy source:
@Override protected void configure(){
  bind(LocationFactory.class).to(LocalLocationFactory.class);
}

Fixed version (ground truth):
@Override protected void configure(){
  bind(LocationFactory.class).to(LocalLocationFactory.class);
  bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class);
}
Program: 7575
Project: 7575
Buggy source:
@BeforeClass public static void init() throws Exception {
  injector=Guice.createInjector(new LocationRuntimeModule().getInMemoryModules(),new DiscoveryRuntimeModule().getInMemoryModules(),new DataFabricModules().getInMemoryModules());
  transactionManager=injector.getInstance(InMemoryTransactionManager.class);
  transactionManager.startAndWait();
  txSystemClient=injector.getInstance(TransactionSystemClient.class);
  queueClientFactory=injector.getInstance(QueueClientFactory.class);
  queueAdmin=injector.getInstance(QueueAdmin.class);
  streamAdmin=injector.getInstance(StreamAdmin.class);
  executorFactory=injector.getInstance(TransactionExecutorFactory.class);
}

Fixed version (ground truth):
@BeforeClass public static void init() throws Exception {
  injector=Guice.createInjector(new LocationRuntimeModule().getInMemoryModules(),new DiscoveryRuntimeModule().getInMemoryModules(),new DataFabricModules().getInMemoryModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class);
    }
  }
);
  transactionManager=injector.getInstance(InMemoryTransactionManager.class);
  transactionManager.startAndWait();
  txSystemClient=injector.getInstance(TransactionSystemClient.class);
  queueClientFactory=injector.getInstance(QueueClientFactory.class);
  queueAdmin=injector.getInstance(QueueAdmin.class);
  streamAdmin=injector.getInstance(StreamAdmin.class);
  executorFactory=injector.getInstance(TransactionExecutorFactory.class);
}
Program: 7576
Project: 7576
Buggy source:
@BeforeClass public static void setupDataFabric() throws Exception {
  injector=Guice.createInjector(new LocationRuntimeModule().getInMemoryModules(),new DiscoveryRuntimeModule().getInMemoryModules(),new DataFabricModules().getInMemoryModules());
}

Fixed version (ground truth):
@BeforeClass public static void setupDataFabric() throws Exception {
  injector=Guice.createInjector(new LocationRuntimeModule().getInMemoryModules(),new DiscoveryRuntimeModule().getInMemoryModules(),new DataFabricModules().getInMemoryModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class);
    }
  }
);
}
Program: 7577
Project: 7577
Buggy source:
/** 
 * Deletes dir if it is empty, and recursively deletes parent dirs if they are empty too. The recursion stops at non-empty parent or base directory. If dir is not child of base directory then the recursion stops at root.
 * @param dir dir to be deleted.
 */
void deleteEmptyDir(Location dir){
  dir=LocationUtils.normalize(locationFactory,dir);
  LOG.debug("String_Node_Str",dir.toURI());
  if (logBaseDir.toURI().equals(dir.toURI()) || !dir.toURI().getRawPath().startsWith(logBaseDir.toURI().getRawPath())) {
    LOG.debug("String_Node_Str",dir.toURI());
    return;
  }
  try {
    if (dir.delete()) {
      LOG.info("String_Node_Str",dir.toURI());
      Location parent=LocationUtils.getParent(locationFactory,dir);
      LOG.debug("String_Node_Str",parent);
      deleteEmptyDir(parent);
    }
 else {
      LOG.debug("String_Node_Str",dir.toURI());
    }
  }
 catch (  RemoteException e) {
    LOG.debug("String_Node_Str",dir.toURI(),e);
  }
catch (  IOException e) {
    LOG.error("String_Node_Str",dir.toURI(),e);
  }
}

Fixed version (ground truth):
/** 
 * Deletes dir if it is empty, and recursively deletes parent dirs if they are empty too. The recursion stops at non-empty parent or base directory. If dir is not child of base directory then the recursion stops at root.
 * @param dir dir to be deleted.
 */
void deleteEmptyDir(Location dir){
  LOG.debug("String_Node_Str",dir.toURI());
  if (logBaseDir.toURI().equals(dir.toURI()) || !dir.toURI().getRawPath().startsWith(logBaseDir.toURI().getRawPath())) {
    LOG.debug("String_Node_Str",dir.toURI());
    return;
  }
  try {
    if (dir.list().isEmpty() && dir.delete()) {
      LOG.info("String_Node_Str",dir.toURI());
      Location parent=LocationUtils.getParent(dir);
      LOG.debug("String_Node_Str",parent);
      deleteEmptyDir(parent);
    }
 else {
      LOG.debug("String_Node_Str",dir.toURI());
    }
  }
 catch (  IOException e) {
    LOG.error("String_Node_Str",dir.toURI(),e);
  }
}
Program: 7578
Project: 7578
Buggy source:
@Override public void run(){
  LOG.info("String_Node_Str");
  try {
    long tillTime=System.currentTimeMillis() - retentionDurationMs;
    final Set<Location> parentDirs=Sets.newHashSet();
    fileMetaDataManager.cleanMetaData(tillTime,new FileMetaDataManager.DeleteCallback(){
      @Override public void handle(      Location location){
        try {
          if (location.exists()) {
            LOG.info(String.format("String_Node_Str",location.toURI()));
            location.delete();
          }
          parentDirs.add(LocationUtils.getParent(locationFactory,location));
        }
 catch (        IOException e) {
          LOG.error(String.format("String_Node_Str",location.toURI()),e);
          throw Throwables.propagate(e);
        }
      }
    }
);
    for (    Location dir : parentDirs) {
      deleteEmptyDir(dir);
    }
  }
 catch (  Throwable e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  LOG.info("String_Node_Str");
  try {
    long tillTime=System.currentTimeMillis() - retentionDurationMs;
    final Set<Location> parentDirs=Sets.newHashSet();
    fileMetaDataManager.cleanMetaData(tillTime,new FileMetaDataManager.DeleteCallback(){
      @Override public void handle(      Location location){
        try {
          if (location.exists()) {
            LOG.info(String.format("String_Node_Str",location.toURI()));
            location.delete();
          }
          parentDirs.add(LocationUtils.getParent(location));
        }
 catch (        IOException e) {
          LOG.error(String.format("String_Node_Str",location.toURI()),e);
          throw Throwables.propagate(e);
        }
      }
    }
);
    for (    Location dir : parentDirs) {
      deleteEmptyDir(dir);
    }
  }
 catch (  Throwable e) {
    LOG.error("String_Node_Str",e);
  }
}
Program: 7579
Project: 7579
Buggy source:
@Override public void handle(Location location){
  try {
    if (location.exists()) {
      LOG.info(String.format("String_Node_Str",location.toURI()));
      location.delete();
    }
    parentDirs.add(LocationUtils.getParent(locationFactory,location));
  }
 catch (  IOException e) {
    LOG.error(String.format("String_Node_Str",location.toURI()),e);
    throw Throwables.propagate(e);
  }
}

Fixed version (ground truth):
@Override public void handle(Location location){
  try {
    if (location.exists()) {
      LOG.info(String.format("String_Node_Str",location.toURI()));
      location.delete();
    }
    parentDirs.add(LocationUtils.getParent(location));
  }
 catch (  IOException e) {
    LOG.error(String.format("String_Node_Str",location.toURI()),e);
    throw Throwables.propagate(e);
  }
}
Program: 7580
Project: 7580
Buggy source:
public LogCleanup(LocationFactory locationFactory,FileMetaDataManager fileMetaDataManager,Location logBaseDir,long retentionDurationMs){
  this.locationFactory=locationFactory;
  this.fileMetaDataManager=fileMetaDataManager;
  this.logBaseDir=LocationUtils.normalize(locationFactory,logBaseDir);
  this.retentionDurationMs=retentionDurationMs;
  LOG.info("String_Node_Str",logBaseDir.toURI());
  LOG.info("String_Node_Str",retentionDurationMs);
}

Fixed version (ground truth):
public LogCleanup(LocationFactory locationFactory,FileMetaDataManager fileMetaDataManager,Location logBaseDir,long retentionDurationMs){
  this.fileMetaDataManager=fileMetaDataManager;
  this.logBaseDir=LocationUtils.normalize(locationFactory,logBaseDir);
  this.retentionDurationMs=retentionDurationMs;
  LOG.info("String_Node_Str",logBaseDir.toURI());
  LOG.info("String_Node_Str",retentionDurationMs);
}
Program: 7581
Project: 7581
Buggy source:
@Test public void testGetParent() throws Exception {
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory,locationFactory.create("String_Node_Str")).toURI());
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory,locationFactory.create("String_Node_Str")).toURI());
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory,locationFactory.create("String_Node_Str")).toURI());
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory,locationFactory.create("String_Node_Str")).toURI());
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory,locationFactory.create("String_Node_Str")).toURI());
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory,locationFactory.create("String_Node_Str")).toURI());
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory,locationFactory.create("String_Node_Str")).toURI());
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory,locationFactory.create("String_Node_Str")).toURI());
}

Fixed version (ground truth):
@Test public void testGetParent() throws Exception {
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory.create("String_Node_Str")).toURI());
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory.create("String_Node_Str")).toURI());
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory.create("String_Node_Str")).toURI());
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory.create("String_Node_Str")).toURI());
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory.create("String_Node_Str")).toURI());
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory.create("String_Node_Str")).toURI());
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory.create("String_Node_Str")).toURI());
  Assert.assertEquals(locationFactory.create("String_Node_Str").toURI(),LocationUtils.getParent(locationFactory.create("String_Node_Str")).toURI());
}
Program: 7582
Project: 7582
Buggy source:
private Location createFile(Location path) throws Exception {
  Location parent=LocationUtils.getParent(locationFactory,path);
  parent.mkdirs();
  path.createNew();
  Assert.assertTrue(path.exists());
  return path;
}

Fixed version (ground truth):
private Location createFile(Location path) throws Exception {
  Location parent=LocationUtils.getParent(path);
  parent.mkdirs();
  path.createNew();
  Assert.assertTrue(path.exists());
  return path;
}
Program: 7583
Project: 7583
Buggy source:
/** 
 * Given a full metrics path like '/v2/metrics/reactor/apps/collect.events', strip the preceding version and metrics to return 'reactor/apps/collect.events', representing the context and metric, which can then be parsed by this parser.
 * @param path request path.
 * @return request path stripped of version and metrics.
 */
static String stripVersionAndMetricsFromPath(String path){
  int startPos=Constants.Gateway.GATEWAY_VERSION.length() + 9;
  return path.substring(startPos,path.length());
}

Fixed version (ground truth):
/** 
 * Given a full metrics path like '/v2/metrics/reactor/apps/collect.events', strip the preceding version and metrics to return 'reactor/apps/collect.events', representing the context and metric, which can then be parsed by this parser.
 * @param path request path.
 * @return request path stripped of version and metrics.
 */
static String stripVersionAndMetricsFromPath(String path){
  int startPos=Constants.Gateway.GATEWAY_VERSION.length() + 9;
  return path.substring(startPos - 1,path.length());
}
Program: 7584
Project: 7584
Buggy source:
@BeforeClass public static void init() throws IOException {
  zkServer=InMemoryZKServer.builder().setDataDir(tmpFolder.newFolder()).build();
  zkServer.startAndWait();
  CConfiguration cConf=CConfiguration.create();
  cConf.set(Constants.Zookeeper.QUORUM,zkServer.getConnectionStr());
  injector=Guice.createInjector(new ConfigModule(cConf),new ZKClientModule(),new DiscoveryRuntimeModule().getDistributedModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(StreamCoordinator.class).to(DistributedStreamCoordinator.class);
    }
  }
);
  zkClient=injector.getInstance(ZKClientService.class);
  zkClient.startAndWait();
}

Fixed version (ground truth):
@BeforeClass public static void init() throws IOException {
  zkServer=InMemoryZKServer.builder().setDataDir(tmpFolder.newFolder()).build();
  zkServer.startAndWait();
  CConfiguration cConf=CConfiguration.create();
  cConf.set(Constants.Zookeeper.QUORUM,zkServer.getConnectionStr());
  injector=Guice.createInjector(new ConfigModule(cConf),new ZKClientModule(),new DiscoveryRuntimeModule().getDistributedModules(),new DataFabricModules().getDistributedModules(),new LocationRuntimeModule().getDistributedModules());
  zkClient=injector.getInstance(ZKClientService.class);
  zkClient.startAndWait();
}
Program: 7585
Project: 7585
Buggy source:
@BeforeClass public static void init(){
  injector=Guice.createInjector(new ConfigModule(),new DiscoveryRuntimeModule().getInMemoryModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(StreamCoordinator.class).to(InMemoryStreamCoordinator.class).in(Scopes.SINGLETON);
    }
  }
);
}

Fixed version (ground truth):
@BeforeClass public static void init(){
  injector=Guice.createInjector(new ConfigModule(),new DiscoveryRuntimeModule().getInMemoryModules(),new DataFabricModules().getInMemoryModules(),new LocationRuntimeModule().getInMemoryModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(StreamCoordinator.class).to(InMemoryStreamCoordinator.class).in(Scopes.SINGLETON);
    }
  }
);
}