nus-yam/ex-repair huggingface dataset:
Program: 5433
Project: 5433
Buggy source:
private Set<NamespacedEntityId> getSortedEntities(List<MetadataEntry> results,SortInfo sortInfo){
  if (SortInfo.SortOrder.WEIGHTED != sortInfo.getSortOrder()) {
    Set<NamespacedEntityId> entities=new LinkedHashSet<>(results.size());
    for (    MetadataEntry metadataEntry : results) {
      if (metadataEntry != null) {
        entities.add(metadataEntry.getTargetId());
      }
    }
    return entities;
  }
  final Map<NamespacedEntityId,Integer> weightedResults=new HashMap<>();
  for (  MetadataEntry metadataEntry : results) {
    if (metadataEntry != null) {
      Integer score=weightedResults.get(metadataEntry.getTargetId());
      score=score == null ? 0 : score;
      weightedResults.put(metadataEntry.getTargetId(),score + 1);
    }
  }
  List<Map.Entry<NamespacedEntityId,Integer>> resultList=new ArrayList<>(weightedResults.entrySet());
  Collections.sort(resultList,SEARCH_RESULT_DESC_SCORE_COMPARATOR);
  Set<NamespacedEntityId> result=new LinkedHashSet<>(resultList.size());
  for (  Map.Entry<NamespacedEntityId,Integer> entry : resultList) {
    result.add(entry.getKey());
  }
  return result;
}

Fixed version (ground truth):
private Set<NamespacedEntityId> getSortedEntities(List<MetadataEntry> results,SortInfo sortInfo){
  if (SortInfo.SortOrder.WEIGHTED != sortInfo.getSortOrder()) {
    Set<NamespacedEntityId> entities=new LinkedHashSet<>(results.size());
    for (    MetadataEntry metadataEntry : results) {
      if (metadataEntry != null) {
        entities.add(metadataEntry.getTargetId());
      }
    }
    return entities;
  }
  final Map<NamespacedEntityId,Integer> weightedResults=new HashMap<>();
  for (  MetadataEntry metadataEntry : results) {
    if (metadataEntry != null) {
      Integer score=weightedResults.get(metadataEntry.getTargetId());
      score=(score == null) ? 0 : score;
      weightedResults.put(metadataEntry.getTargetId(),score + 1);
    }
  }
  List<Map.Entry<NamespacedEntityId,Integer>> resultList=new ArrayList<>(weightedResults.entrySet());
  Collections.sort(resultList,SEARCH_RESULT_DESC_SCORE_COMPARATOR);
  Set<NamespacedEntityId> result=new LinkedHashSet<>(resultList.size());
  for (  Map.Entry<NamespacedEntityId,Integer> entry : resultList) {
    result.add(entry.getKey());
  }
  return result;
}
Program: 5435
Project: 5435
Buggy source:
private MetadataSearchResponse search(String ns,String searchQuery,int offset,int limit,int numCursors,boolean showHidden) throws BadRequestException {
  return store.search(ns,searchQuery,EnumSet.allOf(EntityTypeSimpleName.class),SortInfo.DEFAULT,offset,limit,numCursors,null,showHidden);
}

Fixed version (ground truth):
private MetadataSearchResponse search(String ns,String searchQuery,int offset,int limit,int numCursors,boolean showHidden,SortInfo sortInfo) throws BadRequestException {
  return store.search(ns,searchQuery,EnumSet.allOf(EntityTypeSimpleName.class),sortInfo,offset,limit,numCursors,"String_Node_Str",showHidden);
}
Program: 5436
Project: 5436
Buggy source:
private void rewriteHiveConfig(){
  URL resourceURL=getLocalResourceURL("String_Node_Str");
  if (resourceURL == null) {
    LOG.warn("String_Node_Str");
    return;
  }
  try (InputStream is=new FileInputStream(new File(resourceURL.toURI()))){
    Configuration conf=new Configuration(false);
    conf.addResource(is);
    conf.setBoolean(Job.MAPREDUCE_JOB_USER_CLASSPATH_FIRST,false);
    conf.setBoolean(MRJobConfig.MAPREDUCE_JOB_CLASSLOADER,false);
    String sparkHome=System.getenv(Constants.SPARK_HOME);
    if (sparkHome != null) {
      LOG.debug("String_Node_Str",sparkHome);
      conf.set("String_Node_Str",sparkHome);
    }
    File newConfFile=File.createTempFile("String_Node_Str","String_Node_Str");
    try (FileOutputStream os=new FileOutputStream(newConfFile)){
      conf.writeXml(os);
    }
     Files.move(newConfFile.toPath(),Paths.get(resourceURL.toURI()),StandardCopyOption.REPLACE_EXISTING);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",resourceURL,e);
    throw Throwables.propagate(e);
  }
}

Fixed version (ground truth):
private void rewriteHiveConfig(){
  URL resourceURL=getLocalResourceURL("String_Node_Str");
  if (resourceURL == null) {
    LOG.warn("String_Node_Str");
    return;
  }
  try (InputStream is=new FileInputStream(new File(resourceURL.toURI()))){
    Configuration conf=new Configuration(false);
    conf.addResource(is);
    conf.setBoolean(Job.MAPREDUCE_JOB_USER_CLASSPATH_FIRST,false);
    conf.setBoolean(MRJobConfig.MAPREDUCE_JOB_CLASSLOADER,false);
    conf.set(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION,UserGroupInformation.AuthenticationMethod.SIMPLE.name());
    String sparkHome=System.getenv(Constants.SPARK_HOME);
    if (sparkHome != null) {
      LOG.debug("String_Node_Str",sparkHome);
      conf.set("String_Node_Str",sparkHome);
    }
    File newConfFile=File.createTempFile("String_Node_Str","String_Node_Str");
    try (FileOutputStream os=new FileOutputStream(newConfFile)){
      conf.writeXml(os);
    }
     Files.move(newConfFile.toPath(),Paths.get(resourceURL.toURI()),StandardCopyOption.REPLACE_EXISTING);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",resourceURL,e);
    throw Throwables.propagate(e);
  }
}
Program: 5437
Project: 5437
Buggy source:
private Properties generateKafkaConfig(String kafkaZKConnect){
  int port=Networks.getRandomPort();
  Preconditions.checkState(port > 0,"String_Node_Str");
  Properties prop=new Properties();
  prop.setProperty("String_Node_Str",new File("String_Node_Str").getAbsolutePath());
  prop.setProperty("String_Node_Str",Integer.toString(port));
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str",kafkaZKConnect);
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  return prop;
}

