nus-yam/ex-repair huggingface dataset:
Program: 5292
Project: 5292
Buggy source:
private void doCommit(long transactionId,long writePointer,Set<ChangeId> changes,long commitPointer,boolean addToCommitted){
  committingChangeSets.remove(transactionId);
  if (addToCommitted && !changes.isEmpty()) {
    Set<ChangeId> changeIds=committedChangeSets.get(commitPointer);
    if (changeIds != null) {
      changes.addAll(changeIds);
    }
    committedChangeSets.put(commitPointer,changes);
  }
  InProgressTx previous=inProgress.remove(transactionId);
  if (previous == null) {
    if (invalid.rem(transactionId)) {
      invalidArray=invalid.toLongArray();
      LOG.info("String_Node_Str",transactionId);
    }
  }
 else {
    LongArrayList checkpointPointers=previous.getCheckpointWritePointers();
    if (!checkpointPointers.isEmpty()) {
      writePointer=checkpointPointers.getLong(checkpointPointers.size() - 1);
      inProgress.keySet().removeAll(previous.getCheckpointWritePointers());
    }
  }
  moveReadPointerIfNeeded(writePointer);
  committedChangeSets.headMap(TxUtils.getFirstShortInProgress(inProgress)).clear();
}

Fixed version (ground truth):
private void doCommit(long transactionId,long writePointer,Set<ChangeId> changes,long commitPointer,boolean addToCommitted){
  committingChangeSets.remove(transactionId);
  if (addToCommitted && !changes.isEmpty()) {
    Set<ChangeId> changeIds=committedChangeSets.get(commitPointer);
    if (changeIds != null) {
      changes.addAll(changeIds);
    }
    committedChangeSets.put(commitPointer,changes);
  }
  InProgressTx previous=inProgress.remove(transactionId);
  if (previous == null) {
    if (invalidTxList.remove(transactionId)) {
      LOG.info("String_Node_Str",transactionId);
    }
  }
 else {
    LongArrayList checkpointPointers=previous.getCheckpointWritePointers();
    if (!checkpointPointers.isEmpty()) {
      writePointer=checkpointPointers.getLong(checkpointPointers.size() - 1);
      inProgress.keySet().removeAll(previous.getCheckpointWritePointers());
    }
  }
  moveReadPointerIfNeeded(writePointer);
  committedChangeSets.headMap(TxUtils.getFirstShortInProgress(inProgress)).clear();
}
Program: 5293
Project: 5293
Buggy source:
public synchronized TransactionSnapshot getCurrentState(){
  return TransactionSnapshot.copyFrom(System.currentTimeMillis(),readPointer,lastWritePointer,invalid,inProgress,committingChangeSets,committedChangeSets);
}

Fixed version (ground truth):
public synchronized TransactionSnapshot getCurrentState(){
  return TransactionSnapshot.copyFrom(System.currentTimeMillis(),readPointer,lastWritePointer,invalidTxList.toRawList(),inProgress,committingChangeSets,committedChangeSets);
}
Program: 5294
Project: 5294
Buggy source:
/** 
 * @return the size of invalid list
 */
public int getInvalidSize(){
  return this.invalid.size();
}

Fixed version (ground truth):
/** 
 * @return the size of invalid list
 */
public synchronized int getInvalidSize(){
  return this.invalidTxList.size();
}
Program: 5295
Project: 5295
Buggy source:
private void clear(){
  invalid.clear();
  invalidArray=NO_INVALID_TX;
  inProgress.clear();
  committedChangeSets.clear();
  committingChangeSets.clear();
  lastWritePointer=0;
  readPointer=0;
  lastSnapshotTime=0;
}

Fixed version (ground truth):
private void clear(){
  invalidTxList.clear();
  inProgress.clear();
  committedChangeSets.clear();
  committingChangeSets.clear();
  lastWritePointer=0;
  readPointer=0;
  lastSnapshotTime=0;
}
Program: 5296
Project: 5296
Buggy source:
private boolean doTruncateInvalidTx(Set<Long> invalidTxIds){
  LOG.info("String_Node_Str",invalidTxIds);
  boolean success=invalid.removeAll(invalidTxIds);
  if (success) {
    invalidArray=invalid.toLongArray();
  }
  return success;
}

Fixed version (ground truth):
private boolean doTruncateInvalidTx(Set<Long> toRemove){
  LOG.info("String_Node_Str",toRemove);
  return invalidTxList.removeAll(toRemove);
}
Program: 5297
Project: 5297
Buggy source:
/** 
 * Called from the tx service every 10 seconds. This hack is needed because current metrics system is not flexible when it comes to adding new metrics.
 */
public void logStatistics(){
  LOG.info("String_Node_Str" + lastWritePointer + "String_Node_Str"+ invalid.size()+ "String_Node_Str"+ inProgress.size()+ "String_Node_Str"+ committingChangeSets.size()+ "String_Node_Str"+ committedChangeSets.size());
}

Fixed version (ground truth):
/** 
 * Called from the tx service every 10 seconds. This hack is needed because current metrics system is not flexible when it comes to adding new metrics.
 */
public void logStatistics(){
  LOG.info("String_Node_Str" + lastWritePointer + "String_Node_Str"+ getInvalidSize()+ "String_Node_Str"+ inProgress.size()+ "String_Node_Str"+ committingChangeSets.size()+ "String_Node_Str"+ committedChangeSets.size());
}
Program: 5298
Project: 5298
Buggy source:
public boolean canCommit(Transaction tx,Collection<byte[]> changeIds) throws TransactionNotInProgressException {
  txMetricsCollector.rate("String_Node_Str");
  Stopwatch timer=new Stopwatch().start();
  if (inProgress.get(tx.getTransactionId()) == null) {
    if (invalid.contains(tx.getTransactionId())) {
      throw new TransactionNotInProgressException(String.format("String_Node_Str",tx.getTransactionId()));
    }
 else {
      throw new TransactionNotInProgressException(String.format("String_Node_Str",tx.getTransactionId()));
    }
  }
  Set<ChangeId> set=Sets.newHashSetWithExpectedSize(changeIds.size());
  for (  byte[] change : changeIds) {
    set.add(new ChangeId(change));
  }
  if (hasConflicts(tx,set)) {
    return false;
  }
  this.logReadLock.lock();
  try {
synchronized (this) {
      ensureAvailable();
      addCommittingChangeSet(tx.getTransactionId(),set);
    }
    appendToLog(TransactionEdit.createCommitting(tx.getTransactionId(),set));
  }
  finally {
    this.logReadLock.unlock();
  }
  txMetricsCollector.histogram("String_Node_Str",(int)timer.elapsedMillis());
  return true;
}

