nus-yam/ex-repair huggingface dataset:
Program: 7510
Project: 7510
Buggy source:
@Override protected void startUp(){
  CConfiguration cConf=CConfiguration.create();
  cConf.setBoolean(Constants.Security.SSL_ENABLED,true);
  URL certUrl=getClass().getClassLoader().getResource("String_Node_Str");
  Assert.assertNotNull(certUrl);
  Configuration configuration=new Configuration();
  configuration.set(Constants.Security.ROUTER_SSL_KEYPASSWORD,"String_Node_Str");
  configuration.set(Constants.Security.ROUTER_SSL_KEYSTORE_PASSWORD,"String_Node_Str");
  configuration.set(Constants.Security.ROUTER_SSL_KEYSTORE_TYPE,"String_Node_Str");
  configuration.set(Constants.Security.ROUTER_SSL_KEYSTORE_PATH,certUrl.getPath());
  Injector injector=Guice.createInjector(new ConfigModule(),new IOModule(),new SecurityModules().getInMemoryModules(),new DiscoveryRuntimeModule().getInMemoryModules());
  DiscoveryServiceClient discoveryServiceClient=injector.getInstance(DiscoveryServiceClient.class);
  AccessTokenTransformer accessTokenTransformer=injector.getInstance(AccessTokenTransformer.class);
  cConf.set(Constants.Router.ADDRESS,hostname);
  cConf.setStrings(Constants.Router.FORWARD,forwards.toArray(new String[forwards.size()]));
  router=new NettyRouter(cConf,InetAddresses.forString(hostname),new RouterServiceLookup((DiscoveryServiceClient)discoveryService,new RouterPathLookup(new NoAuthenticator())),new SuccessTokenValidator(),accessTokenTransformer,discoveryServiceClient,configuration);
  router.startAndWait();
  for (  Map.Entry<Integer,String> entry : router.getServiceLookup().getServiceMap().entrySet()) {
    serviceMap.put(entry.getValue(),entry.getKey());
  }
}

Fixed version (ground truth):
@Override protected void startUp(){
  CConfiguration cConf=CConfiguration.create();
  cConf.setBoolean(Constants.Security.SSL_ENABLED,true);
  URL certUrl=getClass().getClassLoader().getResource("String_Node_Str");
  Assert.assertNotNull(certUrl);
  Injector injector=Guice.createInjector(new ConfigModule(),new IOModule(),new SecurityModules().getInMemoryModules(),new DiscoveryRuntimeModule().getInMemoryModules());
  DiscoveryServiceClient discoveryServiceClient=injector.getInstance(DiscoveryServiceClient.class);
  AccessTokenTransformer accessTokenTransformer=injector.getInstance(AccessTokenTransformer.class);
  cConf.set(Constants.Router.ADDRESS,hostname);
  cConf.setStrings(Constants.Router.FORWARD,forwards.toArray(new String[forwards.size()]));
  cConf.set(Constants.Security.ROUTER_SSL_KEYPASSWORD,"String_Node_Str");
  cConf.set(Constants.Security.ROUTER_SSL_KEYSTORE_PASSWORD,"String_Node_Str");
  cConf.set(Constants.Security.ROUTER_SSL_KEYSTORE_TYPE,"String_Node_Str");
  cConf.set(Constants.Security.ROUTER_SSL_KEYSTORE_PATH,certUrl.getPath());
  router=new NettyRouter(cConf,InetAddresses.forString(hostname),new RouterServiceLookup((DiscoveryServiceClient)discoveryService,new RouterPathLookup(new NoAuthenticator())),new SuccessTokenValidator(),accessTokenTransformer,discoveryServiceClient);
  router.startAndWait();
  for (  Map.Entry<Integer,String> entry : router.getServiceLookup().getServiceMap().entrySet()) {
    serviceMap.put(entry.getValue(),entry.getKey());
  }
}
Program: 7512
Project: 7512
Buggy source:
private void addModule(String moduleName,Class<?> typeClass) throws DatasetManagementException {
  Location tempJarPath;
  try {
    tempJarPath=createDeploymentJar(typeClass);
    try {
      client.addModule(moduleName,typeClass.getName(),tempJarPath);
    }
  finally {
      tempJarPath.delete();
    }
  }
 catch (  IOException e) {
    String msg=String.format("String_Node_Str",moduleName,typeClass.getName());
    LOG.error(msg,e);
    throw new DatasetManagementException(msg,e);
  }
}

Fixed version (ground truth):
private void addModule(String moduleName,Class<?> typeClass) throws DatasetManagementException {
  try {
    File tempFile=File.createTempFile(typeClass.getName(),"String_Node_Str");
    try {
      Location tempJarPath=createDeploymentJar(typeClass,new LocalLocationFactory().create(tempFile.toURI()));
      client.addModule(moduleName,typeClass.getName(),tempJarPath);
    }
  finally {
      tempFile.delete();
    }
  }
 catch (  IOException e) {
    String msg=String.format("String_Node_Str",moduleName,typeClass.getName());
    LOG.error(msg,e);
    throw new DatasetManagementException(msg,e);
  }
}
Program: 7513
Project: 7513
Buggy source:
private static void setupClasspath() throws IOException {
  Set<String> bootstrapClassPaths=ExploreServiceUtils.getBoostrapClasses();
  Set<File> hBaseTableDeps=ExploreServiceUtils.traceDependencies(new HBaseTableUtilFactory().get().getClass().getCanonicalName(),bootstrapClassPaths,null);
  Set<File> orderedDependencies=new LinkedHashSet<File>();
  orderedDependencies.addAll(hBaseTableDeps);
  orderedDependencies.addAll(ExploreServiceUtils.traceDependencies(RemoteDatasetFramework.class.getCanonicalName(),bootstrapClassPaths,null));
  orderedDependencies.addAll(ExploreServiceUtils.traceDependencies(DatasetStorageHandler.class.getCanonicalName(),bootstrapClassPaths,null));
  ImmutableList.Builder<String> builder=ImmutableList.builder();
  ImmutableList.Builder<String> builder2=ImmutableList.builder();
  for (  File dep : orderedDependencies) {
    builder.add("String_Node_Str" + dep.getAbsolutePath());
    builder2.add(dep.getAbsolutePath());
  }
  List<String> orderedDependenciesStr=builder.build();
  System.setProperty(HiveConf.ConfVars.HIVEAUXJARS.toString(),Joiner.on(',').join(orderedDependenciesStr));
  LOG.debug("String_Node_Str",HiveConf.ConfVars.HIVEAUXJARS.toString(),System.getProperty(HiveConf.ConfVars.HIVEAUXJARS.toString()));
  LocalMapreduceClasspathSetter classpathSetter=new LocalMapreduceClasspathSetter(new HiveConf(),System.getProperty("String_Node_Str"),builder2.build());
  for (  File jar : hBaseTableDeps) {
    classpathSetter.accept(jar.getAbsolutePath());
  }
  classpathSetter.setupClasspathScript();
}

