nus-yam/ex-repair huggingface dataset:
Program: 33447
Project: 33447
Buggy source:
public static void acceptPromisedValue(String promiseHandle,Object value) throws NoSuchObjectException, OrphanedObjectException {
  checkNonEmpty(promiseHandle,"String_Node_Str");
  Key key=KeyFactory.stringToKey(promiseHandle);
  Slot slot=null;
  for (int i=0; i < 5; i++) {
    try {
      slot=backEnd.querySlot(key,false);
    }
 catch (    NoSuchObjectException e) {
      try {
        Thread.sleep(((long)Math.pow(2.0,i)) * 1000L);
      }
 catch (      InterruptedException f) {
      }
    }
  }
  if (null == slot) {
    throw new NoSuchObjectException("String_Node_Str" + promiseHandle);
  }
  Key generatorJobKey=slot.getGeneratorJobKey();
  if (null == generatorJobKey) {
    throw new RuntimeException("String_Node_Str" + slot);
  }
  JobRecord generatorJob=backEnd.queryJob(generatorJobKey,JobRecord.InflationType.NONE);
  if (null == generatorJob) {
    throw new RuntimeException("String_Node_Str" + "String_Node_Str" + generatorJobKey);
  }
  String childGraphGuid=generatorJob.getChildGraphGuid();
  if (null == childGraphGuid) {
    throw new NoSuchObjectException("String_Node_Str" + "String_Node_Str");
  }
  if (!childGraphGuid.equals(slot.getGraphGuid())) {
    throw new OrphanedObjectException(promiseHandle);
  }
  UpdateSpec updateSpec=new UpdateSpec(slot.getRootJobKey());
  registerSlotFilled(updateSpec,generatorJob.getQueueSettings(),slot,value);
  backEnd.save(updateSpec,generatorJob.getQueueSettings());
}

Fixed version (ground truth):
public static void acceptPromisedValue(String promiseHandle,Object value) throws NoSuchObjectException, OrphanedObjectException {
  checkNonEmpty(promiseHandle,"String_Node_Str");
  Key key=KeyFactory.stringToKey(promiseHandle);
  Slot slot=null;
  int attempts=0;
  boolean interrupted=false;
  try {
    while (slot == null) {
      attempts++;
      try {
        slot=backEnd.querySlot(key,false);
      }
 catch (      NoSuchObjectException e) {
        if (attempts >= 5) {
          throw new NoSuchObjectException("String_Node_Str" + promiseHandle);
        }
        try {
          Thread.sleep((long)Math.pow(2.0,attempts - 1) * 1000L);
        }
 catch (        InterruptedException f) {
          interrupted=true;
        }
      }
    }
  }
  finally {
    if (interrupted) {
      Thread.currentThread().interrupt();
    }
  }
  Key generatorJobKey=slot.getGeneratorJobKey();
  if (null == generatorJobKey) {
    throw new RuntimeException("String_Node_Str" + slot);
  }
  JobRecord generatorJob=backEnd.queryJob(generatorJobKey,JobRecord.InflationType.NONE);
  if (null == generatorJob) {
    throw new RuntimeException("String_Node_Str" + "String_Node_Str" + generatorJobKey);
  }
  String childGraphGuid=generatorJob.getChildGraphGuid();
  if (null == childGraphGuid) {
    throw new NoSuchObjectException("String_Node_Str" + "String_Node_Str");
  }
  if (!childGraphGuid.equals(slot.getGraphGuid())) {
    throw new OrphanedObjectException(promiseHandle);
  }
  UpdateSpec updateSpec=new UpdateSpec(slot.getRootJobKey());
  registerSlotFilled(updateSpec,generatorJob.getQueueSettings(),slot,value);
  backEnd.save(updateSpec,generatorJob.getQueueSettings());
}
Program: 33448
Project: 33448
Buggy source:
/** 
 * Delete up to N entities of the specified kind, with the specified rootJobKey
 * @return The number of entities deleted.
 */
private int deleteN(String kind,Key rootJobKey,int n){
  if (n < 1) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  logger.info("String_Node_Str" + n + "String_Node_Str"+ kind+ "String_Node_Str"+ rootJobKey);
  List<Key> keyList=new LinkedList<>();
  FetchOptions fetchOptions=FetchOptions.Builder.withLimit(n).chunkSize(500);
  for (  Entity entity : queryAll(kind,rootJobKey,true,fetchOptions)) {
    keyList.add(entity.getKey());
  }
  dataStore.delete(keyList);
  return keyList.size();
}

Fixed version (ground truth):
/** 
 * Delete up to N entities of the specified kind, with the specified rootJobKey
 * @return The number of entities deleted.
 */
private int deleteN(String kind,Key rootJobKey,int n){
  if (n < 1) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  logger.info("String_Node_Str" + n + "String_Node_Str"+ kind+ "String_Node_Str"+ rootJobKey);
  List<Key> keyList=new LinkedList<>();
  FetchOptions fetchOptions=FetchOptions.Builder.withLimit(n).chunkSize(500);
  for (  Entity entity : queryAll(kind,rootJobKey,true,fetchOptions)) {
    keyList.add(entity.getKey());
  }
  if (!keyList.isEmpty()) {
    dataStore.delete(keyList);
  }
  return keyList.size();
}
Program: 33449
Project: 33449
Buggy source:
private TaskOptions toTaskOptions(Task task){
  QueueSettings queueSettings=task.getQueueSettings();
  TaskOptions taskOptions=TaskOptions.Builder.withUrl(TaskHandler.HANDLE_TASK_URL);
  if (queueSettings.getOnBackend() != null) {
    taskOptions.header("String_Node_Str",BackendServiceFactory.getBackendService().getBackendAddress(queueSettings.getOnBackend()));
  }
 else {
    ModulesService service=ModulesServiceFactory.getModulesService();
    String module=queueSettings.getOnModule();
    String version=queueSettings.getModuleVersion();
    if (module == null) {
      module=service.getCurrentModule();
      version=service.getCurrentVersion();
    }
    taskOptions.header("String_Node_Str",service.getModuleHostname(module,version));
  }
  addProperties(taskOptions,task.toProperties());
  String taskName=task.getName();
  if (null != taskName) {
    taskOptions.taskName(taskName);
  }
  Long delayInSeconds=queueSettings.getDelayInSeconds();
  if (null != delayInSeconds) {
    taskOptions.countdownMillis(delayInSeconds * 1000L);
  }
  return taskOptions;
}