Fixed version (ground truth):
private Properties generateKafkaConfig(String kafkaZKConnect){
  Properties prop=new Properties();
  prop.setProperty("String_Node_Str",new File("String_Node_Str").getAbsolutePath());
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str",kafkaZKConnect);
  prop.setProperty("String_Node_Str","String_Node_Str");
  prop.setProperty("String_Node_Str","String_Node_Str");
  return prop;
}
Program: 5438
Project: 5438
Buggy source:
@Override public Boolean call() throws Exception {
  try {
    getDSFramework().getInstances(NamespaceId.DEFAULT);
    return true;
  }
 catch (  ServiceUnavailableException sue) {
    return false;
  }
}

Fixed version (ground truth):
@Override public Boolean call() throws Exception {
  try {
    getDSFramework().getInstances(NamespaceId.SYSTEM);
    return true;
  }
 catch (  ServiceUnavailableException sue) {
    return false;
  }
}
Program: 5439
Project: 5439
Buggy source:
@Override protected void startUp() throws Exception {
  if (!zkClientService.isRunning()) {
    zkClientService.startAndWait();
  }
  datasetOpExecutorService.startAndWait();
  remoteSystemOperationsService.startAndWait();
  datasetService.startAndWait();
  Tasks.waitFor(true,new Callable<Boolean>(){
    @Override public Boolean call() throws Exception {
      try {
        getDSFramework().getInstances(NamespaceId.DEFAULT);
        return true;
      }
 catch (      ServiceUnavailableException sue) {
        return false;
      }
    }
  }
,5,TimeUnit.MINUTES,10,TimeUnit.SECONDS);
}

Fixed version (ground truth):
@Override protected void startUp() throws Exception {
  if (!zkClientService.isRunning()) {
    zkClientService.startAndWait();
  }
  datasetOpExecutorService.startAndWait();
  remoteSystemOperationsService.startAndWait();
  datasetService.startAndWait();
  Tasks.waitFor(true,new Callable<Boolean>(){
    @Override public Boolean call() throws Exception {
      try {
        getDSFramework().getInstances(NamespaceId.SYSTEM);
        return true;
      }
 catch (      ServiceUnavailableException sue) {
        return false;
      }
    }
  }
,5,TimeUnit.MINUTES,10,TimeUnit.SECONDS);
}
Program: 5441
Project: 5441
Buggy source:
/** 
 * Creates an instance with all Admin functions supported.
 */
public DefaultAdmin(DatasetFramework dsFramework,NamespaceId namespace,SecureStoreManager secureStoreManager,@Nullable MessagingAdmin messagingAdmin,RetryStrategy retryStrategy){
  this.dsFramework=dsFramework;
  this.namespace=namespace;
  this.secureStoreManager=secureStoreManager;
  this.messagingAdmin=messagingAdmin;
  this.retryStrategy=retryStrategy;
}

Fixed version (ground truth):
/** 
 * Creates an instance with all Admin functions supported.
 */
public DefaultAdmin(DatasetFramework dsFramework,NamespaceId namespace,SecureStoreManager secureStoreManager,@Nullable MessagingAdmin messagingAdmin,RetryStrategy retryStrategy){
  super(dsFramework,namespace,retryStrategy);
  this.secureStoreManager=secureStoreManager;
  this.messagingAdmin=messagingAdmin;
  this.retryStrategy=retryStrategy;
}
Program: 5443
Project: 5443
Buggy source:
MapReduceRuntimeService(Injector injector,CConfiguration cConf,Configuration hConf,MapReduce mapReduce,MapReduceSpecification specification,BasicMapReduceContext context,Location programJarLocation,NamespacedLocationFactory locationFactory,StreamAdmin streamAdmin,TransactionSystemClient txClient,AuthorizationEnforcer authorizationEnforcer,AuthenticationContext authenticationContext){
  this.injector=injector;
  this.cConf=cConf;
  this.hConf=hConf;
  this.mapReduce=mapReduce;
  this.specification=specification;
  this.programJarLocation=programJarLocation;
  this.locationFactory=locationFactory;
  this.streamAdmin=streamAdmin;
  this.txClient=txClient;
  this.context=context;
  this.authorizationEnforcer=authorizationEnforcer;
  this.authenticationContext=authenticationContext;
}

Fixed version (ground truth):
MapReduceRuntimeService(Injector injector,CConfiguration cConf,Configuration hConf,MapReduce mapReduce,MapReduceSpecification specification,BasicMapReduceContext context,Location programJarLocation,NamespacedLocationFactory locationFactory,StreamAdmin streamAdmin,TransactionSystemClient txClient,AuthorizationEnforcer authorizationEnforcer,AuthenticationContext authenticationContext){
  this.injector=injector;
  this.cConf=cConf;
  this.hConf=hConf;
  this.mapReduce=mapReduce;
  this.specification=specification;
  this.programJarLocation=programJarLocation;
  this.locationFactory=locationFactory;
  this.streamAdmin=streamAdmin;
  this.txClient=new RetryingLongTransactionSystemClient(txClient,context.getRetryStrategy());
  this.context=context;
  this.authorizationEnforcer=authorizationEnforcer;
  this.authenticationContext=authenticationContext;
}
Program: 5445
Project: 5445
Buggy source:
/** 
 * Start the scheduler services, by initializing them and starting them
 */
protected final void startSchedulers() throws SchedulerException {
  try {
    timeScheduler.init();
    timeScheduler.start();
    LOG.info("String_Node_Str");
  }
 catch (  Throwable t) {
    Throwables.propagateIfInstanceOf(t,SchedulerException.class);
    throw new SchedulerException(t);
  }
  try {
    streamSizeScheduler.init();
    streamSizeScheduler.start();
    LOG.info("String_Node_Str");
  }
 catch (  Throwable t) {
    Throwables.propagateIfInstanceOf(t,SchedulerException.class);
    throw new SchedulerException(t);
  }
}