Fixed version (ground truth):
public boolean canCommit(Transaction tx,Collection<byte[]> changeIds) throws TransactionNotInProgressException {
  txMetricsCollector.rate("String_Node_Str");
  Stopwatch timer=new Stopwatch().start();
  if (inProgress.get(tx.getTransactionId()) == null) {
synchronized (this) {
      if (invalidTxList.contains(tx.getTransactionId())) {
        throw new TransactionNotInProgressException(String.format("String_Node_Str",tx.getTransactionId()));
      }
 else {
        throw new TransactionNotInProgressException(String.format("String_Node_Str",tx.getTransactionId()));
      }
    }
  }
  Set<ChangeId> set=Sets.newHashSetWithExpectedSize(changeIds.size());
  for (  byte[] change : changeIds) {
    set.add(new ChangeId(change));
  }
  if (hasConflicts(tx,set)) {
    return false;
  }
  this.logReadLock.lock();
  try {
synchronized (this) {
      ensureAvailable();
      addCommittingChangeSet(tx.getTransactionId(),set);
    }
    appendToLog(TransactionEdit.createCommitting(tx.getTransactionId(),set));
  }
  finally {
    this.logReadLock.unlock();
  }
  txMetricsCollector.histogram("String_Node_Str",(int)timer.elapsedMillis());
  return true;
}
Program: 5299
Project: 5299
Buggy source:
/** 
 * Creates a new Transaction. This method only get called from start transaction, which is already synchronized.
 */
private Transaction createTransaction(long writePointer,TransactionType type){
  long firstShortTx=Transaction.NO_TX_IN_PROGRESS;
  LongArrayList inProgressIds=new LongArrayList(inProgress.size());
  for (  Map.Entry<Long,InProgressTx> entry : inProgress.entrySet()) {
    long txId=entry.getKey();
    inProgressIds.add(txId);
    if (firstShortTx == Transaction.NO_TX_IN_PROGRESS && !entry.getValue().isLongRunning()) {
      firstShortTx=txId;
    }
  }
  return new Transaction(readPointer,writePointer,invalidArray,inProgressIds.toLongArray(),firstShortTx,type);
}

Fixed version (ground truth):
/** 
 * Creates a new Transaction. This method only get called from start transaction, which is already synchronized.
 */
private Transaction createTransaction(long writePointer,TransactionType type){
  long firstShortTx=Transaction.NO_TX_IN_PROGRESS;
  LongArrayList inProgressIds=new LongArrayList(inProgress.size());
  for (  Map.Entry<Long,InProgressTx> entry : inProgress.entrySet()) {
    long txId=entry.getKey();
    inProgressIds.add(txId);
    if (firstShortTx == Transaction.NO_TX_IN_PROGRESS && !entry.getValue().isLongRunning()) {
      firstShortTx=txId;
    }
  }
  return new Transaction(readPointer,writePointer,invalidTxList.toSortedArray(),inProgressIds.toLongArray(),firstShortTx,type);
}
Program: 5300
Project: 5300
Buggy source:
private void doAbort(long writePointer,long[] checkpointWritePointers,TransactionType type){
  committingChangeSets.remove(writePointer);
  if (type == TransactionType.LONG) {
    doInvalidate(writePointer);
    return;
  }
  InProgressTx removed=inProgress.remove(writePointer);
  boolean removeInProgressCheckpoints=true;
  if (removed == null) {
    if (invalid.rem(writePointer)) {
      removeInProgressCheckpoints=false;
      if (checkpointWritePointers != null) {
        for (        long checkpointWritePointer : checkpointWritePointers) {
          invalid.rem(checkpointWritePointer);
        }
      }
      invalidArray=invalid.toLongArray();
      LOG.info("String_Node_Str",writePointer);
    }
  }
  if (removeInProgressCheckpoints && checkpointWritePointers != null) {
    for (    long checkpointWritePointer : checkpointWritePointers) {
      inProgress.remove(checkpointWritePointer);
    }
  }
  moveReadPointerIfNeeded(writePointer);
}

Fixed version (ground truth):
private void doAbort(long writePointer,long[] checkpointWritePointers,TransactionType type){
  committingChangeSets.remove(writePointer);
  if (type == TransactionType.LONG) {
    doInvalidate(writePointer);
    return;
  }
  InProgressTx removed=inProgress.remove(writePointer);
  boolean removeInProgressCheckpoints=true;
  if (removed == null) {
    if (invalidTxList.remove(writePointer)) {
      removeInProgressCheckpoints=false;
      if (checkpointWritePointers != null) {
        for (        long checkpointWritePointer : checkpointWritePointers) {
          invalidTxList.remove(checkpointWritePointer);
        }
      }
      LOG.info("String_Node_Str",writePointer);
    }
  }
  if (removeInProgressCheckpoints && checkpointWritePointers != null) {
    for (    long checkpointWritePointer : checkpointWritePointers) {
      inProgress.remove(checkpointWritePointer);
    }
  }
  moveReadPointerIfNeeded(writePointer);
}
Program: 5301
Project: 5301
Buggy source:
private boolean doTruncateInvalidTxBefore(long time) throws InvalidTruncateTimeException {
  LOG.info("String_Node_Str",time);
  long truncateWp=time * TxConstants.MAX_TX_PER_MS;
  if (inProgress.lowerKey(truncateWp) != null) {
    throw new InvalidTruncateTimeException("String_Node_Str" + time + "String_Node_Str");
  }
  Set<Long> toTruncate=Sets.newHashSet();
  for (  long wp : invalid) {
    if (wp >= truncateWp) {
      break;
    }
    toTruncate.add(wp);
  }
  return doTruncateInvalidTx(toTruncate);
}

Fixed version (ground truth):
private boolean doTruncateInvalidTxBefore(long time) throws InvalidTruncateTimeException {
  LOG.info("String_Node_Str",time);
  long truncateWp=time * TxConstants.MAX_TX_PER_MS;
  if (inProgress.lowerKey(truncateWp) != null) {
    throw new InvalidTruncateTimeException("String_Node_Str" + time + "String_Node_Str");
  }
  LongSet toTruncate=new LongArraySet();
  LongIterator it=invalidTxList.toRawList().iterator();
  while (it.hasNext()) {
    long wp=it.nextLong();
    if (wp < truncateWp) {
      toTruncate.add(wp);
    }
  }
  LOG.info("String_Node_Str",toTruncate);
  return invalidTxList.removeAll(toTruncate);
}
Program: 5302
Project: 5302
Buggy source:
private HiveConf getHiveConf(){
  HiveConf conf=new HiveConf();
  if (UserGroupInformation.isSecurityEnabled()) {
    conf.set(HIVE_METASTORE_TOKEN_KEY,HiveAuthFactory.HS2_CLIENT_TOKEN);
  }
  conf.unset("String_Node_Str");
  conf.unset("String_Node_Str");
  return conf;
}

