nus-yam/ex-repair huggingface dataset:
Program: 5102
Project: 5102
Buggy source:
protected AbstractJoinerContext(PluginContext pluginContext,DatasetContext datasetContext,Metrics metrics,LookupProvider lookup,long logicalStartTime,Map<String,String> runtimeArgs,Admin admin,StageInfo stageInfo){
  super(pluginContext,datasetContext,metrics,lookup,logicalStartTime,runtimeArgs,admin,stageInfo);
}

Fixed version (ground truth):
protected AbstractJoinerContext(PluginContext pluginContext,ServiceDiscoverer serviceDiscoverer,DatasetContext datasetContext,Metrics metrics,LookupProvider lookup,long logicalStartTime,Map<String,String> runtimeArgs,Admin admin,StageInfo stageInfo){
  super(pluginContext,serviceDiscoverer,datasetContext,metrics,lookup,logicalStartTime,runtimeArgs,admin,stageInfo);
}
Program: 5103
Project: 5103
Buggy source:
public MapReduceAggregatorContext(MapReduceContext context,Metrics metrics,LookupProvider lookup,Map<String,String> runtimeArgs,StageInfo stageInfo){
  super(context,context,metrics,lookup,context.getLogicalStartTime(),runtimeArgs,context.getAdmin(),stageInfo);
  this.mrContext=context;
}

Fixed version (ground truth):
public MapReduceAggregatorContext(MapReduceContext context,Metrics metrics,LookupProvider lookup,Map<String,String> runtimeArgs,StageInfo stageInfo){
  super(context,context,context,metrics,lookup,context.getLogicalStartTime(),runtimeArgs,context.getAdmin(),stageInfo);
  this.mrContext=context;
}
Program: 5104
Project: 5104
Buggy source:
public MapReduceBatchContext(MapReduceContext context,Metrics metrics,LookupProvider lookup,Map<String,String> runtimeArguments,StageInfo stageInfo){
  super(context,metrics,lookup,context.getLogicalStartTime(),runtimeArguments,context.getAdmin(),stageInfo);
  this.mrContext=context;
}

Fixed version (ground truth):
public MapReduceBatchContext(MapReduceContext context,Metrics metrics,LookupProvider lookup,Map<String,String> runtimeArguments,StageInfo stageInfo){
  super(context,context,metrics,lookup,context.getLogicalStartTime(),runtimeArguments,context.getAdmin(),stageInfo);
  this.mrContext=context;
}
Program: 5105
Project: 5105
Buggy source:
public MapReduceRuntimeContext(MapReduceTaskContext context,Metrics metrics,LookupProvider lookup,Map<String,String> runtimeArgs,StageInfo stageInfo){
  super(context,metrics,lookup,stageInfo);
  this.context=context;
  this.runtimeArgs=ImmutableMap.copyOf(runtimeArgs);
}

Fixed version (ground truth):
public MapReduceRuntimeContext(MapReduceTaskContext context,Metrics metrics,LookupProvider lookup,Map<String,String> runtimeArgs,StageInfo stageInfo){
  super(context,context,metrics,lookup,stageInfo);
  this.context=context;
  this.runtimeArgs=ImmutableMap.copyOf(runtimeArgs);
}
Program: 5107
Project: 5107
Buggy source:
LogData(Long timestamp,String logLevel,String threadName,String className,String simpleClassName,Integer lineNumber,String message,String stackTrace,String loggerName,Map<String,String> mdc){
  this.timestamp=timestamp;
  this.logLevel=logLevel;
  this.threadName=threadName;
  this.className=className;
  this.simpleClassName=simpleClassName;
  this.lineNumber=lineNumber;
  this.message=message;
  this.stackTrace=stackTrace;
  this.loggerName=loggerName;
  this.mdc=mdc;
}

Fixed version (ground truth):
LogData(Long timestamp,String logLevel,String threadName,String className,String simpleClassName,Integer lineNumber,String message,String stackTrace,String loggerName,Map<String,String> mdc,boolean isNativeMethod){
  this.timestamp=timestamp;
  this.logLevel=logLevel;
  this.threadName=threadName;
  this.className=className;
  this.simpleClassName=simpleClassName;
  this.lineNumber=lineNumber;
  this.message=message;
  this.stackTrace=stackTrace;
  this.loggerName=loggerName;
  this.mdc=mdc;
  this.isNativeMethod=isNativeMethod;
}
Program: 5108
Project: 5108
Buggy source:
@Override public Object encodeSend(LogEvent logEvent){
  ILoggingEvent event=logEvent.getLoggingEvent();
  StackTraceElement[] stackTraceElements=event.getCallerData();
  String className="String_Node_Str";
  String simpleClassName="String_Node_Str";
  int lineNumber=0;
  if (stackTraceElements != null && stackTraceElements.length > 0) {
    StackTraceElement first=stackTraceElements[0];
    className=first.getClassName();
    simpleClassName=(className.indexOf('.') >= 0) ? className.substring(className.lastIndexOf('.') + 1) : className;
    lineNumber=first.getLineNumber();
  }
  LogData logData=new LogData(event.getTimeStamp(),event.getLevel().toString(),event.getThreadName(),className,simpleClassName,lineNumber,event.getFormattedMessage(),ThrowableProxyUtil.asString(event.getThrowableProxy()),event.getLoggerName(),event.getMDCPropertyMap());
  return modifyLogJsonElememnt(GSON.toJsonTree(new FormattedLogDataEvent(logData,logEvent.getOffset())));
}

Fixed version (ground truth):
@Override public Object encodeSend(LogEvent logEvent){
  ILoggingEvent event=logEvent.getLoggingEvent();
  StackTraceElement[] stackTraceElements=event.getCallerData();
  String className="String_Node_Str";
  String simpleClassName="String_Node_Str";
  int lineNumber=0;
  boolean isNativeMethod=false;
  if (stackTraceElements != null && stackTraceElements.length > 0) {
    StackTraceElement first=stackTraceElements[0];
    className=first.getClassName();
    simpleClassName=(className.indexOf('.') >= 0) ? className.substring(className.lastIndexOf('.') + 1) : className;
    lineNumber=first.getLineNumber();
    isNativeMethod=first.isNativeMethod();
  }
  LogData logData=new LogData(event.getTimeStamp(),event.getLevel().toString(),event.getThreadName(),className,simpleClassName,lineNumber,event.getFormattedMessage(),ThrowableProxyUtil.asString(event.getThrowableProxy()),event.getLoggerName(),event.getMDCPropertyMap(),isNativeMethod);
  return modifyLogJsonElememnt(GSON.toJsonTree(new FormattedLogDataEvent(logData,logEvent.getOffset())));
}
Program: 5109
Project: 5109
Buggy source:
@Override public Object encodeSend(LogEvent logEvent){
  ILoggingEvent event=logEvent.getLoggingEvent();
  StackTraceElement[] stackTraceElements=event.getCallerData();
  String className="String_Node_Str";
  String simpleClassName="String_Node_Str";
  int lineNumber=0;
  if (stackTraceElements != null && stackTraceElements.length > 0) {
    StackTraceElement first=stackTraceElements[0];
    className=first.getClassName();
    simpleClassName=(className.indexOf('.') >= 0) ? className.substring(className.lastIndexOf('.') + 1) : className;
    lineNumber=first.getLineNumber();
  }
  LogData logData=new LogData(event.getTimeStamp(),event.getLevel().toString(),event.getThreadName(),className,simpleClassName,lineNumber,event.getFormattedMessage(),ThrowableProxyUtil.asString(event.getThrowableProxy()),event.getLoggerName(),event.getMDCPropertyMap());
  return modifyLogJsonElememnt(GSON.toJsonTree(new FormattedLogDataEvent(logData,logEvent.getOffset())));
}