Fixed version (ground truth):
/** 
 * Start the scheduler services, by initializing them and starting them
 */
protected final void startSchedulers() throws SchedulerException {
  try {
    timeScheduler.init();
    timeScheduler.start();
    LOG.info("String_Node_Str");
  }
 catch (  SchedulerException t) {
    Throwables.propagateIfPossible(t,SchedulerException.class);
    throw new SchedulerException(t);
  }
  try {
    streamSizeScheduler.init();
    streamSizeScheduler.start();
    LOG.info("String_Node_Str");
  }
 catch (  Throwable t) {
    Throwables.propagateIfPossible(t,SchedulerException.class);
    throw new SchedulerException(t);
  }
}
Program: 5446
Project: 5446
Buggy source:
/** 
 * Stop the quartz scheduler service.
 */
protected final void stopScheduler() throws SchedulerException {
  try {
    streamSizeScheduler.stop();
    LOG.info("String_Node_Str");
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",t);
    Throwables.propagateIfInstanceOf(t,SchedulerException.class);
    throw new SchedulerException(t);
  }
 finally {
    try {
      timeScheduler.stop();
      LOG.info("String_Node_Str");
    }
 catch (    Throwable t) {
      LOG.error("String_Node_Str",t);
      Throwables.propagateIfInstanceOf(t,SchedulerException.class);
      throw new SchedulerException(t);
    }
  }
}

Fixed version (ground truth):
/** 
 * Stop the quartz scheduler service.
 */
protected final void stopScheduler() throws SchedulerException {
  try {
    streamSizeScheduler.stop();
    LOG.info("String_Node_Str");
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",t);
    Throwables.propagateIfPossible(t,SchedulerException.class);
    throw new SchedulerException(t);
  }
 finally {
    try {
      timeScheduler.stop();
      LOG.info("String_Node_Str");
    }
 catch (    Throwable t) {
      LOG.error("String_Node_Str",t);
      Throwables.propagateIfPossible(t,SchedulerException.class);
      throw new SchedulerException(t);
    }
  }
}
Program: 5447
Project: 5447
Buggy source:
@Inject public DistributedSchedulerService(TimeScheduler timeScheduler,StreamSizeScheduler streamSizeScheduler,Store store){
  super(timeScheduler,streamSizeScheduler,store);
  this.serviceDelegate=new RetryOnStartFailureService(new Supplier<Service>(){
    @Override public Service get(){
      return new AbstractService(){
        @Override protected void doStart(){
          try {
            startSchedulers();
            notifyStarted();
          }
 catch (          SchedulerException e) {
            LOG.warn("String_Node_Str",e);
            notifyFailed(e);
          }
        }
        @Override protected void doStop(){
          try {
            stopScheduler();
            notifyStopped();
          }
 catch (          SchedulerException e) {
            notifyFailed(e);
          }
        }
      }
;
    }
  }
,RetryStrategies.exponentialDelay(200,5000,TimeUnit.MILLISECONDS));
}

Fixed version (ground truth):
@Inject public DistributedSchedulerService(TimeScheduler timeScheduler,StreamSizeScheduler streamSizeScheduler,Store store){
  super(timeScheduler,streamSizeScheduler,store);
  this.serviceDelegate=new RetryOnStartFailureService(new Supplier<Service>(){
    @Override public Service get(){
      return new AbstractService(){
        @Override protected void doStart(){
          try {
            startSchedulers();
            notifyStarted();
          }
 catch (          ServiceUnavailableException e) {
            LOG.debug("String_Node_Str",e.getMessage());
            notifyFailed(e);
          }
catch (          SchedulerException e) {
            LOG.warn("String_Node_Str",e);
            notifyFailed(e);
          }
        }
        @Override protected void doStop(){
          try {
            stopScheduler();
            notifyStopped();
          }
 catch (          SchedulerException e) {
            notifyFailed(e);
          }
        }
      }
;
    }
  }
,RetryStrategies.exponentialDelay(200,5000,TimeUnit.MILLISECONDS));
}
Program: 5448
Project: 5448
Buggy source:
@Override public Service get(){
  return new AbstractService(){
    @Override protected void doStart(){
      try {
        startSchedulers();
        notifyStarted();
      }
 catch (      SchedulerException e) {
        LOG.warn("String_Node_Str",e);
        notifyFailed(e);
      }
    }
    @Override protected void doStop(){
      try {
        stopScheduler();
        notifyStopped();
      }
 catch (      SchedulerException e) {
        notifyFailed(e);
      }
    }
  }
;
}

Fixed version (ground truth):
@Override public Service get(){
  return new AbstractService(){
    @Override protected void doStart(){
      try {
        startSchedulers();
        notifyStarted();
      }
 catch (      ServiceUnavailableException e) {
        LOG.debug("String_Node_Str",e.getMessage());
        notifyFailed(e);
      }
catch (      SchedulerException e) {
        LOG.warn("String_Node_Str",e);
        notifyFailed(e);
      }
    }
    @Override protected void doStop(){
      try {
        stopScheduler();
        notifyStopped();
      }
 catch (      SchedulerException e) {
        notifyFailed(e);
      }
    }
  }
;
}
Program: 5449
Project: 5449
Buggy source:
@Override protected void doStart(){
  try {
    startSchedulers();
    notifyStarted();
  }
 catch (  SchedulerException e) {
    LOG.warn("String_Node_Str",e);
    notifyFailed(e);
  }
}

Fixed version (ground truth):
@Override protected void doStart(){
  try {
    startSchedulers();
    notifyStarted();
  }
 catch (  ServiceUnavailableException e) {
    LOG.debug("String_Node_Str",e.getMessage());
    notifyFailed(e);
  }
catch (  SchedulerException e) {
    LOG.warn("String_Node_Str",e);
    notifyFailed(e);
  }
}
Program: 5450
Project: 5450
Buggy source:
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  String datasetType=arguments.get(ArgumentName.DATASET_TYPE.toString());
  String datasetName=arguments.get(ArgumentName.NEW_DATASET.toString());
  String datasetPropertiesString=arguments.getOptional(ArgumentName.DATASET_PROPERTIES.toString(),"String_Node_Str");
  String datasetDescription=arguments.getOptional(ArgumentName.DATASET_DESCRIPTON.toString(),null);
  Map<String,String> datasetProperties=ArgumentParser.parseMap(datasetPropertiesString);
  DatasetInstanceConfiguration datasetConfig=new DatasetInstanceConfiguration(datasetType,datasetProperties,datasetDescription,null);
  datasetClient.create(cliConfig.getCurrentNamespace().dataset(datasetName),datasetConfig);
  output.printf("String_Node_Str",datasetName,datasetType,GSON.toJson(datasetProperties));
  output.println();
}