Fixed version (ground truth):
private HiveConf getHiveConf(){
  HiveConf conf=new HiveConf();
  if (UserGroupInformation.isSecurityEnabled()) {
    conf.set(HIVE_METASTORE_TOKEN_KEY,HiveAuthFactory.HS2_CLIENT_TOKEN);
  }
  String whiteListAppend=conf.getVar(HiveConf.ConfVars.HIVE_AUTHORIZATION_SQL_STD_AUTH_CONFIG_WHITELIST_APPEND);
  if (whiteListAppend != null && !whiteListAppend.trim().isEmpty()) {
    whiteListAppend=whiteListAppend + "String_Node_Str" + PARAMS_EXPLORE_MODIFIES;
  }
 else {
    whiteListAppend=PARAMS_EXPLORE_MODIFIES;
  }
  conf.setVar(HiveConf.ConfVars.HIVE_AUTHORIZATION_SQL_STD_AUTH_CONFIG_WHITELIST_APPEND,whiteListAppend);
  conf.set(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION,UserGroupInformation.AuthenticationMethod.SIMPLE.name());
  conf.unset("String_Node_Str");
  conf.unset("String_Node_Str");
  return conf;
}
Program: 5304
Project: 5304
Buggy source:
private void rewriteHiveConfig(){
  URL resourceURL=getLocalResourceURL("String_Node_Str");
  if (resourceURL == null) {
    LOG.warn("String_Node_Str");
    return;
  }
  try (InputStream is=new FileInputStream(new File(resourceURL.toURI()))){
    Configuration conf=new Configuration(false);
    conf.addResource(is);
    conf.setBoolean(Job.MAPREDUCE_JOB_USER_CLASSPATH_FIRST,false);
    conf.setBoolean(MRJobConfig.MAPREDUCE_JOB_CLASSLOADER,false);
    conf.set(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION,UserGroupInformation.AuthenticationMethod.SIMPLE.name());
    String sparkHome=System.getenv(Constants.SPARK_HOME);
    if (sparkHome != null) {
      LOG.debug("String_Node_Str",sparkHome);
      conf.set("String_Node_Str",sparkHome);
    }
    File newConfFile=File.createTempFile("String_Node_Str","String_Node_Str");
    try (FileOutputStream os=new FileOutputStream(newConfFile)){
      conf.writeXml(os);
    }
     Files.move(newConfFile.toPath(),Paths.get(resourceURL.toURI()),StandardCopyOption.REPLACE_EXISTING);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",resourceURL,e);
    throw Throwables.propagate(e);
  }
}

Fixed version (ground truth):
private void rewriteHiveConfig(){
  URL resourceURL=getLocalResourceURL("String_Node_Str");
  if (resourceURL == null) {
    LOG.warn("String_Node_Str");
    return;
  }
  try (InputStream is=new FileInputStream(new File(resourceURL.toURI()))){
    Configuration conf=new Configuration(false);
    conf.addResource(is);
    conf.setBoolean(Job.MAPREDUCE_JOB_USER_CLASSPATH_FIRST,false);
    conf.setBoolean(MRJobConfig.MAPREDUCE_JOB_CLASSLOADER,false);
    String sparkHome=System.getenv(Constants.SPARK_HOME);
    if (sparkHome != null) {
      LOG.debug("String_Node_Str",sparkHome);
      conf.set("String_Node_Str",sparkHome);
    }
    File newConfFile=File.createTempFile("String_Node_Str","String_Node_Str");
    try (FileOutputStream os=new FileOutputStream(newConfFile)){
      conf.writeXml(os);
    }
     Files.move(newConfFile.toPath(),Paths.get(resourceURL.toURI()),StandardCopyOption.REPLACE_EXISTING);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",resourceURL,e);
    throw Throwables.propagate(e);
  }
}
Program: 5306
Project: 5306
Buggy source:
private EndpointStrategy loadCache(CacheKey cacheKey) throws Exception {
  EndpointStrategy endpointStrategy;
  RouteDestination routeDestination=cacheKey.getRouteDestination();
  if (routeDestination.getServiceName().contains("String_Node_Str")) {
    endpointStrategy=discoverService(cacheKey);
    if (endpointStrategy.pick() == null) {
      endpointStrategy=discoverDefaultService(cacheKey);
    }
  }
 else {
    endpointStrategy=discover(routeDestination);
  }
  if (endpointStrategy.pick() == null) {
    String message=String.format("String_Node_Str",cacheKey);
    LOG.error(message);
    throw new Exception(message);
  }
  return endpointStrategy;
}

Fixed version (ground truth):
private EndpointStrategy loadCache(CacheKey cacheKey) throws Exception {
  EndpointStrategy endpointStrategy;
  RouteDestination routeDestination=cacheKey.getRouteDestination();
  if (routeDestination.getServiceName().contains("String_Node_Str")) {
    endpointStrategy=discoverService(cacheKey);
    if (endpointStrategy.pick() == null) {
      endpointStrategy=discoverDefaultService(cacheKey);
    }
  }
 else {
    endpointStrategy=discover(routeDestination);
  }
  if (endpointStrategy.pick() == null) {
    String message=String.format("String_Node_Str",cacheKey);
    LOG.debug(message);
    throw new Exception(message);
  }
  return endpointStrategy;
}
Program: 5307
Project: 5307
Buggy source:
@Override public void exceptionCaught(ChannelHandlerContext ctx,ExceptionEvent e){
  Throwable cause=e.getCause();
switch (exceptionsHandled.incrementAndGet()) {
case 1:
    break;
case 2:
  LOG.error("String_Node_Str",ctx.getChannel(),cause);
default :
return;
}
LOG.error("String_Node_Str",ctx.getChannel(),cause);
if (ctx.getChannel().isConnected() && !channelClosed) {
HttpResponse response=(cause instanceof HandlerException) ? ((HandlerException)cause).createFailureResponse() : new DefaultHttpResponse(HttpVersion.HTTP_1_1,HttpResponseStatus.INTERNAL_SERVER_ERROR);
Channels.write(ctx,e.getFuture(),response);
e.getFuture().addListener(ChannelFutureListener.CLOSE);
}
}