Fixed version (ground truth):
private static void setupClasspath() throws IOException {
  Set<String> bootstrapClassPaths=ExploreServiceUtils.getBoostrapClasses();
  Set<File> hBaseTableDeps=ExploreServiceUtils.traceDependencies(new HBaseTableUtilFactory().get().getClass().getCanonicalName(),bootstrapClassPaths,null);
  Set<File> orderedDependencies=new LinkedHashSet<File>();
  orderedDependencies.addAll(hBaseTableDeps);
  orderedDependencies.addAll(ExploreServiceUtils.traceDependencies(RemoteDatasetFramework.class.getCanonicalName(),bootstrapClassPaths,null));
  orderedDependencies.addAll(ExploreServiceUtils.traceDependencies(DatasetStorageHandler.class.getCanonicalName(),bootstrapClassPaths,null));
  ImmutableList.Builder<String> builder=ImmutableList.builder();
  for (  File dep : orderedDependencies) {
    builder.add("String_Node_Str" + dep.getAbsolutePath());
  }
  List<String> orderedDependenciesStr=builder.build();
  System.setProperty(HiveConf.ConfVars.HIVEAUXJARS.toString(),Joiner.on(',').join(orderedDependenciesStr));
  LOG.debug("String_Node_Str",HiveConf.ConfVars.HIVEAUXJARS.toString(),System.getProperty(HiveConf.ConfVars.HIVEAUXJARS.toString()));
  LocalMapreduceClasspathSetter classpathSetter=new LocalMapreduceClasspathSetter(new HiveConf(),System.getProperty("String_Node_Str"),orderedDependenciesStr);
  for (  File jar : hBaseTableDeps) {
    classpathSetter.accept(jar.getAbsolutePath());
  }
  classpathSetter.setupClasspathScript();
}
Program: 7514
Project: 7514
Buggy source:
@Override protected void configure(){
  try {
    setupClasspath();
    System.setProperty(HiveConf.ConfVars.LOCALSCRATCHDIR.toString(),new File(HiveConf.ConfVars.LOCALSCRATCHDIR.defaultVal).getAbsolutePath());
    LOG.info("String_Node_Str",HiveConf.ConfVars.LOCALSCRATCHDIR.toString(),System.getProperty(HiveConf.ConfVars.LOCALSCRATCHDIR.toString()));
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty(Job.MAPREDUCE_JOB_USER_CLASSPATH_FIRST,"String_Node_Str");
    File previewDir=Files.createTempDir();
    LOG.info("String_Node_Str",previewDir.getAbsolutePath());
    bind(File.class).annotatedWith(Names.named(Constants.Explore.PREVIEWS_DIR_NAME)).toInstance(previewDir);
  }
 catch (  Throwable e) {
    throw Throwables.propagate(e);
  }
}

Fixed version (ground truth):
@Override protected void configure(){
  try {
    setupClasspath();
    System.setProperty(HiveConf.ConfVars.LOCALSCRATCHDIR.toString(),new File(HiveConf.ConfVars.LOCALSCRATCHDIR.defaultVal).getAbsolutePath());
    LOG.info("String_Node_Str",HiveConf.ConfVars.LOCALSCRATCHDIR.toString(),System.getProperty(HiveConf.ConfVars.LOCALSCRATCHDIR.toString()));
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    File previewDir=Files.createTempDir();
    LOG.info("String_Node_Str",previewDir.getAbsolutePath());
    bind(File.class).annotatedWith(Names.named(Constants.Explore.PREVIEWS_DIR_NAME)).toInstance(previewDir);
  }
 catch (  Throwable e) {
    throw Throwables.propagate(e);
  }
}
Program: 7516
Project: 7516
Buggy source:
protected HiveConf getHiveConf(){
  HiveConf hiveConf=new HiveConf();
  hiveConf.setBoolean("String_Node_Str",true);
  hiveConf.setBoolean(Job.MAPREDUCE_JOB_USER_CLASSPATH_FIRST,true);
  return hiveConf;
}

Fixed version (ground truth):
protected HiveConf getHiveConf(){
  return new HiveConf();
}
Program: 7517
Project: 7517
Buggy source:
@Test public void testClasspathSetupMulti() throws Exception {
  System.clearProperty(HiveConf.ConfVars.HADOOPBIN.toString());
  List<String> inputURLs=Lists.newArrayList();
  inputURLs.add("String_Node_Str");
  inputURLs.add("String_Node_Str");
  inputURLs.add("String_Node_Str" + "String_Node_Str");
  inputURLs.add("String_Node_Str");
  inputURLs.add("String_Node_Str");
  inputURLs.add("String_Node_Str");
  HiveConf hiveConf=new HiveConf();
  LocalMapreduceClasspathSetter classpathSetter=new LocalMapreduceClasspathSetter(hiveConf,TEMP_FOLDER.newFolder().getAbsolutePath(),ImmutableList.<String>of());
  for (  String url : inputURLs) {
    classpathSetter.accept(url);
  }
  Assert.assertEquals(ImmutableList.of("String_Node_Str","String_Node_Str" + "String_Node_Str","String_Node_Str" + "String_Node_Str"),ImmutableList.copyOf(classpathSetter.getHbaseProtocolJarPaths()));
  classpathSetter.setupClasspathScript();
  String newHadoopBin=new HiveConf().get(HiveConf.ConfVars.HADOOPBIN.toString());
  Assert.assertEquals(generatedHadoopBinMulti,Joiner.on('\n').join(Files.readLines(new File(newHadoopBin),Charsets.UTF_8)));
  Assert.assertTrue(new File(newHadoopBin).canExecute());
  System.clearProperty(HiveConf.ConfVars.HADOOPBIN.toString());
}