Fixed version (ground truth):
private TaskOptions toTaskOptions(Task task){
  QueueSettings queueSettings=task.getQueueSettings();
  TaskOptions taskOptions=TaskOptions.Builder.withUrl(TaskHandler.HANDLE_TASK_URL);
  if (queueSettings.getOnBackend() != null) {
    taskOptions.header("String_Node_Str",BackendServiceFactory.getBackendService().getBackendAddress(queueSettings.getOnBackend()));
  }
 else {
    ModulesService service=ModulesServiceFactory.getModulesService();
    String module=queueSettings.getOnModule();
    String version=queueSettings.getModuleVersion();
    if (module == null) {
      module=service.getCurrentModule();
      version=service.getCurrentVersion();
    }
    taskOptions.header("String_Node_Str",service.getModuleHostname(module,version));
  }
  Long delayInSeconds=queueSettings.getDelayInSeconds();
  if (null != delayInSeconds) {
    taskOptions.countdownMillis(delayInSeconds * 1000L);
    queueSettings.setDelayInSeconds(null);
  }
  addProperties(taskOptions,task.toProperties());
  String taskName=task.getName();
  if (null != taskName) {
    taskOptions.taskName(taskName);
  }
  return taskOptions;
}
Program: 33450
Project: 33450
Buggy source:
private void asyncAskUserForName(final String handle){
  final PipelineService service=PipelineServiceFactory.newPipelineService();
  Thread thread=new Thread(){
    @Override public void run(){
      String name=callback.getUserName();
      try {
        service.submitPromisedValue(handle,name);
      }
 catch (      NoSuchObjectException e) {
        throw new RuntimeException(e);
      }
catch (      OrphanedObjectException f) {
        return;
      }
    }
  }
;
  thread.start();
}

Fixed version (ground truth):
private void asyncAskUserForName(final String handle){
  final PipelineService service=PipelineServiceFactory.newPipelineService();
  Thread thread=new Thread(){
    @Override public void run(){
      try {
        Thread.sleep(2000);
      }
 catch (      InterruptedException e) {
        throw new RuntimeException(e);
      }
      String name=callback.getUserName();
      try {
        service.submitPromisedValue(handle,name);
      }
 catch (      NoSuchObjectException e) {
        throw new RuntimeException(e);
      }
catch (      OrphanedObjectException f) {
        return;
      }
    }
  }
;
  thread.start();
}
Program: 33451
Project: 33451
Buggy source:
private JobRecord(Key key,Job<?> jobInstance,JobSetting[] settings){
  this(key,key,null,null,jobInstance,false,settings);
  if (queueSettings.getOnBackend() == null && queueSettings.getOnModule() == null) {
    ModulesService modulesService=ModulesServiceFactory.getModulesService();
    String currentModule=modulesService.getCurrentModule();
    queueSettings.setOnModule(currentModule);
    queueSettings.setModuleVersion(modulesService.getDefaultVersion(currentModule));
  }
}

Fixed version (ground truth):
private JobRecord(Key key,Job<?> jobInstance,JobSetting[] settings){
  this(key,key,null,null,jobInstance,false,settings);
  if (queueSettings.getOnBackend() == null) {
    ModulesService modulesService=ModulesServiceFactory.getModulesService();
    String currentModule=modulesService.getCurrentModule();
    if (queueSettings.getOnModule() == null) {
      queueSettings.setOnModule(currentModule);
      queueSettings.setModuleVersion(modulesService.getCurrentVersion());
    }
 else     if (queueSettings.getOnModule().equals(currentModule)) {
      queueSettings.setModuleVersion(modulesService.getCurrentVersion());
    }
 else {
      String version=modulesService.getDefaultVersion(queueSettings.getOnModule());
      queueSettings.setModuleVersion(version);
    }
  }
}
Program: 33453
Project: 33453
Buggy source:
public List<Object> buildArgumentList(){
  if (null == waitingOnInflated) {
    throw new RuntimeException("String_Node_Str" + this + "String_Node_Str");
  }
  List<Object> argumentList=new LinkedList<Object>();
  ArrayList<Object> currentListArg=null;
  int currentListArgExpectedSize=-1;
  for (  SlotDescriptor descriptor : waitingOnInflated) {
    if (!descriptor.slot.isFilled()) {
      throw new RuntimeException("String_Node_Str" + descriptor.slot);
    }
    Object nextValue=descriptor.slot.getValue();
    if (currentListArg != null) {
      if (descriptor.groupSize != currentListArgExpectedSize) {
        throw new RuntimeException("String_Node_Str" + currentListArgExpectedSize + "String_Node_Str"+ descriptor.groupSize+ "String_Node_Str"+ nextValue);
      }
      currentListArg.add(nextValue);
    }
 else {
      if (descriptor.groupSize > 0) {
        currentListArgExpectedSize=descriptor.groupSize;
        currentListArg=new ArrayList<Object>(currentListArgExpectedSize);
        currentListArg.add(nextValue);
        argumentList.add(currentListArg);
      }
 else       if (descriptor.groupSize == 0) {
        argumentList.add(nextValue);
      }
 else {
      }
    }
    if (null != currentListArg && currentListArg.size() == currentListArgExpectedSize) {
      currentListArg=null;
      currentListArgExpectedSize=-1;
    }
  }
  return argumentList;
}

Fixed version (ground truth):
public List<Object> buildArgumentList(){
  if (null == waitingOnInflated) {
    throw new RuntimeException("String_Node_Str" + this + "String_Node_Str");
  }
  List<Object> argumentList=new LinkedList<Object>();
  ArrayList<Object> currentListArg=null;
  int currentListArgExpectedSize=-1;
  for (  SlotDescriptor descriptor : waitingOnInflated) {
    if (!descriptor.slot.isFilled()) {
      throw new RuntimeException("String_Node_Str" + descriptor.slot);
    }
    Object nextValue=descriptor.slot.getValue();
    if (currentListArg != null) {
      if (descriptor.groupSize != currentListArgExpectedSize + 1) {
        throw new RuntimeException("String_Node_Str" + currentListArgExpectedSize + "String_Node_Str"+ descriptor.groupSize+ "String_Node_Str"+ nextValue);
      }
      currentListArg.add(nextValue);
    }
 else {
      if (descriptor.groupSize > 0) {
        currentListArgExpectedSize=descriptor.groupSize - 1;
        currentListArg=new ArrayList<Object>(currentListArgExpectedSize);
        argumentList.add(currentListArg);
      }
 else       if (descriptor.groupSize == 0) {
        argumentList.add(nextValue);
      }
 else {
      }
    }
    if (null != currentListArg && currentListArg.size() == currentListArgExpectedSize) {
      currentListArg=null;
      currentListArgExpectedSize=-1;
    }
  }
  return argumentList;
}
Program: 33454
Project: 33454
Buggy source:
public void addListArgumentSlots(List<Slot> slotList){
  int groupSize=slotList.size();
  if (groupSize < 1) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  for (  Slot slot : slotList) {
    addSlotDescriptor(new SlotDescriptor(slot,groupSize));
  }
}