Fixed version (ground truth):
@Override public void exceptionCaught(ChannelHandlerContext ctx,ExceptionEvent e){
  Throwable cause=e.getCause();
switch (exceptionsHandled.incrementAndGet()) {
case 1:
    break;
case 2:
  LOG.error("String_Node_Str",ctx.getChannel(),cause);
default :
return;
}
if (cause instanceof HandlerException && ((HandlerException)cause).getFailureStatus() != HttpResponseStatus.INTERNAL_SERVER_ERROR) {
LOG.debug("String_Node_Str",ctx.getChannel(),cause);
}
 else {
LOG.error("String_Node_Str",ctx.getChannel(),cause);
}
if (ctx.getChannel().isConnected() && !channelClosed) {
HttpResponse response=cause instanceof HandlerException ? ((HandlerException)cause).createFailureResponse() : new DefaultHttpResponse(HttpVersion.HTTP_1_1,HttpResponseStatus.INTERNAL_SERVER_ERROR);
Channels.write(ctx,e.getFuture(),response);
e.getFuture().addListener(ChannelFutureListener.CLOSE);
}
}
Program: 5309
Project: 5309
Buggy source:
@Inject public TransactionHttpHandler(CConfiguration cConf,TransactionSystemClient txClient){
  this.txClient=new TransactionSystemClientAdapter(txClient);
  try {
    this.debugClazz=getClass().getClassLoader().loadClass("String_Node_Str");
    this.debugObject=debugClazz.newInstance();
    Configuration hConf=new Configuration();
    for (    Map.Entry<String,String> entry : cConf) {
      hConf.set(entry.getKey(),entry.getValue());
    }
    Method initMethod=debugClazz.getMethod("String_Node_Str",Configuration.class);
    initMethod.setAccessible(true);
    initMethod.invoke(debugObject,hConf);
  }
 catch (  ClassNotFoundException|IllegalAccessException|InstantiationException ex) {
    LOG.warn("String_Node_Str",ex);
    this.debugClazz=null;
  }
catch (  NoSuchMethodException|InvocationTargetException ex) {
    LOG.warn("String_Node_Str",ex);
    this.debugClazz=null;
  }
}