Fixed version (ground truth):
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  String datasetType=arguments.get(ArgumentName.DATASET_TYPE.toString());
  String datasetName=arguments.get(ArgumentName.NEW_DATASET.toString());
  String datasetPropertiesString=arguments.getOptional(ArgumentName.DATASET_PROPERTIES.toString(),"String_Node_Str");
  String datasetDescription=arguments.getOptional(ArgumentName.DATASET_DESCRIPTON.toString(),null);
  Map<String,String> datasetProperties=ArgumentParser.parseMap(datasetPropertiesString,ArgumentName.DATASET_PROPERTIES.toString());
  DatasetInstanceConfiguration datasetConfig=new DatasetInstanceConfiguration(datasetType,datasetProperties,datasetDescription,null);
  datasetClient.create(cliConfig.getCurrentNamespace().dataset(datasetName),datasetConfig);
  output.printf("String_Node_Str",datasetName,datasetType,GSON.toJson(datasetProperties));
  output.println();
}
Program: 5451
Project: 5451
Buggy source:
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  DatasetId instance=cliConfig.getCurrentNamespace().dataset(arguments.get(ArgumentName.DATASET.toString()));
  Map<String,String> properties=ArgumentParser.parseMap(arguments.get(ArgumentName.DATASET_PROPERTIES.toString()));
  datasetClient.updateExisting(instance,properties);
  output.printf("String_Node_Str",instance.getEntityName(),GSON.toJson(properties));
}

Fixed version (ground truth):
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  DatasetId instance=cliConfig.getCurrentNamespace().dataset(arguments.get(ArgumentName.DATASET.toString()));
  Map<String,String> properties=ArgumentParser.parseMap(arguments.get(ArgumentName.DATASET_PROPERTIES.toString()),ArgumentName.DATASET_PROPERTIES.toString());
  datasetClient.updateExisting(instance,properties);
  output.printf("String_Node_Str",instance.getEntityName(),GSON.toJson(properties));
}
Program: 5452
Project: 5452
Buggy source:
@Override public String getDescription(){
  return String.format("String_Node_Str",Fragment.of(Article.A,ElementType.DATASET.getName()));
}

Fixed version (ground truth):
@Override public String getDescription(){
  return String.format("String_Node_Str",Fragment.of(Article.A,ElementType.DATASET.getName()),ArgumentName.DATASET_PROPERTIES);
}
Program: 5453
Project: 5453
Buggy source:
@Override public void perform(Arguments arguments,PrintStream printStream) throws Exception {
  String runtimeArgs=arguments.get(ArgumentName.RUNTIME_ARGS.toString());
  Map<String,String> args=ArgumentParser.parseMap(runtimeArgs);
  setPreferences(arguments,printStream,args);
}

Fixed version (ground truth):
@Override public void perform(Arguments arguments,PrintStream printStream) throws Exception {
  String runtimeArgs=arguments.get(ArgumentName.RUNTIME_ARGS.toString());
  Map<String,String> args=ArgumentParser.parseMap(runtimeArgs,ArgumentName.RUNTIME_ARGS.toString());
  setPreferences(arguments,printStream,args);
}
Program: 5454
Project: 5454
Buggy source:
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  ProgramId programId=parseProgramId(arguments,elementType);
  String appName=programId.getApplication();
  String appVersion=programId.getVersion();
  String programName=programId.getProgram();
  String runtimeArgsString=arguments.get(ArgumentName.RUNTIME_ARGS.toString());
  Map<String,String> runtimeArgs=ArgumentParser.parseMap(runtimeArgsString);
  programClient.setRuntimeArgs(programId,runtimeArgs);
  output.printf("String_Node_Str",elementType.getName(),programName,appName,appVersion,runtimeArgsString);
}

Fixed version (ground truth):
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  ProgramId programId=parseProgramId(arguments,elementType);
  String appName=programId.getApplication();
  String appVersion=programId.getVersion();
  String programName=programId.getProgram();
  String runtimeArgsString=arguments.get(ArgumentName.RUNTIME_ARGS.toString());
  Map<String,String> runtimeArgs=ArgumentParser.parseMap(runtimeArgsString,ArgumentName.RUNTIME_ARGS.toString());
  programClient.setRuntimeArgs(programId,runtimeArgs);
  output.printf("String_Node_Str",elementType.getName(),programName,appName,appVersion,runtimeArgsString);
}
Program: 5455
Project: 5455
Buggy source:
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  ServiceId serviceId=new ServiceId(parseProgramId(arguments,ElementType.SERVICE));
  String routeConfig=arguments.get(ArgumentName.ROUTE_CONFIG.getName());
  serviceClient.storeRouteConfig(serviceId,ArgumentParser.parseStringIntegerMap(routeConfig));
  output.printf("String_Node_Str",ElementType.SERVICE.getName(),serviceId.getProgram(),serviceId.getApplication(),routeConfig);
}

Fixed version (ground truth):
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  ServiceId serviceId=new ServiceId(parseProgramId(arguments,ElementType.SERVICE));
  String routeConfig=arguments.get(ArgumentName.ROUTE_CONFIG.getName());
  serviceClient.storeRouteConfig(serviceId,ArgumentParser.parseStringIntegerMap(routeConfig,ArgumentName.ROUTE_CONFIG.toString()));
  output.printf("String_Node_Str",ElementType.SERVICE.getName(),serviceId.getProgram(),serviceId.getApplication(),routeConfig);
}
Program: 5456
Project: 5456
Buggy source:
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  StreamId streamId=cliConfig.getCurrentNamespace().stream(arguments.get(ArgumentName.STREAM.toString()));
  StreamProperties currentProperties=streamClient.getConfig(streamId);
  String formatName=arguments.get(ArgumentName.FORMAT.toString());
  Schema schema=getSchema(arguments);
  Map<String,String> settings=Collections.emptyMap();
  if (arguments.hasArgument(ArgumentName.SETTINGS.toString())) {
    settings=ArgumentParser.parseMap(arguments.get(ArgumentName.SETTINGS.toString()));
  }
  FormatSpecification formatSpecification=new FormatSpecification(formatName,schema,settings);
  StreamProperties streamProperties=new StreamProperties(currentProperties.getTTL(),formatSpecification,currentProperties.getNotificationThresholdMB(),currentProperties.getDescription());
  streamClient.setStreamProperties(streamId,streamProperties);
  output.printf("String_Node_Str",streamId.getEntityName());
}