Fixed version (ground truth):
@Test public void testClasspathSetupMulti() throws Exception {
  System.clearProperty(HiveConf.ConfVars.HADOOPBIN.toString());
  List<String> inputURLs=Lists.newArrayList();
  inputURLs.add("String_Node_Str");
  inputURLs.add("String_Node_Str");
  inputURLs.add("String_Node_Str" + "String_Node_Str");
  inputURLs.add("String_Node_Str");
  inputURLs.add("String_Node_Str");
  inputURLs.add("String_Node_Str");
  List<String> auxJarsURLs=Lists.newArrayList();
  auxJarsURLs.add("String_Node_Str");
  auxJarsURLs.add("String_Node_Str");
  HiveConf hiveConf=new HiveConf();
  LocalMapreduceClasspathSetter classpathSetter=new LocalMapreduceClasspathSetter(hiveConf,TEMP_FOLDER.newFolder().getAbsolutePath(),auxJarsURLs);
  for (  String url : inputURLs) {
    classpathSetter.accept(url);
  }
  Assert.assertEquals(ImmutableList.of("String_Node_Str","String_Node_Str" + "String_Node_Str","String_Node_Str" + "String_Node_Str"),ImmutableList.copyOf(classpathSetter.getHbaseProtocolJarPaths()));
  classpathSetter.setupClasspathScript();
  String newHadoopBin=new HiveConf().get(HiveConf.ConfVars.HADOOPBIN.toString());
  Assert.assertEquals(generatedHadoopBinMulti,Joiner.on('\n').join(Files.readLines(new File(newHadoopBin),Charsets.UTF_8)));
  Assert.assertTrue(new File(newHadoopBin).canExecute());
  System.clearProperty(HiveConf.ConfVars.HADOOPBIN.toString());
}
Program: 7518
Project: 7518
Buggy source:
@Test public void testClasspathSetupSingle() throws Exception {
  System.clearProperty(HiveConf.ConfVars.HADOOPBIN.toString());
  List<String> inputURLs=Lists.newArrayList();
  inputURLs.add("String_Node_Str");
  inputURLs.add("String_Node_Str");
  inputURLs.add("String_Node_Str");
  inputURLs.add("String_Node_Str");
  HiveConf hiveConf=new HiveConf();
  LocalMapreduceClasspathSetter classpathSetter=new LocalMapreduceClasspathSetter(hiveConf,TEMP_FOLDER.newFolder().getAbsolutePath(),ImmutableList.<String>of());
  for (  String url : inputURLs) {
    classpathSetter.accept(url);
  }
  Assert.assertEquals(ImmutableList.of("String_Node_Str"),ImmutableList.copyOf(classpathSetter.getHbaseProtocolJarPaths()));
  classpathSetter.setupClasspathScript();
  String newHadoopBin=new HiveConf().get(HiveConf.ConfVars.HADOOPBIN.toString());
  Assert.assertEquals(generatedHadoopBinSingle,Joiner.on('\n').join(Files.readLines(new File(newHadoopBin),Charsets.UTF_8)));
  Assert.assertTrue(new File(newHadoopBin).canExecute());
  System.clearProperty(HiveConf.ConfVars.HADOOPBIN.toString());
}

Fixed version (ground truth):
@Test public void testClasspathSetupSingle() throws Exception {
  System.clearProperty(HiveConf.ConfVars.HADOOPBIN.toString());
  List<String> inputURLs=Lists.newArrayList();
  inputURLs.add("String_Node_Str");
  inputURLs.add("String_Node_Str");
  inputURLs.add("String_Node_Str");
  inputURLs.add("String_Node_Str");
  List<String> auxJarsURLs=Lists.newArrayList();
  auxJarsURLs.add("String_Node_Str");
  auxJarsURLs.add("String_Node_Str");
  HiveConf hiveConf=new HiveConf();
  LocalMapreduceClasspathSetter classpathSetter=new LocalMapreduceClasspathSetter(hiveConf,TEMP_FOLDER.newFolder().getAbsolutePath(),auxJarsURLs);
  for (  String url : inputURLs) {
    classpathSetter.accept(url);
  }
  Assert.assertEquals(ImmutableList.of("String_Node_Str"),ImmutableList.copyOf(classpathSetter.getHbaseProtocolJarPaths()));
  classpathSetter.setupClasspathScript();
  String newHadoopBin=new HiveConf().get(HiveConf.ConfVars.HADOOPBIN.toString());
  Assert.assertEquals(generatedHadoopBinSingle,Joiner.on('\n').join(Files.readLines(new File(newHadoopBin),Charsets.UTF_8)));
  Assert.assertTrue(new File(newHadoopBin).canExecute());
  System.clearProperty(HiveConf.ConfVars.HADOOPBIN.toString());
}
Program: 7519
Project: 7519
Buggy source:
/** 
 * Prepare the specs of the twill application for the Explore twill runnable. Add jars needed by the Explore module in the classpath of the containers, and add conf files (hive_site.xml, etc) as resources available for the Explore twill runnable.
 */