Fixed version (ground truth):
@Override public Object encodeSend(LogEvent logEvent){
  ILoggingEvent event=logEvent.getLoggingEvent();
  StackTraceElement[] stackTraceElements=event.getCallerData();
  String className="String_Node_Str";
  String simpleClassName="String_Node_Str";
  int lineNumber=0;
  boolean isNativeMethod=false;
  if (stackTraceElements != null && stackTraceElements.length > 0) {
    StackTraceElement first=stackTraceElements[0];
    className=first.getClassName();
    simpleClassName=(className.indexOf('.') >= 0) ? className.substring(className.lastIndexOf('.') + 1) : className;
    lineNumber=first.getLineNumber();
    isNativeMethod=first.isNativeMethod();
  }
  LogData logData=new LogData(event.getTimeStamp(),event.getLevel().toString(),event.getThreadName(),className,simpleClassName,lineNumber,event.getFormattedMessage(),ThrowableProxyUtil.asString(event.getThrowableProxy()),event.getLoggerName(),event.getMDCPropertyMap(),isNativeMethod);
  return modifyLogJsonElememnt(GSON.toJsonTree(new FormattedLogDataEvent(logData,logEvent.getOffset())));
}
Program: 5110
Project: 5110
Buggy source:
private void deleteLocalDatasets(){
  for (  Map.Entry<String,String> entry : datasetFramework.getDatasetNameMapping().entrySet()) {
    Map<String,String> datasetArguments=RuntimeArguments.extractScope(Scope.DATASET,entry.getKey(),basicWorkflowContext.getRuntimeArguments());
    if (Boolean.parseBoolean(datasetArguments.get("String_Node_Str"))) {
      continue;
    }
    String localInstanceName=entry.getValue();
    DatasetId instanceId=new DatasetId(workflowRunId.getNamespace(),localInstanceName);
    LOG.debug("String_Node_Str",localInstanceName);
    try {
      datasetFramework.deleteInstance(instanceId);
    }
 catch (    Throwable t) {
      LOG.warn("String_Node_Str",localInstanceName,t);
    }
  }
}

Fixed version (ground truth):
private void deleteLocalDatasets(){
  for (  final Map.Entry<String,String> entry : datasetFramework.getDatasetNameMapping().entrySet()) {
    final Map<String,String> datasetArguments=RuntimeArguments.extractScope(Scope.DATASET,entry.getKey(),basicWorkflowContext.getRuntimeArguments());
    if (Boolean.parseBoolean(datasetArguments.get("String_Node_Str"))) {
      continue;
    }
    final String localInstanceName=entry.getValue();
    final DatasetId instanceId=new DatasetId(workflowRunId.getNamespace(),localInstanceName);
    LOG.debug("String_Node_Str",localInstanceName);
    try {
      Retries.callWithRetries(new Retries.Callable<Void,Exception>(){
        @Override public Void call() throws Exception {
          datasetFramework.deleteInstance(instanceId);
          return null;
        }
      }
,RetryStrategies.fixDelay(Constants.Retry.LOCAL_DATASET_OPERATION_RETRY_DELAY_SECONDS,TimeUnit.SECONDS));
    }
 catch (    Exception e) {
      LOG.warn("String_Node_Str",localInstanceName,e);
    }
  }
}
Program: 5111
Project: 5111
Buggy source:
private void createLocalDatasets() throws IOException, DatasetManagementException {
  for (  Map.Entry<String,String> entry : datasetFramework.getDatasetNameMapping().entrySet()) {
    String localInstanceName=entry.getValue();
    DatasetId instanceId=new DatasetId(workflowRunId.getNamespace(),localInstanceName);
    DatasetCreationSpec instanceSpec=workflowSpec.getLocalDatasetSpecs().get(entry.getKey());
    LOG.debug("String_Node_Str",localInstanceName);
    datasetFramework.addInstance(instanceSpec.getTypeName(),instanceId,addLocalDatasetProperty(instanceSpec.getProperties()));
  }
}

Fixed version (ground truth):
private void createLocalDatasets() throws IOException, DatasetManagementException {
  for (  final Map.Entry<String,String> entry : datasetFramework.getDatasetNameMapping().entrySet()) {
    final String localInstanceName=entry.getValue();
    final DatasetId instanceId=new DatasetId(workflowRunId.getNamespace(),localInstanceName);
    final DatasetCreationSpec instanceSpec=workflowSpec.getLocalDatasetSpecs().get(entry.getKey());
    LOG.debug("String_Node_Str",localInstanceName);
    try {
      Retries.callWithRetries(new Retries.Callable<Void,Exception>(){
        @Override public Void call() throws Exception {
          datasetFramework.addInstance(instanceSpec.getTypeName(),instanceId,addLocalDatasetProperty(instanceSpec.getProperties()));
          return null;
        }
      }
,RetryStrategies.fixDelay(Constants.Retry.LOCAL_DATASET_OPERATION_RETRY_DELAY_SECONDS,TimeUnit.SECONDS));
    }
 catch (    IOException|DatasetManagementException e) {
      throw e;
    }
catch (    Exception e) {
      throw new IllegalStateException(e);
    }
  }
}
Program: 5112
Project: 5112
Buggy source:
@Override public Map.Entry<String,WorkflowToken> call() throws Exception {
  WorkflowToken copiedToken=((BasicWorkflowToken)token).deepCopy();
  executeAll(branch.iterator(),appSpec,instantiator,classLoader,copiedToken);
  return Maps.immutableEntry(branch.toString(),copiedToken);
}