Fixed version (ground truth):
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  StreamId streamId=cliConfig.getCurrentNamespace().stream(arguments.get(ArgumentName.STREAM.toString()));
  StreamProperties currentProperties=streamClient.getConfig(streamId);
  String formatName=arguments.get(ArgumentName.FORMAT.toString());
  Schema schema=getSchema(arguments);
  Map<String,String> settings=Collections.emptyMap();
  if (arguments.hasArgument(ArgumentName.SETTINGS.toString())) {
    settings=ArgumentParser.parseMap(arguments.get(ArgumentName.SETTINGS.toString()),ArgumentName.SETTINGS.toString());
  }
  FormatSpecification formatSpecification=new FormatSpecification(formatName,schema,settings);
  StreamProperties streamProperties=new StreamProperties(currentProperties.getTTL(),formatSpecification,currentProperties.getNotificationThresholdMB(),currentProperties.getDescription());
  streamClient.setStreamProperties(streamId,streamProperties);
  output.printf("String_Node_Str",streamId.getEntityName());
}
Program: 5457
Project: 5457
Buggy source:
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  String[] programIdParts=arguments.get(elementType.getArgumentName().toString()).split("String_Node_Str");
  if (programIdParts.length < 2) {
    throw new CommandInputError(this);
  }
  ProgramId programId=parseProgramId(arguments,elementType);
  String appName=programId.getApplication();
  String appVersion=programId.getVersion();
  String programName=programId.getProgram();
  String runtimeArgsString=arguments.getOptional(ArgumentName.RUNTIME_ARGS.toString(),"String_Node_Str");
  if (runtimeArgsString == null || runtimeArgsString.isEmpty()) {
    programClient.start(programId,isDebug,null);
    runtimeArgsString=GSON.toJson(programClient.getRuntimeArgs(programId));
    output.printf("String_Node_Str",elementType.getName(),programName,appName,appVersion,runtimeArgsString);
  }
 else {
    Map<String,String> runtimeArgs=ArgumentParser.parseMap(runtimeArgsString);
    programClient.start(programId,isDebug,runtimeArgs);
    output.printf("String_Node_Str",elementType.getName(),programName,appName,appVersion,runtimeArgsString);
  }
}

Fixed version (ground truth):
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  String[] programIdParts=arguments.get(elementType.getArgumentName().toString()).split("String_Node_Str");
  if (programIdParts.length < 2) {
    throw new CommandInputError(this);
  }
  ProgramId programId=parseProgramId(arguments,elementType);
  String appName=programId.getApplication();
  String appVersion=programId.getVersion();
  String programName=programId.getProgram();
  String runtimeArgsString=arguments.getOptional(ArgumentName.RUNTIME_ARGS.toString(),"String_Node_Str");
  if (runtimeArgsString == null || runtimeArgsString.isEmpty()) {
    programClient.start(programId,isDebug,null);
    runtimeArgsString=GSON.toJson(programClient.getRuntimeArgs(programId));
    output.printf("String_Node_Str",elementType.getName(),programName,appName,appVersion,runtimeArgsString);
  }
 else {
    Map<String,String> runtimeArgs=ArgumentParser.parseMap(runtimeArgsString,ArgumentName.RUNTIME_ARGS.toString());
    programClient.start(programId,isDebug,runtimeArgs);
    output.printf("String_Node_Str",elementType.getName(),programName,appName,appVersion,runtimeArgsString);
  }
}
Program: 5458
Project: 5458
Buggy source:
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  EntityId entity=EntityId.fromString(arguments.get(ArgumentName.ENTITY.toString()));
  Map<String,String> properties=parseMap(arguments.get("String_Node_Str"));
  client.addProperties(entity.toId(),properties);
  output.println("String_Node_Str");
}

Fixed version (ground truth):
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  EntityId entity=EntityId.fromString(arguments.get(ArgumentName.ENTITY.toString()));
  Map<String,String> properties=parseMap(arguments.get("String_Node_Str"),"String_Node_Str");
  client.addProperties(entity.toId(),properties);
  output.println("String_Node_Str");
}
Program: 5459
Project: 5459
Buggy source:
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  String metric=arguments.get("String_Node_Str");
  Map<String,String> tags=ArgumentParser.parseMap(arguments.getOptional("String_Node_Str","String_Node_Str"));
  String start=arguments.getOptional("String_Node_Str","String_Node_Str");
  String end=arguments.getOptional("String_Node_Str","String_Node_Str");
  MetricQueryResult result=client.query(tags,ImmutableList.of(metric),ImmutableList.<String>of(),start.isEmpty() ? null : start,end.isEmpty() ? null : end);
  output.printf("String_Node_Str",result.getStartTime());
  output.printf("String_Node_Str",result.getEndTime());
  for (  MetricQueryResult.TimeSeries series : result.getSeries()) {
    output.println();
    output.printf("String_Node_Str",series.getMetricName());
    if (!series.getGrouping().isEmpty()) {
      output.printf("String_Node_Str",Joiner.on("String_Node_Str").withKeyValueSeparator("String_Node_Str").join(series.getGrouping()));
    }
    Table table=Table.builder().setHeader("String_Node_Str","String_Node_Str").setRows(ImmutableList.copyOf(series.getData()),new RowMaker<MetricQueryResult.TimeValue>(){
      @Override public List<?> makeRow(      MetricQueryResult.TimeValue object){
        return Lists.newArrayList(object.getTime(),object.getValue());
      }
    }
).build();
    cliConfig.getTableRenderer().render(cliConfig,output,table);
  }
}

