nus-yam/ex-repair huggingface dataset:
Program: 4923
Project: 4923
Buggy source:
@Override public ConstraintResult check(ProgramSchedule schedule,ConstraintContext context){
  long elapsedTime=context.getCheckTimeMillis() - context.getJob().getCreationTime();
  if (elapsedTime >= millisAfterTrigger) {
    return ConstraintResult.SATISFIED;
  }
  return new ConstraintResult(ConstraintResult.SatisfiedState.NOT_SATISFIED,millisAfterTrigger - elapsedTime);
}

Fixed version (ground truth):
@Override public ConstraintResult check(ProgramSchedule schedule,ConstraintContext context){
  long elapsedTime=context.getCheckTimeMillis() - context.getJob().getCreationTime();
  if (elapsedTime >= millisAfterTrigger) {
    return ConstraintResult.SATISFIED;
  }
  return new ConstraintResult(ConstraintResult.SatisfiedState.NOT_SATISFIED,context.getJob().getCreationTime() + millisAfterTrigger);
}
Program: 4924
Project: 4924
Buggy source:
@Override public ConstraintResult check(ProgramSchedule schedule,ConstraintContext context){
  long startTime=TimeUnit.MILLISECONDS.toSeconds(context.getCheckTimeMillis() - millisSinceLastRun);
  Iterable<RunRecordMeta> runRecords=context.getProgramRuns(schedule.getProgramId(),ProgramRunStatus.ALL,startTime - TimeUnit.DAYS.toSeconds(1),Long.MAX_VALUE,100).values();
  if (Iterables.isEmpty(filter(runRecords,startTime))) {
    return ConstraintResult.SATISFIED;
  }
  if (!waitUntilMet) {
    return ConstraintResult.NEVER_SATISFIED;
  }
  return new ConstraintResult(ConstraintResult.SatisfiedState.NOT_SATISFIED,TimeUnit.SECONDS.toMillis(10));
}

Fixed version (ground truth):
@Override public ConstraintResult check(ProgramSchedule schedule,ConstraintContext context){
  long startTime=TimeUnit.MILLISECONDS.toSeconds(context.getCheckTimeMillis() - millisSinceLastRun);
  Iterable<RunRecordMeta> runRecords=context.getProgramRuns(schedule.getProgramId(),ProgramRunStatus.ALL,startTime - TimeUnit.DAYS.toSeconds(1),Long.MAX_VALUE,100).values();
  if (Iterables.isEmpty(filter(runRecords,startTime))) {
    return ConstraintResult.SATISFIED;
  }
  if (!waitUntilMet) {
    return ConstraintResult.NEVER_SATISFIED;
  }
  return new ConstraintResult(ConstraintResult.SatisfiedState.NOT_SATISFIED,context.getCheckTime() + TimeUnit.SECONDS.toMillis(10));
}
Program: 4925
Project: 4925
Buggy source:
@Override public ConstraintResult check(ProgramSchedule schedule,ConstraintContext context){
  initialize();
  calendar.setTimeInMillis(context.getCheckTimeMillis());
  int hourOfDay=calendar.get(Calendar.HOUR_OF_DAY);
  int minute=calendar.get(Calendar.MINUTE);
  boolean pastOrEqualStartRange=hourOfDay > startHour || (hourOfDay == startHour && minute >= startMinute);
  boolean pastOrEqualEndRange=hourOfDay > endHour || (hourOfDay == endHour && minute >= endMinute);
  if (isStartTimeSmaller) {
    boolean satisfied=pastOrEqualStartRange && !pastOrEqualEndRange;
    if (satisfied) {
      return ConstraintResult.SATISFIED;
    }
  }
 else {
    boolean satisfied=pastOrEqualStartRange || !pastOrEqualEndRange;
    if (satisfied) {
      return ConstraintResult.SATISFIED;
    }
  }
  if (!waitUntilMet) {
    return ConstraintResult.NEVER_SATISFIED;
  }
  if (pastOrEqualEndRange && isStartTimeSmaller) {
    calendar.add(Calendar.DAY_OF_YEAR,1);
  }
  calendar.set(Calendar.HOUR_OF_DAY,startHour);
  calendar.set(Calendar.MINUTE,startMinute);
  calendar.set(Calendar.SECOND,0);
  calendar.set(Calendar.MILLISECOND,0);
  return new ConstraintResult(ConstraintResult.SatisfiedState.NOT_SATISFIED,calendar.getTimeInMillis() - context.getCheckTimeMillis());
}

Fixed version (ground truth):
@Override public ConstraintResult check(ProgramSchedule schedule,ConstraintContext context){
  initialize();
  calendar.setTimeInMillis(context.getCheckTimeMillis());
  int hourOfDay=calendar.get(Calendar.HOUR_OF_DAY);
  int minute=calendar.get(Calendar.MINUTE);
  boolean pastOrEqualStartRange=hourOfDay > startHour || (hourOfDay == startHour && minute >= startMinute);
  boolean pastOrEqualEndRange=hourOfDay > endHour || (hourOfDay == endHour && minute >= endMinute);
  if (isStartTimeSmaller) {
    boolean satisfied=pastOrEqualStartRange && !pastOrEqualEndRange;
    if (satisfied) {
      return ConstraintResult.SATISFIED;
    }
  }
 else {
    boolean satisfied=pastOrEqualStartRange || !pastOrEqualEndRange;
    if (satisfied) {
      return ConstraintResult.SATISFIED;
    }
  }
  if (!waitUntilMet) {
    return ConstraintResult.NEVER_SATISFIED;
  }
  if (pastOrEqualEndRange && isStartTimeSmaller) {
    calendar.add(Calendar.DAY_OF_YEAR,1);
  }
  calendar.set(Calendar.HOUR_OF_DAY,startHour);
  calendar.set(Calendar.MINUTE,startMinute);
  calendar.set(Calendar.SECOND,0);
  calendar.set(Calendar.MILLISECOND,0);
  return new ConstraintResult(ConstraintResult.SatisfiedState.NOT_SATISFIED,calendar.getTimeInMillis());
}
Program: 4926
Project: 4926
Buggy source:
@Override public Boolean call(DatasetContext context) throws Exception {
  return runReadyJobs(context);
}