Fixed version (ground truth):
@Override public Void call() throws Exception {
  datasetFramework.deleteInstance(instanceId);
  return null;
}
Program: 5113
Project: 5113
Buggy source:
/** 
 * Adds extra MDC tags to the given event.
 */
private void addExtraTags(ILoggingEvent event){
  StackTraceElement[] callerData=event.getCallerData();
  if (callerData == null || callerData.length == 0) {
    return;
  }
  String callerClass=callerData[0].getClassName();
  Map<String,String> tags=loggerExtraTags.getIfPresent(callerClass);
  if (tags == null) {
    tags=Collections.emptyMap();
    for (    Class<?> cls : CallerClassSecurityManager.getCallerClasses()) {
      if (cls.getName().equals(callerClass)) {
        String classLoaderName=cls.getClassLoader().getClass().getName();
switch (classLoaderName) {
case "String_Node_Str":
          tags=Collections.singletonMap(ORIGIN_KEY,"String_Node_Str");
        break;
case "String_Node_Str":
      tags=Collections.singletonMap(ORIGIN_KEY,"String_Node_Str");
    break;
default :
  tags=Collections.singletonMap(ORIGIN_KEY,"String_Node_Str");
}
break;
}
}
loggerExtraTags.put(callerClass,tags);
}
event.getMDCPropertyMap().putAll(tags);
}

Fixed version (ground truth):
/** 
 * Adds extra MDC tags to the given event.
 */
private void addExtraTags(ILoggingEvent event){
  StackTraceElement[] callerData=event.getCallerData();
  if (callerData == null || callerData.length == 0) {
    return;
  }
  String callerClass=callerData[0].getClassName();
  Map<String,String> tags=loggerExtraTags.getIfPresent(callerClass);
  Class[] callerClasses=CallerClassSecurityManager.getCallerClasses();
  if (tags == null) {
    tags=addTagsForClass(callerClass,callerClasses);
    loggerExtraTags.put(callerClass,tags);
  }
  if (tags.isEmpty()) {
    tags=loggerExtraTags.getIfPresent(event.getLoggerName());
    if (tags == null) {
      tags=addTagsForClass(event.getLoggerName(),callerClasses);
      loggerExtraTags.put(event.getLoggerName(),tags);
    }
  }
  event.getMDCPropertyMap().putAll(tags);
}
Program: 5114
Project: 5114
Buggy source:
/** 
 * Create run constraints for a   {@link Schedule}. When a schedule is triggered, the constraints will be checked before launching a run.
 * @param maxConcurrentRuns the maximum number of concurrent active runs for a schedule.If null, no limit is enforced.
 */
RunConstraints(@Nullable Integer maxConcurrentRuns){
  this.maxConcurrentRuns=maxConcurrentRuns;
}

Fixed version (ground truth):
/** 
 * Create run constraints for a   {@link Schedule}. When a schedule is triggered, the constraints will be checked before launching a run.
 * @param maxConcurrentRuns the maximum number of concurrent active runs for a schedule.If null, no limit is enforced.
 */
public RunConstraints(@Nullable Integer maxConcurrentRuns){
  this.maxConcurrentRuns=maxConcurrentRuns;
}
Program: 5115
Project: 5115
Buggy source:
private void doUpdateSchedule(HttpRequest request,HttpResponder responder,String namespaceId,String appId,String appVersion,String scheduleName) throws IOException, BadRequestException, NotFoundException, SchedulerException, AlreadyExistsException {
  ApplicationId applicationId=new ApplicationId(namespaceId,appId,appVersion);
  ScheduleSpecification scheduleSpecFromRequest;
  try (Reader reader=new InputStreamReader(new ChannelBufferInputStream(request.getContent()),Charsets.UTF_8)){
    scheduleSpecFromRequest=GSON.fromJson(reader,ScheduleSpecification.class);
  }
 catch (  IOException e) {
    LOG.debug("String_Node_Str",e);
    throw new IOException("String_Node_Str");
  }
catch (  JsonSyntaxException e) {
    throw new BadRequestException("String_Node_Str" + e.getMessage());
  }
  if (!scheduleName.equals(scheduleSpecFromRequest.getSchedule().getName())) {
    throw new BadRequestException(String.format("String_Node_Str",scheduleSpecFromRequest.getSchedule().getName(),scheduleName));
  }
  lifecycleService.updateSchedule(applicationId,scheduleSpecFromRequest);
  responder.sendStatus(HttpResponseStatus.OK);
}

Fixed version (ground truth):
private void doUpdateSchedule(HttpRequest request,HttpResponder responder,String namespaceId,String appId,String appVersion,String scheduleName) throws IOException, BadRequestException, NotFoundException, SchedulerException, AlreadyExistsException {
  ApplicationId applicationId=new ApplicationId(namespaceId,appId,appVersion);
  ScheduleUpdateDetail scheduleUpdateDetail;
  try (Reader reader=new InputStreamReader(new ChannelBufferInputStream(request.getContent()),Charsets.UTF_8)){
    scheduleUpdateDetail=GSON.fromJson(reader,ScheduleUpdateDetail.class);
  }
 catch (  IOException e) {
    LOG.debug("String_Node_Str",e);
    throw new IOException("String_Node_Str");
  }
catch (  JsonSyntaxException e) {
    throw new BadRequestException("String_Node_Str" + e.getMessage());
  }
  lifecycleService.updateSchedule(applicationId,scheduleName,scheduleUpdateDetail);
  responder.sendStatus(HttpResponseStatus.OK);
}
Program: 5117
Project: 5117
Buggy source:
protected HttpResponse updateSchedule(String namespace,String appName,@Nullable String appVersion,String scheduleName,ScheduleSpecification scheduleSpec) throws Exception {
  appVersion=appVersion == null ? ApplicationId.DEFAULT_VERSION : appVersion;
  String path=String.format("String_Node_Str",appName,appVersion,scheduleName);
  return doPost(getVersionedAPIPath(path,namespace),GSON.toJson(scheduleSpec));
}

Fixed version (ground truth):
protected HttpResponse updateSchedule(String namespace,String appName,@Nullable String appVersion,String scheduleName,ScheduleUpdateDetail scheduleUpdateDetail) throws Exception {
  appVersion=appVersion == null ? ApplicationId.DEFAULT_VERSION : appVersion;
  String path=String.format("String_Node_Str",appName,appVersion,scheduleName);
  return doPost(getVersionedAPIPath(path,namespace),GSON.toJson(scheduleUpdateDetail));
}
Program: 5118
Project: 5118
Buggy source:
@Override protected QueryStatus doFetchStatus(OperationHandle operationHandle) throws HiveSQLException, ExploreException, HandleNotFoundException {
  OperationStatus operationStatus=getCliService().getOperationStatus(operationHandle);
  @SuppressWarnings("String_Node_Str") HiveSQLException hiveExn=operationStatus.getOperationException();
  if (hiveExn != null) {
    return new QueryStatus(hiveExn.getMessage(),hiveExn.getSQLState());
  }
  return new QueryStatus(QueryStatus.OpStatus.valueOf(operationStatus.getState().toString()),operationHandle.hasResultSet());
}

