nus-yam/ex-repair huggingface dataset:
Program: 6231
Project: 6231
Buggy source:
@Override @SuppressWarnings("String_Node_Str") protected void doCommand(String name,Object value) throws Exception {
  if (!ProgramOptionConstants.INSTANCES.equals(name) || !(value instanceof Map)) {
    return;
  }
  Map<String,String> command=(Map<String,String>)value;
  lock.lock();
  try {
    for (    Map.Entry<String,String> entry : command.entrySet()) {
      changeInstances(entry.getKey(),Integer.valueOf(entry.getValue()));
    }
  }
 catch (  Throwable t) {
    LOG.error(String.format("String_Node_Str",command),t);
  }
 finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") protected void doCommand(String name,Object value) throws Exception {
  if (!ProgramOptionConstants.INSTANCES.equals(name) || !(value instanceof Map)) {
    return;
  }
  Map<String,String> command=(Map<String,String>)value;
  lock.lock();
  try {
    changeInstances(command.get("String_Node_Str"),Integer.valueOf(command.get("String_Node_Str")),Integer.valueOf(command.get("String_Node_Str")));
  }
 catch (  Throwable t) {
    LOG.error(String.format("String_Node_Str",command),t);
    throw t;
  }
 finally {
    lock.unlock();
  }
}
Program: 6232
Project: 6232
Buggy source:
@SuppressWarnings("String_Node_Str") @Override protected void doCommand(String name,Object value) throws Exception {
  if (!ProgramOptionConstants.INSTANCES.equals(name) || !(value instanceof Map)) {
    return;
  }
  Map<String,String> command=(Map<String,String>)value;
  lock.lock();
  try {
    changeInstances(command.get("String_Node_Str"),Integer.valueOf(command.get("String_Node_Str")),GSON.fromJson(command.get("String_Node_Str"),FlowSpecification.class));
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",command,t);
    stop();
  }
 finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected void doCommand(String name,Object value) throws Exception {
  if (!ProgramOptionConstants.INSTANCES.equals(name) || !(value instanceof Map)) {
    return;
  }
  Map<String,String> command=(Map<String,String>)value;
  lock.lock();
  try {
    changeInstances(command.get("String_Node_Str"),Integer.valueOf(command.get("String_Node_Str")),GSON.fromJson(command.get("String_Node_Str"),FlowSpecification.class));
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",command,t);
    stop();
    throw t;
  }
 finally {
    lock.unlock();
  }
}
Program: 6233
Project: 6233
Buggy source:
@SuppressWarnings("String_Node_Str") @Override protected void doCommand(String name,Object value) throws Exception {
  if (!ProgramOptionConstants.INSTANCES.equals(name) || !(value instanceof Map)) {
    return;
  }
  Map<String,String> command=(Map<String,String>)value;
  lock.lock();
  try {
    changeInstances(command.get("String_Node_Str"),Integer.valueOf(command.get("String_Node_Str")),Integer.valueOf(command.get("String_Node_Str")));
  }
 catch (  Throwable t) {
    LOG.error(String.format("String_Node_Str",command),t);
  }
 finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected void doCommand(String name,Object value) throws Exception {
  if (!ProgramOptionConstants.INSTANCES.equals(name) || !(value instanceof Map)) {
    return;
  }
  Map<String,String> command=(Map<String,String>)value;
  lock.lock();
  try {
    changeInstances(command.get("String_Node_Str"),Integer.valueOf(command.get("String_Node_Str")),Integer.valueOf(command.get("String_Node_Str")));
  }
 catch (  Throwable t) {
    LOG.error(String.format("String_Node_Str",command),t);
    throw t;
  }
 finally {
    lock.unlock();
  }
}
Program: 6234
Project: 6234
Buggy source:
@SuppressWarnings("String_Node_Str") @Override protected void doCommand(String name,Object value) throws Exception {
  if (!ProgramOptionConstants.INSTANCES.equals(name) || !(value instanceof Map)) {
    return;
  }
  Map<String,String> command=(Map<String,String>)value;
  try {
    for (    Map.Entry<String,String> entry : command.entrySet()) {
      LOG.info("String_Node_Str",entry.getKey(),entry.getValue());
      changeInstances(entry.getKey(),Integer.valueOf(entry.getValue()));
      LOG.info("String_Node_Str",entry.getKey(),entry.getValue());
    }
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",command,t);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected void doCommand(String name,Object value) throws Exception {
  if (!ProgramOptionConstants.INSTANCES.equals(name) || !(value instanceof Map)) {
    return;
  }
  Map<String,String> command=(Map<String,String>)value;
  try {
    for (    Map.Entry<String,String> entry : command.entrySet()) {
      LOG.info("String_Node_Str",entry.getKey(),entry.getValue());
      changeInstances(entry.getKey(),Integer.valueOf(entry.getValue()));
      LOG.info("String_Node_Str",entry.getKey(),entry.getValue());
    }
  }
 catch (  Throwable t) {
    LOG.error("String_Node_Str",command,t);
    throw t;
  }
}
Program: 6235
Project: 6235
Buggy source:
@Override @SuppressWarnings("String_Node_Str") protected void doCommand(String name,Object value) throws Exception {
  if (!ProgramOptionConstants.INSTANCES.equals(name) || !(value instanceof Map)) {
    return;
  }
  Map<String,String> command=(Map<String,String>)value;
  lock.lock();
  try {
    changeInstances(command.get("String_Node_Str"),Integer.valueOf(command.get("String_Node_Str")));
  }
 catch (  Throwable t) {
    LOG.error(String.format("String_Node_Str",command),t);
  }
 finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") protected void doCommand(String name,Object value) throws Exception {
  if (!ProgramOptionConstants.INSTANCES.equals(name) || !(value instanceof Map)) {
    return;
  }
  Map<String,String> command=(Map<String,String>)value;
  lock.lock();
  try {
    changeInstances(command.get("String_Node_Str"),Integer.valueOf(command.get("String_Node_Str")));
  }
 catch (  Throwable t) {
    LOG.error(String.format("String_Node_Str",command),t);
    stop();
    throw t;
  }
 finally {
    lock.unlock();
  }
}
Program: 6236
Project: 6236
Buggy source:
private void setServiceInstances(ProgramId programId,int instances) throws ExecutionException, InterruptedException {
  int oldInstances=store.getServiceInstances(programId.toId());
  if (oldInstances != instances) {
    store.setServiceInstances(programId.toId(),instances);
    ProgramRuntimeService.RuntimeInfo runtimeInfo=findRuntimeInfo(programId);
    if (runtimeInfo != null) {
      runtimeInfo.getController().command(ProgramOptionConstants.INSTANCES,ImmutableMap.of(programId.getProgram(),String.valueOf(instances))).get();
    }
  }
}

Fixed version (ground truth):
private void setServiceInstances(ProgramId programId,int instances) throws ExecutionException, InterruptedException {
  int oldInstances=store.getServiceInstances(programId.toId());
  if (oldInstances != instances) {
    store.setServiceInstances(programId.toId(),instances);
    ProgramRuntimeService.RuntimeInfo runtimeInfo=findRuntimeInfo(programId);
    if (runtimeInfo != null) {
      runtimeInfo.getController().command(ProgramOptionConstants.INSTANCES,ImmutableMap.of("String_Node_Str",programId.getProgram(),"String_Node_Str",String.valueOf(instances),"String_Node_Str",String.valueOf(oldInstances))).get();
    }
  }
}
Program: 6237
Project: 6237
Buggy source:
private void setWorkerInstances(ProgramId programId,int instances) throws ExecutionException, InterruptedException {
  int oldInstances=store.getWorkerInstances(programId.toId());
  if (oldInstances != instances) {
    store.setWorkerInstances(programId.toId(),instances);
    ProgramRuntimeService.RuntimeInfo runtimeInfo=findRuntimeInfo(programId);
    if (runtimeInfo != null) {
      runtimeInfo.getController().command(ProgramOptionConstants.INSTANCES,ImmutableMap.of(programId.getProgram(),String.valueOf(instances))).get();
    }
  }
}

Fixed version (ground truth):
private void setWorkerInstances(ProgramId programId,int instances) throws ExecutionException, InterruptedException {
  int oldInstances=store.getWorkerInstances(programId.toId());
  if (oldInstances != instances) {
    store.setWorkerInstances(programId.toId(),instances);
    ProgramRuntimeService.RuntimeInfo runtimeInfo=findRuntimeInfo(programId);
    if (runtimeInfo != null) {
      runtimeInfo.getController().command(ProgramOptionConstants.INSTANCES,ImmutableMap.of("String_Node_Str",programId.getProgram(),"String_Node_Str",String.valueOf(instances),"String_Node_Str",String.valueOf(oldInstances))).get();
    }
  }
}
Program: 6238
Project: 6238
Buggy source:
/** 
 * Wraps the given   {@link Throwable} as a {@link TransactionFailureException} if it is not already an instance of{@link TransactionFailureException}.
 */
public static TransactionFailureException asTransactionFailure(Throwable t){
  if (t instanceof TransactionFailureException) {
    return (TransactionFailureException)t;
  }
  return new TransactionFailureException("String_Node_Str" + t.getMessage(),t);
}

Fixed version (ground truth):
/** 
 * Wraps the given   {@link Throwable} as a {@link TransactionFailureException} if it is not already an instance of{@link TransactionFailureException}.
 * @param t the original exception
 * @param message the exception message to use in case wrapping is needed
 */
public static TransactionFailureException asTransactionFailure(Throwable t,String message){
  if (t instanceof TransactionFailureException) {
    return (TransactionFailureException)t;
  }
  return new TransactionFailureException(message,t);
}
Program: 6239
Project: 6239
Buggy source:
@Override protected Scanner scanPersisted(Scan scan){
  byte[] startRow=scan.getStartRow();
  byte[] stopRow=scan.getStopRow();
  NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,byte[]>>> rowRange=InMemoryTableService.getRowRange(getTableName(),startRow,stopRow,tx == null ? null : tx.getReadPointer());
  NavigableMap<byte[],NavigableMap<byte[],byte[]>> visibleRowRange=getLatestNotExcludedRows(rowRange,tx);
  NavigableMap<byte[],NavigableMap<byte[],byte[]>> rows=unwrapDeletesForRows(visibleRowRange);
  rows=applyFilter(rows,scan.getFilter());
  return new InMemoryScanner(rows.entrySet().iterator());
}

Fixed version (ground truth):
@Override protected Scanner scanPersisted(Scan scan){
  byte[] startRow=scan.getStartRow();
  byte[] stopRow=scan.getStopRow();
  NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,byte[]>>> rowRange=InMemoryTableService.getRowRange(getTableName(),startRow,stopRow,tx == null ? null : tx);
  NavigableMap<byte[],NavigableMap<byte[],byte[]>> visibleRowRange=getLatestNotExcludedRows(rowRange,tx);
  NavigableMap<byte[],NavigableMap<byte[],byte[]>> rows=unwrapDeletesForRows(visibleRowRange);
  rows=applyFilter(rows,scan.getFilter());
  return new InMemoryScanner(rows.entrySet().iterator());
}
Program: 6240
Project: 6240
Buggy source:
private NavigableMap<byte[],byte[]> getInternal(byte[] row,@Nullable byte[][] columns) throws IOException {
  if (tx == null) {
    NavigableMap<byte[],NavigableMap<Long,byte[]>> rowMap=InMemoryTableService.get(getTableName(),row,NO_TX_VERSION);
    return unwrapDeletes(filterByColumns(getLatest(rowMap),columns));
  }
  NavigableMap<byte[],NavigableMap<Long,byte[]>> rowMap=InMemoryTableService.get(getTableName(),row,tx.getReadPointer());
  if (rowMap == null) {
    return EMPTY_ROW_MAP;
  }
  if (!tx.hasExcludes()) {
    return unwrapDeletes(filterByColumns(getLatest(rowMap),columns));
  }
  NavigableMap<byte[],byte[]> result=filterByColumns(getLatestNotExcluded(rowMap,tx),columns);
  return unwrapDeletes(result);
}

Fixed version (ground truth):
private NavigableMap<byte[],byte[]> getInternal(byte[] row,@Nullable byte[][] columns) throws IOException {
  if (tx == null) {
    NavigableMap<byte[],NavigableMap<Long,byte[]>> rowMap=InMemoryTableService.get(getTableName(),row,tx);
    return unwrapDeletes(filterByColumns(getLatest(rowMap),columns));
  }
  NavigableMap<byte[],NavigableMap<Long,byte[]>> rowMap=InMemoryTableService.get(getTableName(),row,tx);
  if (rowMap == null) {
    return EMPTY_ROW_MAP;
  }
  if (!tx.hasExcludes()) {
    return unwrapDeletes(filterByColumns(getLatest(rowMap),columns));
  }
  NavigableMap<byte[],byte[]> result=filterByColumns(getLatestNotExcluded(rowMap,tx),columns);
  return unwrapDeletes(result);
}
Program: 6241
Project: 6241
Buggy source:
private static NavigableMap<byte[],NavigableMap<Long,Update>> getVisible(NavigableMap<byte[],NavigableMap<Long,Update>> rowMap,Long version){
  if (rowMap == null) {
    return null;
  }
  NavigableMap<byte[],NavigableMap<Long,Update>> result=Maps.newTreeMap(Bytes.BYTES_COMPARATOR);
  for (  Map.Entry<byte[],NavigableMap<Long,Update>> column : rowMap.entrySet()) {
    NavigableMap<Long,Update> visbleValues=column.getValue();
    if (version != null) {
      visbleValues=visbleValues.headMap(version,true);
    }
    if (visbleValues.size() > 0) {
      NavigableMap<Long,Update> colMap=createVersionedValuesMap(visbleValues);
      result.put(column.getKey(),colMap);
    }
  }
  return result;
}

Fixed version (ground truth):
private static NavigableMap<byte[],NavigableMap<Long,Update>> getVisible(NavigableMap<byte[],NavigableMap<Long,Update>> rowMap,final Transaction tx){
  if (rowMap == null) {
    return null;
  }
  NavigableMap<byte[],NavigableMap<Long,Update>> result=Maps.newTreeMap(Bytes.BYTES_COMPARATOR);
  for (  Map.Entry<byte[],NavigableMap<Long,Update>> column : rowMap.entrySet()) {
    SortedMap<Long,Update> visbleValues=column.getValue();
    if (tx != null) {
      visbleValues=Maps.filterKeys(visbleValues,new Predicate<Long>(){
        @Override public boolean apply(        Long version){
          return tx.isVisible(version);
        }
      }
);
    }
    if (visbleValues.size() > 0) {
      NavigableMap<Long,Update> colMap=createVersionedValuesMap(visbleValues);
      result.put(column.getKey(),colMap);
    }
  }
  return result;
}
Program: 6242
Project: 6242
Buggy source:
public static synchronized NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,byte[]>>> getRowRange(String tableName,byte[] startRow,byte[] stopRow,Long version){
  ConcurrentNavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,Update>>> tableData=tables.get(tableName);
  NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,Update>>> rows;
  if (startRow == null && stopRow == null) {
    rows=tableData;
  }
 else   if (startRow == null) {
    rows=tableData.headMap(stopRow,false);
  }
 else   if (stopRow == null) {
    rows=tableData.tailMap(startRow,true);
  }
 else {
    rows=tableData.subMap(startRow,true,stopRow,false);
  }
  NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,byte[]>>> result=Maps.newTreeMap(Bytes.BYTES_COMPARATOR);
  for (  Map.Entry<byte[],NavigableMap<byte[],NavigableMap<Long,Update>>> rowMap : rows.entrySet()) {
    NavigableMap<byte[],NavigableMap<Long,Update>> columns=version == null ? rowMap.getValue() : getVisible(rowMap.getValue(),version);
    result.put(copy(rowMap.getKey()),deepCopy(Updates.rowToBytes(columns)));
  }
  return result;
}

Fixed version (ground truth):
public static synchronized NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,byte[]>>> getRowRange(String tableName,byte[] startRow,byte[] stopRow,@Nullable Transaction tx){
  ConcurrentNavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,Update>>> tableData=tables.get(tableName);
  NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,Update>>> rows;
  if (startRow == null && stopRow == null) {
    rows=tableData;
  }
 else   if (startRow == null) {
    rows=tableData.headMap(stopRow,false);
  }
 else   if (stopRow == null) {
    rows=tableData.tailMap(startRow,true);
  }
 else {
    rows=tableData.subMap(startRow,true,stopRow,false);
  }
  NavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,byte[]>>> result=Maps.newTreeMap(Bytes.BYTES_COMPARATOR);
  for (  Map.Entry<byte[],NavigableMap<byte[],NavigableMap<Long,Update>>> rowMap : rows.entrySet()) {
    NavigableMap<byte[],NavigableMap<Long,Update>> columns=tx == null ? rowMap.getValue() : getVisible(rowMap.getValue(),tx);
    result.put(copy(rowMap.getKey()),deepCopy(Updates.rowToBytes(columns)));
  }
  return result;
}
Program: 6243
Project: 6243
Buggy source:
public static synchronized NavigableMap<byte[],NavigableMap<Long,byte[]>> get(String tableName,byte[] row,Long version){
  ConcurrentNavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,Update>>> table=tables.get(tableName);
  Preconditions.checkArgument(table != null,"String_Node_Str" + tableName);
  NavigableMap<byte[],NavigableMap<Long,Update>> rowMap=table.get(row);
  return deepCopy(Updates.rowToBytes(getVisible(rowMap,version)));
}

Fixed version (ground truth):
public static synchronized NavigableMap<byte[],NavigableMap<Long,byte[]>> get(String tableName,byte[] row,@Nullable Transaction tx){
  ConcurrentNavigableMap<byte[],NavigableMap<byte[],NavigableMap<Long,Update>>> table=tables.get(tableName);
  Preconditions.checkArgument(table != null,"String_Node_Str" + tableName);
  NavigableMap<byte[],NavigableMap<Long,Update>> rowMap=table.get(row);
  return deepCopy(Updates.rowToBytes(getVisible(rowMap,tx)));
}
Program: 6244
Project: 6244
Buggy source:
private static NavigableMap<Long,Update> createVersionedValuesMap(NavigableMap<Long,Update> copy){
  NavigableMap<Long,Update> map=Maps.newTreeMap(VERSIONED_VALUE_MAP_COMPARATOR);
  map.putAll(copy);
  return map;
}

Fixed version (ground truth):
private static NavigableMap<Long,Update> createVersionedValuesMap(SortedMap<Long,Update> copy){
  NavigableMap<Long,Update> map=Maps.newTreeMap(VERSIONED_VALUE_MAP_COMPARATOR);
  map.putAll(copy);
  return map;
}
Program: 6245
Project: 6245
Buggy source:
private void verify123(){
  NavigableMap<byte[],NavigableMap<Long,byte[]>> rowFromGet=InMemoryTableService.get("String_Node_Str",new byte[]{1},1L);
  Assert.assertEquals(1,rowFromGet.size());
  Assert.assertArrayEquals(new byte[]{2},rowFromGet.firstEntry().getKey());
  Assert.assertArrayEquals(new byte[]{3},rowFromGet.firstEntry().getValue().get(1L));
}

Fixed version (ground truth):
private void verify123(){
  NavigableMap<byte[],NavigableMap<Long,byte[]>> rowFromGet=InMemoryTableService.get("String_Node_Str",new byte[]{1},new Transaction(1L,2L,new long[0],new long[0],1L));
  Assert.assertEquals(1,rowFromGet.size());
  Assert.assertArrayEquals(new byte[]{2},rowFromGet.firstEntry().getKey());
  Assert.assertArrayEquals(new byte[]{3},rowFromGet.firstEntry().getValue().get(1L));
}
Program: 6247
Project: 6247
Buggy source:
/** 
 * Gets all the plugins of the given type and name available to the given artifact.
 * @param artifactId the id of the artifact to get
 * @param pluginType the type of plugins to get
 * @param pluginName the name of the plugins to get
 * @param scope the scope of the artifact
 * @return list of {@link PluginInfo}
 * @throws NotFoundException if the given artifact does not exist or plugins for that artifact do not exist
 * @throws IOException if a network error occurred
 * @throws UnauthenticatedException if the request is not authorized successfully in the gateway server
 */
public List<PluginInfo> getPluginInfo(Id.Artifact artifactId,String pluginType,String pluginName,ArtifactScope scope) throws IOException, UnauthenticatedException, NotFoundException {
  String path=String.format("String_Node_Str",artifactId.getName(),artifactId.getVersion().getVersion(),pluginType,pluginName);
  URL url=config.resolveNamespacedURLV3(artifactId.getNamespace(),path);
  HttpResponse response=restClient.execute(HttpMethod.GET,url,config.getAccessToken(),HttpURLConnection.HTTP_NOT_FOUND);
  if (response.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) {
    throw new NotFoundException(response.getResponseBodyAsString());
  }
  return ObjectResponse.<List<PluginInfo>>fromJsonBody(response,PLUGIN_INFOS_TYPE).getResponseObject();
}

Fixed version (ground truth):
/** 
 * Gets all the plugins of the given type and name available to the given artifact.
 * @param artifactId the id of the artifact to get
 * @param pluginType the type of plugins to get
 * @param pluginName the name of the plugins to get
 * @param scope the scope of the artifact
 * @return list of {@link PluginInfo}
 * @throws NotFoundException if the given artifact does not exist or plugins for that artifact do not exist
 * @throws IOException if a network error occurred
 * @throws UnauthenticatedException if the request is not authorized successfully in the gateway server
 */
public List<PluginInfo> getPluginInfo(Id.Artifact artifactId,String pluginType,String pluginName,ArtifactScope scope) throws IOException, UnauthenticatedException, NotFoundException {
  String path=String.format("String_Node_Str",artifactId.getName(),artifactId.getVersion().getVersion(),pluginType,pluginName,scope.name());
  URL url=config.resolveNamespacedURLV3(artifactId.getNamespace(),path);
  HttpResponse response=restClient.execute(HttpMethod.GET,url,config.getAccessToken(),HttpURLConnection.HTTP_NOT_FOUND);
  if (response.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) {
    throw new NotFoundException(response.getResponseBodyAsString());
  }
  return ObjectResponse.<List<PluginInfo>>fromJsonBody(response,PLUGIN_INFOS_TYPE).getResponseObject();
}
Program: 6248
Project: 6248
Buggy source:
public SmartWorkflow(PipelineSpec spec,PipelinePlan plan,ApplicationConfigurer applicationConfigurer){
  this.spec=spec;
  this.plan=plan;
  this.applicationConfigurer=applicationConfigurer;
  this.phaseNum=1;
  this.dag=new ControlDag(plan.getPhaseConnections());
  this.dag.flatten();
  this.connectorDatasets=new HashMap<>();
}

Fixed version (ground truth):
public SmartWorkflow(PipelineSpec spec,PipelinePlan plan,ApplicationConfigurer applicationConfigurer){
  this.spec=spec;
  this.plan=plan;
  this.applicationConfigurer=applicationConfigurer;
  this.phaseNum=1;
  this.connectorDatasets=new HashMap<>();
}
Program: 6249
Project: 6249
Buggy source:
@Override protected void configure(){
  setName(NAME);
  setDescription(DESCRIPTION);
  Map<String,String> properties=new HashMap<>();
  properties.put("String_Node_Str",GSON.toJson(spec));
  setProperties(properties);
  String start=dag.getSources().iterator().next();
  addPrograms(start,getConfigurer());
}

Fixed version (ground truth):
@Override protected void configure(){
  setName(NAME);
  setDescription(DESCRIPTION);
  Map<String,String> properties=new HashMap<>();
  properties.put("String_Node_Str",GSON.toJson(spec));
  setProperties(properties);
  if (plan.getPhaseConnections().isEmpty()) {
    if (plan.getPhases().size() == 1) {
      addProgram(plan.getPhases().keySet().iterator().next(),new TrunkProgramAdder(getConfigurer()));
      return;
    }
    WorkflowForkConfigurer forkConfigurer=getConfigurer().fork();
    for (    String phaseName : plan.getPhases().keySet()) {
      addProgram(phaseName,new BranchProgramAdder(forkConfigurer));
    }
    forkConfigurer.join();
    return;
  }
  dag=new ControlDag(plan.getPhaseConnections());
  dag.flatten();
  String start=dag.getSources().iterator().next();
  addPrograms(start,getConfigurer());
}
Program: 6251
Project: 6251
Buggy source:
@Override public PluginClass deserialize(JsonElement json,Type typeOfT,JsonDeserializationContext context) throws JsonParseException {
  if (!json.isJsonObject()) {
    throw new JsonParseException("String_Node_Str");
  }
  JsonObject jsonObj=json.getAsJsonObject();
  String type=jsonObj.has("String_Node_Str") ? jsonObj.get("String_Node_Str").getAsString() : Plugin.DEFAULT_TYPE;
  String name=getRequired(jsonObj,"String_Node_Str").getAsString();
  String description=jsonObj.has("String_Node_Str") ? jsonObj.get("String_Node_Str").getAsString() : "String_Node_Str";
  String className=getRequired(jsonObj,"String_Node_Str").getAsString();
  JsonArray endpoints=getRequired(jsonObj,"String_Node_Str").getAsJsonArray();
  Set<String> endpointsSet=new HashSet<>();
  Iterator<JsonElement> iterator=endpoints.iterator();
  while (iterator.hasNext()) {
    endpointsSet.add(iterator.next().getAsString());
  }
  Map<String,PluginPropertyField> properties=jsonObj.has("String_Node_Str") ? context.<Map<String,PluginPropertyField>>deserialize(jsonObj.get("String_Node_Str"),PROPERTIES_TYPE) : ImmutableMap.<String,PluginPropertyField>of();
  return new PluginClass(type,name,description,className,null,properties,endpointsSet);
}

Fixed version (ground truth):
@Override public PluginClass deserialize(JsonElement json,Type typeOfT,JsonDeserializationContext context) throws JsonParseException {
  if (!json.isJsonObject()) {
    throw new JsonParseException("String_Node_Str");
  }
  JsonObject jsonObj=json.getAsJsonObject();
  String type=jsonObj.has("String_Node_Str") ? jsonObj.get("String_Node_Str").getAsString() : Plugin.DEFAULT_TYPE;
  String name=getRequired(jsonObj,"String_Node_Str").getAsString();
  String description=jsonObj.has("String_Node_Str") ? jsonObj.get("String_Node_Str").getAsString() : "String_Node_Str";
  String className=getRequired(jsonObj,"String_Node_Str").getAsString();
  Set<String> endpointsSet=new HashSet<>();
  if (jsonObj.has("String_Node_Str")) {
    endpointsSet=context.deserialize(jsonObj.get("String_Node_Str"),ENDPOINTS_TYPE);
  }
  Map<String,PluginPropertyField> properties=jsonObj.has("String_Node_Str") ? context.<Map<String,PluginPropertyField>>deserialize(jsonObj.get("String_Node_Str"),PROPERTIES_TYPE) : ImmutableMap.<String,PluginPropertyField>of();
  return new PluginClass(type,name,description,className,null,properties,endpointsSet);
}
Program: 6252
Project: 6252
Buggy source:
@Override public PartitionConsumerResult doConsume(ConsumerWorkingSet workingSet,PartitionAcceptor acceptor){
  doExpiry(workingSet);
  workingSet.populate(getPartitionedFileSet(),getConfiguration());
  long now=System.currentTimeMillis();
  List<PartitionDetail> toConsume=new ArrayList<>();
  List<? extends ConsumablePartition> partitions=workingSet.getPartitions();
  for (  ConsumablePartition consumablePartition : partitions) {
    if (ProcessState.AVAILABLE != consumablePartition.getProcessState()) {
      continue;
    }
    PartitionDetail partition=getPartitionedFileSet().getPartition(consumablePartition.getPartitionKey());
    PartitionAcceptor.Return accept=acceptor.accept(partition);
switch (accept) {
case ACCEPT:
      consumablePartition.take();
    consumablePartition.setTimestamp(now);
  toConsume.add(partition);
continue;
case SKIP:
continue;
case STOP:
break;
}
}
return new PartitionConsumerResult(toConsume,removeDiscardedPartitions(workingSet));
}

Fixed version (ground truth):
@Override public PartitionConsumerResult doConsume(ConsumerWorkingSet workingSet,PartitionAcceptor acceptor){
  doExpiry(workingSet);
  workingSet.populate(getPartitionedFileSet(),getConfiguration());
  long now=System.currentTimeMillis();
  List<PartitionDetail> toConsume=new ArrayList<>();
  List<? extends ConsumablePartition> partitions=workingSet.getPartitions();
  for (  ConsumablePartition consumablePartition : partitions) {
    if (ProcessState.AVAILABLE != consumablePartition.getProcessState()) {
      continue;
    }
    PartitionDetail partition=getPartitionedFileSet().getPartition(consumablePartition.getPartitionKey());
    if (partition == null) {
      continue;
    }
    PartitionAcceptor.Return accept=acceptor.accept(partition);
switch (accept) {
case ACCEPT:
      consumablePartition.take();
    consumablePartition.setTimestamp(now);
  toConsume.add(partition);
continue;
case SKIP:
continue;
case STOP:
break;
}
}
return new PartitionConsumerResult(toConsume,removeDiscardedPartitions(workingSet));
}
Program: 6253
Project: 6253
Buggy source:
@Test public void testDeployApplicationInNamespace() throws Exception {
  Id.Namespace namespace=createNamespace("String_Node_Str");
  ClientConfig clientConfig=new ClientConfig.Builder(getClientConfig()).build();
  deployApplication(namespace,TestApplication.class);
  ClientConfig defaultClientConfig=new ClientConfig.Builder(getClientConfig()).build();
  Assert.assertEquals(0,new ApplicationClient(defaultClientConfig).list(Id.Namespace.DEFAULT).size());
  ApplicationClient applicationClient=new ApplicationClient(clientConfig);
  Assert.assertEquals("String_Node_Str",applicationClient.list(namespace).get(0).getName());
  applicationClient.delete(Id.Application.from(namespace,"String_Node_Str"));
  Assert.assertEquals(0,new ApplicationClient(clientConfig).list(namespace).size());
}

Fixed version (ground truth):
@Test public void testDeployApplicationInNamespace() throws Exception {
  Id.Namespace namespace=createNamespace("String_Node_Str");
  ClientConfig clientConfig=new ClientConfig.Builder(getClientConfig()).build();
  deployApplication(namespace,TestApplication.class);
  ClientConfig defaultClientConfig=new ClientConfig.Builder(getClientConfig()).build();
  Assert.assertEquals(0,new ApplicationClient(defaultClientConfig).list(Id.Namespace.DEFAULT).size());
  ApplicationClient applicationClient=new ApplicationClient(clientConfig);
  Assert.assertEquals(TestApplication.NAME,applicationClient.list(namespace).get(0).getName());
  applicationClient.delete(Id.Application.from(namespace,TestApplication.NAME));
  Assert.assertEquals(0,new ApplicationClient(clientConfig).list(namespace).size());
}
Program: 6254
Project: 6254
Buggy source:
@Override protected void configureFlow(){
  setName(NAME);
  setDescription("String_Node_Str");
  addFlowlet("String_Node_Str",new TestFlowlet());
  connectStream(INPUT_STREAM,"String_Node_Str");
}

Fixed version (ground truth):
@Override protected void configureFlow(){
  setName(NAME);
  setDescription("String_Node_Str");
  addFlowlet(TestFlowlet.NAME,new TestFlowlet());
  connectStream(INPUT_STREAM,"String_Node_Str");
}
Program: 6255
Project: 6255
Buggy source:
@Override public ApplicationManager deployApplication(Id.Application appId,AppRequest appRequest) throws Exception {
  appFabricClient.deployApplication(appId,appRequest);
  ArtifactSummary requestedArtifact=appRequest.getArtifact();
  Id.Artifact artifactId=Id.Artifact.from(ArtifactScope.SYSTEM.equals(requestedArtifact.getScope()) ? Id.Namespace.SYSTEM : appId.getNamespace(),requestedArtifact.getName(),requestedArtifact.getVersion());
  ArtifactDetail artifactDetail=artifactRepository.getArtifact(artifactId);
  return appManagerFactory.create(appId,artifactDetail.getDescriptor().getLocation());
}

Fixed version (ground truth):
@Override public ApplicationManager deployApplication(Id.Application appId,AppRequest appRequest) throws Exception {
  appFabricClient.deployApplication(appId,appRequest);
  return appManagerFactory.create(appId);
}
Program: 6256
Project: 6256
Buggy source:
ApplicationManager create(@Assisted("String_Node_Str") Id.Application applicationId,Location deployedJar);

Fixed version (ground truth):
ApplicationManager create(@Assisted("String_Node_Str") Id.Application applicationId);
Program: 6257
Project: 6257
Buggy source:
/** 
 * Constructs a   {@link Schema} from the "key":"schema" pair.
 * @param reader The {@link JsonReader} for streaming json input tokens.
 * @param key The json property name that need to match.
 * @param knownRecords Set of record name already encountered during the reading.
 * @return A {@link Schema} object representing the schema of the json input.
 * @throws IOException When fails to construct a valid schema from the input.
 */
private Schema readInnerSchema(JsonReader reader,String key,Set<String> knownRecords) throws IOException {
  if (!key.equals(reader.nextName())) {
    throw new IOException("String_Node_Str" + key + "String_Node_Str");
  }
  return read(reader,knownRecords);
}

Fixed version (ground truth):
/** 
 * Constructs a   {@link Schema} from the "key":"schema" pair.
 * @param reader The {@link JsonReader} for streaming json input tokens.
 * @param key The json property name that need to match.
 * @param knownRecords Set of record name already encountered during the reading.
 * @return A {@link Schema} object representing the schema of the json input.
 * @throws IOException When fails to construct a valid schema from the input.
 */
private Schema readInnerSchema(JsonReader reader,String key,Map<String,Schema> knownRecords) throws IOException {
  if (!key.equals(reader.nextName())) {
    throw new IOException("String_Node_Str" + key + "String_Node_Str");
  }
  return read(reader,knownRecords);
}
Program: 6258
Project: 6258
Buggy source:
/** 
 * Reads json value and convert it into   {@link Schema} object.
 * @param reader Source of json
 * @param knownRecords Set of record name already encountered during the reading.
 * @return A {@link Schema} reflecting the json.
 * @throws IOException Any error during reading.
 */
private Schema read(JsonReader reader,Set<String> knownRecords) throws IOException {
  JsonToken token=reader.peek();
switch (token) {
case NULL:
    return null;
case STRING:
{
    String name=reader.nextString();
    if (knownRecords.contains(name)) {
      return Schema.recordOf(name);
    }
    return Schema.of(Schema.Type.valueOf(name.toUpperCase()));
  }
case BEGIN_ARRAY:
return readUnion(reader,knownRecords);
case BEGIN_OBJECT:
{
reader.beginObject();
String name=reader.nextName();
if (!"String_Node_Str".equals(name)) {
  throw new IOException("String_Node_Str");
}
Schema.Type schemaType=Schema.Type.valueOf(reader.nextString().toUpperCase());
Schema schema;
switch (schemaType) {
case ENUM:
  schema=readEnum(reader);
break;
case ARRAY:
schema=readArray(reader,knownRecords);
break;
case MAP:
schema=readMap(reader,knownRecords);
break;
case RECORD:
schema=readRecord(reader,knownRecords);
break;
default :
schema=Schema.of(schemaType);
}
reader.endObject();
return schema;
}
}
throw new IOException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Reads json value and convert it into   {@link Schema} object.
 * @param reader Source of json
 * @param knownRecords Set of record name already encountered during the reading.
 * @return A {@link Schema} reflecting the json.
 * @throws IOException Any error during reading.
 */
private Schema read(JsonReader reader,Map<String,Schema> knownRecords) throws IOException {
  JsonToken token=reader.peek();
switch (token) {
case NULL:
    return null;
case STRING:
{
    String name=reader.nextString();
    if (knownRecords.containsKey(name)) {
      Schema schema=knownRecords.get(name);
      return schema == null ? Schema.recordOf(name) : schema;
    }
    return Schema.of(Schema.Type.valueOf(name.toUpperCase()));
  }
case BEGIN_ARRAY:
return readUnion(reader,knownRecords);
case BEGIN_OBJECT:
{
reader.beginObject();
String name=reader.nextName();
if (!"String_Node_Str".equals(name)) {
  throw new IOException("String_Node_Str");
}
Schema.Type schemaType=Schema.Type.valueOf(reader.nextString().toUpperCase());
Schema schema;
switch (schemaType) {
case ENUM:
  schema=readEnum(reader);
break;
case ARRAY:
schema=readArray(reader,knownRecords);
break;
case MAP:
schema=readMap(reader,knownRecords);
break;
case RECORD:
schema=readRecord(reader,knownRecords);
break;
default :
schema=Schema.of(schemaType);
}
reader.endObject();
return schema;
}
}
throw new IOException("String_Node_Str");
}
Program: 6259
Project: 6259
Buggy source:
/** 
 * Constructs   {@link Schema.Type#MAP MAP} type schema from the json input.
 * @param reader The {@link JsonReader} for streaming json input tokens.
 * @param knownRecords Set of record name already encountered during the reading.
 * @return A {@link Schema} of type {@link Schema.Type#MAP MAP}.
 * @throws IOException When fails to construct a valid schema from the input.
 */
private Schema readMap(JsonReader reader,Set<String> knownRecords) throws IOException {
  return Schema.mapOf(readInnerSchema(reader,"String_Node_Str",knownRecords),readInnerSchema(reader,"String_Node_Str",knownRecords));
}

Fixed version (ground truth):
/** 
 * Constructs   {@link Schema.Type#MAP MAP} type schema from the json input.
 * @param reader The {@link JsonReader} for streaming json input tokens.
 * @param knownRecords Set of record name already encountered during the reading.
 * @return A {@link Schema} of type {@link Schema.Type#MAP MAP}.
 * @throws IOException When fails to construct a valid schema from the input.
 */
private Schema readMap(JsonReader reader,Map<String,Schema> knownRecords) throws IOException {
  return Schema.mapOf(readInnerSchema(reader,"String_Node_Str",knownRecords),readInnerSchema(reader,"String_Node_Str",knownRecords));
}
Program: 6260
Project: 6260
Buggy source:
/** 
 * Constructs   {@link Schema.Type#RECORD RECORD} type schema from the json input.
 * @param reader The {@link JsonReader} for streaming json input tokens.
 * @param knownRecords Set of record name already encountered during the reading.
 * @return A {@link Schema} of type {@link Schema.Type#RECORD RECORD}.
 * @throws IOException When fails to construct a valid schema from the input.
 */
private Schema readRecord(JsonReader reader,Set<String> knownRecords) throws IOException {
  if (!"String_Node_Str".equals(reader.nextName())) {
    throw new IOException("String_Node_Str");
  }
  String recordName=reader.nextString();
  if (!"String_Node_Str".equals(reader.nextName())) {
    throw new IOException("String_Node_Str");
  }
  knownRecords.add(recordName);
  List<Schema.Field> fieldBuilder=new ArrayList<>();
  reader.beginArray();
  while (reader.peek() != JsonToken.END_ARRAY) {
    reader.beginObject();
    if (!"String_Node_Str".equals(reader.nextName())) {
      throw new IOException("String_Node_Str");
    }
    String fieldName=reader.nextString();
    fieldBuilder.add(Schema.Field.of(fieldName,readInnerSchema(reader,"String_Node_Str",knownRecords)));
    reader.endObject();
  }
  reader.endArray();
  return Schema.recordOf(recordName,fieldBuilder);
}

Fixed version (ground truth):
/** 
 * Constructs   {@link Schema.Type#RECORD RECORD} type schema from the json input.
 * @param reader The {@link JsonReader} for streaming json input tokens.
 * @param knownRecords Set of record name already encountered during the reading.
 * @return A {@link Schema} of type {@link Schema.Type#RECORD RECORD}.
 * @throws IOException When fails to construct a valid schema from the input.
 */
private Schema readRecord(JsonReader reader,Map<String,Schema> knownRecords) throws IOException {
  if (!"String_Node_Str".equals(reader.nextName())) {
    throw new IOException("String_Node_Str");
  }
  String recordName=reader.nextString();
  if (!"String_Node_Str".equals(reader.nextName())) {
    throw new IOException("String_Node_Str");
  }
  knownRecords.put(recordName,null);
  List<Schema.Field> fieldBuilder=new ArrayList<>();
  reader.beginArray();
  while (reader.peek() != JsonToken.END_ARRAY) {
    reader.beginObject();
    if (!"String_Node_Str".equals(reader.nextName())) {
      throw new IOException("String_Node_Str");
    }
    String fieldName=reader.nextString();
    fieldBuilder.add(Schema.Field.of(fieldName,readInnerSchema(reader,"String_Node_Str",knownRecords)));
    reader.endObject();
  }
  reader.endArray();
  Schema schema=Schema.recordOf(recordName,fieldBuilder);
  knownRecords.put(recordName,schema);
  return schema;
}
Program: 6261
Project: 6261
Buggy source:
/** 
 * Constructs   {@link Schema.Type#ARRAY ARRAY} type schema from the json input.
 * @param reader The {@link JsonReader} for streaming json input tokens.
 * @param knownRecords Set of record name already encountered during the reading.
 * @return A {@link Schema} of type {@link Schema.Type#ARRAY ARRAY}.
 * @throws IOException When fails to construct a valid schema from the input.
 */
private Schema readArray(JsonReader reader,Set<String> knownRecords) throws IOException {
  return Schema.arrayOf(readInnerSchema(reader,"String_Node_Str",knownRecords));
}

Fixed version (ground truth):
/** 
 * Constructs   {@link Schema.Type#ARRAY ARRAY} type schema from the json input.
 * @param reader The {@link JsonReader} for streaming json input tokens.
 * @param knownRecords Set of record name already encountered during the reading.
 * @return A {@link Schema} of type {@link Schema.Type#ARRAY ARRAY}.
 * @throws IOException When fails to construct a valid schema from the input.
 */
private Schema readArray(JsonReader reader,Map<String,Schema> knownRecords) throws IOException {
  return Schema.arrayOf(readInnerSchema(reader,"String_Node_Str",knownRecords));
}
Program: 6262
Project: 6262
Buggy source:
/** 
 * Constructs   {@link Schema.Type#UNION UNION} type schema from the json input.
 * @param reader The {@link JsonReader} for streaming json input tokens.
 * @param knownRecords Set of record name already encountered during the reading.
 * @return A {@link Schema} of type {@link Schema.Type#UNION UNION}.
 * @throws IOException When fails to construct a valid schema from the input.
 */
private Schema readUnion(JsonReader reader,Set<String> knownRecords) throws IOException {
  List<Schema> unionSchemas=new ArrayList<>();
  reader.beginArray();
  while (reader.peek() != JsonToken.END_ARRAY) {
    unionSchemas.add(read(reader,knownRecords));
  }
  reader.endArray();
  return Schema.unionOf(unionSchemas);
}

Fixed version (ground truth):
/** 
 * Constructs   {@link Schema.Type#UNION UNION} type schema from the json input.
 * @param reader The {@link JsonReader} for streaming json input tokens.
 * @param knownRecords Set of record name already encountered during the reading.
 * @return A {@link Schema} of type {@link Schema.Type#UNION UNION}.
 * @throws IOException When fails to construct a valid schema from the input.
 */
private Schema readUnion(JsonReader reader,Map<String,Schema> knownRecords) throws IOException {
  List<Schema> unionSchemas=new ArrayList<>();
  reader.beginArray();
  while (reader.peek() != JsonToken.END_ARRAY) {
    unionSchemas.add(read(reader,knownRecords));
  }
  reader.endArray();
  return Schema.unionOf(unionSchemas);
}
Program: 6264
Project: 6264
Buggy source:
@Override public ProcessLauncher<ApplicationId> createLauncher(String user,TwillSpecification twillSpec,@Nullable String schedulerQueue) throws Exception {
  return createLauncher(twillSpec,schedulerQueue);
}

Fixed version (ground truth):
@Override public ProcessLauncher<ApplicationMasterInfo> createLauncher(String user,TwillSpecification twillSpec,@Nullable String schedulerQueue) throws Exception {
  return createLauncher(twillSpec,schedulerQueue);
}
Program: 6265
Project: 6265
Buggy source:
@Override public ProcessController<YarnApplicationReport> submit(YarnLaunchContext context,Resource capability){
  ContainerLaunchContext launchContext=context.getLaunchContext();
  appSubmissionContext.setAMContainerSpec(launchContext);
  appSubmissionContext.setResource(adjustMemory(response,capability));
  appSubmissionContext.setMaxAppAttempts(2);
  try {
    yarnClient.submitApplication(appSubmissionContext);
    return new ProcessControllerImpl(yarnClient,appId);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",appId,e);
    throw Throwables.propagate(e);
  }
}

Fixed version (ground truth):
@Override public ProcessController<YarnApplicationReport> submit(YarnLaunchContext context){
  ContainerLaunchContext launchContext=context.getLaunchContext();
  appSubmissionContext.setAMContainerSpec(launchContext);
  appSubmissionContext.setResource(capability);
  appSubmissionContext.setMaxAppAttempts(2);
  try {
    yarnClient.submitApplication(appSubmissionContext);
    return new ProcessControllerImpl(yarnClient,appId);
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",appId,e);
    throw Throwables.propagate(e);
  }
}
Program: 6266
Project: 6266
Buggy source:
@Inject public TokenSecureStoreUpdater(YarnConfiguration hConf,CConfiguration cConf,LocationFactory locationFactory){
  this.hConf=hConf;
  this.locationFactory=locationFactory;
  secureExplore=cConf.getBoolean(Constants.Explore.EXPLORE_ENABLED) && UserGroupInformation.isSecurityEnabled();
  credentials=new Credentials();
  updateInterval=calculateUpdateInterval();
}

Fixed version (ground truth):
@Inject public TokenSecureStoreUpdater(YarnConfiguration hConf,CConfiguration cConf,LocationFactory locationFactory){
  this.hConf=hConf;
  this.locationFactory=locationFactory;
  secureExplore=cConf.getBoolean(Constants.Explore.EXPLORE_ENABLED) && UserGroupInformation.isSecurityEnabled();
  updateInterval=calculateUpdateInterval();
}
Program: 6267
Project: 6267
Buggy source:
private void refreshCredentials(){
  try {
    Credentials refreshedCredentials=new Credentials();
    if (User.isSecurityEnabled()) {
      YarnTokenUtils.obtainToken(hConf,refreshedCredentials);
    }
    if (User.isHBaseSecurityEnabled(hConf)) {
      HBaseTokenUtils.obtainToken(hConf,refreshedCredentials);
    }
    if (secureExplore) {
      HiveTokenUtils.obtainToken(refreshedCredentials);
      JobHistoryServerTokenUtils.obtainToken(hConf,refreshedCredentials);
    }
    if (locationFactory instanceof HDFSLocationFactory) {
      YarnUtils.addDelegationTokens(hConf,locationFactory,refreshedCredentials);
    }
 else     if (locationFactory instanceof FileContextLocationFactory) {
      List<Token<?>> tokens=((FileContextLocationFactory)locationFactory).getFileContext().getDelegationTokens(new Path(Locations.toURI(locationFactory.getHomeLocation())),YarnUtils.getYarnTokenRenewer(hConf));
      for (      Token<?> token : tokens) {
        refreshedCredentials.addToken(token.getService(),token);
      }
    }
    credentials=refreshedCredentials;
  }
 catch (  IOException ioe) {
    throw Throwables.propagate(ioe);
  }
}

Fixed version (ground truth):
private Credentials refreshCredentials(){
  try {
    Credentials refreshedCredentials=new Credentials();
    if (User.isSecurityEnabled()) {
      YarnTokenUtils.obtainToken(hConf,refreshedCredentials);
    }
    if (User.isHBaseSecurityEnabled(hConf)) {
      HBaseTokenUtils.obtainToken(hConf,refreshedCredentials);
    }
    if (secureExplore) {
      HiveTokenUtils.obtainToken(refreshedCredentials);
      JobHistoryServerTokenUtils.obtainToken(hConf,refreshedCredentials);
    }
    if (locationFactory instanceof HDFSLocationFactory) {
      YarnUtils.addDelegationTokens(hConf,locationFactory,refreshedCredentials);
    }
 else     if (locationFactory instanceof FileContextLocationFactory) {
      List<Token<?>> tokens=((FileContextLocationFactory)locationFactory).getFileContext().getDelegationTokens(new Path(Locations.toURI(locationFactory.getHomeLocation())),YarnUtils.getYarnTokenRenewer(hConf));
      for (      Token<?> token : tokens) {
        refreshedCredentials.addToken(token.getService(),token);
      }
    }
    return refreshedCredentials;
  }
 catch (  IOException ioe) {
    throw Throwables.propagate(ioe);
  }
}
Program: 6268
Project: 6268
Buggy source:
@Override public SecureStore update(String application,RunId runId){
  long now=System.currentTimeMillis();
  if (now >= nextUpdateTime) {
    nextUpdateTime=now + getUpdateInterval();
    refreshCredentials();
  }
  return YarnSecureStore.create(credentials);
}

Fixed version (ground truth):
@Override public SecureStore update(String application,RunId runId){
  Credentials credentials=refreshCredentials();
  LOG.info("String_Node_Str",credentials.getAllTokens());
  return YarnSecureStore.create(credentials);
}
Program: 6271
Project: 6271
Buggy source:
@Override public ProcessLauncher<ApplicationId> createLauncher(String user,TwillSpecification twillSpec,@Nullable String schedulerQueue) throws Exception {
  return createLauncher(twillSpec,schedulerQueue);
}

Fixed version (ground truth):
@Override public ProcessLauncher<ApplicationMasterInfo> createLauncher(String user,TwillSpecification twillSpec,@Nullable String schedulerQueue) throws Exception {
  return createLauncher(twillSpec,schedulerQueue);
}