Fixed version (ground truth):
@Override public Void call(DatasetContext context) throws Exception {
  if (runReadyJob(job)) {
    readyJobsIter.remove();
  }
  return null;
}
Program: 4927
Project: 4927
Buggy source:
private boolean runReadyJobs(DatasetContext context) throws Exception {
  Iterator<Job> readyJobsIter=readyJobs.iterator();
  while (readyJobsIter.hasNext() && !stopping) {
    Job job=readyJobsIter.next();
    Job storedJob=jobQueue.getJob(job.getJobKey());
    if (storedJob == null) {
      readyJobsIter.remove();
      continue;
    }
    if (job.isToBeDeleted()) {
      readyJobsIter.remove();
      jobQueue.deleteJob(job);
      return true;
    }
    if (storedJob.getState() == Job.State.PENDING_LAUNCH) {
      try {
        taskRunner.launch(job);
      }
 catch (      Exception e) {
        LOG.warn("String_Node_Str",job.getSchedule().getProgramId(),job.getSchedule().getName(),e);
        continue;
      }
      readyJobsIter.remove();
      jobQueue.deleteJob(job);
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private void runReadyJobs(){
  final Iterator<Job> readyJobsIter=readyJobs.iterator();
  while (readyJobsIter.hasNext() && !stopping) {
    final Job job=readyJobsIter.next();
    try {
      Transactions.execute(transactional,new TxCallable<Void>(){
        @Override public Void call(        DatasetContext context) throws Exception {
          if (runReadyJob(job)) {
            readyJobsIter.remove();
          }
          return null;
        }
      }
);
    }
 catch (    TransactionFailureException e) {
      LOG.warn("String_Node_Str",job.getSchedule().getProgramId(),job.getSchedule().getName(),e);
    }
  }
}
Program: 4928
Project: 4928
Buggy source:
/** 
 * Check jobs in job queue for constraint satisfaction.
 * @return sleep time in milliseconds before next fetch
 */
private long checkJobQueue(){
  boolean emptyFetch=false;
  try {
    emptyFetch=Transactions.execute(transactional,new TxCallable<Boolean>(){
      @Override public Boolean call(      DatasetContext context) throws Exception {
        return checkJobConstraints();
      }
    }
);
    Transactions.execute(transactional,new TxCallable<Boolean>(){
      @Override public Boolean call(      DatasetContext context) throws Exception {
        return runReadyJobs(context);
      }
    }
);
    failureCount=0;
  }
 catch (  Exception e) {
    LOG.warn("String_Node_Str",e);
    failureCount++;
  }
  if (failureCount > 0) {
    return scheduleStrategy.nextRetry(failureCount,0);
  }
  return emptyFetch ? 2000L : 0L;
}

Fixed version (ground truth):
/** 
 * Check jobs in job queue for constraint satisfaction.
 * @return sleep time in milliseconds before next fetch
 */
private long checkJobQueue(){
  boolean emptyFetch=false;
  try {
    emptyFetch=Transactions.execute(transactional,new TxCallable<Boolean>(){
      @Override public Boolean call(      DatasetContext context) throws Exception {
        return checkJobConstraints();
      }
    }
);
    runReadyJobs();
    failureCount=0;
  }
 catch (  Exception e) {
    LOG.warn("String_Node_Str",e);
    failureCount++;
  }
  if (failureCount > 0) {
    return scheduleStrategy.nextRetry(failureCount,0);
  }
  return emptyFetch && readyJobs.isEmpty() ? 2000L : 0L;
}
Program: 4930
Project: 4930
Buggy source:
@Override public Service get(){
  return new AbstractIdleService(){
    @Override protected void startUp() throws Exception {
      if (!datasetFramework.hasInstance(Schedulers.STORE_DATASET_ID)) {
        datasetFramework.addInstance(Schedulers.STORE_TYPE_NAME,Schedulers.STORE_DATASET_ID,DatasetProperties.EMPTY);
      }
      schedulerService.startAndWait();
      migrateSchedules(namespaceQueryAdmin,store);
      constraintCheckerService.startAndWait();
      notificationSubscriberService.startAndWait();
    }
    @Override protected void shutDown() throws Exception {
      notificationSubscriberService.stopAndWait();
      constraintCheckerService.stopAndWait();
      schedulerService.stopAndWait();
    }
  }
;
}

Fixed version (ground truth):
@Override public Service get(){
  return new AbstractIdleService(){
    @Override protected void startUp() throws Exception {
      if (!datasetFramework.hasInstance(Schedulers.STORE_DATASET_ID)) {
        datasetFramework.addInstance(Schedulers.STORE_TYPE_NAME,Schedulers.STORE_DATASET_ID,DatasetProperties.EMPTY);
      }
      schedulerService.startAndWait();
      migrateSchedules(namespaceQueryAdmin,store);
      cleanupJobs();
      constraintCheckerService.startAndWait();
      notificationSubscriberService.startAndWait();
    }
    @Override protected void shutDown() throws Exception {
      notificationSubscriberService.stopAndWait();
      constraintCheckerService.stopAndWait();
      schedulerService.stopAndWait();
    }
  }
;
}
Program: 4931
Project: 4931
Buggy source:
public LaunchConfig addRunnable(String name,TwillRunnable runnable,Resources resources,int instances){
  runnables.put(name,new RunnableResource(runnable,createResourceSpec(resources,instances)));
  return this;
}

Fixed version (ground truth):
public LaunchConfig addRunnable(String name,TwillRunnable runnable,Resources resources,int instances,@Nullable Integer maxRetries){
  runnables.put(name,new RunnableResource(runnable,createResourceSpec(resources,instances),maxRetries));
  return this;
}
Program: 4934
Project: 4934
Buggy source:
public RunnableResource(TwillRunnable runnable,ResourceSpecification resources){
  this.runnable=runnable;
  this.resources=resources;
}

Fixed version (ground truth):
public RunnableResource(TwillRunnable runnable,ResourceSpecification resources,@Nullable Integer maxRetries){
  this.runnable=runnable;
  this.resources=resources;
  this.maxRetries=maxRetries;
}
Program: 4935
Project: 4935
Buggy source:
protected Supplier<TransactionStateCache> getTransactionStateCacheSupplier(HTableDescriptor htd,Configuration conf){
  String tablePrefix=htd.getValue(Constants.Dataset.TABLE_PREFIX);
  String sysConfigTablePrefix=HTableNameConverter.getSysConfigTablePrefix(tablePrefix);
  return new DefaultTransactionStateCacheSupplier(sysConfigTablePrefix,conf);
}

Fixed version (ground truth):
protected CacheSupplier<TransactionStateCache> getTransactionStateCacheSupplier(HTableDescriptor htd,Configuration conf){
  String tablePrefix=htd.getValue(Constants.Dataset.TABLE_PREFIX);
  String sysConfigTablePrefix=HTableNameConverter.getSysConfigTablePrefix(tablePrefix);
  return new DefaultTransactionStateCacheSupplier(sysConfigTablePrefix,conf);
}
Program: 4936
Project: 4936
Buggy source:
public void initFamily(byte[] familyName,Map<byte[],byte[]> familyValues){
  String familyAsString=Bytes.toString(familyName);
  byte[] transactionalConfig=familyValues.get(Bytes.toBytes(IncrementHandlerState.PROPERTY_TRANSACTIONAL));
  boolean txnl=transactionalConfig == null || !"String_Node_Str".equals(Bytes.toString(transactionalConfig));
  LOG.info("String_Node_Str" + familyAsString + "String_Node_Str"+ txnl);
  if (txnl) {
    txnlFamilies.add(familyName);
  }
  byte[] columnTTL=familyValues.get(Bytes.toBytes(TxConstants.PROPERTY_TTL));
  long ttl=0;
  if (columnTTL != null) {
    try {
      String stringTTL=Bytes.toString(columnTTL);
      ttl=Long.parseLong(stringTTL);
      LOG.info("String_Node_Str" + familyAsString + "String_Node_Str"+ ttl);
    }
 catch (    NumberFormatException nfe) {
      LOG.warn("String_Node_Str" + familyAsString + "String_Node_Str"+ Bytes.toStringBinary(columnTTL));
    }
  }
  ttlByFamily.put(familyName,ttl);
  if (!txnlFamilies.isEmpty() && cache == null) {
    Supplier<TransactionStateCache> cacheSupplier=getTransactionStateCacheSupplier(hTableDescriptor,conf);
    this.cache=cacheSupplier.get();
  }
}

Fixed version (ground truth):
public void initFamily(byte[] familyName,Map<byte[],byte[]> familyValues){
  String familyAsString=Bytes.toString(familyName);
  byte[] transactionalConfig=familyValues.get(Bytes.toBytes(IncrementHandlerState.PROPERTY_TRANSACTIONAL));
  boolean txnl=transactionalConfig == null || !"String_Node_Str".equals(Bytes.toString(transactionalConfig));
  LOG.info("String_Node_Str" + familyAsString + "String_Node_Str"+ txnl);
  if (txnl) {
    txnlFamilies.add(familyName);
  }
  byte[] columnTTL=familyValues.get(Bytes.toBytes(TxConstants.PROPERTY_TTL));
  long ttl=0;
  if (columnTTL != null) {
    try {
      String stringTTL=Bytes.toString(columnTTL);
      ttl=Long.parseLong(stringTTL);
      LOG.info("String_Node_Str" + familyAsString + "String_Node_Str"+ ttl);
    }
 catch (    NumberFormatException nfe) {
      LOG.warn("String_Node_Str" + familyAsString + "String_Node_Str"+ Bytes.toStringBinary(columnTTL));
    }
  }
  ttlByFamily.put(familyName,ttl);
  if (!txnlFamilies.isEmpty() && cache == null) {
    txStateCacheSupplier=getTransactionStateCacheSupplier(hTableDescriptor,conf);
    cache=txStateCacheSupplier.get();
  }
}
Program: 4937
Project: 4937
Buggy source:
private void startRefreshThread(){
  refreshThread=new Thread("String_Node_Str"){
    @Override public void run(){
      while (!isInterrupted()) {
        updateConfig();
        long now=System.currentTimeMillis();
        if (now > (lastUpdated + configCacheUpdateFrequency)) {
          try {
            updateCache();
          }
 catch (          TableNotFoundException e) {
            LOG.warn("String_Node_Str",queueConfigTableName,e);
            break;
          }
catch (          IOException e) {
            LOG.warn("String_Node_Str",e);
          }
        }
        try {
          Thread.sleep(1000);
        }
 catch (        InterruptedException ie) {
          interrupt();
          break;
        }
      }
      LOG.info("String_Node_Str",queueConfigTableName);
      INSTANCES.remove(queueConfigTableName,this);
    }
  }
;
  refreshThread.setDaemon(true);
  refreshThread.start();
}

Fixed version (ground truth):
private void startRefreshThread(){
  refreshThread=new Thread("String_Node_Str"){
    @Override public void run(){
      while (!isInterrupted() && !stopped) {
        updateConfig();
        long now=System.currentTimeMillis();
        if (now > (lastUpdated + configCacheUpdateFrequency)) {
          try {
            updateCache();
          }
 catch (          TableNotFoundException e) {
            LOG.warn("String_Node_Str",queueConfigTableName,e);
            break;
          }
catch (          IOException e) {
            LOG.warn("String_Node_Str",e);
          }
        }
        try {
          TimeUnit.SECONDS.sleep(1);
        }
 catch (        InterruptedException ie) {
          interrupt();
          break;
        }
      }
      LOG.info("String_Node_Str",queueConfigTableName);
    }
  }
;
  refreshThread.setDaemon(true);
  refreshThread.start();
}
Program: 4938
Project: 4938
Buggy source:
@Override public void run(){
  while (!isInterrupted()) {
    updateConfig();
    long now=System.currentTimeMillis();
    if (now > (lastUpdated + configCacheUpdateFrequency)) {
      try {
        updateCache();
      }
 catch (      TableNotFoundException e) {
        LOG.warn("String_Node_Str",queueConfigTableName,e);
        break;
      }
catch (      IOException e) {
        LOG.warn("String_Node_Str",e);
      }
    }
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException ie) {
      interrupt();
      break;
    }
  }
  LOG.info("String_Node_Str",queueConfigTableName);
  INSTANCES.remove(queueConfigTableName,this);
}

Fixed version (ground truth):
@Override public void run(){
  while (!isInterrupted() && !stopped) {
    updateConfig();
    long now=System.currentTimeMillis();
    if (now > (lastUpdated + configCacheUpdateFrequency)) {
      try {
        updateCache();
      }
 catch (      TableNotFoundException e) {
        LOG.warn("String_Node_Str",queueConfigTableName,e);
        break;
      }
catch (      IOException e) {
        LOG.warn("String_Node_Str",e);
      }
    }
    try {
      TimeUnit.SECONDS.sleep(1);
    }
 catch (    InterruptedException ie) {
      interrupt();
      break;
    }
  }
  LOG.info("String_Node_Str",queueConfigTableName);
}
Program: 4939
Project: 4939
Buggy source:
@Override public int hashCode(){
  return hashCode;
}

Fixed version (ground truth):
@Override public int hashCode(){
  if (hashCode != 0) {
    return hashCode;
  }
  hashCode=Objects.hash(name,type,kerberosPrincipal);
  return hashCode;
}
Program: 4940
Project: 4940
Buggy source:
public Principal(String name,PrincipalType type,@Nullable String kerberosPrincipal){
  this.name=name;
  this.type=type;
  this.kerberosPrincipal=kerberosPrincipal;
  this.hashCode=Objects.hash(name,type,kerberosPrincipal);
}

Fixed version (ground truth):
public Principal(String name,PrincipalType type,@Nullable String kerberosPrincipal){
  this.name=name;
  this.type=type;
  this.kerberosPrincipal=kerberosPrincipal;
}
Program: 4941
Project: 4941
Buggy source:
private boolean checkJobConstraints() throws Exception {
  boolean emptyScan=true;
  try (CloseableIterator<Job> jobQueueIter=jobQueue.getJobs(partition,lastConsumed)){
    Stopwatch stopWatch=new Stopwatch().start();
    while (!stopping && stopWatch.elapsedMillis() < 1000) {
      if (!jobQueueIter.hasNext()) {
        jobQueueIter.close();
        lastConsumed=null;
        return emptyScan;
      }
      Job job=jobQueueIter.next();
      lastConsumed=job;
      emptyScan=false;
      checkAndUpdateJob(jobQueue,job);
    }
  }
   return emptyScan;
}

Fixed version (ground truth):
private boolean checkJobConstraints() throws Exception {
  boolean emptyScan=true;
  try (CloseableIterator<Job> jobQueueIter=jobQueue.getJobs(partition,lastConsumed)){
    Stopwatch stopWatch=new Stopwatch().start();
    while (!stopping && stopWatch.elapsedMillis() < 1000) {
      if (!jobQueueIter.hasNext()) {
        lastConsumed=null;
        return emptyScan;
      }
      Job job=jobQueueIter.next();
      lastConsumed=job;
      emptyScan=false;
      checkAndUpdateJob(jobQueue,job);
    }
  }
   return emptyScan;
}
Program: 4942
Project: 4942
Buggy source:
/** 
 * Collects HBase table stats //TODO: Explore the possiblitity of returning a   {@code Map<TableId, TableStats>}
 * @param admin instance of {@link HBaseAdmin} to communicate with HBase
 * @return map of table name -> table stats
 * @throws IOException
 */
public Map<TableId,TableStats> getTableStats(HBaseAdmin admin) throws IOException {
  Map<TableId,TableStats> datasetStat=Maps.newHashMap();
  ClusterStatus clusterStatus=admin.getClusterStatus();
  for (  ServerName serverName : clusterStatus.getServers()) {
    Map<byte[],RegionLoad> regionsLoad=clusterStatus.getLoad(serverName).getRegionsLoad();
    for (    RegionLoad regionLoad : regionsLoad.values()) {
      TableName tableName=HRegionInfo.getTable(regionLoad.getName());
      HTableDescriptor tableDescriptor=admin.getTableDescriptor(tableName);
      if (!isCDAPTable(tableDescriptor)) {
        continue;
      }
      TableId tableId=HTableNameConverter.from(tableDescriptor);
      TableStats stat=datasetStat.get(tableId);
      if (stat == null) {
        stat=new TableStats(regionLoad.getStorefileSizeMB(),regionLoad.getMemStoreSizeMB());
        datasetStat.put(tableId,stat);
      }
 else {
        stat.incStoreFileSizeMB(regionLoad.getStorefileSizeMB());
        stat.incMemStoreSizeMB(regionLoad.getMemStoreSizeMB());
      }
    }
  }
  return datasetStat;
}

Fixed version (ground truth):
/** 
 * Collects HBase table stats //TODO: Explore the possiblitity of returning a   {@code Map<TableId, TableStats>}
 * @param admin instance of {@link HBaseAdmin} to communicate with HBase
 * @return map of table name -> table stats
 * @throws IOException
 */
public Map<TableId,TableStats> getTableStats(HBaseAdmin admin) throws IOException {
  Map<TableId,TableStats> datasetStat=Maps.newHashMap();
  ClusterStatus clusterStatus=admin.getClusterStatus();
  for (  ServerName serverName : clusterStatus.getServers()) {
    Map<byte[],RegionLoad> regionsLoad=clusterStatus.getLoad(serverName).getRegionsLoad();
    for (    RegionLoad regionLoad : regionsLoad.values()) {
      TableName tableName=HRegionInfo.getTable(regionLoad.getName());
      HTableDescriptor tableDescriptor;
      try {
        tableDescriptor=admin.getTableDescriptor(tableName);
      }
 catch (      TableNotFoundException exception) {
        LOG.warn("String_Node_Str",tableName,exception.getMessage());
        continue;
      }
      if (!isCDAPTable(tableDescriptor)) {
        continue;
      }
      TableId tableId=HTableNameConverter.from(tableDescriptor);
      TableStats stat=datasetStat.get(tableId);
      if (stat == null) {
        stat=new TableStats(regionLoad.getStorefileSizeMB(),regionLoad.getMemStoreSizeMB());
        datasetStat.put(tableId,stat);
      }
 else {
        stat.incStoreFileSizeMB(regionLoad.getStorefileSizeMB());
        stat.incMemStoreSizeMB(regionLoad.getMemStoreSizeMB());
      }
    }
  }
  return datasetStat;
}
Program: 4945
Project: 4945
Buggy source:
/** 
 * Shutdown the service.
 */
public void shutDown(){
  LOG.info("String_Node_Str");
  boolean halt=false;
  try {
    if (userInterfaceService != null) {
      userInterfaceService.stopAndWait();
    }
    if (trackerAppCreationService != null) {
      trackerAppCreationService.stopAndWait();
    }
    router.stopAndWait();
    operationalStatsService.stopAndWait();
    remoteSystemOperationsService.stopAndWait();
    streamService.stopAndWait();
    if (exploreExecutorService != null) {
      exploreExecutorService.stopAndWait();
    }
    exploreClient.close();
    metadataService.stopAndWait();
    serviceStore.stopAndWait();
    appFabricServer.stopAndWait();
    datasetService.stopAndWait();
    metricsQueryService.stopAndWait();
    txService.stopAndWait();
    if (securityEnabled) {
      externalAuthenticationServer.stopAndWait();
    }
    injector.getInstance(MessagingHttpService.class).startAndWait();
    if (messagingService instanceof Service) {
      ((Service)messagingService).stopAndWait();
    }
    logAppenderInitializer.close();
    authorizerInstantiator.close();
  }
 catch (  Throwable e) {
    halt=true;
    LOG.error("String_Node_Str",e);
  }
 finally {
    cleanupTempDir();
  }
  if (halt) {
    Runtime.getRuntime().halt(1);
  }
}

Fixed version (ground truth):
/** 
 * Shutdown the service.
 */
public void shutDown(){
  LOG.info("String_Node_Str");
  boolean halt=false;
  try {
    if (userInterfaceService != null) {
      userInterfaceService.stopAndWait();
    }
    wranglerAppCreationService.stopAndWait();
    if (trackerAppCreationService != null) {
      trackerAppCreationService.stopAndWait();
    }
    router.stopAndWait();
    operationalStatsService.stopAndWait();
    remoteSystemOperationsService.stopAndWait();
    streamService.stopAndWait();
    if (exploreExecutorService != null) {
      exploreExecutorService.stopAndWait();
    }
    exploreClient.close();
    metadataService.stopAndWait();
    serviceStore.stopAndWait();
    appFabricServer.stopAndWait();
    datasetService.stopAndWait();
    metricsQueryService.stopAndWait();
    txService.stopAndWait();
    if (securityEnabled) {
      externalAuthenticationServer.stopAndWait();
    }
    injector.getInstance(MessagingHttpService.class).startAndWait();
    if (messagingService instanceof Service) {
      ((Service)messagingService).stopAndWait();
    }
    logAppenderInitializer.close();
    authorizerInstantiator.close();
  }
 catch (  Throwable e) {
    halt=true;
    LOG.error("String_Node_Str",e);
  }
 finally {
    cleanupTempDir();
  }
  if (halt) {
    Runtime.getRuntime().halt(1);
  }
}
Program: 4946
Project: 4946
Buggy source:
@Inject public TrackerAppCreationService(CConfiguration cConf,ArtifactRepository artifactRepository,ApplicationLifecycleService applicationLifecycleService,ProgramLifecycleService programLifecycleService){
  this.cConf=cConf;
  this.artifactRepository=artifactRepository;
  this.applicationLifecycleService=applicationLifecycleService;
  this.programLifecycleService=programLifecycleService;
}

Fixed version (ground truth):
@Inject public TrackerAppCreationService(CConfiguration cConf,ArtifactRepository artifactRepository,ApplicationLifecycleService applicationLifecycleService,ProgramLifecycleService programLifecycleService){
  super(artifactRepository,applicationLifecycleService,programLifecycleService,"String_Node_Str",TRACKER_APPID,PROGRAM_ID_MAP,cConf.get(TRACKER_CONFIG,"String_Node_Str"));
}
Program: 4949
Project: 4949
Buggy source:
/** 
 * Shutdown the service.
 */
public void shutDown(){
  LOG.info("String_Node_Str");
  boolean halt=false;
  try {
    if (userInterfaceService != null) {
      userInterfaceService.stopAndWait();
    }
    if (trackerAppCreationService != null) {
      trackerAppCreationService.stopAndWait();
    }
    router.stopAndWait();
    operationalStatsService.stopAndWait();
    remoteSystemOperationsService.stopAndWait();
    streamService.stopAndWait();
    if (exploreExecutorService != null) {
      exploreExecutorService.stopAndWait();
    }
    exploreClient.close();
    metadataService.stopAndWait();
    serviceStore.stopAndWait();
    appFabricServer.stopAndWait();
    datasetService.stopAndWait();
    metricsQueryService.stopAndWait();
    txService.stopAndWait();
    if (securityEnabled) {
      externalAuthenticationServer.stopAndWait();
    }
    injector.getInstance(MessagingHttpService.class).startAndWait();
    if (messagingService instanceof Service) {
      ((Service)messagingService).stopAndWait();
    }
    logAppenderInitializer.close();
    authorizerInstantiator.close();
  }
 catch (  Throwable e) {
    halt=true;
    LOG.error("String_Node_Str",e);
  }
 finally {
    cleanupTempDir();
  }
  if (halt) {
    Runtime.getRuntime().halt(1);
  }
}

Fixed version (ground truth):
/** 
 * Shutdown the service.
 */
public void shutDown(){
  LOG.info("String_Node_Str");
  boolean halt=false;
  try {
    if (userInterfaceService != null) {
      userInterfaceService.stopAndWait();
    }
    wranglerAppCreationService.stopAndWait();
    if (trackerAppCreationService != null) {
      trackerAppCreationService.stopAndWait();
    }
    router.stopAndWait();
    operationalStatsService.stopAndWait();
    remoteSystemOperationsService.stopAndWait();
    streamService.stopAndWait();
    if (exploreExecutorService != null) {
      exploreExecutorService.stopAndWait();
    }
    exploreClient.close();
    metadataService.stopAndWait();
    serviceStore.stopAndWait();
    appFabricServer.stopAndWait();
    datasetService.stopAndWait();
    metricsQueryService.stopAndWait();
    txService.stopAndWait();
    if (securityEnabled) {
      externalAuthenticationServer.stopAndWait();
    }
    injector.getInstance(MessagingHttpService.class).startAndWait();
    if (messagingService instanceof Service) {
      ((Service)messagingService).stopAndWait();
    }
    logAppenderInitializer.close();
    authorizerInstantiator.close();
  }
 catch (  Throwable e) {
    halt=true;
    LOG.error("String_Node_Str",e);
  }
 finally {
    cleanupTempDir();
  }
  if (halt) {
    Runtime.getRuntime().halt(1);
  }
}
Program: 4950
Project: 4950
Buggy source:
@Inject public TrackerAppCreationService(CConfiguration cConf,ArtifactRepository artifactRepository,ApplicationLifecycleService applicationLifecycleService,ProgramLifecycleService programLifecycleService){
  this.cConf=cConf;
  this.artifactRepository=artifactRepository;
  this.applicationLifecycleService=applicationLifecycleService;
  this.programLifecycleService=programLifecycleService;
}

Fixed version (ground truth):
@Inject public TrackerAppCreationService(CConfiguration cConf,ArtifactRepository artifactRepository,ApplicationLifecycleService applicationLifecycleService,ProgramLifecycleService programLifecycleService){
  super(artifactRepository,applicationLifecycleService,programLifecycleService,"String_Node_Str",TRACKER_APPID,PROGRAM_ID_MAP,cConf.get(TRACKER_CONFIG,"String_Node_Str"));
}
Program: 4953
Project: 4953
Buggy source:
/** 
 * Collects HBase table stats //TODO: Explore the possiblitity of returning a   {@code Map<TableId, TableStats>}
 * @param admin instance of {@link HBaseAdmin} to communicate with HBase
 * @return map of table name -> table stats
 * @throws IOException
 */
public Map<TableId,TableStats> getTableStats(HBaseAdmin admin) throws IOException {
  Map<TableId,TableStats> datasetStat=Maps.newHashMap();
  ClusterStatus clusterStatus=admin.getClusterStatus();
  for (  ServerName serverName : clusterStatus.getServers()) {
    Map<byte[],RegionLoad> regionsLoad=clusterStatus.getLoad(serverName).getRegionsLoad();
    for (    RegionLoad regionLoad : regionsLoad.values()) {
      TableName tableName=HRegionInfo.getTable(regionLoad.getName());
      HTableDescriptor tableDescriptor=new HTableDescriptor(tableName);
      if (!isCDAPTable(tableDescriptor)) {
        continue;
      }
      TableId tableId=HTableNameConverter.from(tableDescriptor);
      TableStats stat=datasetStat.get(tableId);
      if (stat == null) {
        stat=new TableStats(regionLoad.getStorefileSizeMB(),regionLoad.getMemStoreSizeMB());
        datasetStat.put(tableId,stat);
      }
 else {
        stat.incStoreFileSizeMB(regionLoad.getStorefileSizeMB());
        stat.incMemStoreSizeMB(regionLoad.getMemStoreSizeMB());
      }
    }
  }
  return datasetStat;
}

Fixed version (ground truth):
/** 
 * Collects HBase table stats //TODO: Explore the possiblitity of returning a   {@code Map<TableId, TableStats>}
 * @param admin instance of {@link HBaseAdmin} to communicate with HBase
 * @return map of table name -> table stats
 * @throws IOException
 */
public Map<TableId,TableStats> getTableStats(HBaseAdmin admin) throws IOException {
  Map<TableId,TableStats> datasetStat=Maps.newHashMap();
  ClusterStatus clusterStatus=admin.getClusterStatus();
  for (  ServerName serverName : clusterStatus.getServers()) {
    Map<byte[],RegionLoad> regionsLoad=clusterStatus.getLoad(serverName).getRegionsLoad();
    for (    RegionLoad regionLoad : regionsLoad.values()) {
      TableName tableName=HRegionInfo.getTable(regionLoad.getName());
      HTableDescriptor tableDescriptor=admin.getTableDescriptor(tableName);
      if (!isCDAPTable(tableDescriptor)) {
        continue;
      }
      TableId tableId=HTableNameConverter.from(tableDescriptor);
      TableStats stat=datasetStat.get(tableId);
      if (stat == null) {
        stat=new TableStats(regionLoad.getStorefileSizeMB(),regionLoad.getMemStoreSizeMB());
        datasetStat.put(tableId,stat);
      }
 else {
        stat.incStoreFileSizeMB(regionLoad.getStorefileSizeMB());
        stat.incMemStoreSizeMB(regionLoad.getMemStoreSizeMB());
      }
    }
  }
  return datasetStat;
}
Program: 4954
Project: 4954
Buggy source:
protected boolean isCDAPTable(HTableDescriptor hTableDescriptor){
  String tableName=hTableDescriptor.getNameAsString();
  String value=hTableDescriptor.getValue(CDAP_VERSION);
  return tableName.startsWith(tablePrefix + "String_Node_Str") || tableName.startsWith(tablePrefix + "String_Node_Str") || !Strings.isNullOrEmpty(value);
}

Fixed version (ground truth):
protected boolean isCDAPTable(HTableDescriptor hTableDescriptor){
  return !Strings.isNullOrEmpty(hTableDescriptor.getValue(CDAP_VERSION));
}
Program: 4955
Project: 4955
Buggy source:
@Test public void testWorkflowTags() throws Exception {
  String appName=WorkflowAppWithFork.class.getSimpleName();
  ApplicationId appId=NamespaceId.DEFAULT.app(appName);
  String workflowName=WorkflowAppWithFork.WorkflowWithFork.class.getSimpleName();
  ArtifactId artifactId=NamespaceId.DEFAULT.artifact(appId.getApplication(),"String_Node_Str");
  ApplicationWithPrograms appWithPrograms=createAppWithWorkflow(artifactId,appId,workflowName);
  WorkflowSpecification workflowSpec=appWithPrograms.getSpecification().getWorkflows().get(workflowName);
  SystemMetadataWriterStage systemMetadataWriterStage=new SystemMetadataWriterStage(metadataStore);
  StageContext stageContext=new StageContext(Object.class);
  systemMetadataWriterStage.process(stageContext);
  systemMetadataWriterStage.process(appWithPrograms);
  Set<String> workflowSystemTags=metadataStore.getTags(MetadataScope.SYSTEM,appId.workflow(workflowName));
  Sets.SetView<String> intersection=Sets.intersection(workflowSystemTags,getWorkflowForkNodes(workflowSpec));
  Assert.assertTrue("String_Node_Str" + "String_Node_Str" + intersection,intersection.isEmpty());
}

Fixed version (ground truth):
@Test public void testWorkflowTags() throws Exception {
  String appName=WorkflowAppWithFork.class.getSimpleName();
  ApplicationId appId=NamespaceId.DEFAULT.app(appName);
  String workflowName=WorkflowAppWithFork.WorkflowWithFork.class.getSimpleName();
  ArtifactId artifactId=NamespaceId.DEFAULT.artifact(appId.getApplication(),"String_Node_Str");
  ApplicationWithPrograms appWithPrograms=createAppWithWorkflow(artifactId,appId,workflowName);
  WorkflowSpecification workflowSpec=appWithPrograms.getSpecification().getWorkflows().get(workflowName);
  SystemMetadataWriterStage systemMetadataWriterStage=new SystemMetadataWriterStage(metadataStore);
  StageContext stageContext=new StageContext(Object.class);
  systemMetadataWriterStage.process(stageContext);
  systemMetadataWriterStage.process(appWithPrograms);
  Set<String> workflowSystemTags=metadataStore.getTags(MetadataScope.SYSTEM,appId.workflow(workflowName));
  Sets.SetView<String> intersection=Sets.intersection(workflowSystemTags,getWorkflowForkNodes(workflowSpec));
  Assert.assertTrue("String_Node_Str" + "String_Node_Str" + intersection,intersection.isEmpty());
  Map<String,String> metadataProperties=metadataStore.getMetadata(MetadataScope.SYSTEM,appId).getProperties();
  Assert.assertEquals(WorkflowAppWithFork.SCHED_NAME + "String_Node_Str",metadataProperties.get("String_Node_Str" + WorkflowAppWithFork.SCHED_NAME));
}
Program: 4956
Project: 4956
Buggy source:
private void addSchedules(ImmutableMap.Builder<String,String> properties){
  for (  ScheduleSpecification scheduleSpec : appSpec.getSchedules().values()) {
    Schedule schedule=scheduleSpec.getSchedule();
    properties.put("String_Node_Str" + MetadataDataset.KEYVALUE_SEPARATOR + schedule.getName(),schedule.getName() + MetadataDataset.KEYVALUE_SEPARATOR + schedule.getDescription());
  }
}

Fixed version (ground truth):
private void addSchedules(ImmutableMap.Builder<String,String> properties){
  for (  ScheduleCreationSpec creationSpec : appSpec.getProgramSchedules().values()) {
    properties.put("String_Node_Str" + MetadataDataset.KEYVALUE_SEPARATOR + creationSpec.getName(),creationSpec.getName() + MetadataDataset.KEYVALUE_SEPARATOR + creationSpec.getDescription());
  }
}
Program: 4957
Project: 4957
Buggy source:
public Module createModule(final TwillContext context,ProgramId programId,@Nullable String principal){
  return Modules.combine(createModule(programId,principal),new AbstractModule(){
    @Override protected void configure(){
      bind(InetAddress.class).annotatedWith(Names.named(Constants.Service.MASTER_SERVICES_BIND_ADDRESS)).toInstance(context.getHost());
      bind(ServiceAnnouncer.class).toInstance(new ServiceAnnouncer(){
        @Override public Cancellable announce(        String serviceName,        int port){
          return context.announce(serviceName,port);
        }
        @Override public Cancellable announce(        String serviceName,        int port,        byte[] payload){
          return context.announce(serviceName,port,payload);
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
public Module createModule(final TwillContext context,ProgramId programId,String runId,String instanceId,@Nullable String principal){
  return Modules.combine(createModule(programId,runId,instanceId,principal),new AbstractModule(){
    @Override protected void configure(){
      bind(InetAddress.class).annotatedWith(Names.named(Constants.Service.MASTER_SERVICES_BIND_ADDRESS)).toInstance(context.getHost());
      bind(ServiceAnnouncer.class).toInstance(new ServiceAnnouncer(){
        @Override public Cancellable announce(        String serviceName,        int port){
          return context.announce(serviceName,port);
        }
        @Override public Cancellable announce(        String serviceName,        int port,        byte[] payload){
          return context.announce(serviceName,port,payload);
        }
      }
);
    }
  }
);
}
Program: 4958
Project: 4958
Buggy source:
private Module getCombinedModules(final ProgramId programId){
  return Modules.combine(new ConfigModule(cConf,hConf),new IOModule(),new ZKClientModule(),new KafkaClientModule(),new MetricsClientRuntimeModule().getDistributedModules(),new MessagingClientModule(),new LocationRuntimeModule().getDistributedModules(),new LoggingModules().getDistributedModules(),new DiscoveryRuntimeModule().getDistributedModules(),new DataFabricModules().getDistributedModules(),new DataSetsModules().getDistributedModules(),new ViewAdminModules().getDistributedModules(),new StreamAdminModules().getDistributedModules(),new NotificationFeedClientModule(),new AuditModule().getDistributedModules(),new NamespaceClientRuntimeModule().getDistributedModules(),new AuthorizationEnforcementModule().getDistributedModules(),new SecureStoreModules().getDistributedModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(QueueReaderFactory.class).in(Scopes.SINGLETON);
      install(new DataFabricFacadeModule());
      bind(RuntimeStore.class).to(RemoteRuntimeStore.class);
      install(createStreamFactoryModule());
      bind(UGIProvider.class).to(CurrentUGIProvider.class).in(Scopes.SINGLETON);
      bind(PrivilegesManager.class).to(RemotePrivilegesManager.class);
      bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
      bind(ProgramId.class).toInstance(programId);
      bind(ExploreClient.class).to(ProgramDiscoveryExploreClient.class).in(Scopes.SINGLETON);
    }
  }
);
}

Fixed version (ground truth):
private Module getCombinedModules(final ProgramId programId,String txClientId){
  return Modules.combine(new ConfigModule(cConf,hConf),new IOModule(),new ZKClientModule(),new KafkaClientModule(),new MetricsClientRuntimeModule().getDistributedModules(),new MessagingClientModule(),new LocationRuntimeModule().getDistributedModules(),new LoggingModules().getDistributedModules(),new DiscoveryRuntimeModule().getDistributedModules(),new DataFabricModules(txClientId).getDistributedModules(),new DataSetsModules().getDistributedModules(),new ViewAdminModules().getDistributedModules(),new StreamAdminModules().getDistributedModules(),new NotificationFeedClientModule(),new AuditModule().getDistributedModules(),new NamespaceClientRuntimeModule().getDistributedModules(),new AuthorizationEnforcementModule().getDistributedModules(),new SecureStoreModules().getDistributedModules(),new AbstractModule(){
    @Override protected void configure(){
      bind(QueueReaderFactory.class).in(Scopes.SINGLETON);
      install(new DataFabricFacadeModule());
      bind(RuntimeStore.class).to(RemoteRuntimeStore.class);
      install(createStreamFactoryModule());
      bind(UGIProvider.class).to(CurrentUGIProvider.class).in(Scopes.SINGLETON);
      bind(PrivilegesManager.class).to(RemotePrivilegesManager.class);
      bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
      bind(ProgramId.class).toInstance(programId);
      bind(ExploreClient.class).to(ProgramDiscoveryExploreClient.class).in(Scopes.SINGLETON);
    }
  }
);
}
Program: 4959
Project: 4959
Buggy source:
private static Injector createInjector(CConfiguration cConf,Configuration hConf){
  MapReduceContextConfig mapReduceContextConfig=new MapReduceContextConfig(hConf);
  String principal=mapReduceContextConfig.getProgramOptions().getArguments().getOption(ProgramOptionConstants.PRINCIPAL);
  return Guice.createInjector(new DistributedProgramRunnableModule(cConf,hConf).createModule(mapReduceContextConfig.getProgramId(),principal));
}

Fixed version (ground truth):
private static Injector createInjector(CConfiguration cConf,Configuration hConf){
  MapReduceContextConfig mapReduceContextConfig=new MapReduceContextConfig(hConf);
  Arguments arguments=mapReduceContextConfig.getProgramOptions().getArguments();
  String principal=arguments.getOption(ProgramOptionConstants.PRINCIPAL);
  String runId=arguments.getOption(ProgramOptionConstants.RUN_ID);
  String instanceId=arguments.getOption(ProgramOptionConstants.INSTANCE_ID);
  return Guice.createInjector(new DistributedProgramRunnableModule(cConf,hConf).createModule(mapReduceContextConfig.getProgramId(),runId,instanceId,principal));
}
Program: 4960
Project: 4960
Buggy source:
protected Module createModule(TwillContext context,ProgramId programId,@Nullable String principal){
  return new DistributedProgramRunnableModule(cConf,hConf).createModule(context,programId,principal);
}

Fixed version (ground truth):
protected Module createModule(TwillContext context,ProgramId programId,String runId,String instanceId,@Nullable String principal){
  return new DistributedProgramRunnableModule(cConf,hConf).createModule(context,programId,runId,instanceId,principal);
}
Program: 4962
Project: 4962
Buggy source:
@Override protected Module createModule(TwillContext context,ProgramId programId,@Nullable String principal){
  return Modules.combine(super.createModule(context,programId,principal),new AbstractModule(){
    @Override protected void configure(){
      install(new FactoryModuleBuilder().implement(JarHttpHandler.class,ExplodeJarHttpHandler.class).build(WebappHttpHandlerFactory.class));
    }
  }
);
}

Fixed version (ground truth):
@Override protected Module createModule(TwillContext context,ProgramId programId,String runId,String instanceId,@Nullable String principal){
  return Modules.combine(super.createModule(context,programId,runId,instanceId,principal),new AbstractModule(){
    @Override protected void configure(){
      install(new FactoryModuleBuilder().implement(JarHttpHandler.class,ExplodeJarHttpHandler.class).build(WebappHttpHandlerFactory.class));
    }
  }
);
}
Program: 4963
Project: 4963
Buggy source:
@Override protected Module createModule(TwillContext context,ProgramId programId,@Nullable String principal){
  Module module=super.createModule(context,programId,principal);
  return Modules.combine(module,new PrivateModule(){
    @Override protected void configure(){
      MapBinder<ProgramType,ProgramRunner> runnerFactoryBinder=MapBinder.newMapBinder(binder(),ProgramType.class,ProgramRunner.class);
      runnerFactoryBinder.addBinding(ProgramType.MAPREDUCE).to(MapReduceProgramRunner.class);
      bind(ProgramRuntimeProvider.Mode.class).toInstance(ProgramRuntimeProvider.Mode.LOCAL);
      bind(ProgramRunnerFactory.class).to(DefaultProgramRunnerFactory.class).in(Scopes.SINGLETON);
      expose(ProgramRunnerFactory.class);
    }
  }
);
}

Fixed version (ground truth):
@Override protected Module createModule(TwillContext context,ProgramId programId,String runId,String instanceId,@Nullable String principal){
  Module module=super.createModule(context,programId,runId,instanceId,principal);
  return Modules.combine(module,new PrivateModule(){
    @Override protected void configure(){
      MapBinder<ProgramType,ProgramRunner> runnerFactoryBinder=MapBinder.newMapBinder(binder(),ProgramType.class,ProgramRunner.class);
      runnerFactoryBinder.addBinding(ProgramType.MAPREDUCE).to(MapReduceProgramRunner.class);
      bind(ProgramRuntimeProvider.Mode.class).toInstance(ProgramRuntimeProvider.Mode.LOCAL);
      bind(ProgramRunnerFactory.class).to(DefaultProgramRunnerFactory.class).in(Scopes.SINGLETON);
      expose(ProgramRunnerFactory.class);
    }
  }
);
}
Program: 4965
Project: 4965
Buggy source:
@BeforeClass public static void setup() throws Exception {
  CConfiguration conf=CConfiguration.create();
  conf.set(Constants.CFG_HDFS_USER,System.getProperty("String_Node_Str"));
  Injector injector=Guice.createInjector(new DataFabricDistributedModule(),new ConfigModule(conf,TEST_HBASE.getConfiguration()),new ZKClientModule(),new DiscoveryRuntimeModule().getDistributedModules(),new TransactionMetricsModule(),new LocationRuntimeModule().getDistributedModules(),new NamespaceClientUnitTestModule().getModule(),new SystemDatasetRuntimeModule().getDistributedModules(),new DataSetsModules().getInMemoryModules(),new AuthorizationTestModule(),new AuthorizationEnforcementModule().getInMemoryModules(),new AuthenticationContextModules().getNoOpModule(),new AbstractModule(){
    @Override protected void configure(){
      bind(UGIProvider.class).to(UnsupportedUGIProvider.class);
      bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
    }
  }
);
  dsFramework=injector.getInstance(DatasetFramework.class);
  tableUtil=injector.getInstance(HBaseTableUtil.class);
  ddlExecutor=new HBaseDDLExecutorFactory(conf,TEST_HBASE.getHBaseAdmin().getConfiguration()).get();
  ddlExecutor.createNamespaceIfNotExists(tableUtil.getHBaseNamespace(NamespaceId.SYSTEM));
}

Fixed version (ground truth):
@BeforeClass public static void setup() throws Exception {
  CConfiguration conf=CConfiguration.create();
  conf.set(Constants.CFG_HDFS_USER,System.getProperty("String_Node_Str"));
  Injector injector=Guice.createInjector(new DataFabricModules().getDistributedModules(),new ConfigModule(conf,TEST_HBASE.getConfiguration()),new ZKClientModule(),new DiscoveryRuntimeModule().getDistributedModules(),new TransactionMetricsModule(),new LocationRuntimeModule().getDistributedModules(),new NamespaceClientUnitTestModule().getModule(),new SystemDatasetRuntimeModule().getDistributedModules(),new DataSetsModules().getInMemoryModules(),new AuthorizationTestModule(),new AuthorizationEnforcementModule().getInMemoryModules(),new AuthenticationContextModules().getNoOpModule(),new AbstractModule(){
    @Override protected void configure(){
      bind(UGIProvider.class).to(UnsupportedUGIProvider.class);
      bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
    }
  }
);
  dsFramework=injector.getInstance(DatasetFramework.class);
  tableUtil=injector.getInstance(HBaseTableUtil.class);
  ddlExecutor=new HBaseDDLExecutorFactory(conf,TEST_HBASE.getHBaseAdmin().getConfiguration()).get();
  ddlExecutor.createNamespaceIfNotExists(tableUtil.getHBaseNamespace(NamespaceId.SYSTEM));
}
Program: 4969
Project: 4969
Buggy source:
public DataFabricDistributedModule(){
}

Fixed version (ground truth):
public DataFabricDistributedModule(String txClientId){
  this.txClientId=txClientId;
}
Program: 4970
Project: 4970
Buggy source:
@Override public void configure(){
  bind(ThriftClientProvider.class).toProvider(ThriftClientProviderSupplier.class);
  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(TxMetricsCollector.class).to(TransactionManagerMetricsCollector.class).in(Scopes.SINGLETON);
  bind(TransactionSystemClientService.class).to(DistributedTransactionSystemClientService.class);
  install(new TransactionModules().getDistributedModules());
  install(new TransactionExecutorModule());
}

Fixed version (ground truth):
@Override public void configure(){
  bind(ThriftClientProvider.class).toProvider(ThriftClientProviderSupplier.class);
  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(TxMetricsCollector.class).to(TransactionManagerMetricsCollector.class).in(Scopes.SINGLETON);
  bind(TransactionSystemClientService.class).to(DistributedTransactionSystemClientService.class);
  install(new TransactionModules(txClientId).getDistributedModules());
  install(new TransactionExecutorModule());
}