Fixed version (ground truth):
@Override protected QueryStatus doFetchStatus(OperationHandle operationHandle) throws HiveSQLException, ExploreException, HandleNotFoundException {
  OperationStatus operationStatus;
  CLIService cliService=getCliService();
  try {
    if (getOperationStatus.getParameterTypes().length == 2) {
      operationStatus=(OperationStatus)getOperationStatus.invoke(cliService,operationHandle,true);
    }
 else {
      operationStatus=(OperationStatus)getOperationStatus.invoke(cliService,operationHandle);
    }
  }
 catch (  IndexOutOfBoundsException|IllegalAccessException|InvocationTargetException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  @SuppressWarnings("String_Node_Str") HiveSQLException hiveExn=operationStatus.getOperationException();
  if (hiveExn != null) {
    return new QueryStatus(hiveExn.getMessage(),hiveExn.getSQLState());
  }
  return new QueryStatus(QueryStatus.OpStatus.valueOf(operationStatus.getState().toString()),operationHandle.hasResultSet());
}
Program: 5122
Project: 5122
Buggy source:
private ApplicationSpecification getAppSpecOrFail(AppMetadataStore mds,ProgramId id){
  ApplicationSpecification appSpec=getApplicationSpec(mds,id.getParent());
  if (appSpec == null) {
    throw new NoSuchElementException("String_Node_Str" + id.getNamespaceId() + "String_Node_Str"+ id.getApplication());
  }
  return appSpec;
}

Fixed version (ground truth):
private ApplicationSpecification getAppSpecOrFail(AppMetadataStore mds,ApplicationId id){
  ApplicationSpecification appSpec=getApplicationSpec(mds,id);
  if (appSpec == null) {
    throw new NoSuchElementException("String_Node_Str" + id.getNamespaceId() + "String_Node_Str"+ id.getApplication());
  }
  return appSpec;
}
Program: 5123
Project: 5123
Buggy source:
@Inject public HBaseQueueDebugger(HBaseTableUtil tableUtil,HBaseQueueAdmin queueAdmin,HBaseQueueClientFactory queueClientFactory,ZKClientService zkClientService,TransactionExecutorFactory txExecutorFactory,NamespaceQueryAdmin namespaceQueryAdmin,Store store,Impersonator impersonator,AuthorizationEnforcementService authorizationEnforcementService){
  this.tableUtil=tableUtil;
  this.queueAdmin=queueAdmin;
  this.queueClientFactory=queueClientFactory;
  this.zkClientService=zkClientService;
  this.txExecutorFactory=txExecutorFactory;
  this.namespaceQueryAdmin=namespaceQueryAdmin;
  this.store=store;
  this.impersonator=impersonator;
  this.authorizationEnforcementService=authorizationEnforcementService;
}

Fixed version (ground truth):
@Inject public HBaseQueueDebugger(HBaseTableUtil tableUtil,HBaseQueueAdmin queueAdmin,HBaseQueueClientFactory queueClientFactory,ZKClientService zkClientService,TransactionExecutorFactory txExecutorFactory,Store store,Impersonator impersonator,AuthorizationEnforcementService authorizationEnforcementService){
  this.tableUtil=tableUtil;
  this.queueAdmin=queueAdmin;
  this.queueClientFactory=queueClientFactory;
  this.zkClientService=zkClientService;
  this.txExecutorFactory=txExecutorFactory;
  this.store=store;
  this.impersonator=impersonator;
  this.authorizationEnforcementService=authorizationEnforcementService;
}
Program: 5125
Project: 5125
Buggy source:
public static HBaseQueueDebugger createDebugger() throws Exception {
  CConfiguration cConf=CConfiguration.create();
  if (cConf.getBoolean(Constants.Security.Authorization.ENABLED)) {
    System.out.println(String.format("String_Node_Str",HBaseQueueDebugger.class.getSimpleName()));
    cConf.setBoolean(Constants.Security.Authorization.ENABLED,false);
  }
  SecurityUtil.loginForMasterService(cConf);
  Injector injector=Guice.createInjector(new ConfigModule(cConf,HBaseConfiguration.create()),new IOModule(),new ZKClientModule(),new LocationRuntimeModule().getDistributedModules(),new DiscoveryRuntimeModule().getDistributedModules(),new ViewAdminModules().getDistributedModules(),new StreamAdminModules().getDistributedModules(),new NotificationFeedClientModule(),new TwillModule(),new ExploreClientModule(),new DataFabricModules().getDistributedModules(),new ServiceStoreModules().getDistributedModules(),new DataSetsModules().getDistributedModules(),new AppFabricServiceRuntimeModule().getDistributedModules(),new ProgramRunnerRuntimeModule().getDistributedModules(),new SystemDatasetRuntimeModule().getDistributedModules(),new NotificationServiceRuntimeModule().getDistributedModules(),new MetricsClientRuntimeModule().getDistributedModules(),new MetricsStoreModule(),new KafkaClientModule(),new NamespaceStoreModule().getDistributedModules(),new AuthorizationModule(),new AuthorizationEnforcementModule().getMasterModule(),new SecureStoreModules().getDistributedModules(),new MessagingClientModule(),new AbstractModule(){
    @Override protected void configure(){
      bind(QueueClientFactory.class).to(HBaseQueueClientFactory.class).in(Singleton.class);
      bind(QueueAdmin.class).to(HBaseQueueAdmin.class).in(Singleton.class);
      bind(HBaseTableUtil.class).toProvider(HBaseTableUtilFactory.class);
      bind(Store.class).annotatedWith(Names.named("String_Node_Str")).to(DefaultStore.class).in(Singleton.class);
      bind(DatasetFramework.class).annotatedWith(Names.named("String_Node_Str")).to(DatasetFramework.class).in(Singleton.class);
    }
  }
);
  return injector.getInstance(HBaseQueueDebugger.class);
}

Fixed version (ground truth):
@VisibleForTesting static HBaseQueueDebugger createDebugger() throws Exception {
  return createInjector(false).getInstance(HBaseQueueDebugger.class);
}
Program: 5126
Project: 5126
Buggy source:
@Override protected void shutDown() throws Exception {
  authorizationEnforcementService.stopAndWait();
  zkClientService.stopAndWait();
}

Fixed version (ground truth):
@Override protected void shutDown() throws Exception {
  zkClientService.stopAndWait();
}
Program: 5127
Project: 5127
Buggy source:
@Override public Void call() throws Exception {
  SimpleQueueSpecificationGenerator queueSpecGenerator=new SimpleQueueSpecificationGenerator(flowId.getParent());
  Table<QueueSpecificationGenerator.Node,String,Set<QueueSpecification>> table=queueSpecGenerator.create(flow);
  for (  Table.Cell<QueueSpecificationGenerator.Node,String,Set<QueueSpecification>> cell : table.cellSet()) {
    if (cell.getRowKey().getType() == FlowletConnection.Type.FLOWLET) {
      for (      QueueSpecification queue : cell.getValue()) {
        QueueStatistics queueStats=scanQueue(queue.getQueueName(),null);
        totalStats.add(queueStats);
      }
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public Void call() throws Exception {
  debugger.scanQueue(queueName,finalConsumerGroupId);
  return null;
}
Program: 5128
Project: 5128
Buggy source:
@Override protected void startUp() throws Exception {
  zkClientService.startAndWait();
  authorizationEnforcementService.startAndWait();
}

Fixed version (ground truth):
@Override protected void startUp() throws Exception {
  zkClientService.startAndWait();
}
Program: 5131
Project: 5131
Buggy source:
private ETLRealtimeConfig convertRealtimeConfig(int minorVersion,String configStr){
  UpgradeableConfig config;
  if (minorVersion == 2) {
    config=GSON.fromJson(configStr,co.cask.cdap.etl.proto.v0.ETLRealtimeConfig.class);
  }
 else   if (minorVersion == 3) {
    config=GSON.fromJson(configStr,co.cask.cdap.etl.proto.v1.ETLRealtimeConfig.class);
  }
 else {
    ETLRealtimeConfig realtimeConfig=GSON.fromJson(configStr,ETLRealtimeConfig.class);
    ETLRealtimeConfig.Builder builder=ETLRealtimeConfig.builder().addConnections(realtimeConfig.getConnections()).setInstances(realtimeConfig.getInstances()).setResources(realtimeConfig.getResources());
    for (    ETLStage stage : realtimeConfig.getStages()) {
      builder.addStage(stage.upgradeStage(etlRealtimeContext));
    }
    return builder.build();
  }
  while (config.canUpgrade()) {
    config=config.upgrade(etlRealtimeContext);
  }
  return (ETLRealtimeConfig)config;
}

Fixed version (ground truth):
private ETLRealtimeConfig convertRealtimeConfig(int majorVersion,int minorVersion,String configStr){
  UpgradeableConfig config;
  if (majorVersion == 3 && minorVersion == 2) {
    config=GSON.fromJson(configStr,co.cask.cdap.etl.proto.v0.ETLRealtimeConfig.class);
  }
 else   if (majorVersion == 3 && minorVersion == 3) {
    config=GSON.fromJson(configStr,co.cask.cdap.etl.proto.v1.ETLRealtimeConfig.class);
  }
 else {
    ETLRealtimeConfig realtimeConfig=GSON.fromJson(configStr,ETLRealtimeConfig.class);
    ETLRealtimeConfig.Builder builder=ETLRealtimeConfig.builder().addConnections(realtimeConfig.getConnections()).setInstances(realtimeConfig.getInstances()).setResources(realtimeConfig.getResources());
    for (    ETLStage stage : realtimeConfig.getStages()) {
      builder.addStage(stage.upgradeStage(etlRealtimeContext));
    }
    return builder.build();
  }
  while (config.canUpgrade()) {
    config=config.upgrade(etlRealtimeContext);
  }
  return (ETLRealtimeConfig)config;
}
Program: 5132
Project: 5132
Buggy source:
private ETLBatchConfig convertBatchConfig(int minorVersion,String configStr,UpgradeContext upgradeContext){
  UpgradeableConfig config;
  if (minorVersion == 2) {
    config=GSON.fromJson(configStr,co.cask.cdap.etl.proto.v0.ETLBatchConfig.class);
  }
 else   if (minorVersion == 3) {
    config=GSON.fromJson(configStr,co.cask.cdap.etl.proto.v1.ETLBatchConfig.class);
  }
 else {
    ETLBatchConfig batchConfig=GSON.fromJson(configStr,ETLBatchConfig.class);
    ETLBatchConfig.Builder builder=ETLBatchConfig.builder(batchConfig.getSchedule()).addConnections(batchConfig.getConnections()).setResources(batchConfig.getResources()).setDriverResources(batchConfig.getDriverResources()).setEngine(batchConfig.getEngine());
    for (    ETLStage postAction : batchConfig.getPostActions()) {
      builder.addPostAction(postAction.upgradeStage(upgradeContext));
    }
    for (    ETLStage stage : batchConfig.getStages()) {
      builder.addStage(stage.upgradeStage(upgradeContext));
    }
    return builder.build();
  }
  while (config.canUpgrade()) {
    config=config.upgrade(upgradeContext);
  }
  return (ETLBatchConfig)config;
}

Fixed version (ground truth):
private ETLBatchConfig convertBatchConfig(int majorVersion,int minorVersion,String configStr,UpgradeContext upgradeContext){
  UpgradeableConfig config;
  if (majorVersion == 3 && minorVersion == 2) {
    config=GSON.fromJson(configStr,co.cask.cdap.etl.proto.v0.ETLBatchConfig.class);
  }
 else   if (majorVersion == 3 && minorVersion == 3) {
    config=GSON.fromJson(configStr,co.cask.cdap.etl.proto.v1.ETLBatchConfig.class);
  }
 else {
    ETLBatchConfig batchConfig=GSON.fromJson(configStr,ETLBatchConfig.class);
    ETLBatchConfig.Builder builder=ETLBatchConfig.builder(batchConfig.getSchedule()).addConnections(batchConfig.getConnections()).setResources(batchConfig.getResources()).setDriverResources(batchConfig.getDriverResources()).setEngine(batchConfig.getEngine());
    for (    ETLStage postAction : batchConfig.getPostActions()) {
      builder.addPostAction(postAction.upgradeStage(upgradeContext));
    }
    for (    ETLStage stage : batchConfig.getStages()) {
      builder.addStage(stage.upgradeStage(upgradeContext));
    }
    return builder.build();
  }
  while (config.canUpgrade()) {
    config=config.upgrade(upgradeContext);
  }
  return (ETLBatchConfig)config;
}
Program: 5133
Project: 5133
Buggy source:
public boolean shouldUpgrade(ArtifactSummary artifactSummary){
  if (artifactSummary.getScope() != ArtifactScope.SYSTEM) {
    return false;
  }
  if (!Upgrader.ARTIFACT_NAMES.contains(artifactSummary.getName())) {
    return false;
  }
  ArtifactVersion artifactVersion=new ArtifactVersion(artifactSummary.getVersion());
  Integer majorVersion=artifactVersion.getMajor();
  Integer minorVersion=artifactVersion.getMinor();
  return majorVersion != null && majorVersion == 3 && minorVersion != null && minorVersion >= 2;
}

Fixed version (ground truth):
public boolean shouldUpgrade(ArtifactSummary artifactSummary){
  if (artifactSummary.getScope() != ArtifactScope.SYSTEM) {
    return false;
  }
  if (!Upgrader.ARTIFACT_NAMES.contains(artifactSummary.getName())) {
    return false;
  }
  ArtifactVersion artifactVersion=new ArtifactVersion(artifactSummary.getVersion());
  return LOWEST_VERSION.compareTo(artifactVersion) <= 0 && CURRENT_VERSION.compareTo(artifactVersion) > 0;
}
Program: 5134
Project: 5134
Buggy source:
@Override public void getLogNext(LoggingContext loggingContext,ReadRange readRange,int maxEvents,Filter filter,Callback callback){
  if (readRange.getKafkaOffset() < 0) {
    getLogPrev(loggingContext,readRange,maxEvents,filter,callback);
    return;
  }
  Filter contextFilter=LoggingContextHelper.createFilter(loggingContext);
  callback.init();
  try {
    int count=0;
    for (    LogEvent logLine : logEvents) {
      if (logLine.getOffset().getKafkaOffset() >= readRange.getKafkaOffset()) {
        long logTime=logLine.getLoggingEvent().getTimeStamp();
        if (!contextFilter.match(logLine.getLoggingEvent()) || logTime < readRange.getFromMillis() || logTime >= readRange.getToMillis()) {
          continue;
        }
        if (++count > maxEvents) {
          break;
        }
        if (filter != Filter.EMPTY_FILTER && logLine.getOffset().getKafkaOffset() % 2 != 0) {
          continue;
        }
        callback.handle(logLine);
      }
    }
  }
 catch (  Throwable e) {
    LOG.error("String_Node_Str",e);
  }
 finally {
    callback.close();
  }
}

Fixed version (ground truth):
@Override public void getLogNext(LoggingContext loggingContext,ReadRange readRange,int maxEvents,Filter filter,Callback callback){
  if (readRange.getKafkaOffset() < 0) {
    getLogPrev(loggingContext,readRange,maxEvents,filter,callback);
    return;
  }
  Filter contextFilter=LoggingContextHelper.createFilter(loggingContext);
  callback.init();
  try {
    int count=0;
    for (    LogEvent logLine : logEvents) {
      if (logLine.getOffset().getKafkaOffset() >= readRange.getKafkaOffset()) {
        long logTime=logLine.getLoggingEvent().getTimeStamp();
        if (!contextFilter.match(logLine.getLoggingEvent()) || logTime < readRange.getFromMillis() || logTime >= readRange.getToMillis()) {
          continue;
        }
        if (++count > maxEvents) {
          break;
        }
        if (!filter.match(logLine.getLoggingEvent())) {
          continue;
        }
        callback.handle(logLine);
      }
    }
  }
 catch (  Throwable e) {
    LOG.error("String_Node_Str",e);
  }
 finally {
    callback.close();
  }
}
Program: 5135
Project: 5135
Buggy source:
@Override public void uncaughtException(Thread t,Throwable e){
  StackTraceElement[] stackTrace=e.getStackTrace();
  if (stackTrace.length > 0) {
    Logger logger=LoggerFactory.getLogger(stackTrace[0].getClassName());
    logger.error("String_Node_Str",t,e);
  }
 else {
    LOG.error("String_Node_Str",t,e);
  }
}

Fixed version (ground truth):
@Override public void uncaughtException(Thread t,Throwable e){
  StackTraceElement[] stackTrace=e.getStackTrace();
  if (stackTrace.length > 0) {
    Logger logger=LoggerFactory.getLogger(stackTrace[0].getClassName());
    logger.debug("String_Node_Str",t,e);
  }
 else {
    LOG.debug("String_Node_Str",t,e);
  }
}
Program: 5136
Project: 5136
Buggy source:
LogData(Long timestamp,String logLevel,String threadName,String className,String simpleClassName,Integer lineNumber,String message,String stackTrace){
  this.timestamp=timestamp;
  this.logLevel=logLevel;
  this.threadName=threadName;
  this.className=className;
  this.simpleClassName=simpleClassName;
  this.lineNumber=lineNumber;
  this.message=message;
  this.stackTrace=stackTrace;
}

Fixed version (ground truth):
LogData(Long timestamp,String logLevel,String threadName,String className,String simpleClassName,Integer lineNumber,String message,String stackTrace,String loggerName){
  this.timestamp=timestamp;
  this.logLevel=logLevel;
  this.threadName=threadName;
  this.className=className;
  this.simpleClassName=simpleClassName;
  this.lineNumber=lineNumber;
  this.message=message;
  this.stackTrace=stackTrace;
  this.loggerName=loggerName;
}
Program: 5137
Project: 5137
Buggy source:
@Override public Object encodeSend(LogEvent logEvent){
  ILoggingEvent event=logEvent.getLoggingEvent();
  StackTraceElement[] stackTraceElements=event.getCallerData();
  String className="String_Node_Str";
  String simpleClassName="String_Node_Str";
  int lineNumber=0;
  if (stackTraceElements != null && stackTraceElements.length > 0) {
    StackTraceElement first=stackTraceElements[0];
    className=first.getClassName();
    simpleClassName=(className.indexOf('.') >= 0) ? className.substring(className.lastIndexOf('.') + 1) : className;
    lineNumber=first.getLineNumber();
  }
  LogData logData=new LogData(event.getTimeStamp(),event.getLevel().toString(),event.getThreadName(),className,simpleClassName,lineNumber,event.getFormattedMessage(),ThrowableProxyUtil.asString(event.getThrowableProxy()));
  return modifyLogJsonElememnt(GSON.toJsonTree(new FormattedLogDataEvent(logData,logEvent.getOffset())));
}

Fixed version (ground truth):
@Override public Object encodeSend(LogEvent logEvent){
  ILoggingEvent event=logEvent.getLoggingEvent();
  StackTraceElement[] stackTraceElements=event.getCallerData();
  String className="String_Node_Str";
  String simpleClassName="String_Node_Str";
  int lineNumber=0;
  if (stackTraceElements != null && stackTraceElements.length > 0) {
    StackTraceElement first=stackTraceElements[0];
    className=first.getClassName();
    simpleClassName=(className.indexOf('.') >= 0) ? className.substring(className.lastIndexOf('.') + 1) : className;
    lineNumber=first.getLineNumber();
  }
  LogData logData=new LogData(event.getTimeStamp(),event.getLevel().toString(),event.getThreadName(),className,simpleClassName,lineNumber,event.getFormattedMessage(),ThrowableProxyUtil.asString(event.getThrowableProxy()),event.getLoggerName());
  return modifyLogJsonElememnt(GSON.toJsonTree(new FormattedLogDataEvent(logData,logEvent.getOffset())));
}
Program: 5138
Project: 5138
Buggy source:
@Override public Object encodeSend(LogEvent logEvent){
  ILoggingEvent event=logEvent.getLoggingEvent();
  StackTraceElement[] stackTraceElements=event.getCallerData();
  String className="String_Node_Str";
  String simpleClassName="String_Node_Str";
  int lineNumber=0;
  if (stackTraceElements != null && stackTraceElements.length > 0) {
    StackTraceElement first=stackTraceElements[0];
    className=first.getClassName();
    simpleClassName=(className.indexOf('.') >= 0) ? className.substring(className.lastIndexOf('.') + 1) : className;
    lineNumber=first.getLineNumber();
  }
  LogData logData=new LogData(event.getTimeStamp(),event.getLevel().toString(),event.getThreadName(),className,simpleClassName,lineNumber,event.getFormattedMessage(),ThrowableProxyUtil.asString(event.getThrowableProxy()));
  return modifyLogJsonElememnt(GSON.toJsonTree(new FormattedLogDataEvent(logData,logEvent.getOffset())));
}

Fixed version (ground truth):
@Override public Object encodeSend(LogEvent logEvent){
  ILoggingEvent event=logEvent.getLoggingEvent();
  StackTraceElement[] stackTraceElements=event.getCallerData();
  String className="String_Node_Str";
  String simpleClassName="String_Node_Str";
  int lineNumber=0;
  if (stackTraceElements != null && stackTraceElements.length > 0) {
    StackTraceElement first=stackTraceElements[0];
    className=first.getClassName();
    simpleClassName=(className.indexOf('.') >= 0) ? className.substring(className.lastIndexOf('.') + 1) : className;
    lineNumber=first.getLineNumber();
  }
  LogData logData=new LogData(event.getTimeStamp(),event.getLevel().toString(),event.getThreadName(),className,simpleClassName,lineNumber,event.getFormattedMessage(),ThrowableProxyUtil.asString(event.getThrowableProxy()),event.getLoggerName());
  return modifyLogJsonElememnt(GSON.toJsonTree(new FormattedLogDataEvent(logData,logEvent.getOffset())));
}
Program: 5139
Project: 5139
Buggy source:
@Inject public HBaseQueueClientFactory(CConfiguration cConf,Configuration hConf,HBaseTableUtil hBaseTableUtil,QueueAdmin queueAdmin,TransactionExecutorFactory txExecutorFactory){
  this.cConf=cConf;
  this.hConf=hConf;
  this.queueAdmin=(HBaseQueueAdmin)queueAdmin;
  this.queueUtil=new HBaseQueueUtilFactory().get();
  this.hBaseTableUtil=hBaseTableUtil;
  this.txExecutorFactory=txExecutorFactory;
  this.txMaxLifeTimeInMillis=TimeUnit.SECONDS.toMillis(cConf.getLong(Constants.Tephra.CFG_TX_MAX_LIFETIME,Constants.Tephra.DEFAULT_TX_MAX_LIFETIME));
}

Fixed version (ground truth):
@Inject public HBaseQueueClientFactory(CConfiguration cConf,Configuration hConf,HBaseTableUtil hBaseTableUtil,QueueAdmin queueAdmin,TransactionExecutorFactory txExecutorFactory){
  this.cConf=cConf;
  this.hConf=hConf;
  this.queueAdmin=(HBaseQueueAdmin)queueAdmin;
  this.queueUtil=new HBaseQueueUtilFactory().get();
  this.hBaseTableUtil=hBaseTableUtil;
  this.txExecutorFactory=txExecutorFactory;
  this.txMaxLifeTimeInMillis=TimeUnit.SECONDS.toMillis(cConf.getLong(TxConstants.Manager.CFG_TX_MAX_LIFETIME,TxConstants.Manager.DEFAULT_TX_MAX_LIFETIME));
}
Program: 5141
Project: 5141
Buggy source:
/** 
 * Get all artifacts that match artifacts in the given ranges.
 * @param range the range to match artifacts in
 * @return an unmodifiable list of all artifacts that match the given ranges. If none exist, an empty list is returned
 */
public List<ArtifactDetail> getArtifacts(final ArtifactRange range) throws Exception {
  List<ArtifactDetail> artifacts=artifactStore.getArtifacts(range);
  Principal principal=authenticationContext.getPrincipal();
  final Predicate<EntityId> filter=authorizationEnforcer.createFilter(principal);
  return Lists.newArrayList(Iterables.filter(artifacts,new com.google.common.base.Predicate<ArtifactDetail>(){
    @Override public boolean apply(    ArtifactDetail artifactDetail){
      ArtifactId artifactId=artifactDetail.getDescriptor().getArtifactId();
      return filter.apply(range.getNamespace().artifact(artifactId.getName(),artifactId.getVersion().getVersion()));
    }
  }
));
}

Fixed version (ground truth):
/** 
 * Get all artifacts that match artifacts in the given ranges.
 * @param range the range to match artifacts in
 * @return an unmodifiable list of all artifacts that match the given ranges. If none exist, an empty list is returned
 */
public List<ArtifactDetail> getArtifacts(final ArtifactRange range) throws Exception {
  List<ArtifactDetail> artifacts=artifactStore.getArtifacts(range);
  if (NamespaceId.SYSTEM.equals(range.getNamespace())) {
    return artifacts;
  }
  Principal principal=authenticationContext.getPrincipal();
  final Predicate<EntityId> filter=authorizationEnforcer.createFilter(principal);
  return Lists.newArrayList(Iterables.filter(artifacts,new com.google.common.base.Predicate<ArtifactDetail>(){
    @Override public boolean apply(    ArtifactDetail artifactDetail){
      ArtifactId artifactId=artifactDetail.getDescriptor().getArtifactId();
      return filter.apply(range.getNamespace().artifact(artifactId.getName(),artifactId.getVersion().getVersion()));
    }
  }
));
}
Program: 5142
Project: 5142
Buggy source:
@Inject public HBaseQueueDebugger(HBaseTableUtil tableUtil,HBaseQueueAdmin queueAdmin,HBaseQueueClientFactory queueClientFactory,ZKClientService zkClientService,TransactionExecutorFactory txExecutorFactory,NamespaceQueryAdmin namespaceQueryAdmin,Store store,Impersonator impersonator,AuthorizationEnforcementService authorizationEnforcementService){
  this.tableUtil=tableUtil;
  this.queueAdmin=queueAdmin;
  this.queueClientFactory=queueClientFactory;
  this.zkClientService=zkClientService;
  this.txExecutorFactory=txExecutorFactory;
  this.namespaceQueryAdmin=namespaceQueryAdmin;
  this.store=store;
  this.impersonator=impersonator;
  this.authorizationEnforcementService=authorizationEnforcementService;
}

Fixed version (ground truth):
@Inject public HBaseQueueDebugger(HBaseTableUtil tableUtil,HBaseQueueAdmin queueAdmin,HBaseQueueClientFactory queueClientFactory,ZKClientService zkClientService,TransactionExecutorFactory txExecutorFactory,Store store,Impersonator impersonator,AuthorizationEnforcementService authorizationEnforcementService){
  this.tableUtil=tableUtil;
  this.queueAdmin=queueAdmin;
  this.queueClientFactory=queueClientFactory;
  this.zkClientService=zkClientService;
  this.txExecutorFactory=txExecutorFactory;
  this.store=store;
  this.impersonator=impersonator;
  this.authorizationEnforcementService=authorizationEnforcementService;
}
Program: 5144
Project: 5144
Buggy source:
public static HBaseQueueDebugger createDebugger() throws Exception {
  CConfiguration cConf=CConfiguration.create();
  if (cConf.getBoolean(Constants.Security.Authorization.ENABLED)) {
    System.out.println(String.format("String_Node_Str",HBaseQueueDebugger.class.getSimpleName()));
    cConf.setBoolean(Constants.Security.Authorization.ENABLED,false);
  }
  SecurityUtil.loginForMasterService(cConf);
  Injector injector=Guice.createInjector(new ConfigModule(cConf,HBaseConfiguration.create()),new IOModule(),new ZKClientModule(),new LocationRuntimeModule().getDistributedModules(),new DiscoveryRuntimeModule().getDistributedModules(),new ViewAdminModules().getDistributedModules(),new StreamAdminModules().getDistributedModules(),new NotificationFeedClientModule(),new TwillModule(),new ExploreClientModule(),new DataFabricModules().getDistributedModules(),new ServiceStoreModules().getDistributedModules(),new DataSetsModules().getDistributedModules(),new AppFabricServiceRuntimeModule().getDistributedModules(),new ProgramRunnerRuntimeModule().getDistributedModules(),new SystemDatasetRuntimeModule().getDistributedModules(),new NotificationServiceRuntimeModule().getDistributedModules(),new MetricsClientRuntimeModule().getDistributedModules(),new MetricsStoreModule(),new KafkaClientModule(),new NamespaceStoreModule().getDistributedModules(),new AuthorizationModule(),new AuthorizationEnforcementModule().getMasterModule(),new SecureStoreModules().getDistributedModules(),new MessagingClientModule(),new AbstractModule(){
    @Override protected void configure(){
      bind(QueueClientFactory.class).to(HBaseQueueClientFactory.class).in(Singleton.class);
      bind(QueueAdmin.class).to(HBaseQueueAdmin.class).in(Singleton.class);
      bind(HBaseTableUtil.class).toProvider(HBaseTableUtilFactory.class);
      bind(Store.class).annotatedWith(Names.named("String_Node_Str")).to(DefaultStore.class).in(Singleton.class);
      bind(DatasetFramework.class).annotatedWith(Names.named("String_Node_Str")).to(DatasetFramework.class).in(Singleton.class);
    }
  }
);
  return injector.getInstance(HBaseQueueDebugger.class);
}

Fixed version (ground truth):
@VisibleForTesting static HBaseQueueDebugger createDebugger() throws Exception {
  return createInjector(false).getInstance(HBaseQueueDebugger.class);
}
Program: 5145
Project: 5145
Buggy source:
@Override protected void shutDown() throws Exception {
  authorizationEnforcementService.stopAndWait();
  zkClientService.stopAndWait();
}

Fixed version (ground truth):
@Override protected void shutDown() throws Exception {
  zkClientService.stopAndWait();
}
Program: 5146
Project: 5146
Buggy source:
@Override public Void call() throws Exception {
  SimpleQueueSpecificationGenerator queueSpecGenerator=new SimpleQueueSpecificationGenerator(flowId.getParent());
  Table<QueueSpecificationGenerator.Node,String,Set<QueueSpecification>> table=queueSpecGenerator.create(flow);
  for (  Table.Cell<QueueSpecificationGenerator.Node,String,Set<QueueSpecification>> cell : table.cellSet()) {
    if (cell.getRowKey().getType() == FlowletConnection.Type.FLOWLET) {
      for (      QueueSpecification queue : cell.getValue()) {
        QueueStatistics queueStats=scanQueue(queue.getQueueName(),null);
        totalStats.add(queueStats);
      }
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public Void call() throws Exception {
  debugger.scanQueue(queueName,finalConsumerGroupId);
  return null;
}
Program: 5147
Project: 5147
Buggy source:
@Override protected void startUp() throws Exception {
  zkClientService.startAndWait();
  authorizationEnforcementService.startAndWait();
}

Fixed version (ground truth):
@Override protected void startUp() throws Exception {
  zkClientService.startAndWait();
}
Program: 5150
Project: 5150
Buggy source:
/** 
 * The main method. It simply call methods in the same sequence as if the program is started by jsvc.
 */
protected void doMain(final String[] args) throws Exception {
  init(args);
  final CountDownLatch shutdownLatch=new CountDownLatch(1);
  Runtime.getRuntime().addShutdownHook(new Thread(){
    @Override public void run(){
      try {
        try {
          DaemonMain.this.stop();
        }
  finally {
          try {
            DaemonMain.this.destroy();
          }
  finally {
            shutdownLatch.countDown();
          }
        }
      }
 catch (      Throwable t) {
        LOG.error("String_Node_Str" + t.getMessage(),t);
      }
    }
  }
);
  start();
  shutdownLatch.await();
}

Fixed version (ground truth):
/** 
 * The main method. It simply call methods in the same sequence as if the program is started by jsvc.
 */
protected void doMain(final String[] args) throws Exception {
  Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler());
  init(args);
  final CountDownLatch shutdownLatch=new CountDownLatch(1);
  Runtime.getRuntime().addShutdownHook(new Thread(){
    @Override public void run(){
      try {
        try {
          DaemonMain.this.stop();
        }
  finally {
          try {
            DaemonMain.this.destroy();
          }
  finally {
            shutdownLatch.countDown();
          }
        }
      }
 catch (      Throwable t) {
        LOG.error("String_Node_Str" + t.getMessage(),t);
      }
    }
  }
);
  start();
  shutdownLatch.await();
}