Fixed version (ground truth):
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  String metric=arguments.get("String_Node_Str");
  Map<String,String> tags=ArgumentParser.parseMap(arguments.getOptional("String_Node_Str","String_Node_Str"),"String_Node_Str");
  String start=arguments.getOptional("String_Node_Str","String_Node_Str");
  String end=arguments.getOptional("String_Node_Str","String_Node_Str");
  MetricQueryResult result=client.query(tags,ImmutableList.of(metric),ImmutableList.<String>of(),start.isEmpty() ? null : start,end.isEmpty() ? null : end);
  output.printf("String_Node_Str",result.getStartTime());
  output.printf("String_Node_Str",result.getEndTime());
  for (  MetricQueryResult.TimeSeries series : result.getSeries()) {
    output.println();
    output.printf("String_Node_Str",series.getMetricName());
    if (!series.getGrouping().isEmpty()) {
      output.printf("String_Node_Str",Joiner.on("String_Node_Str").withKeyValueSeparator("String_Node_Str").join(series.getGrouping()));
    }
    Table table=Table.builder().setHeader("String_Node_Str","String_Node_Str").setRows(ImmutableList.copyOf(series.getData()),new RowMaker<MetricQueryResult.TimeValue>(){
      @Override public List<?> makeRow(      MetricQueryResult.TimeValue object){
        return Lists.newArrayList(object.getTime(),object.getValue());
      }
    }
).build();
    cliConfig.getTableRenderer().render(cliConfig,output,table);
  }
}
Program: 5460
Project: 5460
Buggy source:
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  Map<String,String> tags=ArgumentParser.parseMap(arguments.getOptional("String_Node_Str","String_Node_Str"));
  List<String> results=client.searchMetrics(tags);
  for (  String result : results) {
    output.println(result);
  }
}

Fixed version (ground truth):
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  Map<String,String> tags=ArgumentParser.parseMap(arguments.getOptional("String_Node_Str","String_Node_Str"),"String_Node_Str");
  List<String> results=client.searchMetrics(tags);
  for (  String result : results) {
    output.println(result);
  }
}
Program: 5461
Project: 5461
Buggy source:
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  Map<String,String> tags=ArgumentParser.parseMap(arguments.getOptional("String_Node_Str","String_Node_Str"));
  List<MetricTagValue> results=client.searchTags(tags);
  for (  MetricTagValue result : results) {
    output.printf("String_Node_Str",result.getName(),result.getValue());
  }
}

Fixed version (ground truth):
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  Map<String,String> tags=ArgumentParser.parseMap(arguments.getOptional("String_Node_Str","String_Node_Str"),"String_Node_Str");
  List<MetricTagValue> results=client.searchTags(tags);
  for (  MetricTagValue result : results) {
    output.printf("String_Node_Str",result.getName(),result.getValue());
  }
}
Program: 5462
Project: 5462
Buggy source:
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  StreamId streamId=cliConfig.getCurrentNamespace().stream(arguments.get(ArgumentName.STREAM.toString()));
  StreamViewId viewId=streamId.view(arguments.get(ArgumentName.VIEW.toString()));
  String formatName=arguments.get(ArgumentName.FORMAT.toString());
  Schema schema=getSchema(arguments);
  Map<String,String> settings=Collections.emptyMap();
  if (arguments.hasArgument(ArgumentName.SETTINGS.toString())) {
    settings=ArgumentParser.parseMap(arguments.get(ArgumentName.SETTINGS.toString()));
  }
  FormatSpecification formatSpecification=new FormatSpecification(formatName,schema,settings);
  ViewSpecification viewSpecification=new ViewSpecification(formatSpecification);
  boolean created=client.createOrUpdate(viewId,viewSpecification);
  if (created) {
    output.printf("String_Node_Str",viewId.getEntityName());
  }
 else {
    output.printf("String_Node_Str",viewId.getEntityName());
  }
}

Fixed version (ground truth):
@Override public void perform(Arguments arguments,PrintStream output) throws Exception {
  StreamId streamId=cliConfig.getCurrentNamespace().stream(arguments.get(ArgumentName.STREAM.toString()));
  StreamViewId viewId=streamId.view(arguments.get(ArgumentName.VIEW.toString()));
  String formatName=arguments.get(ArgumentName.FORMAT.toString());
  Schema schema=getSchema(arguments);
  Map<String,String> settings=Collections.emptyMap();
  if (arguments.hasArgument(ArgumentName.SETTINGS.toString())) {
    settings=ArgumentParser.parseMap(arguments.get(ArgumentName.SETTINGS.toString()),ArgumentName.SETTINGS.toString());
  }
  FormatSpecification formatSpecification=new FormatSpecification(formatName,schema,settings);
  ViewSpecification viewSpecification=new ViewSpecification(formatSpecification);
  boolean created=client.createOrUpdate(viewId,viewSpecification);
  if (created) {
    output.printf("String_Node_Str",viewId.getEntityName());
  }
 else {
    output.printf("String_Node_Str",viewId.getEntityName());
  }
}
Program: 5463
Project: 5463
Buggy source:
protected Map<String,String> parseMap(@Nullable String value){
  return ArgumentParser.parseMap(value);
}

Fixed version (ground truth):
protected Map<String,String> parseMap(@Nullable String value,String description){
  return ArgumentParser.parseMap(value,description);
}
Program: 5464
Project: 5464
Buggy source:
/** 
 * Parses a map in the format: "key1=a key2=b .."
 * @param mapString {@link String} representation of the map
 * @return a {@link Map} with {@link String} keys and {@link String} values
 */
public static Map<String,String> parseMap(String mapString){
  if (mapString == null || mapString.isEmpty()) {
    return ImmutableMap.of();
  }
  ImmutableMap.Builder<String,String> result=ImmutableMap.builder();
  List<String> tokens=Parser.parseInput(mapString);
  for (  String token : tokens) {
    int firstEquals=token.indexOf('=');
    if (firstEquals > 0) {
      String key=token.substring(0,firstEquals);
      String value=token.substring(firstEquals + 1,token.length());
      result.put(extractValue(key),extractValue(value));
    }
  }
  return result.build();
}