private TwillPreparer prepareExploreContainer(TwillPreparer preparer){
  if (!isExploreEnabled) {
    return preparer;
  }
  try {
    Set<File> jars=ExploreServiceUtils.traceExploreDependencies();
    for (    File jarFile : jars) {
      LOG.trace("String_Node_Str",jarFile.getName());
      preparer=preparer.withClassPaths(jarFile.getName());
    }
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  String hiveConfFiles=System.getProperty(Constants.Explore.EXPLORE_CONF_FILES);
  LOG.debug("String_Node_Str",hiveConfFiles);
  if (hiveConfFiles == null) {
    throw new RuntimeException("String_Node_Str" + Constants.Explore.EXPLORE_CONF_FILES + "String_Node_Str");
  }
  Iterable<File> hiveConfFilesFiles=ExploreServiceUtils.getClassPathJarsFiles(hiveConfFiles);
  for (  File file : hiveConfFilesFiles) {
    if (file.getName().matches("String_Node_Str")) {
      preparer=preparer.withResources(file.toURI());
    }
  }
  return preparer;
}

Fixed version (ground truth):
/** 
 * Prepare the specs of the twill application for the Explore twill runnable. Add jars needed by the Explore module in the classpath of the containers, and add conf files (hive_site.xml, etc) as resources available for the Explore twill runnable.
 */
private TwillPreparer prepareExploreContainer(TwillPreparer preparer){
  if (!isExploreEnabled) {
    return preparer;
  }
  try {
    Set<File> jars=ExploreServiceUtils.traceExploreDependencies();
    for (    File jarFile : jars) {
      LOG.trace("String_Node_Str",jarFile.getName());
      preparer=preparer.withClassPaths(jarFile.getName());
    }
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  String hiveConfFiles=System.getProperty(Constants.Explore.EXPLORE_CONF_FILES);
  LOG.debug("String_Node_Str",hiveConfFiles);
  if (hiveConfFiles == null) {
    throw new RuntimeException("String_Node_Str" + Constants.Explore.EXPLORE_CONF_FILES + "String_Node_Str");
  }
  Iterable<File> hiveConfFilesFiles=ExploreServiceUtils.getClassPathJarsFiles(hiveConfFiles);
  for (  File file : hiveConfFilesFiles) {
    if (file.getName().matches("String_Node_Str")) {
      preparer=preparer.withResources(ExploreServiceUtils.hijackHiveConfFile(file).toURI());
    }
  }
  return preparer;
}
Program: 7520
Project: 7520
Buggy source:
private TwillSpecification.Builder.RunnableSetter addExploreService(TwillSpecification.Builder.MoreRunnable builder){
  int instances=instanceCountMap.get(Constants.Service.EXPLORE_HTTP_USER_SERVICE);
  ResourceSpecification resourceSpec=ResourceSpecification.Builder.with().setVirtualCores(cConf.getInt(Constants.Explore.CONTAINER_VIRTUAL_CORES,1)).setMemory(cConf.getInt(Constants.Explore.CONTAINER_MEMORY_MB,512),ResourceSpecification.SizeUnit.MEGA).setInstances(instances).build();
  TwillSpecification.Builder.MoreFile twillSpecs=builder.add(new ExploreServiceTwillRunnable(Constants.Service.EXPLORE_HTTP_USER_SERVICE,"String_Node_Str","String_Node_Str"),resourceSpec).withLocalFiles().add("String_Node_Str",cConfFile.toURI()).add("String_Node_Str",hConfFile.toURI());
  try {
    Set<File> jars=ExploreServiceUtils.traceExploreDependencies();
    for (    File jarFile : jars) {
      twillSpecs=twillSpecs.add(jarFile.getName(),jarFile);
    }
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return twillSpecs.apply();
}

Fixed version (ground truth):
private TwillSpecification.Builder.RunnableSetter addExploreService(TwillSpecification.Builder.MoreRunnable builder){
  int instances=instanceCountMap.get(Constants.Service.EXPLORE_HTTP_USER_SERVICE);
  ResourceSpecification resourceSpec=ResourceSpecification.Builder.with().setVirtualCores(cConf.getInt(Constants.Explore.CONTAINER_VIRTUAL_CORES,1)).setMemory(cConf.getInt(Constants.Explore.CONTAINER_MEMORY_MB,1024),ResourceSpecification.SizeUnit.MEGA).setInstances(instances).build();
  TwillSpecification.Builder.MoreFile twillSpecs=builder.add(new ExploreServiceTwillRunnable(Constants.Service.EXPLORE_HTTP_USER_SERVICE,"String_Node_Str","String_Node_Str"),resourceSpec).withLocalFiles().add("String_Node_Str",cConfFile.toURI()).add("String_Node_Str",hConfFile.toURI());
  try {
    Set<File> jars=ExploreServiceUtils.traceExploreDependencies();
    for (    File jarFile : jars) {
      twillSpecs=twillSpecs.add(jarFile.getName(),jarFile);
    }
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return twillSpecs.apply();
}
Program: 7522
Project: 7522
Buggy source:
private void addModule(String moduleName,Class<?> typeClass) throws DatasetManagementException {
  Location tempJarPath;
  try {
    tempJarPath=createDeploymentJar(typeClass);
    try {
      client.addModule(moduleName,typeClass.getName(),tempJarPath);
    }
  finally {
      tempJarPath.delete();
    }
  }
 catch (  IOException e) {
    String msg=String.format("String_Node_Str",moduleName,typeClass.getName());
    LOG.error(msg,e);
    throw new DatasetManagementException(msg,e);
  }
}

Fixed version (ground truth):
private void addModule(String moduleName,Class<?> typeClass) throws DatasetManagementException {
  try {
    File tempFile=File.createTempFile(typeClass.getName(),"String_Node_Str");
    try {
      Location tempJarPath=createDeploymentJar(typeClass,new LocalLocationFactory().create(tempFile.toURI()));
      client.addModule(moduleName,typeClass.getName(),tempJarPath);
    }
  finally {
      tempFile.delete();
    }
  }
 catch (  IOException e) {
    String msg=String.format("String_Node_Str",moduleName,typeClass.getName());
    LOG.error(msg,e);
    throw new DatasetManagementException(msg,e);
  }
}
Program: 7523
Project: 7523
Buggy source:
private void createDatasetInstance(DatasetInstanceConfiguration creationProperties,String name,HttpResponder responder,String operation){
  DatasetTypeMeta typeMeta=implManager.getTypeInfo(creationProperties.getTypeName());
  if (typeMeta == null) {
    String message=String.format("String_Node_Str",operation,name,creationProperties.getTypeName());
    LOG.warn(message);
    responder.sendError(HttpResponseStatus.NOT_FOUND,message);
    return;
  }
  DatasetSpecification spec;
  try {
    spec=opExecutorClient.create(name,typeMeta,DatasetProperties.builder().addAll(creationProperties.getProperties()).build());
  }
 catch (  Exception e) {
    String msg=String.format("String_Node_Str",operation,name,creationProperties.getTypeName(),e.getMessage());
    LOG.error(msg,e);
    throw new RuntimeException(msg,e);
  }
  instanceManager.add(spec);
}

Fixed version (ground truth):
private boolean createDatasetInstance(DatasetInstanceConfiguration creationProperties,String name,HttpResponder responder,String operation){
  DatasetTypeMeta typeMeta=implManager.getTypeInfo(creationProperties.getTypeName());
  if (typeMeta == null) {
    String message=String.format("String_Node_Str",operation,name,creationProperties.getTypeName());
    LOG.warn(message);
    responder.sendError(HttpResponseStatus.NOT_FOUND,message);
    return false;
  }
  DatasetSpecification spec;
  try {
    spec=opExecutorClient.create(name,typeMeta,DatasetProperties.builder().addAll(creationProperties.getProperties()).build());
  }
 catch (  Exception e) {
    String msg=String.format("String_Node_Str",operation,name,creationProperties.getTypeName(),e.getMessage());
    LOG.error(msg,e);
    throw new RuntimeException(msg,e);
  }
  instanceManager.add(spec);
  return true;
}
Program: 7524
Project: 7524
Buggy source:
/** 
 * Updates an existing Dataset specification properties    {@link DatasetInstanceConfiguration}is constructed based on request and the Dataset instance is updated.
 */
@PUT @Path("String_Node_Str") public void update(HttpRequest request,final HttpResponder responder,@PathParam("String_Node_Str") String name){
  Reader reader=new InputStreamReader(new ChannelBufferInputStream(request.getContent()));
  DatasetInstanceConfiguration creationProperties=GSON.fromJson(reader,DatasetInstanceConfiguration.class);
  LOG.info("String_Node_Str",name,creationProperties.getTypeName(),creationProperties.getProperties());
  DatasetSpecification existing=instanceManager.get(name);
  if (existing == null) {
    responder.sendError(HttpResponseStatus.NOT_FOUND,String.format("String_Node_Str",name));
    return;
  }
  if (!existing.getType().equals(creationProperties.getTypeName())) {
    String message=String.format("String_Node_Str",name,existing.getType());
    LOG.warn(message);
    responder.sendError(HttpResponseStatus.CONFLICT,message);
    return;
  }
  createDatasetInstance(creationProperties,name,responder,"String_Node_Str");
  try {
    datasetExploreFacade.disableExplore(name);
    datasetExploreFacade.enableExplore(name);
  }
 catch (  Exception e) {
    String msg=String.format("String_Node_Str",name,creationProperties.getProperties(),e.getMessage());
    LOG.error(msg,e);
  }
  executeAdmin(request,responder,name,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Updates an existing Dataset specification properties    {@link DatasetInstanceConfiguration}is constructed based on request and the Dataset instance is updated.
 */
@PUT @Path("String_Node_Str") public void update(HttpRequest request,final HttpResponder responder,@PathParam("String_Node_Str") String name){
  Reader reader=new InputStreamReader(new ChannelBufferInputStream(request.getContent()));
  DatasetInstanceConfiguration creationProperties=GSON.fromJson(reader,DatasetInstanceConfiguration.class);
  LOG.info("String_Node_Str",name,creationProperties.getTypeName(),creationProperties.getProperties());
  DatasetSpecification existing=instanceManager.get(name);
  if (existing == null) {
    responder.sendError(HttpResponseStatus.NOT_FOUND,String.format("String_Node_Str",name));
    return;
  }
  if (!existing.getType().equals(creationProperties.getTypeName())) {
    String message=String.format("String_Node_Str",name,existing.getType());
    LOG.warn(message);
    responder.sendError(HttpResponseStatus.CONFLICT,message);
    return;
  }
  if (!createDatasetInstance(creationProperties,name,responder,"String_Node_Str")) {
    return;
  }
  try {
    datasetExploreFacade.disableExplore(name);
    datasetExploreFacade.enableExplore(name);
  }
 catch (  Exception e) {
    String msg=String.format("String_Node_Str",name,creationProperties.getProperties(),e.getMessage());
    LOG.error(msg,e);
  }
  executeAdmin(request,responder,name,"String_Node_Str");
}
Program: 7525
Project: 7525
Buggy source:
@Override protected InetSocketAddress getExploreServiceAddress(){
  EndpointStrategy endpointStrategy=this.endpointStrategySupplier.get();
  if (endpointStrategy == null || endpointStrategy.pick() == null) {
    String message=String.format("String_Node_Str",Service.EXPLORE_HTTP_USER_SERVICE);
    LOG.error(message);
    throw new RuntimeException(message);
  }
  return endpointStrategy.pick().getSocketAddress();
}

Fixed version (ground truth):
@Override protected InetSocketAddress getExploreServiceAddress(){
  EndpointStrategy endpointStrategy=this.endpointStrategySupplier.get();
  if (endpointStrategy == null || endpointStrategy.pick() == null) {
    String message=String.format("String_Node_Str",Service.EXPLORE_HTTP_USER_SERVICE);
    LOG.debug(message);
    throw new RuntimeException(message);
  }
  return endpointStrategy.pick().getSocketAddress();
}
Program: 7527
Project: 7527
Buggy source:
@BeforeClass public static void setUpClass() throws Throwable {
  if (singleNodeMain != null) {
    try {
      CConfiguration cConf=CConfiguration.create();
      cConf.set(Constants.CFG_LOCAL_DATA_DIR,tmpFolder.newFolder().getAbsolutePath());
      singleNodeMain=SingleNodeMain.createSingleNodeMain(true,null,cConf,new Configuration());
      singleNodeMain.startUp();
    }
 catch (    Throwable e) {
      LOG.error("String_Node_Str",e);
      if (singleNodeMain != null) {
        singleNodeMain.shutDown();
      }
      throw e;
    }
  }
}

Fixed version (ground truth):
@BeforeClass public static void setUpClass() throws Throwable {
  testStackIndex++;
  if (singleNodeMain == null) {
    try {
      CConfiguration cConf=CConfiguration.create();
      cConf.set(Constants.CFG_LOCAL_DATA_DIR,tmpFolder.newFolder().getAbsolutePath());
      singleNodeMain=SingleNodeMain.createSingleNodeMain(true,null,cConf,new Configuration());
      singleNodeMain.startUp();
    }
 catch (    Throwable e) {
      LOG.error("String_Node_Str",e);
      if (singleNodeMain != null) {
        singleNodeMain.shutDown();
      }
      throw e;
    }
  }
}
Program: 7528
Project: 7528
Buggy source:
@AfterClass public static void tearDownClass(){
  if (singleNodeMain != null) {
    singleNodeMain.shutDown();
    singleNodeMain=null;
  }
}

Fixed version (ground truth):
@AfterClass public static void tearDownClass(){
  testStackIndex--;
  if (singleNodeMain != null && testStackIndex == 0) {
    singleNodeMain.shutDown();
    singleNodeMain=null;
  }
}
Program: 7529
Project: 7529
Buggy source:
@Override public void run(){
  LOG.info("String_Node_Str");
  Future<Service.State> completion=Services.getCompletionFuture(service);
  service.startAndWait();
  int port=service.getBindAddress().getPort();
  Cancellable contextCancellable=context.announce(name,port);
  LOG.info("String_Node_Str");
  try {
    completion.get();
    contextCancellable.cancel();
  }
 catch (  InterruptedException e) {
    LOG.error("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  LOG.info("String_Node_Str");
  Future<Service.State> completion=Services.getCompletionFuture(service);
  service.startAndWait();
  int port=service.getBindAddress().getPort();
  Cancellable contextCancellable=getContext().announce(name,port);
  LOG.info("String_Node_Str");
  try {
    completion.get();
    contextCancellable.cancel();
  }
 catch (  InterruptedException e) {
    LOG.error("String_Node_Str",e);
  }
catch (  ExecutionException e) {
    LOG.error("String_Node_Str",e);
  }
}
Program: 7530
Project: 7530
Buggy source:
@Override public void initialize(TwillContext context){
  LOG.info("String_Node_Str");
  this.context=context;
  Map<String,String> runnableArgs=new HashMap<String,String>(context.getSpecification().getConfigs());
  name=runnableArgs.get("String_Node_Str");
  handlers=new ArrayList<HttpServiceHandler>();
  List<String> handlerNames=GSON.fromJson(runnableArgs.get("String_Node_Str"),HANDLER_NAMES_TYPE);
  for (  String handlerName : handlerNames) {
    try {
      HttpServiceHandler handler=(HttpServiceHandler)programClassLoader.loadClass(handlerName).newInstance();
      handlers.add(handler);
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str");
      Throwables.propagate(e);
    }
  }
  service=createNettyHttpService(context.getHost().getCanonicalHostName());
}

Fixed version (ground truth):
@Override public void initialize(TwillContext context){
  LOG.info("String_Node_Str");
  super.initialize(context);
  Map<String,String> runnableArgs=new HashMap<String,String>(context.getSpecification().getConfigs());
  name=runnableArgs.get("String_Node_Str");
  handlers=new ArrayList<HttpServiceHandler>();
  List<String> handlerNames=GSON.fromJson(runnableArgs.get("String_Node_Str"),HANDLER_NAMES_TYPE);
  for (  String handlerName : handlerNames) {
    try {
      HttpServiceHandler handler=(HttpServiceHandler)programClassLoader.loadClass(handlerName).newInstance();
      handlers.add(handler);
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str");
      Throwables.propagate(e);
    }
  }
  service=createNettyHttpService(context.getHost().getCanonicalHostName());
}
Program: 7533
Project: 7533
Buggy source:
@Override protected boolean upgradeTable(HTableDescriptor tableDescriptor){
  HColumnDescriptor columnDescriptor=tableDescriptor.getFamily(DATA_COLUMN_FAMILY);
  boolean needUpgrade=false;
  if (columnDescriptor.getMaxVersions() < Integer.MAX_VALUE) {
    columnDescriptor.setMaxVersions(Integer.MAX_VALUE);
    needUpgrade=true;
  }
  if (tableUtil.getBloomFilter(columnDescriptor) != HBaseTableUtil.BloomType.ROW) {
    tableUtil.setBloomFilter(columnDescriptor,HBaseTableUtil.BloomType.ROW);
    needUpgrade=true;
  }
  if (spec.getProperty(TxConstants.PROPERTY_TTL) == null && columnDescriptor.getValue(TxConstants.PROPERTY_TTL) != null) {
    columnDescriptor.remove(TxConstants.PROPERTY_TTL.getBytes());
    needUpgrade=true;
  }
 else   if (!spec.getProperty(TxConstants.PROPERTY_TTL).equals(columnDescriptor.getValue(TxConstants.PROPERTY_TTL))) {
    columnDescriptor.setValue(TxConstants.PROPERTY_TTL,spec.getProperty(TxConstants.PROPERTY_TTL));
    needUpgrade=true;
  }
  return needUpgrade;
}

Fixed version (ground truth):
@Override protected boolean upgradeTable(HTableDescriptor tableDescriptor){
  HColumnDescriptor columnDescriptor=tableDescriptor.getFamily(DATA_COLUMN_FAMILY);
  boolean needUpgrade=false;
  if (columnDescriptor.getMaxVersions() < Integer.MAX_VALUE) {
    columnDescriptor.setMaxVersions(Integer.MAX_VALUE);
    needUpgrade=true;
  }
  if (tableUtil.getBloomFilter(columnDescriptor) != HBaseTableUtil.BloomType.ROW) {
    tableUtil.setBloomFilter(columnDescriptor,HBaseTableUtil.BloomType.ROW);
    needUpgrade=true;
  }
  if (spec.getProperty(TxConstants.PROPERTY_TTL) == null && columnDescriptor.getValue(TxConstants.PROPERTY_TTL) != null) {
    columnDescriptor.remove(TxConstants.PROPERTY_TTL.getBytes());
    needUpgrade=true;
  }
 else   if (spec.getProperty(TxConstants.PROPERTY_TTL) != null && !spec.getProperty(TxConstants.PROPERTY_TTL).equals(columnDescriptor.getValue(TxConstants.PROPERTY_TTL))) {
    columnDescriptor.setValue(TxConstants.PROPERTY_TTL,spec.getProperty(TxConstants.PROPERTY_TTL));
    needUpgrade=true;
  }
  return needUpgrade;
}
Program: 7534
Project: 7534
Buggy source:
public static <T extends Iterable<? extends V>,V>Transactional<T,V> of(TransactionExecutorFactory txFactory,Supplier<T> supplier){
  return new Transactional<T,V>(txFactory,supplier);
}

Fixed version (ground truth):
public static <T extends Iterable<V>,V>Transactional<T,V> of(TransactionExecutorFactory txFactory,Supplier<T> supplier){
  return new Transactional<T,V>(txFactory,supplier);
}
Program: 7535
Project: 7535
Buggy source:
/** 
 * Executes function within new transaction. See   {@link Transactional} for more details.
 * @param txFactory transaction factory to create new transaction
 * @param supplier supplier of transaction context
 * @param func function to execute
 * @param < V > type of object contained inside the transaction context
 * @param < T > type of the transaction context
 * @param < R > type of the function result
 * @return function result
 */
public static <V,T extends Iterable<? extends V>,R>R execute(TransactionExecutorFactory txFactory,Supplier<T> supplier,TransactionExecutor.Function<T,R> func) throws TransactionFailureException, IOException, InterruptedException {
  T it=supplier.get();
  Iterable<TransactionAware> txAwares=Iterables.transform(Iterables.filter(it,Predicates.instanceOf(TransactionAware.class)),new Function<V,TransactionAware>(){
    @Override public TransactionAware apply(    V input){
      return (TransactionAware)input;
    }
  }
);
  TransactionExecutor executor=txFactory.createExecutor(txAwares);
  try {
    return executor.execute(func,it);
  }
  finally {
    for (    V t : it) {
      if (t instanceof Closeable) {
        ((Closeable)t).close();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Executes function within new transaction. See   {@link Transactional} for more details.
 * @param txFactory transaction factory to create new transaction
 * @param supplier supplier of transaction context
 * @param func function to execute
 * @param < V > type of object contained inside the transaction context
 * @param < T > type of the transaction context
 * @param < R > type of the function result
 * @return function result
 */
public static <V,T extends Iterable<V>,R>R execute(TransactionExecutorFactory txFactory,Supplier<T> supplier,TransactionExecutor.Function<T,R> func) throws TransactionFailureException, IOException, InterruptedException {
  T it=supplier.get();
  Iterable<TransactionAware> txAwares=Iterables.transform(Iterables.filter(it,Predicates.instanceOf(TransactionAware.class)),new Function<V,TransactionAware>(){
    @Override public TransactionAware apply(    V input){
      return (TransactionAware)input;
    }
  }
);
  TransactionExecutor executor=txFactory.createExecutor(txAwares);
  try {
    return executor.execute(func,it);
  }
  finally {
    for (    V t : it) {
      if (t instanceof Closeable) {
        ((Closeable)t).close();
      }
    }
  }
}
Program: 7536
Project: 7536
Buggy source:
@Inject public MDSStreamMetaStore(CConfiguration conf,final TransactionSystemClient txClient,DatasetFramework framework){
  final DatasetFramework dsFramework=new NamespacedDatasetFramework(framework,new ReactorDatasetNamespace(conf,DataSetAccessor.Namespace.SYSTEM));
  txnl=Transactional.of(new TransactionExecutorFactory(){
    @Override public TransactionExecutor createExecutor(    Iterable<TransactionAware> transactionAwares){
      return new DefaultTransactionExecutor(txClient,transactionAwares);
    }
  }
,new Supplier<StreamMds>(){
    @Override public StreamMds get(){
      try {
        Table mdsTable=DatasetsUtil.getOrCreateDataset(dsFramework,STREAM_META_TABLE,"String_Node_Str",DatasetProperties.EMPTY,null);
        return new StreamMds(new MetadataStoreDataset(mdsTable));
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str",e);
        throw Throwables.propagate(e);
      }
    }
  }
);
}

Fixed version (ground truth):
@Inject public MDSStreamMetaStore(CConfiguration conf,final TransactionSystemClient txClient,DatasetFramework framework){
  final DatasetFramework dsFramework=new NamespacedDatasetFramework(framework,new ReactorDatasetNamespace(conf,DataSetAccessor.Namespace.SYSTEM));
  txnl=Transactional.of(new TransactionExecutorFactory(){
    @Override public TransactionExecutor createExecutor(    Iterable<TransactionAware> transactionAwares){
      return new DefaultTransactionExecutor(txClient,transactionAwares);
    }
  }
,new Supplier<StreamMds>(){
    @Override public StreamMds get(){
      try {
        Table mdsTable=DatasetsUtil.getOrCreateDataset(dsFramework,STREAM_META_TABLE,"String_Node_Str",DatasetProperties.EMPTY,DatasetDefinition.NO_ARGUMENTS,null);
        return new StreamMds(new MetadataStoreDataset(mdsTable));
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str",e);
        throw Throwables.propagate(e);
      }
    }
  }
);
}
Program: 7537
Project: 7537
Buggy source:
@Override public StreamMds get(){
  try {
    Table mdsTable=DatasetsUtil.getOrCreateDataset(dsFramework,STREAM_META_TABLE,"String_Node_Str",DatasetProperties.EMPTY,null);
    return new StreamMds(new MetadataStoreDataset(mdsTable));
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    throw Throwables.propagate(e);
  }
}

Fixed version (ground truth):
@Override public StreamMds get(){
  try {
    Table mdsTable=DatasetsUtil.getOrCreateDataset(dsFramework,STREAM_META_TABLE,"String_Node_Str",DatasetProperties.EMPTY,DatasetDefinition.NO_ARGUMENTS,null);
    return new StreamMds(new MetadataStoreDataset(mdsTable));
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    throw Throwables.propagate(e);
  }
}
Program: 7538
Project: 7538
Buggy source:
public OrderedTable getMetaTable() throws Exception {
  return DatasetsUtil.getOrCreateDataset(dsFramework,getMetaTableName(),OrderedTable.class.getName(),DatasetProperties.EMPTY,null);
}

Fixed version (ground truth):
public OrderedTable getMetaTable() throws Exception {
  return DatasetsUtil.getOrCreateDataset(dsFramework,getMetaTableName(),OrderedTable.class.getName(),DatasetProperties.EMPTY,DatasetDefinition.NO_ARGUMENTS,null);
}
Program: 7540
Project: 7540
Buggy source:
private String getStatus(final Id.Program id,final Type type) throws Throwable {
  final String[] statusStr={null};
  LOG.error(type.prettyName());
  if (type == Type.MAPREDUCE) {
    String workflowName=getWorkflowName(id.getId());
    LOG.error(workflowName);
    if (workflowName != null) {
      LOG.error("String_Node_Str");
      workflowClient.getWorkflowStatus(id.getAccountId(),id.getApplicationId(),workflowName,new WorkflowClient.Callback(){
        @Override public void handle(        WorkflowClient.Status status){
          LOG.error("String_Node_Str");
          if (status.getCode().equals(WorkflowClient.Status.Code.OK)) {
            LOG.error("String_Node_Str");
            statusStr[0]="String_Node_Str";
          }
 else {
            LOG.error("String_Node_Str");
            try {
              statusStr[0]=getProgramStatus(id,type).getStatus();
            }
 catch (            Exception e) {
              LOG.error("String_Node_Str",e);
              statusStr[0]=null;
            }
          }
        }
      }
);
    }
 else {
      LOG.error("String_Node_Str");
      statusStr[0]=getProgramStatus(id,type).getStatus();
    }
  }
 else   if (type == null) {
    return "String_Node_Str";
  }
 else {
    statusStr[0]=getProgramStatus(id,type).getStatus();
  }
  if (statusStr[0] == null) {
    throw new Throwable("String_Node_Str");
  }
  return statusStr[0];
}

Fixed version (ground truth):
private void getStatus(final Id.Program id,final Type type,final Map<Id.Program,String> statusMap) throws Throwable {
  if (type == Type.MAPREDUCE) {
    String workflowName=getWorkflowName(id.getId());
    if (workflowName != null) {
      ApplicationSpecification appSpec=store.getApplication(id.getApplication());
      if (appSpec == null || !appSpec.getMapReduce().containsKey(id.getId())) {
        statusMap.put(id,"String_Node_Str");
      }
      workflowClient.getWorkflowStatus(id.getAccountId(),id.getApplicationId(),workflowName,new WorkflowClient.Callback(){
        @Override public void handle(        WorkflowClient.Status status){
          if (status.getCode().equals(WorkflowClient.Status.Code.OK)) {
            statusMap.put(id,"String_Node_Str");
          }
 else {
            try {
              statusMap.put(id,getProgramStatus(id,type).getStatus());
            }
 catch (            Exception e) {
              LOG.error("String_Node_Str",e);
              statusMap.put(id,null);
            }
          }
        }
      }
);
    }
 else {
      statusMap.put(id,getProgramStatus(id,type).getStatus());
    }
  }
 else   if (type == null) {
    statusMap.put(id,"String_Node_Str");
  }
 else {
    statusMap.put(id,getProgramStatus(id,type).getStatus());
  }
}
Program: 7541
Project: 7541
Buggy source:
@Nullable protected List<JsonObject> decodeArrayArguments(HttpRequest request) throws IOException {
  ChannelBuffer content=request.getContent();
  if (!content.readable()) {
    return new ArrayList<JsonObject>();
  }
  Reader reader=new InputStreamReader(new ChannelBufferInputStream(content),Charsets.UTF_8);
  try {
    List<JsonObject> args=GSON.fromJson(reader,new TypeToken<List<JsonObject>>(){
    }
.getType());
    System.err.println(args);
    return args == null ? new ArrayList<JsonObject>() : args;
  }
 catch (  JsonSyntaxException e) {
    LOG.info("String_Node_Str",request.getUri(),e);
    throw e;
  }
 finally {
    reader.close();
  }
}

Fixed version (ground truth):
@Nullable protected List<JsonObject> decodeArrayArguments(HttpRequest request) throws IOException {
  ChannelBuffer content=request.getContent();
  if (!content.readable()) {
    return new ArrayList<JsonObject>();
  }
  Reader reader=new InputStreamReader(new ChannelBufferInputStream(content),Charsets.UTF_8);
  try {
    List<JsonObject> args=GSON.fromJson(reader,new TypeToken<List<JsonObject>>(){
    }
.getType());
    return args == null ? new ArrayList<JsonObject>() : args;
  }
 catch (  JsonSyntaxException e) {
    LOG.info("String_Node_Str",request.getUri(),e);
    throw e;
  }
 finally {
    reader.close();
  }
}
Program: 7544
Project: 7544
Buggy source:
@Override protected void doInit(TwillContext context){
  this.user=DEFAULT_USER;
  CConfiguration cConf=getCConfiguration();
  Configuration hConf=getConfiguration();
  cConf.set(Constants.Dataset.Executor.ADDRESS,context.getHost().getHostName());
  injector=Guice.createInjector(new ConfigModule(cConf,hConf),new IOModule(),new ZKClientModule(),new KafkaClientModule(),new MetricsClientRuntimeModule().getDistributedModules(),new DiscoveryRuntimeModule().getDistributedModules(),new LocationRuntimeModule().getDistributedModules(),new DataFabricModules().getDistributedModules(),new DataSetsModules().getDistributedModule(),new DataSetServiceModules().getDistributedModule(),new LoggingModules().getDistributedModules(),new AuthModule());
  injector.getInstance(LogAppenderInitializer.class).initialize();
  LoggingContextAccessor.setLoggingContext(new ServiceLoggingContext(Constants.Logging.SYSTEM_NAME,Constants.Logging.COMPONENT_NAME,Constants.Service.DATASET_EXECUTOR));
}

Fixed version (ground truth):
@Override protected void doInit(TwillContext context){
  this.user=DEFAULT_USER;
  CConfiguration cConf=getCConfiguration();
  Configuration hConf=getConfiguration();
  cConf.set(Constants.Dataset.Executor.ADDRESS,context.getHost().getHostName());
  injector=Guice.createInjector(new ConfigModule(cConf,hConf),new IOModule(),new ZKClientModule(),new KafkaClientModule(),new MetricsClientRuntimeModule().getDistributedModules(),new DiscoveryRuntimeModule().getDistributedModules(),new LocationRuntimeModule().getDistributedModules(),new DataFabricModules().getDistributedModules(),new DataSetsModules().getDistributedModule(),new DataSetServiceModules().getDistributedModule(),new LoggingModules().getDistributedModules(),new AuthModule(),new ExploreClientModule());
  injector.getInstance(LogAppenderInitializer.class).initialize();
  LoggingContextAccessor.setLoggingContext(new ServiceLoggingContext(Constants.Logging.SYSTEM_NAME,Constants.Logging.COMPONENT_NAME,Constants.Service.DATASET_EXECUTOR));
}
Program: 7546
Project: 7546
Buggy source:
/** 
 * Constructor.
 * @param streamConfig Stream configuration.
 * @param consumerConfig Consumer configuration.
 * @param hTable For communicate with HBase for storing polled entry states (not consumer state). This class isresponsible for closing the HTable.
 * @param reader For reading stream events. This class is responsible for closing the reader.
 */
public HBaseStreamFileConsumer(StreamConfig streamConfig,ConsumerConfig consumerConfig,HTable hTable,FileReader<StreamEventOffset,Iterable<StreamFileOffset>> reader,StreamConsumerStateStore stateStore,StreamConsumerState beginConsumerState,@Nullable ReadFilter extraFilter,AbstractRowKeyDistributor keyDistributor){
  super(streamConfig,consumerConfig,reader,stateStore,beginConsumerState,extraFilter);
  this.hTable=hTable;
  this.keyDistributor=keyDistributor;
  this.scanExecutor=createScanExecutor(streamConfig.getName());
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param streamConfig Stream configuration.
 * @param consumerConfig Consumer configuration.
 * @param hTable For communicate with HBase for storing polled entry states (not consumer state). This class isresponsible for closing the HTable.
 * @param reader For reading stream events. This class is responsible for closing the reader.
 */
public HBaseStreamFileConsumer(CConfiguration cConf,StreamConfig streamConfig,ConsumerConfig consumerConfig,HTable hTable,FileReader<StreamEventOffset,Iterable<StreamFileOffset>> reader,StreamConsumerStateStore stateStore,StreamConsumerState beginConsumerState,@Nullable ReadFilter extraFilter,AbstractRowKeyDistributor keyDistributor){
  super(cConf,streamConfig,consumerConfig,reader,stateStore,beginConsumerState,extraFilter);
  this.hTable=hTable;
  this.keyDistributor=keyDistributor;
  this.scanExecutor=createScanExecutor(streamConfig.getName());
}