Fixed version (ground truth):
@Inject public TransactionHttpHandler(CConfiguration cConf,TransactionSystemClient txClient){
  this.cConf=cConf;
  this.txClient=new TransactionSystemClientAdapter(txClient);
  this.pruneEnable=cConf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
}
Program: 5310
Project: 5310
Buggy source:
@Path("String_Node_Str") @GET public void getPruneInfo(HttpRequest request,HttpResponder responder,@PathParam("String_Node_Str") String regionName){
  if (debugClazz == null || debugObject == null) {
    responder.sendString(HttpResponseStatus.INTERNAL_SERVER_ERROR,"String_Node_Str");
    return;
  }
  try {
    Method method=debugClazz.getMethod("String_Node_Str",String.class);
    method.setAccessible(true);
    Object response=method.invoke(debugObject,regionName);
    if (response == null) {
      responder.sendString(HttpResponseStatus.NOT_FOUND,"String_Node_Str");
      return;
    }
    RegionPruneInfo pruneInfo=(RegionPruneInfo)response;
    responder.sendJson(HttpResponseStatus.OK,pruneInfo);
  }
 catch (  Exception e) {
    responder.sendString(HttpResponseStatus.BAD_REQUEST,e.getMessage());
    LOG.debug("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Path("String_Node_Str") @GET public void getPruneInfo(HttpRequest request,HttpResponder responder,@PathParam("String_Node_Str") String regionName){
  if (!initializePruningDebug(responder)) {
    return;
  }
  try {
    Method method=debugClazz.getMethod("String_Node_Str",String.class);
    method.setAccessible(true);
    Object response=method.invoke(debugObject,regionName);
    if (response == null) {
      responder.sendString(HttpResponseStatus.NOT_FOUND,"String_Node_Str");
      return;
    }
    RegionPruneInfo pruneInfo=(RegionPruneInfo)response;
    responder.sendJson(HttpResponseStatus.OK,pruneInfo);
  }
 catch (  Exception e) {
    responder.sendString(HttpResponseStatus.BAD_REQUEST,e.getMessage());
    LOG.debug("String_Node_Str",e);
  }
}
Program: 5311
Project: 5311
Buggy source:
@Path("String_Node_Str") @GET public void getTimeRegions(HttpRequest request,HttpResponder responder,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") long time){
  if (debugClazz == null || debugObject == null) {
    responder.sendString(HttpResponseStatus.INTERNAL_SERVER_ERROR,"String_Node_Str");
    return;
  }
  try {
    Method method=debugClazz.getMethod("String_Node_Str",Long.class);
    method.setAccessible(true);
    Object response=method.invoke(debugObject,time);
    if (response == null) {
      responder.sendString(HttpResponseStatus.NOT_FOUND,String.format("String_Node_Str",time));
      return;
    }
    Map<Long,SortedSet<String>> timeRegionInfo=(Map<Long,SortedSet<String>>)response;
    responder.sendJson(HttpResponseStatus.OK,timeRegionInfo);
  }
 catch (  Exception e) {
    responder.sendString(HttpResponseStatus.BAD_REQUEST,e.getMessage());
    LOG.debug("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Path("String_Node_Str") @GET public void getTimeRegions(HttpRequest request,HttpResponder responder,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") long time){
  if (!initializePruningDebug(responder)) {
    return;
  }
  try {
    Method method=debugClazz.getMethod("String_Node_Str",Long.class);
    method.setAccessible(true);
    Object response=method.invoke(debugObject,time);
    if (response == null) {
      responder.sendString(HttpResponseStatus.NOT_FOUND,String.format("String_Node_Str",time));
      return;
    }
    Map<Long,SortedSet<String>> timeRegionInfo=(Map<Long,SortedSet<String>>)response;
    responder.sendJson(HttpResponseStatus.OK,timeRegionInfo);
  }
 catch (  Exception e) {
    responder.sendString(HttpResponseStatus.BAD_REQUEST,e.getMessage());
    LOG.debug("String_Node_Str",e);
  }
}
Program: 5312
Project: 5312
Buggy source:
@Path("String_Node_Str") @GET public void getIdleRegions(HttpRequest request,HttpResponder responder,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") int numRegions){
  if (debugClazz == null || debugObject == null) {
    responder.sendString(HttpResponseStatus.INTERNAL_SERVER_ERROR,"String_Node_Str");
    return;
  }
  try {
    Method method=debugClazz.getMethod("String_Node_Str",Integer.class);
    method.setAccessible(true);
    Object response=method.invoke(debugObject,numRegions);
    Queue<RegionPruneInfo> pruneInfos=(Queue<RegionPruneInfo>)response;
    responder.sendJson(HttpResponseStatus.OK,pruneInfos);
  }
 catch (  Exception e) {
    responder.sendString(HttpResponseStatus.BAD_REQUEST,e.getMessage());
    LOG.debug("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Path("String_Node_Str") @GET public void getIdleRegions(HttpRequest request,HttpResponder responder,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") int numRegions){
  if (!initializePruningDebug(responder)) {
    return;
  }
  try {
    Method method=debugClazz.getMethod("String_Node_Str",Integer.class);
    method.setAccessible(true);
    Object response=method.invoke(debugObject,numRegions);
    Queue<RegionPruneInfo> pruneInfos=(Queue<RegionPruneInfo>)response;
    responder.sendJson(HttpResponseStatus.OK,pruneInfos);
  }
 catch (  Exception e) {
    responder.sendString(HttpResponseStatus.BAD_REQUEST,e.getMessage());
    LOG.debug("String_Node_Str",e);
  }
}
Program: 5314
Project: 5314
Buggy source:
/** 
 * Helper method to get delegation tokens for the given LocationFactory.
 * @param config The hadoop configuration.
 * @param locationFactory The LocationFactory for generating tokens.
 * @param credentials Credentials for storing tokens acquired.
 * @return List of delegation Tokens acquired.TODO: copied from Twill 0.6 YarnUtils for CDAP-5350. Remove after this fix is moved to Twill.
 */
private static List<Token<?>> addDelegationTokens(Configuration config,LocationFactory locationFactory,Credentials credentials) throws IOException {
  if (!UserGroupInformation.isSecurityEnabled()) {
    LOG.debug("String_Node_Str");
    return ImmutableList.of();
  }
  FileSystem fileSystem=getFileSystem(locationFactory,config);
  if (fileSystem == null) {
    LOG.warn("String_Node_Str");
    return ImmutableList.of();
  }
  String renewer=YarnUtils.getYarnTokenRenewer(config);
  Token<?>[] tokens=fileSystem.addDelegationTokens(renewer,credentials);
  LOG.info("String_Node_Str",Arrays.toString(tokens));
  return tokens == null ? ImmutableList.<Token<?>>of() : ImmutableList.copyOf(tokens);
}

Fixed version (ground truth):
/** 
 * Helper method to get delegation tokens for the given LocationFactory.
 * @param config The hadoop configuration.
 * @param locationFactory The LocationFactory for generating tokens.
 * @param credentials Credentials for storing tokens acquired.
 * @return List of delegation Tokens acquired.TODO: copied from Twill 0.6 YarnUtils for CDAP-5350. Remove after this fix is moved to Twill.
 */
private static List<Token<?>> addDelegationTokens(Configuration config,LocationFactory locationFactory,Credentials credentials) throws IOException {
  if (!UserGroupInformation.isSecurityEnabled()) {
    LOG.debug("String_Node_Str");
    return ImmutableList.of();
  }
  FileSystem fileSystem=getFileSystem(locationFactory,config);
  if (fileSystem == null) {
    LOG.warn("String_Node_Str");
    return ImmutableList.of();
  }
  String renewer=YarnUtils.getYarnTokenRenewer(config);
  Token<?>[] tokens=fileSystem.addDelegationTokens(renewer,credentials);
  LOG.debug("String_Node_Str",Arrays.toString(tokens));
  return tokens == null ? ImmutableList.<Token<?>>of() : ImmutableList.copyOf(tokens);
}
Program: 5315
Project: 5315
Buggy source:
/** 
 * Invoked when an update to secure store is needed.
 */
public SecureStore update(){
  Credentials credentials=refreshCredentials();
  LOG.info("String_Node_Str",credentials.getAllTokens());
  try {
    return YarnSecureStore.create(credentials,UserGroupInformation.getCurrentUser());
  }
 catch (  IOException e) {
    throw Throwables.propagate(e);
  }
}

Fixed version (ground truth):
/** 
 * Invoked when an update to secure store is needed.
 */
public SecureStore update(){
  Credentials credentials=refreshCredentials();
  LOG.debug("String_Node_Str",credentials.getAllTokens());
  try {
    return YarnSecureStore.create(credentials,UserGroupInformation.getCurrentUser());
  }
 catch (  IOException e) {
    throw Throwables.propagate(e);
  }
}
Program: 5316
Project: 5316
Buggy source:
public static Credentials obtainToken(Credentials credentials){
  ClassLoader hiveClassloader=ExploreUtils.getExploreClassloader();
  ClassLoader contextClassloader=Thread.currentThread().getContextClassLoader();
  Thread.currentThread().setContextClassLoader(hiveClassloader);
  try {
    LOG.info("String_Node_Str");
    Class hiveConfClass=hiveClassloader.loadClass("String_Node_Str");
    Object hiveConf=hiveConfClass.newInstance();
    Class hiveClass=hiveClassloader.loadClass("String_Node_Str");
    @SuppressWarnings("String_Node_Str") Method hiveGet=hiveClass.getMethod("String_Node_Str",hiveConfClass);
    Object hiveObject=hiveGet.invoke(null,hiveConf);
    String user=UserGroupInformation.getCurrentUser().getShortUserName();
    @SuppressWarnings("String_Node_Str") Method getDelegationToken=hiveClass.getMethod("String_Node_Str",String.class,String.class);
    String tokenStr=(String)getDelegationToken.invoke(hiveObject,user,user);
    Token<DelegationTokenIdentifier> delegationToken=new Token<>();
    delegationToken.decodeFromUrlString(tokenStr);
    delegationToken.setService(new Text(HiveAuthFactory.HS2_CLIENT_TOKEN));
    LOG.info("String_Node_Str",delegationToken,delegationToken.getService(),user);
    credentials.addToken(delegationToken.getService(),delegationToken);
    return credentials;
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    throw Throwables.propagate(e);
  }
 finally {
    Thread.currentThread().setContextClassLoader(contextClassloader);
  }
}

Fixed version (ground truth):
public static Credentials obtainToken(Credentials credentials){
  ClassLoader hiveClassloader=ExploreUtils.getExploreClassloader();
  ClassLoader contextClassloader=Thread.currentThread().getContextClassLoader();
  Thread.currentThread().setContextClassLoader(hiveClassloader);
  try {
    Class hiveConfClass=hiveClassloader.loadClass("String_Node_Str");
    Object hiveConf=hiveConfClass.newInstance();
    Class hiveClass=hiveClassloader.loadClass("String_Node_Str");
    @SuppressWarnings("String_Node_Str") Method hiveGet=hiveClass.getMethod("String_Node_Str",hiveConfClass);
    Object hiveObject=hiveGet.invoke(null,hiveConf);
    String user=UserGroupInformation.getCurrentUser().getShortUserName();
    @SuppressWarnings("String_Node_Str") Method getDelegationToken=hiveClass.getMethod("String_Node_Str",String.class,String.class);
    String tokenStr=(String)getDelegationToken.invoke(hiveObject,user,user);
    Token<DelegationTokenIdentifier> delegationToken=new Token<>();
    delegationToken.decodeFromUrlString(tokenStr);
    delegationToken.setService(new Text(HiveAuthFactory.HS2_CLIENT_TOKEN));
    LOG.debug("String_Node_Str",delegationToken,delegationToken.getService(),user);
    credentials.addToken(delegationToken.getService(),delegationToken);
    return credentials;
  }
 catch (  Exception e) {
    throw Throwables.propagate(e);
  }
 finally {
    Thread.currentThread().setContextClassLoader(contextClassloader);
  }
}
Program: 5317
Project: 5317
Buggy source:
/** 
 * Gets a JHS delegation token and stores it in the given Credentials.
 * @return the same Credentials instance as the one given in parameter.
 */
public static Credentials obtainToken(Configuration configuration,Credentials credentials){
  if (!UserGroupInformation.isSecurityEnabled()) {
    return credentials;
  }
  String historyServerAddress=configuration.get("String_Node_Str");
  HostAndPort hostAndPort=HostAndPort.fromString(historyServerAddress);
  try {
    LOG.info("String_Node_Str");
    ResourceMgrDelegate resourceMgrDelegate=new ResourceMgrDelegate(new YarnConfiguration(configuration));
    MRClientCache clientCache=new MRClientCache(configuration,resourceMgrDelegate);
    MRClientProtocol hsProxy=clientCache.getInitializedHSProxy();
    GetDelegationTokenRequest request=new GetDelegationTokenRequestPBImpl();
    request.setRenewer(YarnUtils.getYarnTokenRenewer(configuration));
    InetSocketAddress address=new InetSocketAddress(hostAndPort.getHostText(),hostAndPort.getPort());
    Token<TokenIdentifier> token=ConverterUtils.convertFromYarn(hsProxy.getDelegationToken(request).getDelegationToken(),address);
    credentials.addToken(new Text(token.getService()),token);
    return credentials;
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",hostAndPort,e);
    throw Throwables.propagate(e);
  }
}

Fixed version (ground truth):
/** 
 * Gets a JHS delegation token and stores it in the given Credentials.
 * @return the same Credentials instance as the one given in parameter.
 */
public static Credentials obtainToken(Configuration configuration,Credentials credentials){
  if (!UserGroupInformation.isSecurityEnabled()) {
    return credentials;
  }
  String historyServerAddress=configuration.get("String_Node_Str");
  HostAndPort hostAndPort=HostAndPort.fromString(historyServerAddress);
  try {
    ResourceMgrDelegate resourceMgrDelegate=new ResourceMgrDelegate(new YarnConfiguration(configuration));
    MRClientCache clientCache=new MRClientCache(configuration,resourceMgrDelegate);
    MRClientProtocol hsProxy=clientCache.getInitializedHSProxy();
    GetDelegationTokenRequest request=new GetDelegationTokenRequestPBImpl();
    request.setRenewer(YarnUtils.getYarnTokenRenewer(configuration));
    InetSocketAddress address=new InetSocketAddress(hostAndPort.getHostText(),hostAndPort.getPort());
    Token<TokenIdentifier> token=ConverterUtils.convertFromYarn(hsProxy.getDelegationToken(request).getDelegationToken(),address);
    credentials.addToken(new Text(token.getService()),token);
    LOG.debug("String_Node_Str",token);
    return credentials;
  }
 catch (  Exception e) {
    throw Throwables.propagate(e);
  }
}
Program: 5319
Project: 5319
Buggy source:
/** 
 * Gets a HBase delegation token and stores it in the given Credentials.
 * @return the same Credentials instance as the one given in parameter.
 */
public static Credentials obtainToken(Configuration hConf,Credentials credentials){
  if (!User.isHBaseSecurityEnabled(hConf)) {
    return credentials;
  }
  try {
    Class c=Class.forName("String_Node_Str");
    Method method=c.getMethod("String_Node_Str",Configuration.class);
    Token<? extends TokenIdentifier> token=castToken(method.invoke(null,hConf));
    credentials.addToken(token.getService(),token);
    return credentials;
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    throw Throwables.propagate(e);
  }
}

Fixed version (ground truth):
/** 
 * Gets a HBase delegation token and stores it in the given Credentials.
 * @return the same Credentials instance as the one given in parameter.
 */
public static Credentials obtainToken(Configuration hConf,Credentials credentials){
  if (!User.isHBaseSecurityEnabled(hConf)) {
    return credentials;
  }
  try {
    Class c=Class.forName("String_Node_Str");
    Method method=c.getMethod("String_Node_Str",Configuration.class);
    Token<? extends TokenIdentifier> token=castToken(method.invoke(null,hConf));
    credentials.addToken(token.getService(),token);
    return credentials;
  }
 catch (  Exception e) {
    throw Throwables.propagate(e);
  }
}
Program: 5323
Project: 5323
Buggy source:
private List<MetadataEntry> searchByDefaultIndex(MetadataDataset dataset,String namespaceId,String searchQuery,Set<EntityTypeSimpleName> types){
  return dataset.search(namespaceId,searchQuery,types,SortInfo.DEFAULT,0,Integer.MAX_VALUE,1,null,false,EnumSet.allOf(EntityScope.class)).getResults();
}

Fixed version (ground truth):
private List<MetadataEntry> searchByDefaultIndex(MetadataDataset dataset,String namespaceId,String searchQuery,Set<EntityTypeSimpleName> types) throws BadRequestException {
  return dataset.search(namespaceId,searchQuery,types,SortInfo.DEFAULT,0,Integer.MAX_VALUE,1,null,false,EnumSet.allOf(EntityScope.class)).getResults();
}
Program: 5325
Project: 5325
Buggy source:
@Test public void testInvalidSearchParams() throws Exception {
  NamespaceId namespace=new NamespaceId("String_Node_Str");
  Set<EntityTypeSimpleName> targets=EnumSet.allOf(EntityTypeSimpleName.class);
  try {
    searchMetadata(namespace,"String_Node_Str",targets,AbstractSystemMetadataWriter.ENTITY_NAME_KEY);
    Assert.fail();
  }
 catch (  BadRequestException e) {
  }
  try {
    searchMetadata(namespace,"String_Node_Str",targets,"String_Node_Str");
    Assert.fail();
  }
 catch (  BadRequestException e) {
  }
  try {
    searchMetadata(namespace,"String_Node_Str",targets,AbstractSystemMetadataWriter.ENTITY_NAME_KEY + "String_Node_Str");
    Assert.fail();
  }
 catch (  BadRequestException e) {
  }
  try {
    searchMetadata(NamespaceId.DEFAULT,"String_Node_Str",targets,null,0,Integer.MAX_VALUE,1,null);
    Assert.fail();
  }
 catch (  BadRequestException e) {
  }
  try {
    searchMetadata(NamespaceId.DEFAULT,"String_Node_Str",targets,null,0,Integer.MAX_VALUE,0,"String_Node_Str");
    Assert.fail();
  }
 catch (  BadRequestException e) {
  }
}

Fixed version (ground truth):
@Test public void testInvalidSearchParams() throws Exception {
  NamespaceId namespace=new NamespaceId("String_Node_Str");
  Set<EntityTypeSimpleName> targets=EnumSet.allOf(EntityTypeSimpleName.class);
  try {
    searchMetadata(namespace,"String_Node_Str",targets,AbstractSystemMetadataWriter.ENTITY_NAME_KEY);
    Assert.fail();
  }
 catch (  BadRequestException e) {
  }
  try {
    searchMetadata(namespace,"String_Node_Str",targets,"String_Node_Str");
    Assert.fail();
  }
 catch (  BadRequestException e) {
  }
  try {
    searchMetadata(namespace,"String_Node_Str",targets,AbstractSystemMetadataWriter.ENTITY_NAME_KEY + "String_Node_Str");
    Assert.fail();
  }
 catch (  BadRequestException e) {
  }
  try {
    searchMetadata(NamespaceId.DEFAULT,"String_Node_Str",targets,null,0,Integer.MAX_VALUE,1,null);
    Assert.fail();
  }
 catch (  BadRequestException e) {
  }
  try {
    searchMetadata(NamespaceId.DEFAULT,"String_Node_Str",targets,null,0,Integer.MAX_VALUE,0,"String_Node_Str");
    Assert.fail();
  }
 catch (  BadRequestException e) {
  }
  try {
    searchMetadata(NamespaceId.DEFAULT,"String_Node_Str");
    Assert.fail();
  }
 catch (  BadRequestException e) {
  }
}
Program: 5328
Project: 5328
Buggy source:
@Override protected void startUp() throws Exception {
  LOG.info("String_Node_Str");
  httpService=new CommonNettyHttpServiceBuilder(cConf,Constants.Service.METADATA_SERVICE).addHttpHandlers(handlers).setHandlerHooks(ImmutableList.of(new MetricsReporterHook(metricsCollectionService,Constants.Service.METADATA_SERVICE))).setHost(cConf.get(Constants.Metadata.SERVICE_BIND_ADDRESS)).setPort(cConf.getInt(Constants.Metadata.SERVICE_BIND_PORT)).setWorkerThreadPoolSize(cConf.getInt(Constants.Metadata.SERVICE_WORKER_THREADS)).setExecThreadPoolSize(cConf.getInt(Constants.Metadata.SERVICE_EXEC_THREADS)).setConnectionBacklog(20000).build();
  httpService.addListener(new ServiceListenerAdapter(){
    private Cancellable cancellable;
    @Override public void running(){
      final InetSocketAddress socketAddress=httpService.getBindAddress();
      LOG.info("String_Node_Str",socketAddress);
      cancellable=discoveryService.register(ResolvingDiscoverable.of(new Discoverable(Constants.Service.METADATA_SERVICE,socketAddress)));
    }
    @Override public void terminated(    State from){
      LOG.info("String_Node_Str");
      cancellable.cancel();
    }
    @Override public void failed(    State from,    Throwable failure){
      LOG.info("String_Node_Str",failure);
      cancellable.cancel();
    }
  }
,Threads.SAME_THREAD_EXECUTOR);
  httpService.startAndWait();
}

Fixed version (ground truth):
@Override protected void startUp() throws Exception {
  LOG.info("String_Node_Str");
  metadataUpgrader.createOrUpgradeIfNecessary();
  httpService=new CommonNettyHttpServiceBuilder(cConf,Constants.Service.METADATA_SERVICE).addHttpHandlers(handlers).setHandlerHooks(ImmutableList.of(new MetricsReporterHook(metricsCollectionService,Constants.Service.METADATA_SERVICE))).setHost(cConf.get(Constants.Metadata.SERVICE_BIND_ADDRESS)).setPort(cConf.getInt(Constants.Metadata.SERVICE_BIND_PORT)).setWorkerThreadPoolSize(cConf.getInt(Constants.Metadata.SERVICE_WORKER_THREADS)).setExecThreadPoolSize(cConf.getInt(Constants.Metadata.SERVICE_EXEC_THREADS)).setConnectionBacklog(20000).build();
  httpService.addListener(new ServiceListenerAdapter(){
    private Cancellable cancellable;
    @Override public void running(){
      final InetSocketAddress socketAddress=httpService.getBindAddress();
      LOG.info("String_Node_Str",socketAddress);
      cancellable=discoveryService.register(ResolvingDiscoverable.of(new Discoverable(Constants.Service.METADATA_SERVICE,socketAddress)));
    }
    @Override public void terminated(    State from){
      LOG.info("String_Node_Str");
      cancellable.cancel();
    }
    @Override public void failed(    State from,    Throwable failure){
      LOG.info("String_Node_Str",failure);
      cancellable.cancel();
    }
  }
,Threads.SAME_THREAD_EXECUTOR);
  httpService.startAndWait();
}
Program: 5329
Project: 5329
Buggy source:
@Inject MetadataService(CConfiguration cConf,MetricsCollectionService metricsCollectionService,DiscoveryService discoveryService,@Named(Constants.Metadata.HANDLERS_NAME) Set<HttpHandler> handlers){
  this.cConf=cConf;
  this.metricsCollectionService=metricsCollectionService;
  this.discoveryService=discoveryService;
  this.handlers=handlers;
}

Fixed version (ground truth):
@Inject MetadataService(CConfiguration cConf,MetricsCollectionService metricsCollectionService,DiscoveryService discoveryService,@Named(Constants.Metadata.HANDLERS_NAME) Set<HttpHandler> handlers,MetadataUpgrader metadataUpgrader){
  this.cConf=cConf;
  this.metricsCollectionService=metricsCollectionService;
  this.discoveryService=discoveryService;
  this.handlers=handlers;
  this.metadataUpgrader=metadataUpgrader;
}
Program: 5330
Project: 5330
Buggy source:
@Override public DatasetSpecification reconfigure(String instanceName,DatasetProperties newProperties,DatasetSpecification currentSpec) throws IncompatibleUpdateException {
  DatasetSpecification indexSpec=currentSpec.getSpecification(METADATA_INDEX_TABLE_NAME);
  String indexColumn=indexSpec.getProperty(IndexedTable.INDEX_COLUMNS_CONF_KEY);
  return DatasetSpecification.builder(instanceName,getName()).properties(newProperties.getProperties()).datasets(AbstractDatasetDefinition.reconfigure(indexedTableDef,METADATA_INDEX_TABLE_NAME,addIndexColumns(newProperties,indexColumn),indexSpec)).build();
}

Fixed version (ground truth):
@Override public DatasetSpecification reconfigure(String instanceName,DatasetProperties newProperties,DatasetSpecification currentSpec) throws IncompatibleUpdateException {
  return configure(instanceName,newProperties);
}
Program: 5331
Project: 5331
Buggy source:
@Inject public DefaultConfigStore(DatasetFramework datasetFramework,TransactionSystemClient txClient){
  this.datasetFramework=datasetFramework;
  this.transactional=Transactions.createTransactionalWithRetry(Transactions.createTransactional(new MultiThreadDatasetCache(new SystemDatasetInstantiator(datasetFramework),txClient,NamespaceId.SYSTEM,ImmutableMap.<String,String>of(),null,null)),RetryStrategies.retryOnConflict(20,100));
}

Fixed version (ground truth):
@Inject public DefaultConfigStore(DatasetFramework datasetFramework,TransactionSystemClient txClient){
  this.datasetFramework=datasetFramework;
  this.transactional=Transactions.createTransactionalWithRetry(Transactions.createTransactional(new MultiThreadDatasetCache(new SystemDatasetInstantiator(datasetFramework),new TransactionSystemClientAdapter(txClient),NamespaceId.SYSTEM,ImmutableMap.<String,String>of(),null,null)),RetryStrategies.retryOnConflict(20,100));
}
Program: 5332
Project: 5332
Buggy source:
@Inject public TransactionHttpHandler(CConfiguration cConf,TransactionSystemClient txClient){
  this.txClient=txClient;
  try {
    this.debugClazz=getClass().getClassLoader().loadClass("String_Node_Str");
    this.debugObject=debugClazz.newInstance();
    Configuration hConf=new Configuration();
    for (    Map.Entry<String,String> entry : cConf) {
      hConf.set(entry.getKey(),entry.getValue());
    }
    Method initMethod=debugClazz.getMethod("String_Node_Str",Configuration.class);
    initMethod.setAccessible(true);
    initMethod.invoke(debugObject,hConf);
  }
 catch (  ClassNotFoundException|IllegalAccessException|InstantiationException ex) {
    LOG.warn("String_Node_Str",ex);
    this.debugClazz=null;
  }
catch (  NoSuchMethodException|InvocationTargetException ex) {
    LOG.warn("String_Node_Str",ex);
    this.debugClazz=null;
  }
}

Fixed version (ground truth):
@Inject public TransactionHttpHandler(CConfiguration cConf,TransactionSystemClient txClient){
  this.txClient=new TransactionSystemClientAdapter(txClient);
  try {
    this.debugClazz=getClass().getClassLoader().loadClass("String_Node_Str");
    this.debugObject=debugClazz.newInstance();
    Configuration hConf=new Configuration();
    for (    Map.Entry<String,String> entry : cConf) {
      hConf.set(entry.getKey(),entry.getValue());
    }
    Method initMethod=debugClazz.getMethod("String_Node_Str",Configuration.class);
    initMethod.setAccessible(true);
    initMethod.invoke(debugObject,hConf);
  }
 catch (  ClassNotFoundException|IllegalAccessException|InstantiationException ex) {
    LOG.warn("String_Node_Str",ex);
    this.debugClazz=null;
  }
catch (  NoSuchMethodException|InvocationTargetException ex) {
    LOG.warn("String_Node_Str",ex);
    this.debugClazz=null;
  }
}
Program: 5333
Project: 5333
Buggy source:
@Inject ArtifactStore(DatasetFramework datasetFramework,NamespacedLocationFactory namespacedLocationFactory,LocationFactory locationFactory,TransactionSystemClient txClient,Impersonator impersonator){
  this.locationFactory=locationFactory;
  this.namespacedLocationFactory=namespacedLocationFactory;
  this.datasetFramework=datasetFramework;
  this.transactional=Transactions.createTransactionalWithRetry(Transactions.createTransactional(new MultiThreadDatasetCache(new SystemDatasetInstantiator(datasetFramework),txClient,META_ID.getParent(),Collections.<String,String>emptyMap(),null,null)),RetryStrategies.retryOnConflict(20,100));
  this.impersonator=impersonator;
}

Fixed version (ground truth):
@Inject ArtifactStore(DatasetFramework datasetFramework,NamespacedLocationFactory namespacedLocationFactory,LocationFactory locationFactory,TransactionSystemClient txClient,Impersonator impersonator){
  this.locationFactory=locationFactory;
  this.namespacedLocationFactory=namespacedLocationFactory;
  this.datasetFramework=datasetFramework;
  this.transactional=Transactions.createTransactionalWithRetry(Transactions.createTransactional(new MultiThreadDatasetCache(new SystemDatasetInstantiator(datasetFramework),new TransactionSystemClientAdapter(txClient),META_ID.getParent(),Collections.<String,String>emptyMap(),null,null)),RetryStrategies.retryOnConflict(20,100));
  this.impersonator=impersonator;
}
Program: 5334
Project: 5334
Buggy source:
@Inject public DefaultStore(CConfiguration conf,DatasetFramework framework,TransactionSystemClient txClient){
  this.configuration=conf;
  this.dsFramework=framework;
  this.transactional=Transactions.createTransactionalWithRetry(Transactions.createTransactional(new MultiThreadDatasetCache(new SystemDatasetInstantiator(framework),txClient,NamespaceId.SYSTEM,ImmutableMap.<String,String>of(),null,null)),RetryStrategies.retryOnConflict(20,100));
}

Fixed version (ground truth):
@Inject public DefaultStore(CConfiguration conf,DatasetFramework framework,TransactionSystemClient txClient){
  this.configuration=conf;
  this.dsFramework=framework;
  this.transactional=Transactions.createTransactionalWithRetry(Transactions.createTransactional(new MultiThreadDatasetCache(new SystemDatasetInstantiator(framework),new TransactionSystemClientAdapter(txClient),NamespaceId.SYSTEM,ImmutableMap.<String,String>of(),null,null)),RetryStrategies.retryOnConflict(20,100));
}
Program: 5335
Project: 5335
Buggy source:
@Inject public MDSStreamMetaStore(DatasetFramework dsFramework,TransactionSystemClient txClient){
  this.datasetFramework=dsFramework;
  this.transactional=Transactions.createTransactionalWithRetry(Transactions.createTransactional(new MultiThreadDatasetCache(new SystemDatasetInstantiator(datasetFramework),txClient,NamespaceId.SYSTEM,ImmutableMap.<String,String>of(),null,null)),RetryStrategies.retryOnConflict(20,100));
}

Fixed version (ground truth):
@Inject public MDSStreamMetaStore(DatasetFramework dsFramework,TransactionSystemClient txClient){
  this.datasetFramework=dsFramework;
  this.transactional=Transactions.createTransactionalWithRetry(Transactions.createTransactional(new MultiThreadDatasetCache(new SystemDatasetInstantiator(datasetFramework),new TransactionSystemClientAdapter(txClient),NamespaceId.SYSTEM,ImmutableMap.<String,String>of(),null,null)),RetryStrategies.retryOnConflict(20,100));
}