Fixed version (ground truth):
/** 
 * Parses a map in the format: "key1=a key2=b .."
 * @param mapString {@link String} representation of the map
 * @return a {@link Map} with {@link String} keys and {@link String} values
 */
public static Map<String,String> parseMap(String mapString,String description){
  if (mapString == null || mapString.isEmpty()) {
    return ImmutableMap.of();
  }
  ImmutableMap.Builder<String,String> result=ImmutableMap.builder();
  List<String> tokens=Parser.parseInput(mapString);
  for (  String token : tokens) {
    int firstEquals=token.indexOf('=');
    if (firstEquals > 0) {
      String key=token.substring(0,firstEquals);
      String value=token.substring(firstEquals + 1,token.length());
      result.put(extractValue(key),extractValue(value));
    }
 else {
      throw new IllegalArgumentException(description + "String_Node_Str");
    }
  }
  return result.build();
}
Program: 5465
Project: 5465
Buggy source:
/** 
 * Parses a map in the format: "key1=a key2=b .." where a, b and etc. are integers
 * @param mapString {@link String} representation of the map
 * @return a {@link Map} with {@link String} keys and {@link Integer} values
 */
public static Map<String,Integer> parseStringIntegerMap(String mapString){
  return Maps.transformValues(parseMap(mapString),new Function<String,Integer>(){
    @Override public Integer apply(    String input){
      return Integer.valueOf(input);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Parses a map in the format: "key1=a key2=b .." where a, b and etc. are integers
 * @param mapString {@link String} representation of the map
 * @return a {@link Map} with {@link String} keys and {@link Integer} values
 */
public static Map<String,Integer> parseStringIntegerMap(String mapString,String description){
  return Maps.transformValues(parseMap(mapString,description),new Function<String,Integer>(){
    @Override public Integer apply(    String input){
      return Integer.valueOf(input);
    }
  }
);
}
Program: 5466
Project: 5466
Buggy source:
@Test public void testParseMap(){
  String argValue="String_Node_Str";
  String mapString="String_Node_Str" + argValue + "String_Node_Str";
  Map<String,String> actual=ArgumentParser.parseMap(mapString);
  Assert.assertEquals("String_Node_Str",actual.get("String_Node_Str"));
  Assert.assertEquals(argValue,actual.get("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testParseMap(){
  String argValue="String_Node_Str";
  String mapString="String_Node_Str" + argValue + "String_Node_Str";
  Map<String,String> actual=ArgumentParser.parseMap(mapString,"String_Node_Str");
  Assert.assertEquals("String_Node_Str",actual.get("String_Node_Str"));
  Assert.assertEquals(argValue,actual.get("String_Node_Str"));
}
Program: 5467
Project: 5467
Buggy source:
@Override public void stop(CoprocessorEnvironment e) throws IOException {
  if (e instanceof RegionCoprocessorEnvironment) {
    getTopicMetadataCache((RegionCoprocessorEnvironment)e).stop();
  }
}

Fixed version (ground truth):
@Override public void stop(CoprocessorEnvironment e){
  if (e instanceof RegionCoprocessorEnvironment) {
    getTopicMetadataCache((RegionCoprocessorEnvironment)e).stop();
  }
  if (compactionState != null) {
    compactionState.stop();
  }
}
Program: 5468
Project: 5468
Buggy source:
@Override public void stop(CoprocessorEnvironment e) throws IOException {
  if (e instanceof RegionCoprocessorEnvironment) {
    getTopicMetadataCache((RegionCoprocessorEnvironment)e).stop();
  }
}

Fixed version (ground truth):
@Override public void stop(CoprocessorEnvironment e){
  if (e instanceof RegionCoprocessorEnvironment) {
    getTopicMetadataCache((RegionCoprocessorEnvironment)e).stop();
  }
  if (compactionState != null) {
    compactionState.stop();
  }
}
Program: 5469
Project: 5469
Buggy source:
@Override public void stop(CoprocessorEnvironment e) throws IOException {
  if (e instanceof RegionCoprocessorEnvironment) {
    getTopicMetadataCache((RegionCoprocessorEnvironment)e).stop();
  }
}

Fixed version (ground truth):
@Override public void stop(CoprocessorEnvironment e){
  if (e instanceof RegionCoprocessorEnvironment) {
    getTopicMetadataCache((RegionCoprocessorEnvironment)e).stop();
  }
  if (compactionState != null) {
    compactionState.stop();
  }
}
Program: 5470
Project: 5470
Buggy source:
@Override public void stop(CoprocessorEnvironment e) throws IOException {
  if (e instanceof RegionCoprocessorEnvironment) {
    getTopicMetadataCache((RegionCoprocessorEnvironment)e).stop();
  }
}

Fixed version (ground truth):
@Override public void stop(CoprocessorEnvironment e){
  if (e instanceof RegionCoprocessorEnvironment) {
    getTopicMetadataCache((RegionCoprocessorEnvironment)e).stop();
  }
  if (compactionState != null) {
    compactionState.stop();
  }
}
Program: 5471
Project: 5471
Buggy source:
@Override public void stop(CoprocessorEnvironment e) throws IOException {
  if (e instanceof RegionCoprocessorEnvironment) {
    getTopicMetadataCache((RegionCoprocessorEnvironment)e).stop();
  }
}

Fixed version (ground truth):
@Override public void stop(CoprocessorEnvironment e){
  if (e instanceof RegionCoprocessorEnvironment) {
    getTopicMetadataCache((RegionCoprocessorEnvironment)e).stop();
  }
  if (compactionState != null) {
    compactionState.stop();
  }
}
Program: 5472
Project: 5472
Buggy source:
@Override public void stop(CoprocessorEnvironment e) throws IOException {
  if (e instanceof RegionCoprocessorEnvironment) {
    getTopicMetadataCache((RegionCoprocessorEnvironment)e).stop();
  }
}

Fixed version (ground truth):
@Override public void stop(CoprocessorEnvironment e){
  if (e instanceof RegionCoprocessorEnvironment) {
    getTopicMetadataCache((RegionCoprocessorEnvironment)e).stop();
  }
  if (compactionState != null) {
    compactionState.stop();
  }
}
Program: 5473
Project: 5473
Buggy source:
@Override public void start(CoprocessorEnvironment env) throws IOException {
  if (env instanceof RegionCoprocessorEnvironment) {
    HTableDescriptor tableDesc=((RegionCoprocessorEnvironment)env).getRegion().getTableDesc();
    metadataTableNamespace=tableDesc.getValue(Constants.MessagingSystem.HBASE_METADATA_TABLE_NAMESPACE);
    hbaseNamespacePrefix=tableDesc.getValue(Constants.Dataset.TABLE_PREFIX);
    prefixLength=Integer.valueOf(tableDesc.getValue(Constants.MessagingSystem.HBASE_MESSAGING_TABLE_PREFIX_NUM_BYTES));
    String sysConfigTablePrefix=HTableNameConverter.getSysConfigTablePrefix(hbaseNamespacePrefix);
    cConfReader=new CConfigurationReader(env.getConfiguration(),sysConfigTablePrefix);
    Supplier<TransactionStateCache> cacheSupplier=getTransactionStateCacheSupplier(hbaseNamespacePrefix,env.getConfiguration());
    txStateCache=cacheSupplier.get();
    topicMetadataCache=createTopicMetadataCache((RegionCoprocessorEnvironment)env);
  }
}

Fixed version (ground truth):
@Override public void start(CoprocessorEnvironment env){
  if (env instanceof RegionCoprocessorEnvironment) {
    HTableDescriptor tableDesc=((RegionCoprocessorEnvironment)env).getRegion().getTableDesc();
    metadataTableNamespace=tableDesc.getValue(Constants.MessagingSystem.HBASE_METADATA_TABLE_NAMESPACE);
    hbaseNamespacePrefix=tableDesc.getValue(Constants.Dataset.TABLE_PREFIX);
    prefixLength=Integer.valueOf(tableDesc.getValue(Constants.MessagingSystem.HBASE_MESSAGING_TABLE_PREFIX_NUM_BYTES));
    String sysConfigTablePrefix=HTableNameConverter.getSysConfigTablePrefix(hbaseNamespacePrefix);
    cConfReader=new CConfigurationReader(env.getConfiguration(),sysConfigTablePrefix);
    Supplier<TransactionStateCache> cacheSupplier=getTransactionStateCacheSupplier(hbaseNamespacePrefix,env.getConfiguration());
    txStateCache=cacheSupplier.get();
    topicMetadataCache=createTopicMetadataCache((RegionCoprocessorEnvironment)env);
  }
}
Program: 5474
Project: 5474
Buggy source:
@Override public void stop(CoprocessorEnvironment e) throws IOException {
  if (e instanceof RegionCoprocessorEnvironment) {
    getTopicMetadataCache((RegionCoprocessorEnvironment)e).stop();
  }
}

Fixed version (ground truth):
@Override public void stop(CoprocessorEnvironment e) throws IOException {
  if (e instanceof RegionCoprocessorEnvironment) {
    getTopicMetadataCache((RegionCoprocessorEnvironment)e).stop();
  }
  if (compactionState != null) {
    compactionState.stop();
  }
}
Program: 5475
Project: 5475
Buggy source:
/** 
 * Returns a list of services associated with a namespace.
 */
@GET @Path("String_Node_Str") public void getAllServices(HttpRequest request,HttpResponder responder,@PathParam("String_Node_Str") String namespaceId) throws Exception {
  responder.sendJson(HttpResponseStatus.OK,lifecycleService.list(new NamespaceId(namespaceId),ProgramType.SERVICE));
}

Fixed version (ground truth):
/** 
 * Returns a list of services associated with a namespace.
 */
@GET @Path("String_Node_Str") public void getAllServices(HttpRequest request,HttpResponder responder,@PathParam("String_Node_Str") String namespaceId) throws Exception {
  responder.sendJson(HttpResponseStatus.OK,lifecycleService.list(validateAndGetNamespace(namespaceId),ProgramType.SERVICE));
}
Program: 5476
Project: 5476
Buggy source:
@GET @Path("String_Node_Str") public void getAllWorkers(HttpRequest request,HttpResponder responder,@PathParam("String_Node_Str") String namespaceId) throws Exception {
  responder.sendJson(HttpResponseStatus.OK,lifecycleService.list(new NamespaceId(namespaceId),ProgramType.WORKER));
}

Fixed version (ground truth):
@GET @Path("String_Node_Str") public void getAllWorkers(HttpRequest request,HttpResponder responder,@PathParam("String_Node_Str") String namespaceId) throws Exception {
  responder.sendJson(HttpResponseStatus.OK,lifecycleService.list(validateAndGetNamespace(namespaceId),ProgramType.WORKER));
}
Program: 5477
Project: 5477
Buggy source:
@Inject ProgramLifecycleHttpHandler(Store store,ProgramRuntimeService runtimeService,DiscoveryServiceClient discoveryServiceClient,ProgramLifecycleService lifecycleService,QueueAdmin queueAdmin,PreferencesStore preferencesStore,MRJobInfoFetcher mrJobInfoFetcher,MetricStore metricStore){
  this.store=store;
  this.runtimeService=runtimeService;
  this.discoveryServiceClient=discoveryServiceClient;
  this.lifecycleService=lifecycleService;
  this.metricStore=metricStore;
  this.queueAdmin=queueAdmin;
  this.preferencesStore=preferencesStore;
  this.mrJobInfoFetcher=mrJobInfoFetcher;
}

Fixed version (ground truth):
@Inject ProgramLifecycleHttpHandler(Store store,ProgramRuntimeService runtimeService,DiscoveryServiceClient discoveryServiceClient,ProgramLifecycleService lifecycleService,QueueAdmin queueAdmin,PreferencesStore preferencesStore,MRJobInfoFetcher mrJobInfoFetcher,MetricStore metricStore,NamespaceQueryAdmin namespaceQueryAdmin){
  this.store=store;
  this.runtimeService=runtimeService;
  this.discoveryServiceClient=discoveryServiceClient;
  this.lifecycleService=lifecycleService;
  this.metricStore=metricStore;
  this.queueAdmin=queueAdmin;
  this.preferencesStore=preferencesStore;
  this.mrJobInfoFetcher=mrJobInfoFetcher;
  this.namespaceQueryAdmin=namespaceQueryAdmin;
}