Fixed version (ground truth):
/** 
 * Adds multiple slots to this barrier's waiting-on list representing a single Job argument of type list.
 * @param dummySlot A slot representing the list as a whole. It is necessaryto add this slot to the barrier to handle the case that the length of the list is zero. In that case no other slots will be added and the presence of this slot indicates the existence of the empty list. This slot should be already registered as filled because the barrier will be waiting on it. It does not matter what value the slot is filled with because the value will not be used.
 * @param slotList A list of slots that will be added to the barrier and usedas the elements of the list Job argument.
 */
public void addListArgumentSlots(Slot initialSlot,List<Slot> slotList){
  int groupSize=slotList.size() + 1;
  if (!initialSlot.isFilled()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  addSlotDescriptor(new SlotDescriptor(initialSlot,groupSize));
  for (  Slot slot : slotList) {
    addSlotDescriptor(new SlotDescriptor(slot,groupSize));
  }
}
Program: 33455
Project: 33455
Buggy source:
private void doArgumentBuildingTest(Object[] expectedArguments,Object... slotValues){
  Barrier barrier=Barrier.dummyInstanceForTesting();
  for (  Object value : slotValues) {
    if (value instanceof ListMarker) {
      List<?> valueList=((ListMarker)value).valueList;
      List<Slot> slotList=new ArrayList<Slot>(valueList.size());
      for (      Object v : valueList) {
        Slot slot=Slot.dummyInstanceForTesting();
        slot.fill(v);
        slotList.add(slot);
      }
      barrier.addListArgumentSlots(slotList);
    }
 else     if (value instanceof PhantomMarker) {
      Slot slot=Slot.dummyInstanceForTesting();
      slot.fill(((PhantomMarker)value).value);
      barrier.addPhantomArgumentSlot(slot);
    }
 else {
      Slot slot=Slot.dummyInstanceForTesting();
      slot.fill(value);
      barrier.addRegularArgumentSlot(slot);
    }
  }
  Object[] arguments=barrier.buildArgumentArray();
  assertEqualArrays(expectedArguments,arguments);
}

Fixed version (ground truth):
private void doArgumentBuildingTest(Object[] expectedArguments,Object... slotValues){
  Barrier barrier=Barrier.dummyInstanceForTesting();
  for (  Object value : slotValues) {
    if (value instanceof ListMarker) {
      List<?> valueList=((ListMarker)value).valueList;
      List<Slot> slotList=new ArrayList<Slot>(valueList.size());
      Slot dummyListSlot=Slot.dummyInstanceForTesting();
      dummyListSlot.fill(null);
      for (      Object v : valueList) {
        Slot slot=Slot.dummyInstanceForTesting();
        slot.fill(v);
        slotList.add(slot);
      }
      barrier.addListArgumentSlots(dummyListSlot,slotList);
    }
 else     if (value instanceof PhantomMarker) {
      Slot slot=Slot.dummyInstanceForTesting();
      slot.fill(((PhantomMarker)value).value);
      barrier.addPhantomArgumentSlot(slot);
    }
 else {
      Slot slot=Slot.dummyInstanceForTesting();
      slot.fill(value);
      barrier.addRegularArgumentSlot(slot);
    }
  }
  Object[] arguments=barrier.buildArgumentArray();
  assertEqualArrays(expectedArguments,arguments);
}
Program: 33456
Project: 33456
Buggy source:
/** 
 * This is the non-type-safe version of the   {@code futureCall()} family ofmethods. Normally a user will not need to invoke this method directly. Instead, one of the type-safe methods such as {@link #futureCall(Job2,Value,Value,JobSetting)} should be used. Theonly reason a user should invoke this method directly is if  {@code jobInstance} is a direct subclass of {@code Job} instead of being asubclass of one of the  {@code Jobn} classes and the {@code run()} method of{@code jobInstance} takes more arguments than the greatest {@code n} suchthat the framework offers a  {@code Jobn} class.
 * @param < T > The return type of the child job being specified
 * @param settings
 * @param jobInstance The user-written job object
 * @param params The parameters to be passed to the {@code run} method of thejob
 * @return a {@code FutureValue} representing an empty value slot that will befilled by the output of  {@code jobInstance} when it finalizes. Thismay be passed in to further invocations of  {@code futureCall()} inorder to specify a data dependency.
 */
protected <T>FutureValue<T> futureCallUnchecked(JobSetting[] settings,Job<?> jobInstance,Object... params){
  JobRecord childJobRecord=PipelineManager.registerNewJob(updateSpec,settings,thisJobRecord,jobInstance,params);
  return new FutureValueImpl<T>(childJobRecord.getOutputSlotInflated());
}

Fixed version (ground truth):
/** 
 * This is the non-type-safe version of the   {@code futureCall()} family ofmethods. Normally a user will not need to invoke this method directly. Instead, one of the type-safe methods such as {@link #futureCall(Job2,Value,Value,JobSetting)} should be used. Theonly reason a user should invoke this method directly is if {@code jobInstance} is a direct subclass of {@code Job} instead of being asubclass of one of the  {@code Jobn} classes and the {@code run()} method of{@code jobInstance} takes more arguments than the greatest {@code n} suchthat the framework offers a  {@code Jobn} class.
 * @param < T > The return type of the child job being specified
 * @param settings
 * @param jobInstance The user-written job object
 * @param params The parameters to be passed to the {@code run} method of thejob
 * @return a {@code FutureValue} representing an empty value slot that will befilled by the output of  {@code jobInstance} when it finalizes. Thismay be passed in to further invocations of  {@code futureCall()} inorder to specify a data dependency.
 */
protected <T>FutureValue<T> futureCallUnchecked(JobSetting[] settings,Job<?> jobInstance,Object... params){
  JobRecord childJobRecord=PipelineManager.registerNewJobRecord(updateSpec,settings,thisJobRecord,currentRunGUID,jobInstance,params);
  thisJobRecord.appendChildKey(childJobRecord.getKey());
  return new FutureValueImpl<T>(childJobRecord.getOutputSlotInflated());
}
Program: 33457
Project: 33457
Buggy source:
/** 
 * Invoke this method from within the   {@code run} method of a <b>generatorjob</b> in order to declare that some value will be provided asynchronously by some external agent.
 * @param < F > The type of the asynchronously provided value.
 * @param klass A {@link Class} object used to specify the type of theasynchronously provided value.
 * @return A {@code PromisedValue} that represents an empty value slot thatwill be filled at a later time when the external agent invokes {@link PipelineService#submitPromisedValue(String,Object)}. This may be passed in to further invocations of   {@code futureCall()} inorder to specify a data dependency.
 */
protected <F>PromisedValue<F> newPromise(Class<F> klass){
  PromisedValueImpl<F> promisedValue=new PromisedValueImpl<F>(getPipelineKey());
  updateSpec.includeSlot(promisedValue.getSlot());
  return promisedValue;
}

Fixed version (ground truth):
/** 
 * Invoke this method from within the   {@code run} method of a <b>generatorjob</b> in order to declare that some value will be provided asynchronously by some external agent.
 * @param < F > The type of the asynchronously provided value.
 * @param klass A {@link Class} object used to specify the type of theasynchronously provided value.
 * @return A {@code PromisedValue} that represents an empty value slot thatwill be filled at a later time when the external agent invokes {@link PipelineService#submitPromisedValue(String,Object)}. This may be passed in to further invocations of   {@code futureCall()} inorder to specify a data dependency.
 */
protected <F>PromisedValue<F> newPromise(Class<F> klass){
  PromisedValueImpl<F> promisedValue=new PromisedValueImpl<F>(getPipelineKey(),thisJobRecord.getKey(),currentRunGUID);
  updateSpec.getNonTransactionalGroup().includeSlot(promisedValue.getSlot());
  return promisedValue;
}
Program: 33458
Project: 33458
Buggy source:
/** 
 * Start a new Pipeline by specifying the root job and its arguments This version of the method is for root jobs that take more arguments than are allowed in any of the type-safe versions of   {@code startNewPipeline()}.
 * @param jobInstance A job instance to use as the root job of the Pipeline
 * @param arguments An array of Objects to be used as the arguments of theroot job. The type and number of the arguments must match the arguments of the  {@code run()} method of the job. If possible, it ispreferable to use one of the type-safe versions of  {@code startNewPipeline()} instead of using this method.
 * @param settings Optional {@code JobSettings}. These apply only to the root job
 * @return The pipeline handle. This String uniquely identifies the newlystarted Pipeline. It also uniquely identifies the root job of the Pipeline. The String may be used as an argument to {@link #getJobInfo(String)},   {@link #stopPipeline(String)}, and  {@link #deletePipelineRecords(String,boolean,boolean)}
 */
String startNewPipelineUnchecked(Job<?> jobInstance,Object[] arguments,JobSetting... settings);

Fixed version (ground truth):
/** 
 * Start a new Pipeline by specifying the root job and its arguments This version of the method is for root jobs that take more arguments than are allowed in any of the type-safe versions of   {@code startNewPipeline()}.
 * @param jobInstance A job instance to use as the root job of the Pipeline
 * @param arguments An array of Objects to be used as the arguments of theroot job. The type and number of the arguments must match the arguments of the  {@code run()} method of the job. If possible, it ispreferable to use one of the type-safe versions of {@code startNewPipeline()} instead of using this method.
 * @param settings Optional {@code JobSettings}. These apply only to the root job
 * @return The pipeline handle. This String uniquely identifies the newlystarted Pipeline. It also uniquely identifies the root job of the Pipeline. The String may be used as an argument to {@link #getJobInfo(String)},   {@link #stopPipeline(String)}, and  {@link #deletePipelineRecords(String,boolean,boolean)}
 */
String startNewPipelineUnchecked(Job<?> jobInstance,Object[] arguments,JobSetting... settings);
Program: 33459
Project: 33459
Buggy source:
/** 
 * This method is used to give the framework a value that was provided asynchronously by some external agent and that some job is currently waiting on. We call such a value a   {@link PromisedValue}.
 * @param promiseHandle The unique identifer for the {@link PromisedValue}obtained from   {@link PromisedValue#getHandle()}.
 * @param value The value being submitted to the framework. The type of thevalue must match the type of the  {@link PromisedValue}.
 * @throws NoSuchObjectException If the framework cannot find a{@link PromisedValue} with the specified unique identifier.
 */
void submitPromisedValue(String promiseHandle,Object value) throws NoSuchObjectException ;

Fixed version (ground truth):
/** 
 * This method is used to give the framework a value that is provided asynchronously by some external agent and that some job is currently waiting on. We call such a value a   {@link PromisedValue}.
 * @param promiseHandle The unique identifier for the {@link PromisedValue}obtained during the execution of some job via the method  {@link PromisedValue#getHandle()}.
 * @param value The value being submitted to the framework. The type of thevalue must match the type of the  {@link PromisedValue}.
 * @throws NoSuchObjectException If the framework cannot find a{@link PromisedValue} identified by {@code promiseHandel}. This exception may indicate that this method is being invoked too soon. The thread that created the   {@link PromisedValue} referenced by{@code promiseHandle} may not have finished running the associatedjob and saving the  {@link PromisedValue} yet and this would explainwhy the framework does not yet have an object with the given handle. For this reason, this exception should be caught by the caller and this method should be attempted again after waiting some time. If the caller has good reason to believe that he has waited long enough for the other thread to have completed its work, then this method may indicate that the Pipeline has somehow become corrupted and the caller should give up.
 * @throws OrphanedObjectException If the {@link PromisedValue} reference by{@code promiseHandle} has been orphaned during some failedexecution of a job. In this case the caller should not attempt to use  {@code promiseHandle} again. Most likely a different successfulexecution of the same job generated a different promise handle, and some other thread will be submitting the promised value via that non-orphaned handle.
 */
void submitPromisedValue(String promiseHandle,Object value) throws NoSuchObjectException, OrphanedObjectException ;
Program: 33460
Project: 33460
Buggy source:
public String getPipelineHandle(){
  return KeyFactory.keyToString(slot.getRootJobKey());
}

Fixed version (ground truth):
@Override public String getPipelineHandle(){
  return KeyFactory.keyToString(slot.getRootJobKey());
}
Program: 33461
Project: 33461
Buggy source:
public String getSourceJobHandle(){
  return KeyFactory.keyToString(slot.getSourceJobKey());
}

Fixed version (ground truth):
@Override public String getSourceJobHandle(){
  return KeyFactory.keyToString(slot.getSourceJobKey());
}
Program: 33462
Project: 33462
Buggy source:
/** 
 * main
 * @param args
 */
public static void main(String[] args){
  InvertBinaryTree test=new InvertBinaryTree();
  TreeNode t=new TreeNode(4);
  Queue<TreeNode> s=new LinkedList<TreeNode>();
  s.offer(t);
  int[] arr=new int[]{4,2,7,1,3,6,9};
  init(s,arr,1);
  test.invertTree(t);
  inOrder(t);
  assertThat(INORDER_TRAVERSE_STR,is("String_Node_Str"));
}

Fixed version (ground truth):
public static void main(String[] args){
  InvertBinaryTree test=new InvertBinaryTree();
  int[] arr=new int[]{4,2,7,1,3,6,9};
  TreeNode root=TreeNodeHelper.init(arr);
  test.invertTree(root);
  String output=TreeNodeHelper.inOrderTraversal(root);
  System.out.println(output);
  assertThat(output,is("String_Node_Str"));
}
Program: 33463
Project: 33463
Buggy source:
/** 
 * 反转二叉树实现
 * @param root
 * @return inverted tree root node
 */
public TreeNode invertTree(TreeNode root){
  if (root == null) {
    return root;
  }
  TreeNode temp=root.right;
  root.right=root.left;
  root.left=temp;
  invertTree(root.left);
  invertTree(root.right);
  return root;
}

Fixed version (ground truth):
/** 
 * 反转二叉树实现
 * @param root 根节点
 * @return inverted tree root node
 */
public TreeNode invertTree(TreeNode root){
  if (root == null) {
    return null;
  }
  TreeNode temp=root.right;
  root.right=root.left;
  root.left=temp;
  invertTree(root.left);
  invertTree(root.right);
  return root;
}
Program: 33465
Project: 33465
Buggy source:
/** 
 * @return Whether it is possible for the child view of this layout toscroll left or right. Override this if the child view is a custom view.
 */
private static boolean canViewScrollHorizontally(View view,MotionEvent event,int direction){
  boolean ret;
  event.offsetLocation(view.getScrollX() - view.getLeft(),view.getScrollY() - view.getTop());
  if (android.os.Build.VERSION.SDK_INT < 14) {
    if (view instanceof ViewPager) {
      ret=((ViewPager)view).canScrollHorizontally(direction);
    }
 else {
      ret=view.getScrollX() * direction > 0;
    }
  }
 else {
    ret=ViewCompat.canScrollHorizontally(view,direction) || ViewCompat.canScrollHorizontally(view,-1 * direction);
  }
  ret=ret || canChildrenScroolHorizontally(view,event,direction);
  if (DEBUG)   Log.d(TAG,"String_Node_Str" + view.getClass().getName() + "String_Node_Str"+ ret);
  return ret;
}

Fixed version (ground truth):
/** 
 * @param direction Negative to check scrolling left, positive to check scrolling right.
 * @return Whether it is possible for the child view of this layout toscroll left or right. Override this if the child view is a custom view.
 */
private static boolean canViewScrollHorizontally(View view,MotionEvent event,int direction){
  boolean ret;
  event.offsetLocation(view.getScrollX() - view.getLeft(),view.getScrollY() - view.getTop());
  if (android.os.Build.VERSION.SDK_INT < 14) {
    if (view instanceof ViewPager) {
      ret=((ViewPager)view).canScrollHorizontally(direction);
    }
 else {
      ret=view.getScrollX() * direction > 0;
    }
  }
 else {
    ret=ViewCompat.canScrollHorizontally(view,direction);
  }
  ret=ret || canChildrenScroolHorizontally(view,event,direction);
  if (DEBUG)   Log.d(TAG,"String_Node_Str" + view.getClass().getName() + "String_Node_Str"+ ret);
  return ret;
}
Program: 33467
Project: 33467
Buggy source:
private static boolean canChildrenScroolHorizontally(View view,MotionEvent event,int direction){
  if (view instanceof ViewGroup) {
    final ViewGroup viewgroup=(ViewGroup)view;
    int count=viewgroup.getChildCount();
    for (int i=0; i < count; ++i) {
      View child=viewgroup.getChildAt(i);
      Rect bounds=new Rect();
      child.getHitRect(bounds);
      if (bounds.contains((int)event.getX(),(int)event.getY())) {
        if (DEBUG)         Log.d(TAG,"String_Node_Str" + child.getClass().getName());
        return canViewScrollHorizontally(child,event,direction);
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private static boolean canChildrenScroolHorizontally(View view,MotionEvent event,int direction){
  if (view instanceof ViewGroup) {
    final ViewGroup viewgroup=(ViewGroup)view;
    int count=viewgroup.getChildCount();
    for (int i=0; i < count; ++i) {
      View child=viewgroup.getChildAt(i);
      Rect bounds=new Rect();
      child.getHitRect(bounds);
      if (DEBUG)       Log.d(TAG,"String_Node_Str" + child.getClass().getName() + "String_Node_Str"+ bounds.toShortString());
      if (bounds.contains((int)event.getX(),(int)event.getY())) {
        if (DEBUG)         Log.d(TAG,"String_Node_Str" + child.getClass().getName());
        return canViewScrollHorizontally(child,event,direction);
      }
    }
  }
  return false;
}
Program: 33468
Project: 33468
Buggy source:
private void setImageRotation(float rotation){
  int currentapiVersion=android.os.Build.VERSION.SDK_INT;
  if (currentapiVersion >= android.os.Build.VERSION_CODES.HONEYCOMB) {
    mImageView.setRotation(rotation);
  }
 else {
    Drawable imageDrawable=mImageView.getDrawable();
    if (null != imageDrawable) {
      int rotationPivotX=Math.round(imageDrawable.getIntrinsicWidth() / 2f);
      int rotationPivotY=Math.round(imageDrawable.getIntrinsicHeight() / 2f);
      matrix.setRotate(rotation,rotationPivotX,rotationPivotY);
      mImageView.setImageMatrix(matrix);
    }
  }
}

Fixed version (ground truth):
private void setImageRotation(float rotation){
  int currentapiVersion=android.os.Build.VERSION.SDK_INT;
  if (currentapiVersion >= android.os.Build.VERSION_CODES.HONEYCOMB) {
    mImageView.setRotation(rotation);
  }
 else {
    if (mImageView.getTag() == null) {
      mImageView.setTag(0f);
    }
    mImageView.clearAnimation();
    Float lastDegree=(Float)mImageView.getTag();
    RotateAnimation rotate=new RotateAnimation(lastDegree,rotation,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
    mImageView.setTag(rotation);
    rotate.setFillAfter(true);
    mImageView.startAnimation(rotate);
  }
}
Program: 33470
Project: 33470
Buggy source:
protected void setupCustomSwipeRefreshLayout(){
  mCustomSwipeRefreshLayout=(CustomSwipeRefreshLayout)findViewById(R.id.swipelayout);
  mCustomSwipeRefreshLayout.setOnRefreshListener(new CustomSwipeRefreshLayout.OnRefreshListener(){
    @Override public void onRefresh(){
      initiateRefresh();
    }
  }
);
}

Fixed version (ground truth):
protected void setupCustomSwipeRefreshLayout(){
  mCustomSwipeRefreshLayout=(CustomSwipeRefreshLayout)findViewById(R.id.swipelayout);
  mCustomSwipeRefreshLayout.setCustomHeadview(new MyCustomHeadView(this));
  mCustomSwipeRefreshLayout.setOnRefreshListener(new CustomSwipeRefreshLayout.OnRefreshListener(){
    @Override public void onRefresh(){
      initiateRefresh();
    }
  }
);
}
Program: 33475
Project: 33475
Buggy source:
@Override public void mouseClicked(MouseEvent e){
  File srgsFolder=new File(BONFiles.MINECRAFTFORGE_FORGE_FOLDER,forgeVer.getSelectedItem().toString() + File.separator + "String_Node_Str");
  try {
    Repo.loadMappings(srgsFolder);
    inputCC=JarUtils.readFromJar(new File(input.getText()));
    Remapper.remap(inputCC);
    JarUtils.writeToJar(inputCC,new File(output.getText()));
  }
 catch (  Exception ex) {
    throw new RuntimeException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
@Override public void mouseClicked(MouseEvent e){
  File srgsFolder=new File(BONFiles.MINECRAFTFORGE_FORGE_FOLDER,forgeVer.getSelectedItem().toString() + File.separator + "String_Node_Str");
  try {
    Repo.loadMappings(srgsFolder);
    inputCC=JarUtils.readFromJar(new File(input.getText()));
    outputCC=Remapper.remap(inputCC);
    JarUtils.writeToJar(outputCC,new File(output.getText()));
  }
 catch (  Exception ex) {
    throw new RuntimeException("String_Node_Str",ex);
  }
}
Program: 33476
Project: 33476
Buggy source:
public static void loadMappings(File srgsDir) throws IOException {
  File mcpToSrg=new File(srgsDir,"String_Node_Str");
  BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream(mcpToSrg)));
  String line;
  while ((line=br.readLine()) != null) {
    String type=line.substring(0,2);
    Mapping.Type mappingType=Mapping.Type.getByCode(type);
    if (mappingType == Mapping.Type.PACKAGE || mappingType == Mapping.Type.CLASS) {
      continue;
    }
 else     if (mappingType == Mapping.Type.METHOD) {
      String mcpline=line.substring(4,IOUtils.getSecondToLastIndexOf(line,' '));
      String srgLine=line.substring(IOUtils.getSecondToLastIndexOf(line,' ') + 1);
      String mcpName=mcpline.substring(0,mcpline.indexOf(' '));
      String srgName=srgLine.substring(0,srgLine.indexOf(' '));
      repo.put(srgName,new Mapping(mappingType,mcpName,srgName));
    }
 else     if (mappingType == Mapping.Type.FIELD) {
      String mcpLine=line.substring(4,line.lastIndexOf(' '));
      String srgLine=line.substring(line.lastIndexOf(' ') + 1);
      String mcpName=mcpLine.substring(mcpLine.lastIndexOf('/') + 1);
      String srgName=srgLine.substring(srgLine.lastIndexOf('/') + 1);
      repo.put(srgName,new Mapping(mappingType,mcpName,srgName));
    }
  }
  br.close();
}

Fixed version (ground truth):
public static void loadMappings(File srgsDir) throws IOException {
  File mcpToSrg=new File(srgsDir,"String_Node_Str");
  BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream(mcpToSrg)));
  String line;
  while ((line=br.readLine()) != null) {
    String type=line.substring(0,2);
    Mapping.Type mappingType=Mapping.Type.getByCode(type);
    if (mappingType == Mapping.Type.PACKAGE || mappingType == Mapping.Type.CLASS) {
      continue;
    }
 else     if (mappingType == Mapping.Type.METHOD) {
      String mcpline=line.substring(4,IOUtils.getSecondToLastIndexOf(line,' '));
      String srgLine=line.substring(IOUtils.getSecondToLastIndexOf(line,' ') + 1);
      String mcpNameNoSig=mcpline.substring(0,mcpline.indexOf(' '));
      String srgNameNoSig=srgLine.substring(0,srgLine.indexOf(' '));
      String mcpName=mcpNameNoSig.substring(mcpNameNoSig.lastIndexOf('/') + 1);
      String srgName=srgNameNoSig.substring(srgNameNoSig.lastIndexOf('/') + 1);
      repo.put(srgName,new Mapping(mappingType,mcpName,srgName));
    }
 else     if (mappingType == Mapping.Type.FIELD) {
      String mcpLine=line.substring(4,line.lastIndexOf(' '));
      String srgLine=line.substring(line.lastIndexOf(' ') + 1);
      String mcpName=mcpLine.substring(mcpLine.lastIndexOf('/') + 1);
      String srgName=srgLine.substring(srgLine.lastIndexOf('/') + 1);
      repo.put(srgName,new Mapping(mappingType,mcpName,srgName));
    }
  }
  br.close();
}
Program: 33477
Project: 33477
Buggy source:
public static void remap(ClassCollection cc){
  for (  ClassNode classNode : cc.getClasses()) {
    for (    MethodNode method : classNode.methods) {
      if (hasRemap(method.name)) {
        Mapping mapping=getRemap(method.name);
        method.name=mapping.getMcpName().substring(0,mapping.getMcpName().indexOf(' '));
      }
      if (method.instructions != null) {
        for (AbstractInsnNode node=method.instructions.getFirst(); node != null; node.getNext()) {
          if (node instanceof FieldInsnNode) {
            FieldInsnNode field=(FieldInsnNode)node;
            if (hasRemap(field.name)) {
              Mapping mapping=getRemap(field.name);
              field.name=mapping.getMcpName();
            }
          }
 else           if (node instanceof MethodInsnNode) {
            MethodInsnNode methodInsn=(MethodInsnNode)node;
            if (hasRemap(methodInsn.name)) {
              Mapping mapping=getRemap(methodInsn.name);
              methodInsn.name=mapping.getMcpName().substring(0,mapping.getMcpName().indexOf(' '));
            }
          }
        }
      }
    }
    for (    FieldNode field : classNode.fields) {
      if (hasRemap(field.name)) {
        Mapping mapping=getRemap(field.name);
        field.name=mapping.getMcpName();
      }
    }
  }
}

Fixed version (ground truth):
public static ClassCollection remap(ClassCollection cc){
  for (  ClassNode classNode : cc.getClasses()) {
    for (    MethodNode method : classNode.methods) {
      if (hasRemap(method.name)) {
        Mapping mapping=getRemap(method.name);
        method.name=mapping.getMcpName();
      }
      if (method.instructions != null && method.instructions.size() > 0) {
        for (        AbstractInsnNode node : method.instructions.toArray()) {
          if (node instanceof FieldInsnNode) {
            FieldInsnNode field=(FieldInsnNode)node;
            if (hasRemap(field.name)) {
              Mapping mapping=getRemap(field.name);
              field.name=mapping.getMcpName();
            }
          }
 else           if (node instanceof MethodInsnNode) {
            MethodInsnNode methodInsn=(MethodInsnNode)node;
            if (hasRemap(methodInsn.name)) {
              Mapping mapping=getRemap(methodInsn.name);
              methodInsn.name=mapping.getMcpName();
            }
          }
        }
      }
    }
    for (    FieldNode field : classNode.fields) {
      if (hasRemap(field.name)) {
        Mapping mapping=getRemap(field.name);
        field.name=mapping.getMcpName();
      }
    }
  }
  return cc;
}
Program: 33478
Project: 33478
Buggy source:
public static boolean isNumber(Class field){
  return Number.class.getSimpleName().equalsIgnoreCase(field.getSimpleName());
}

Fixed version (ground truth):
public static boolean isNumber(Class field){
  return Number.class.isAssignableFrom(field);
}
Program: 33479
Project: 33479
Buggy source:
/** 
 * @throws ExecutionException
 */
public void closeAllConnections() throws ExecutionException {
synchronized (connections) {
    while (!connections.isEmpty()) {
      for (      Connection connection : connections.values()) {
        if (!connection.hasPendingJobs()) {
          connection.close();
          connections.remove(connection);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @throws ExecutionException
 */
public void closeAllConnections() throws ExecutionException {
synchronized (connections) {
    while (!connections.isEmpty()) {
      for (      Entry<String,Connection> mapConnections : connections.entrySet()) {
        Connection connection=mapConnections.getValue();
        if (!connection.hasPendingJobs()) {
          connection.close();
          connections.remove(mapConnections.getKey());
        }
      }
    }
  }
}
Program: 33480
Project: 33480
Buggy source:
public CatalogMetadataBuilder withOptions(Map<Selector,Selector> opts){
  options=new HashMap<Selector,Selector>(opts);
  return this;
}

Fixed version (ground truth):
/** 
 * Set the options. Any options previously created are removed.
 * @param opts the opts
 * @return the catalog metadata builder
 */
public CatalogMetadataBuilder withOptions(Map<Selector,Selector> opts){
  options=new HashMap<Selector,Selector>(opts);
  return this;
}
Program: 33481
Project: 33481
Buggy source:
public CatalogMetadata build(){
  return new CatalogMetadata(catalogName,options,tables);
}

Fixed version (ground truth):
/** 
 * Builds the CatalogMetadata.
 * @return the catalog metadata
 */
public CatalogMetadata build(){
  return new CatalogMetadata(catalogName,options,tables);
}
Program: 33482
Project: 33482
Buggy source:
public CatalogMetadataBuilder(String catalogName){
  this.catalogName=new CatalogName(catalogName);
  options=null;
  tables=new HashMap<TableName,TableMetadata>();
}

Fixed version (ground truth):
/** 
 * Instantiates a new catalog metadata builder.
 * @param catalogName the catalog name
 */
public CatalogMetadataBuilder(String catalogName){
  this.catalogName=new CatalogName(catalogName);
  options=null;
  tables=new HashMap<TableName,TableMetadata>();
}
Program: 33483
Project: 33483
Buggy source:
public CatalogMetadataBuilder withTables(TableMetadata... tableMetadataList){
  for (  TableMetadata tableMetadata : tableMetadataList) {
    tables.put(tableMetadata.getName(),tableMetadata);
  }
  return this;
}

Fixed version (ground truth):
/** 
 * Adds tables to the catalog.
 * @param tableMetadataList the table metadata list
 * @return the catalog metadata builder
 */
public CatalogMetadataBuilder withTables(TableMetadata... tableMetadataList){
  for (  TableMetadata tableMetadata : tableMetadataList) {
    tables.put(tableMetadata.getName(),tableMetadata);
  }
  return this;
}
Program: 33484
Project: 33484
Buggy source:
/** 
 * parameters in columnMetadata will be null.
 * @param columnName the column name
 * @param colType the col type
 * @return the index metadata builder
 */
public IndexMetadataBuilder addColumn(String columnName,ColumnType colType){
  ColumnName colName=new ColumnName(tableName,columnName);
  ColumnMetadata colMetadata=new ColumnMetadata(colName,null,colType);
  columns.put(colName,colMetadata);
  return this;
}

Fixed version (ground truth):
/** 
 * Add column. Parameters in columnMetadata will be null.
 * @param columnName the column name
 * @param colType the col type
 * @return the index metadata builder
 */
public IndexMetadataBuilder addColumn(String columnName,ColumnType colType){
  ColumnName colName=new ColumnName(tableName,columnName);
  ColumnMetadata colMetadata=new ColumnMetadata(colName,null,colType);
  columns.put(colName,colMetadata);
  return this;
}
Program: 33485
Project: 33485
Buggy source:
/** 
 * With options.
 * @param opts the opts
 * @return the index metadata builder
 */
public IndexMetadataBuilder withOptions(Map<Selector,Selector> opts){
  options=opts;
  return this;
}

Fixed version (ground truth):
/** 
 * Set the options. Any options previously created are removed.
 * @param opts the opts
 * @return the index metadata builder
 */
public IndexMetadataBuilder withOptions(Map<Selector,Selector> opts){
  options=new HashMap<Selector,Selector>(opts);
  return this;
}
Program: 33486
Project: 33486
Buggy source:
/** 
 * Adds the option.
 * @param option the option
 * @param value the value
 * @return the index metadata builder
 */
public IndexMetadataBuilder addOption(String option,Boolean value){
  if (options == null) {
    options=new HashMap<Selector,Selector>();
  }
  options.put(new StringSelector(option),new BooleanSelector(value));
  return this;
}

Fixed version (ground truth):
/** 
 * Adds a new boolean option.
 * @param option the option
 * @param value the value
 * @return the index metadata builder
 */
public IndexMetadataBuilder addOption(String option,Boolean value){
  if (options == null) {
    options=new HashMap<Selector,Selector>();
  }
  options.put(new StringSelector(option),new BooleanSelector(value));
  return this;
}
Program: 33487
Project: 33487
Buggy source:
/** 
 * Builds the.
 * @return the index metadata
 */
public IndexMetadata build(){
  return new IndexMetadata(indexName,columns,indexType,options);
}

Fixed version (ground truth):
/** 
 * Builds the IndexMetadata.
 * @return the index metadata
 */
public IndexMetadata build(){
  return new IndexMetadata(indexName,columns,indexType,options);
}
Program: 33488
Project: 33488
Buggy source:
/** 
 * With columns.
 * @param columnsMetadata the columns metadata
 * @return the index metadata builder
 */
public IndexMetadataBuilder withColumns(List<ColumnMetadata> columnsMetadata){
  for (  ColumnMetadata colMetadata : columnsMetadata) {
    columns.put(colMetadata.getName(),colMetadata);
  }
  return this;
}

Fixed version (ground truth):
/** 
 * Add new columns. The columns previously created are not removed.
 * @param columnsMetadata the columns metadata
 * @return the index metadata builder
 */
public IndexMetadataBuilder withColumns(List<ColumnMetadata> columnsMetadata){
  for (  ColumnMetadata colMetadata : columnsMetadata) {
    columns.put(colMetadata.getName(),colMetadata);
  }
  return this;
}
Program: 33489
Project: 33489
Buggy source:
@After public void tearDown() throws ConnectionException, UnsupportedException, ExecutionException {
  if (deleteBeteweenTest) {
    deleteCatalog(CATALOG);
    dropTable(CATALOG,TABLE);
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str" + CATALOG);
      connector.close(getClusterName());
    }
  }
}

Fixed version (ground truth):
@After public void tearDown() throws ConnectionException, UnsupportedException, ExecutionException {
  if (deleteBeteweenTest) {
    deleteCatalog(CATALOG);
    dropTable(CATALOG,TABLE);
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str" + CATALOG);
    }
  }
  connector.close(getClusterName());
}
Program: 33491
Project: 33491
Buggy source:
private void insertRow(int ikey,int age,int money,ClusterName clusterNodeName,boolean withPk) throws UnsupportedOperationException, ConnectorException {
  Row row=new Row();
  Map<String,Cell> cells=new HashMap<>();
  cells.put(COLUMN_1,new Cell("String_Node_Str" + ikey + "String_Node_Str"));
  cells.put(COLUMN_2,new Cell("String_Node_Str" + ikey + "String_Node_Str"));
  cells.put(COLUMN_3,new Cell("String_Node_Str" + ikey + "String_Node_Str"));
  cells.put(COLUMN_AGE,new Cell(age));
  cells.put(COLUMN_MONEY,new Cell(money));
  TableMetadataBuilder tableMetadataBuilder=new TableMetadataBuilder(CATALOG,TABLE);
  tableMetadataBuilder.addColumn(COLUMN_1,ColumnType.VARCHAR).addColumn(COLUMN_2,ColumnType.VARCHAR).addColumn(COLUMN_3,ColumnType.VARCHAR).addColumn(COLUMN_AGE,ColumnType.INT).addColumn(COLUMN_MONEY,ColumnType.INT);
  if (withPk) {
    tableMetadataBuilder.withPartitionKey(COLUMN_1);
  }
  TableMetadata targetTable=tableMetadataBuilder.build(getConnectorHelper());
  row.setCells(cells);
  connector.getStorageEngine().insert(clusterNodeName,targetTable,row);
}

Fixed version (ground truth):
private void insertRow(int ikey,int age,int money,ClusterName clusterNodeName,boolean withPk) throws UnsupportedOperationException, ConnectorException {
  Row row=new Row();
  Map<String,Cell> cells=new HashMap<>();
  if (withPk) {
    cells.put(COLUMN_KEY,new Cell(ikey));
  }
  cells.put(COLUMN_1,new Cell("String_Node_Str" + ikey + "String_Node_Str"));
  cells.put(COLUMN_2,new Cell("String_Node_Str" + ikey + "String_Node_Str"));
  cells.put(COLUMN_3,new Cell("String_Node_Str" + ikey + "String_Node_Str"));
  cells.put(COLUMN_AGE,new Cell(age));
  cells.put(COLUMN_MONEY,new Cell(money));
  TableMetadataBuilder tableMetadataBuilder=new TableMetadataBuilder(CATALOG,TABLE);
  tableMetadataBuilder.addColumn(COLUMN_1,ColumnType.VARCHAR).addColumn(COLUMN_2,ColumnType.VARCHAR).addColumn(COLUMN_3,ColumnType.VARCHAR).addColumn(COLUMN_AGE,ColumnType.INT).addColumn(COLUMN_MONEY,ColumnType.INT);
  if (withPk) {
    tableMetadataBuilder.withPartitionKey(COLUMN_KEY);
  }
  TableMetadata targetTable=tableMetadataBuilder.build(getConnectorHelper());
  row.setCells(cells);
  connector.getStorageEngine().insert(clusterNodeName,targetTable,row);
}