nus-yam/ex-repair huggingface dataset:
Program: 87535
Project: 87535
Buggy source:
public static IEMFValueProperty value(FeaturePath featurePath){
  IValueProperty property;
  property=new EMFXtextValueProperty(featurePath.getFeaturePath()[0]);
  IEMFValueProperty featureProperty=new XtextValuePropertyDecorator(property,featurePath.getFeaturePath()[0]);
  for (int i=1; i < featurePath.getFeaturePath().length; i++) {
    featureProperty=featureProperty.value(featurePath.getFeaturePath()[i]);
  }
  return featureProperty;
}

Fixed version (ground truth):
public static IXtextValueProperty value(FeaturePath featurePath){
  IValueProperty property;
  property=new EMFXtextValueProperty(featurePath.getFeaturePath()[0]);
  IXtextValueProperty featureProperty=new XtextValuePropertyDecorator(property,featurePath.getFeaturePath()[0]);
  for (int i=1; i < featurePath.getFeaturePath().length; i++) {
    featureProperty=featureProperty.value(featurePath.getFeaturePath()[i]);
  }
  return featureProperty;
}
Program: 87536
Project: 87536
Buggy source:
@Override protected Object doSafeGetValue(final Object source){
  if (source instanceof IReadAccess<?>) {
    IReadAccess<XtextResource> access=(IReadAccess<XtextResource>)source;
    return access.readOnly(new IUnitOfWork<Object,XtextResource>(){
      @Override public Object exec(      XtextResource resource) throws Exception {
        EObject eObject=resource.getContents().get(0);
        return EMFXtextValueProperty.super.doSafeGetValue(eObject);
      }
    }
);
  }
 else   if (source instanceof Resource) {
    Resource resource=(Resource)source;
    EObject eObject=resource.getContents().get(0);
    return EMFXtextValueProperty.super.doSafeGetValue(eObject);
  }
 else {
    throw new IllegalArgumentException("String_Node_Str" + source);
  }
}

Fixed version (ground truth):
@Override protected Object doSafeGetValue(final Object source){
  SourceAccessor sourceAccessor=(SourceAccessor)source;
  return sourceAccessor.eGet(getFeature());
}
Program: 87537
Project: 87537
Buggy source:
@Override protected void doSafeSetValue(final Object source,final Object value){
  if (source instanceof IWriteAccess<?>) {
    IWriteAccess<XtextResource> access=(IWriteAccess<XtextResource>)source;
    access.modify(new IUnitOfWork.Void<XtextResource>(){
      @Override public void process(      XtextResource state) throws Exception {
        EObject eObject=state.getContents().get(0);
        eObject.eSet(EMFXtextValueProperty.this.getFeature(),value);
      }
    }
);
  }
 else   if (source instanceof Resource) {
    Resource resource=(Resource)source;
    EObject eObject=resource.getContents().get(0);
    eObject.eSet(EMFXtextValueProperty.this.getFeature(),value);
  }
 else {
    throw new IllegalArgumentException("String_Node_Str" + source);
  }
}

Fixed version (ground truth):
@Override protected void doSafeSetValue(final Object source,final Object value){
  SourceAccessor sourceAccessor=(SourceAccessor)source;
  sourceAccessor.eSet(getFeature(),value);
}
Program: 87538
Project: 87538
Buggy source:
@Override public void addTo(Object source){
  if (source != null) {
    getResource(source).eAdapters().add(this);
  }
}

Fixed version (ground truth):
@Override public void addTo(Object source){
  SourceAccessor sourceAccessor=(SourceAccessor)source;
  sourceAccessor.addAdapter(this);
}
Program: 87539
Project: 87539
Buggy source:
@Override public void removeFrom(Object source){
  if (source != null) {
    getResource(source).eAdapters().remove(this);
  }
}

Fixed version (ground truth):
@Override public void removeFrom(Object source){
  SourceAccessor sourceAccessor=(SourceAccessor)source;
  sourceAccessor.removeAdapter(this);
}
Program: 87541
Project: 87541
Buggy source:
@Override public void execute(Object fact,Report context){
  ArrayList<String> matches=new ArrayList<String>();
  matches=getMatches(fact.toString(),pattern);
  if (matches.size() > 0) {
    Log.debug("String_Node_Str" + this + "String_Node_Str"+ fact+ "String_Node_Str");
    try {
      setReport(context);
      setFact(fact);
      executeCommands();
    }
 catch (    Exception e) {
    }
  }
}

Fixed version (ground truth):
@Override public void execute(Object fact,Report context){
  ArrayList<String> matches=new ArrayList<String>();
  matches=getMatches(fact.toString(),pattern);
  if (matches.size() > 0) {
    Log.debug("String_Node_Str" + this + "String_Node_Str"+ fact+ "String_Node_Str");
    setReport(context);
    setFact(fact);
    executeCommands();
  }
}
Program: 87542
Project: 87542
Buggy source:
/** 
 * Returns the query.
 * @return the query
 */
public SopremoPlan getQuery(){
  if (this.query != null || this.planBuffer == null)   return this.query;
  final JobID dummId=new JobID();
  try {
    LibraryCacheManager.register(dummId,this.requiredPackages.toArray(new String[this.requiredPackages.size()]));
    this.query=SopremoUtil.byteArrayToSerializable(this.planBuffer,LibraryCacheManager.getClassLoader(dummId));
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    try {
      LibraryCacheManager.unregister(dummId);
    }
 catch (    IOException e) {
    }
  }
  return this.query;
}

Fixed version (ground truth):
/** 
 * Returns the query.
 * @return the query
 */
public SopremoPlan getQuery(){
  if (this.query != null || this.planBuffer == null)   return this.query;
  final JobID dummId=new JobID();
  try {
    LibraryCacheManager.register(dummId,this.requiredPackages.toArray(new String[this.requiredPackages.size()]));
    this.query=SopremoUtil.byteArrayToSerializable(this.planBuffer,SopremoPlan.class,LibraryCacheManager.getClassLoader(dummId));
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    try {
      LibraryCacheManager.unregister(dummId);
    }
 catch (    IOException e) {
    }
  }
  return this.query;
}
Program: 87543
Project: 87543
Buggy source:
@SuppressWarnings("String_Node_Str") public static <T extends Serializable>T byteArrayToSerializable(byte[] buffer,final ClassLoader classLoader) throws IOException {
  final ObjectInputStream ois=new ObjectInputStream(new ByteArrayInputStream(buffer)){
    @Override protected Class<?> resolveClass(    ObjectStreamClass desc) throws IOException, ClassNotFoundException {
      try {
        return classLoader.loadClass(desc.getName());
      }
 catch (      ClassNotFoundException e) {
        return super.resolveClass(desc);
      }
    }
  }
;
  try {
    return (T)ois.readObject();
  }
 catch (  ClassNotFoundException e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static <T extends Serializable>T byteArrayToSerializable(byte[] buffer,Class<T> clazz,final ClassLoader classLoader) throws IOException {
  final ObjectInputStream ois=new ObjectInputStream(new ByteArrayInputStream(buffer)){
    @Override protected Class<?> resolveClass(    ObjectStreamClass desc) throws IOException, ClassNotFoundException {
      try {
        return classLoader.loadClass(desc.getName());
      }
 catch (      ClassNotFoundException e) {
        return super.resolveClass(desc);
      }
    }
  }
;
  try {
    return (T)ois.readObject();
  }
 catch (  ClassNotFoundException e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}
Program: 87544
Project: 87544
Buggy source:
/** 
 * Deserializes an   {@link Serializable} from a {@link DataInput}.<br> Please note that this method is not very efficient.
 */
public static <T extends Serializable>T deserializeObject(DataInput in,Class<T> clazz) throws IOException {
  byte[] buffer=new byte[in.readInt()];
  in.readFully(buffer);
  return byteArrayToSerializable(buffer,clazz.getClassLoader());
}

Fixed version (ground truth):
/** 
 * Deserializes an   {@link Serializable} from a {@link DataInput}.<br> Please note that this method is not very efficient.
 */
public static <T extends Serializable>T deserializeObject(DataInput in,Class<T> clazz) throws IOException {
  byte[] buffer=new byte[in.readInt()];
  in.readFully(buffer);
  return byteArrayToSerializable(buffer,clazz,clazz.getClassLoader());
}
Program: 87545
Project: 87545
Buggy source:
/** 
 * Tests whether the job manager has been shut down completely.
 * @return <code>true</code> if the job manager has been shut down completely, <code>false</code> otherwise
 */
public boolean isShutDown(){
  return this.isShutDown.get();
}

Fixed version (ground truth):
/** 
 * Tests whether the job manager has been shut down completely.
 * @return <code>true</code> if the job manager has been shut down completely, <code>false</code> otherwise
 */
public boolean isShutDown(){
  return this.isShutDown;
}
Program: 87546
Project: 87546
Buggy source:
public void shutdown(){
  if (this.isShutDown.compareAndSet(false,true)) {
    return;
  }
  if (this.instanceManager != null) {
    this.instanceManager.shutdown();
  }
  DiscoveryService.stopDiscoveryService();
  if (this.profiler != null) {
    this.profiler.shutdown();
  }
  if (this.jobManagerServer != null) {
    this.jobManagerServer.stop();
  }
  if (this.executorService != null) {
    this.executorService.shutdown();
    try {
      this.executorService.awaitTermination(5000L,TimeUnit.MILLISECONDS);
    }
 catch (    InterruptedException e) {
      if (LOG.isDebugEnabled()) {
        LOG.debug(StringUtils.stringifyException(e));
      }
    }
  }
  final Iterator<JobManagerPlugin> it=this.jobManagerPlugins.values().iterator();
  while (it.hasNext()) {
    it.next().shutdown();
  }
  if (this.eventCollector != null) {
    this.eventCollector.shutdown();
  }
  if (this.scheduler != null) {
    this.scheduler.shutdown();
  }
  this.isShutDown.set(true);
  LOG.debug("String_Node_Str");
}

Fixed version (ground truth):
public void shutdown(){
  if (!this.isShutdownInProgress.compareAndSet(false,true)) {
    return;
  }
  if (this.instanceManager != null) {
    this.instanceManager.shutdown();
  }
  DiscoveryService.stopDiscoveryService();
  if (this.profiler != null) {
    this.profiler.shutdown();
  }
  if (this.jobManagerServer != null) {
    this.jobManagerServer.stop();
  }
  if (this.executorService != null) {
    this.executorService.shutdown();
    try {
      this.executorService.awaitTermination(5000L,TimeUnit.MILLISECONDS);
    }
 catch (    InterruptedException e) {
      if (LOG.isDebugEnabled()) {
        LOG.debug(StringUtils.stringifyException(e));
      }
    }
  }
  final Iterator<JobManagerPlugin> it=this.jobManagerPlugins.values().iterator();
  while (it.hasNext()) {
    it.next().shutdown();
  }
  if (this.eventCollector != null) {
    this.eventCollector.shutdown();
  }
  if (this.scheduler != null) {
    this.scheduler.shutdown();
  }
  this.isShutDown=true;
  LOG.debug("String_Node_Str");
}
Program: 87547
Project: 87547
Buggy source:
private void process(String[] args){
  CommandLine cmd=this.parseOptions(args);
  final SopremoPlan plan=this.parseScript(cmd);
  this.configureClient(cmd);
  this.sopremoClient.submit(plan,new StateListener(){
    @Override public void stateChanged(    ExecutionState executionState,    String detail){
switch (executionState) {
case ENQUEUED:
        System.out.print("String_Node_Str");
      break;
case RUNNING:
    System.out.print("String_Node_Str");
  break;
case FINISHED:
System.out.println("String_Node_Str" + detail);
break;
case ERROR:
System.err.println("String_Node_Str" + detail);
break;
}
}
@Override public void progressUpdate(ExecutionState status,String detail){
super.progressUpdate(status,detail);
System.out.print("String_Node_Str");
}
}
,cmd.hasOption("String_Node_Str"));
this.sopremoClient.close();
}

Fixed version (ground truth):
private void process(String[] args){
  CommandLine cmd=this.parseOptions(args);
  final SopremoPlan plan=this.parseScript(cmd);
  this.configureClient(cmd);
  this.sopremoClient.submit(plan,new StateListener(){
    @Override public void stateChanged(    ExecutionState executionState,    String detail){
      System.out.println();
switch (executionState) {
case ENQUEUED:
        System.out.print("String_Node_Str");
      break;
case RUNNING:
    System.out.print("String_Node_Str");
  break;
case FINISHED:
System.out.print(detail);
break;
case ERROR:
System.out.print(detail);
break;
}
}
@Override protected void stateNotChanged(ExecutionState state,String detail){
System.out.print("String_Node_Str");
}
}
,cmd.hasOption("String_Node_Str"));
this.sopremoClient.close();
}
Program: 87548
Project: 87548
Buggy source:
protected void dealWithError(Exception e,final String message){
  System.err.print(message);
  if (e != null) {
    System.err.print("String_Node_Str");
    System.err.print(e);
  }
  System.err.println();
  System.exit(1);
}

Fixed version (ground truth):
protected void dealWithError(Exception e,final String message,Object... args){
  System.err.print(String.format(message,args));
  if (e != null) {
    System.err.print("String_Node_Str");
    System.err.print(e);
  }
  System.err.println();
  System.exit(1);
}
Program: 87549
Project: 87549
Buggy source:
@Override public void stateChanged(ExecutionState executionState,String detail){
switch (executionState) {
case ENQUEUED:
    System.out.print("String_Node_Str");
  break;
case RUNNING:
System.out.print("String_Node_Str");
break;
case FINISHED:
System.out.println("String_Node_Str" + detail);
break;
case ERROR:
System.err.println("String_Node_Str" + detail);
break;
}
}

Fixed version (ground truth):
@Override public void stateChanged(ExecutionState executionState,String detail){
  System.out.println();
switch (executionState) {
case ENQUEUED:
    System.out.print("String_Node_Str");
  break;
case RUNNING:
System.out.print("String_Node_Str");
break;
case FINISHED:
System.out.print(detail);
break;
case ERROR:
System.out.print(detail);
break;
}
}
Program: 87550
Project: 87550
Buggy source:
private SopremoPlan parseScript(CommandLine cmd){
  File file=new File(cmd.getOptionValue("String_Node_Str"));
  if (!file.exists())   this.dealWithError(null,"String_Node_Str");
  try {
    return new QueryParser().tryParse(new FileInputStream(file));
  }
 catch (  IOException e) {
    this.dealWithError(e,"String_Node_Str");
    return null;
  }
}

Fixed version (ground truth):
private SopremoPlan parseScript(CommandLine cmd){
  File file=new File(cmd.getOptionValue("String_Node_Str"));
  if (!file.exists())   this.dealWithError(null,"String_Node_Str",file);
  try {
    return new QueryParser().tryParse(new FileInputStream(file));
  }
 catch (  IOException e) {
    this.dealWithError(e,"String_Node_Str");
    return null;
  }
}
Program: 87551
Project: 87551
Buggy source:
private void configureClient(CommandLine cmd){
  String configDir=cmd.getOptionValue("String_Node_Str");
  GlobalConfiguration.loadConfiguration(configDir);
  this.sopremoClient=new DefaultClient();
  int updateTime=1000;
  if (cmd.hasOption("String_Node_Str"))   updateTime=Integer.parseInt(cmd.getOptionValue("String_Node_Str"));
  this.sopremoClient.setUpdateTime(updateTime);
  String address=cmd.getOptionValue("String_Node_Str"), port=cmd.getOptionValue("String_Node_Str");
  if (address != null || port != null) {
    this.sopremoClient.setServerAddress(new InetSocketAddress(address == null ? "String_Node_Str" : address,port == null ? SopremoConstants.DEFAULT_SOPREMO_SERVER_IPC_PORT : Integer.parseInt(port)));
  }
  this.sopremoClient.setExecutionMode(ExecutionMode.RUN_WITH_STATISTICS);
}

Fixed version (ground truth):
private void configureClient(CommandLine cmd){
  String configDir=cmd.getOptionValue("String_Node_Str");
  GlobalConfiguration.loadConfiguration(configDir);
  this.sopremoClient=new DefaultClient(GlobalConfiguration.getConfiguration());
  int updateTime=1000;
  if (cmd.hasOption("String_Node_Str"))   updateTime=Integer.parseInt(cmd.getOptionValue("String_Node_Str"));
  this.sopremoClient.setUpdateTime(updateTime);
  String address=cmd.getOptionValue("String_Node_Str"), port=cmd.getOptionValue("String_Node_Str");
  if (address != null || port != null) {
    this.sopremoClient.setServerAddress(new InetSocketAddress(address == null ? "String_Node_Str" : address,port == null ? SopremoConstants.DEFAULT_SOPREMO_SERVER_IPC_PORT : Integer.parseInt(port)));
  }
  this.sopremoClient.setExecutionMode(ExecutionMode.RUN_WITH_STATISTICS);
}
Program: 87554
Project: 87554
Buggy source:
@Override protected void fillArray(IJsonNode[] result){
  this.children.toArray(new IJsonNode[this.children.size()]);
}

Fixed version (ground truth):
@Override protected void fillArray(IJsonNode[] result){
  IJsonNode[] array=this.children.toArray(new IJsonNode[this.children.size()]);
  for (int i=0; i < this.children.size(); i++) {
    result[i]=array[i];
  }
}
Program: 87558
Project: 87558
Buggy source:
@Override protected void computeValidPlanAlternatives(List<? extends OptimizerNode> altSubPlans,CostEstimator estimator,List<OptimizerNode> outputPlans){
  ShipStrategy ss=ShipStrategy.NONE;
  ShipStrategy hintSS=this.inConn.getShipStrategy();
  if (hintSS == ShipStrategy.BROADCAST || hintSS == ShipStrategy.SFR)   return;
 else   ss=hintSS;
  if (ss == ShipStrategy.NONE)   ss=ShipStrategy.FORWARD;
  for (  OptimizerNode subPlan : altSubPlans) {
    GlobalProperties gp=PactConnection.getGlobalPropertiesAfterConnection(subPlan,this,ss);
    LocalProperties lp=PactConnection.getLocalPropertiesAfterConnection(subPlan,this,ss);
    MapNode nMap=new MapNode(this,subPlan,this.inConn,gp,lp);
    nMap.inConn.setShipStrategy(ss);
    nMap.getGlobalProperties().filterByNodesConstantSet(this,0);
    nMap.getLocalProperties().filterByNodesConstantSet(this,0);
    estimator.costOperator(nMap);
    outputPlans.add(nMap);
  }
}

Fixed version (ground truth):
@Override protected void computeValidPlanAlternatives(List<? extends OptimizerNode> altSubPlans,CostEstimator estimator,List<OptimizerNode> outputPlans){
  ShipStrategy ss=ShipStrategy.NONE;
  ShipStrategy hintSS=this.inConn.getShipStrategy();
  if (hintSS == ShipStrategy.BROADCAST || hintSS == ShipStrategy.SFR)   return;
 else   ss=hintSS;
  if (ss == ShipStrategy.NONE)   ss=ShipStrategy.FORWARD;
  for (  OptimizerNode subPlan : altSubPlans) {
    GlobalProperties gp=PactConnection.getGlobalPropertiesAfterConnection(subPlan,this,0,ss);
    LocalProperties lp=PactConnection.getLocalPropertiesAfterConnection(subPlan,this,ss);
    MapNode nMap=new MapNode(this,subPlan,this.inConn,gp,lp);
    nMap.inConn.setShipStrategy(ss);
    nMap.getGlobalProperties().filterByNodesConstantSet(this,0);
    nMap.getLocalProperties().filterByNodesConstantSet(this,0);
    estimator.costOperator(nMap);
    outputPlans.add(nMap);
  }
}
Program: 87564
Project: 87564
Buggy source:
public RandomAccessInputView(ArrayList<MemorySegment> segments,int segmentSize,int limitInLastSegment){
  super(segments.get(0),segmentSize,0);
  this.segments=segments;
  this.currentSegmentIndex=0;
  this.segmentSize=segmentSize;
  this.segmentSizeBits=MathUtils.log2strict(segmentSize);
  this.segmentSizeMask=segmentSize - 1;
  this.limitInLastSegment=limitInLastSegment;
}

Fixed version (ground truth):
public RandomAccessInputView(ArrayList<MemorySegment> segments,int segmentSize,int limitInLastSegment){
  super(segments.get(0),segments.size() > 1 ? segmentSize : limitInLastSegment,0);
  this.segments=segments;
  this.currentSegmentIndex=0;
  this.segmentSize=segmentSize;
  this.segmentSizeBits=MathUtils.log2strict(segmentSize);
  this.segmentSizeMask=segmentSize - 1;
  this.limitInLastSegment=limitInLastSegment;
}
Program: 87565
Project: 87565
Buggy source:
@Override public void setReadPosition(long position){
  final int bufferNum=(int)(position >>> this.segmentSizeBits);
  final int offset=(int)(position & this.segmentSizeMask);
  this.currentSegmentIndex=bufferNum;
  seekInput(this.segments.get(bufferNum),offset,this.segmentSize);
}

Fixed version (ground truth):
@Override public void setReadPosition(long position){
  final int bufferNum=(int)(position >>> this.segmentSizeBits);
  final int offset=(int)(position & this.segmentSizeMask);
  this.currentSegmentIndex=bufferNum;
  seekInput(this.segments.get(bufferNum),offset,bufferNum < this.segments.size() - 1 ? this.segmentSize : this.limitInLastSegment);
}
Program: 87566
Project: 87566
Buggy source:
/** 
 * Creates a new block location
 * @param blockLocation the original HDFS block location
 */
public DistributedBlockLocation(org.apache.hadoop.fs.BlockLocation blockLocation){
  this.blockLocation=blockLocation;
}

Fixed version (ground truth):
/** 
 * Creates a new block location
 * @param blockLocation the original HDFS block location
 */
public DistributedBlockLocation(final org.apache.hadoop.fs.BlockLocation blockLocation){
  this.blockLocation=blockLocation;
}
Program: 87567
Project: 87567
Buggy source:
@Override public long getOffset(){
  return blockLocation.getOffset();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public long getOffset(){
  return this.blockLocation.getOffset();
}
Program: 87568
Project: 87568
Buggy source:
@Override public long getLength(){
  return blockLocation.getLength();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public long getLength(){
  return this.blockLocation.getLength();
}
Program: 87569
Project: 87569
Buggy source:
@Override public int compareTo(BlockLocation o){
  long diff=getOffset() - o.getOffset();
  return diff < 0 ? -1 : diff > 0 ? 1 : 0;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public int compareTo(final BlockLocation o){
  final long diff=getOffset() - o.getOffset();
  return diff < 0 ? -1 : diff > 0 ? 1 : 0;
}
Program: 87570
Project: 87570
Buggy source:
@Override public String[] getHosts() throws IOException {
  return blockLocation.getHosts();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public String[] getHosts() throws IOException {
  if (this.hostnames == null) {
    final String[] hadoopHostnames=blockLocation.getHosts();
    this.hostnames=new String[hadoopHostnames.length];
    for (int i=0; i < hadoopHostnames.length; ++i) {
      this.hostnames[i]=stripHostname(hadoopHostnames[i]);
    }
  }
  return this.hostnames;
}
Program: 87571
Project: 87571
Buggy source:
/** 
 * Checks if another thread requested the vertex to cancel while it was in state STARTING. If so, the method clears the respective flag and repeats the cancel request.
 */
private void checkCancelRequestedFlag(){
  if (this.cancelRequested.compareAndSet(true,false)) {
    final TaskCancelResult tsr=cancelTask();
    if (tsr.getReturnCode() != AbstractTaskResult.ReturnCode.SUCCESS || tsr.getReturnCode() != AbstractTaskResult.ReturnCode.TASK_NOT_FOUND) {
      LOG.error("String_Node_Str" + this + "String_Node_Str"+ tsr.getReturnCode().toString()+ ((tsr.getDescription() != null) ? ("String_Node_Str" + tsr.getDescription() + "String_Node_Str") : "String_Node_Str"));
    }
  }
}

Fixed version (ground truth):
/** 
 * Checks if another thread requested the vertex to cancel while it was in state STARTING. If so, the method clears the respective flag and repeats the cancel request.
 */
private void checkCancelRequestedFlag(){
  if (this.cancelRequested.compareAndSet(true,false)) {
    final TaskCancelResult tsr=cancelTask();
    if (tsr.getReturnCode() != AbstractTaskResult.ReturnCode.SUCCESS && tsr.getReturnCode() != AbstractTaskResult.ReturnCode.TASK_NOT_FOUND) {
      LOG.error("String_Node_Str" + this + "String_Node_Str"+ tsr.getReturnCode().toString()+ ((tsr.getDescription() != null) ? ("String_Node_Str" + tsr.getDescription() + "String_Node_Str") : "String_Node_Str"));
    }
  }
}
Program: 87572
Project: 87572
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void setCompressedDataBuffer(Buffer buffer){
  if (buffer == null) {
    this.compressedBuffer=null;
    this.compressedDataBuffer=null;
    this.compressedDataBufferLength=0;
  }
 else {
    this.compressedDataBuffer=getInternalByteBuffer(buffer);
    this.compressedBuffer=buffer;
    this.compressedDataBufferLength=bufferToInt(this.compressedDataBuffer,0);
    this.uncompressedDataBufferLength=bufferToInt(this.compressedDataBuffer,4);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void setCompressedDataBuffer(final MemoryBuffer buffer){
  if (buffer == null) {
    this.compressedBuffer=null;
    this.compressedDataBuffer=null;
    this.compressedDataBufferLength=0;
  }
 else {
    this.compressedDataBuffer=buffer.getByteBuffer();
    this.compressedBuffer=buffer;
    this.compressedDataBufferLength=bufferToInt(this.compressedDataBuffer,0);
    this.uncompressedDataBufferLength=bufferToInt(this.compressedDataBuffer,4);
  }
}
Program: 87573
Project: 87573
Buggy source:
public String toString(){
  if (this.indexes.size() == 0) {
    return "String_Node_Str";
  }
  final StringBuffer buf=new StringBuffer();
  for (int i=0; i < indexes.size(); i++) {
    if (buf.length() == 0) {
      buf.append("String_Node_Str");
    }
 else {
      buf.append("String_Node_Str");
    }
    buf.append(this.indexes.get(i));
    buf.append("String_Node_Str");
    buf.append(this.types.get(i).getName());
    buf.append("String_Node_Str");
    buf.append(this.orders.get(i).name());
  }
  buf.append("String_Node_Str");
  return buf.toString();
}

Fixed version (ground truth):
public String toString(){
  if (this.indexes.size() == 0) {
    return "String_Node_Str";
  }
  final StringBuffer buf=new StringBuffer();
  for (int i=0; i < indexes.size(); i++) {
    if (buf.length() == 0) {
      buf.append("String_Node_Str");
    }
 else {
      buf.append("String_Node_Str");
    }
    buf.append(this.indexes.get(i));
    if (this.types.get(i) != null) {
      buf.append("String_Node_Str");
      buf.append(this.types.get(i).getName());
    }
    buf.append("String_Node_Str");
    buf.append(this.orders.get(i).name());
  }
  buf.append("String_Node_Str");
  return buf.toString();
}
Program: 87576
Project: 87576
Buggy source:
/** 
 * Creates a copy of the given   {@link IOReadableWritable} object by an in-memory serialization and subsequentdeserialization.
 * @param original the original object to be copied
 * @return the copy of original object created by the original object's serialization/deserialization methods
 * @throws IOException thrown if an error occurs while creating the copy of the object
 */
@SuppressWarnings("String_Node_Str") public static IOReadableWritable createCopy(IOReadableWritable original) throws IOException {
  final ByteArrayOutputStream baos=new ByteArrayOutputStream();
  final DataOutputStream dos=new DataOutputStream(baos);
  original.write(dos);
  final String className=original.getClass().getName();
  if (className == null) {
    fail("String_Node_Str");
  }
  Class<? extends IOReadableWritable> clazz=null;
  try {
    clazz=(Class<? extends IOReadableWritable>)Class.forName(className);
  }
 catch (  ClassNotFoundException e) {
    fail(e.getMessage());
  }
  if (clazz == null) {
    fail("String_Node_Str" + className);
  }
  IOReadableWritable copy=null;
  try {
    copy=clazz.newInstance();
  }
 catch (  InstantiationException e) {
    fail(e.getMessage());
  }
catch (  IllegalAccessException e) {
    fail(e.getMessage());
  }
  if (copy == null) {
    fail("String_Node_Str" + className + "String_Node_Str");
  }
  final ByteArrayInputStream bais=new ByteArrayInputStream(baos.toByteArray());
  final DataInputStream dis=new DataInputStream(bais);
  copy.read(dis);
  return copy;
}

Fixed version (ground truth):
/** 
 * Creates a copy of the given   {@link IOReadableWritable} object by an in-memory serialization and subsequentdeserialization.
 * @param original the original object to be copied
 * @return the copy of original object created by the original object's serialization/deserialization methods
 * @throws IOException thrown if an error occurs while creating the copy of the object
 */
@SuppressWarnings("String_Node_Str") public static <T extends IOReadableWritable>T createCopy(final T original) throws IOException {
  final ByteArrayOutputStream baos=new ByteArrayOutputStream();
  final DataOutputStream dos=new DataOutputStream(baos);
  original.write(dos);
  final String className=original.getClass().getName();
  if (className == null) {
    fail("String_Node_Str");
  }
  Class<T> clazz=null;
  try {
    clazz=(Class<T>)Class.forName(className);
  }
 catch (  ClassNotFoundException e) {
    fail(e.getMessage());
  }
  if (clazz == null) {
    fail("String_Node_Str" + className);
  }
  T copy=null;
  try {
    copy=clazz.newInstance();
  }
 catch (  InstantiationException e) {
    fail(e.getMessage());
  }
catch (  IllegalAccessException e) {
    fail(e.getMessage());
  }
  if (copy == null) {
    fail("String_Node_Str" + className + "String_Node_Str");
  }
  final ByteArrayInputStream bais=new ByteArrayInputStream(baos.toByteArray());
  final DataInputStream dis=new DataInputStream(bais);
  copy.read(dis);
  return copy;
}
Program: 87577
Project: 87577
Buggy source:
/** 
 * Unregisters the   {@link ExecutionListener} object for this vertex. This objectwill no longer be notified about particular events during the vertex's lifetime.
 * @param checkpointStateChangeListener the object to be unregistered
 */
public void unregisterExecutionListener(final ExecutionListener executionListener){
  this.executionListeners.remove(executionListener);
}

Fixed version (ground truth):
/** 
 * Unregisters the   {@link ExecutionListener} object for this vertex. This objectwill no longer be notified about particular events during the vertex's lifetime.
 * @param checkpointStateChangeListener the object to be unregistered
 */
public void unregisterExecutionListener(final ExecutionListener executionListener){
  this.executionListeners.remove(Integer.valueOf(executionListener.getPriority()));
}
Program: 87579
Project: 87579
Buggy source:
public boolean compareAndUpdateExecutionState(final ExecutionState expected,final ExecutionState update){
  if (update == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (!this.executionState.compareAndSet(expected,update)) {
    return false;
  }
  ExecutionStateTransition.checkTransition(true,toString(),expected,update);
  final Iterator<ExecutionListener> it=this.executionListeners.values().iterator();
  while (it.hasNext()) {
    it.next().executionStateChanged(this.executionGraph.getJobID(),this.vertexID,update,null);
  }
  return true;
}

Fixed version (ground truth):
public boolean compareAndUpdateExecutionState(final ExecutionState expected,final ExecutionState update){
  if (update == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (!this.executionState.compareAndSet(expected,update)) {
    return false;
  }
  ExecutionStateTransition.checkTransition(true,toString(),expected,update);
  final Iterator<ExecutionListener> it=this.executionListeners.values().iterator();
  while (it.hasNext()) {
    it.next().executionStateChanged(this.executionGraph.getJobID(),this.vertexID,update,null);
  }
  checkCancelRequestedFlag();
  return true;
}
Program: 87580
Project: 87580
Buggy source:
/** 
 * Updates the vertex's current execution state.
 * @param newExecutionState the new execution state
 * @param optionalMessage an optional message related to the state change
 */
public ExecutionState updateExecutionState(ExecutionState newExecutionState,final String optionalMessage){
  if (newExecutionState == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final ExecutionState currentExecutionState=this.executionState.get();
  if (currentExecutionState == ExecutionState.CANCELING) {
    if (newExecutionState == ExecutionState.FINISHING) {
      return currentExecutionState;
    }
    if (newExecutionState == ExecutionState.FINISHED) {
      LOG.info("String_Node_Str" + toString() + "String_Node_Str");
      newExecutionState=ExecutionState.CANCELED;
    }
  }
  final ExecutionState previousState=this.executionState.getAndSet(newExecutionState);
  if (previousState == newExecutionState) {
    return previousState;
  }
  ExecutionStateTransition.checkTransition(true,toString(),previousState,newExecutionState);
  final Iterator<ExecutionListener> it=this.executionListeners.values().iterator();
  while (it.hasNext()) {
    it.next().executionStateChanged(this.executionGraph.getJobID(),this.vertexID,newExecutionState,optionalMessage);
  }
  return previousState;
}

Fixed version (ground truth):
/** 
 * Updates the vertex's current execution state.
 * @param newExecutionState the new execution state
 * @param optionalMessage an optional message related to the state change
 */
public ExecutionState updateExecutionState(ExecutionState newExecutionState,final String optionalMessage){
  if (newExecutionState == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final ExecutionState currentExecutionState=this.executionState.get();
  if (currentExecutionState == ExecutionState.CANCELING) {
    if (newExecutionState == ExecutionState.FINISHING) {
      return currentExecutionState;
    }
    if (newExecutionState == ExecutionState.FINISHED) {
      LOG.info("String_Node_Str" + toString() + "String_Node_Str");
      newExecutionState=ExecutionState.CANCELED;
    }
  }
  final ExecutionState previousState=this.executionState.getAndSet(newExecutionState);
  if (previousState == newExecutionState) {
    return previousState;
  }
  ExecutionStateTransition.checkTransition(true,toString(),previousState,newExecutionState);
  final Iterator<ExecutionListener> it=this.executionListeners.values().iterator();
  while (it.hasNext()) {
    it.next().executionStateChanged(this.executionGraph.getJobID(),this.vertexID,newExecutionState,optionalMessage);
  }
  checkCancelRequestedFlag();
  return previousState;
}
Program: 87581
Project: 87581
Buggy source:
public boolean readRecord(PactRecord target,byte[] bytes,int offset,int numBytes){
  PactString str=this.theString;
  if (this.ascii) {
    str.setValueAscii(bytes,offset,numBytes);
  }
 else {
    ByteBuffer byteWrapper=this.byteWrapper;
    if (bytes != byteWrapper.array()) {
      byteWrapper=ByteBuffer.wrap(bytes,0,bytes.length);
      this.byteWrapper=byteWrapper;
    }
    byteWrapper.position(offset);
    byteWrapper.limit(numBytes);
    try {
      CharBuffer result=this.decoder.decode(byteWrapper);
      str.setValue(result);
    }
 catch (    CharacterCodingException e) {
      byte[] copy=new byte[numBytes];
      System.arraycopy(bytes,offset,copy,0,numBytes);
      LOG.warn("String_Node_Str" + Arrays.toString(copy),e);
      return false;
    }
  }
  target.clear();
  target.addField(str);
  return true;
}

Fixed version (ground truth):
public boolean readRecord(PactRecord target,byte[] bytes,int offset,int numBytes){
  PactString str=this.theString;
  if (this.ascii) {
    str.setValueAscii(bytes,offset,numBytes);
  }
 else {
    ByteBuffer byteWrapper=this.byteWrapper;
    if (bytes != byteWrapper.array()) {
      byteWrapper=ByteBuffer.wrap(bytes,0,bytes.length);
      this.byteWrapper=byteWrapper;
    }
    byteWrapper.clear();
    byteWrapper.position(offset);
    byteWrapper.limit(offset + numBytes);
    try {
      CharBuffer result=this.decoder.decode(byteWrapper);
      str.setValue(result);
    }
 catch (    CharacterCodingException e) {
      byte[] copy=new byte[numBytes];
      System.arraycopy(bytes,offset,copy,0,numBytes);
      LOG.warn("String_Node_Str" + Arrays.toString(copy),e);
      return false;
    }
  }
  target.clear();
  target.addField(str);
  return true;
}
Program: 87582
Project: 87582
Buggy source:
/** 
 * Gets the type of the input splits that are processed by this input format.
 * @return The type of the input splits.
 */
public Class<T> getInputSplitType();

Fixed version (ground truth):
/** 
 * Gets the type of the input splits that are processed by this input format.
 * @return The type of the input splits.
 */
public Class<? extends T> getInputSplitType();
Program: 87583
Project: 87583
Buggy source:
@Override public Class<GenericInputSplit> getInputSplitType(){
  return GenericInputSplit.class;
}

Fixed version (ground truth):
@Override public Class<? extends GenericInputSplit> getInputSplitType(){
  return GenericInputSplit.class;
}
Program: 87584
Project: 87584
Buggy source:
@Override public Class<InputSplit> getInputSplitType(){
  if (this.format == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  return (Class<InputSplit>)this.format.getInputSplitType();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public Class<InputSplit> getInputSplitType(){
  if (this.format == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  return (Class<InputSplit>)this.format.getInputSplitType();
}
Program: 87587
Project: 87587
Buggy source:
@Override public void closeTask() throws Exception {
  while (!canceled && this.combinerThread.isAlive()) {
    try {
      this.combinerThread.join();
    }
 catch (    InterruptedException iex) {
    }
  }
  if (this.exception != null) {
    throw new ExceptionInChainedStubException(this.taskName,this.exception);
  }
  if (this.parent != null && this.combinerThread != null) {
    this.parent.userThreadFinished(this.combinerThread);
  }
  this.sorter.close();
  if (this.canceled)   return;
  AbstractPactTask.closeUserCode(this.combiner);
}

Fixed version (ground truth):
@Override public void closeTask() throws Exception {
  while (!this.canceled && this.combinerThread.isAlive()) {
    try {
      this.combinerThread.join();
    }
 catch (    InterruptedException iex) {
      cancelTask();
      throw iex;
    }
  }
  if (this.parent != null && this.combinerThread != null) {
    this.parent.userThreadFinished(this.combinerThread);
  }
  if (this.exception != null) {
    throw new ExceptionInChainedStubException(this.taskName,this.exception);
  }
  this.sorter.close();
  if (this.canceled)   return;
  AbstractPactTask.closeUserCode(this.combiner);
}
Program: 87588
Project: 87588
Buggy source:
@Override public void cancelTask(){
  this.canceled=true;
  this.exception=new Exception("String_Node_Str");
  this.combinerThread.cancel();
  this.inputCollector.close();
  this.sorter.close();
}

Fixed version (ground truth):
@Override public void cancelTask(){
  this.canceled=true;
  this.exception=new Exception("String_Node_Str");
  this.combinerThread.cancel();
  this.inputCollector.close();
  this.sorter.close();
  try {
    this.combinerThread.join();
  }
 catch (  InterruptedException iex) {
  }
 finally {
    if (this.parent != null && this.combinerThread != null) {
      this.parent.userThreadFinished(this.combinerThread);
    }
  }
}
Program: 87589
Project: 87589
Buggy source:
/** 
 * Copy constructor to create a copy of a node with a different predecessor. The predecessor is assumed to be of the same type and merely a copy with different strategies, as they are created in the process of the plan enumeration.
 * @param template The node to create a copy of.
 * @param predNode The new predecessor.
 * @param inConn The old connection to copy properties from.
 * @param globalProps The global properties of this copy.
 * @param localProps The local properties of this copy.
 */
protected SingleInputNode(SingleInputNode template,OptimizerNode predNode,PactConnection inConn,GlobalProperties globalProps,LocalProperties localProps){
  super(template,globalProps,localProps);
  this.constantSet=template.constantSet;
  this.keyList=template.keyList;
  this.inConn=new PactConnection(inConn,predNode,this);
  if (predNode.branchPlan != null && predNode.branchPlan.size() > 0) {
    this.branchPlan=new HashMap<OptimizerNode,OptimizerNode>(predNode.branchPlan);
  }
 else {
    this.branchPlan=null;
  }
}

Fixed version (ground truth):
/** 
 * Copy constructor to create a copy of a node with a different predecessor. The predecessor is assumed to be of the same type and merely a copy with different strategies, as they are created in the process of the plan enumeration.
 * @param template The node to create a copy of.
 * @param predNode The new predecessor.
 * @param inConn The old connection to copy properties from.
 * @param globalProps The global properties of this copy.
 * @param localProps The local properties of this copy.
 */
protected SingleInputNode(SingleInputNode template,OptimizerNode predNode,PactConnection inConn,GlobalProperties globalProps,LocalProperties localProps){
  super(template,globalProps,localProps);
  this.constantSet=template.constantSet;
  this.keyList=template.keyList;
  this.inConn=new PactConnection(inConn,predNode,this);
  if (this.branchPlan == null) {
    this.branchPlan=predNode.branchPlan;
  }
 else   if (predNode.branchPlan != null) {
    this.branchPlan.putAll(predNode.branchPlan);
  }
}
Program: 87590
Project: 87590
Buggy source:
/** 
 * Reads all stub annotations
 */
private void readStubAnnotations(){
  this.readConstantAnnotation();
  this.readUniqueFieldsAnnotation();
}

Fixed version (ground truth):
/** 
 * Reads all stub annotations
 */
private void readStubAnnotations(){
  this.readConstantAnnotation();
  this.readOutputCardBoundAnnotation();
  this.readUniqueFieldsAnnotation();
}
Program: 87591
Project: 87591
Buggy source:
@Override protected void map(final IJsonNode value,final JsonCollector out){
  System.out.println("String_Node_Str" + value);
  AnnotatorNodes.annotate(this.output,ANNOTATION_VALUE,value);
  System.out.println(this.output);
  out.collect(this.output);
}

Fixed version (ground truth):
@Override protected void map(final IJsonNode value,final JsonCollector out){
  AnnotatorNodes.annotate(this.output,ANNOTATION_VALUE,value);
  out.collect(this.output);
}
Program: 87592
Project: 87592
Buggy source:
@Override public void read(final IJsonNode node){
  if (node == null || !(node instanceof ObjectNode))   throw new IllegalArgumentException("String_Node_Str" + node);
  final ObjectNode objectNode=(ObjectNode)node;
  System.out.println("String_Node_Str" + node);
  this.key=PointNodes.getId(objectNode).getJavaValue();
  this.values=new ArrayList<String>();
  for (  final IJsonNode valuesNode : PointNodes.getValues(objectNode))   this.values.add(((TextNode)valuesNode).getTextValue());
  this.rowsum=PointNodes.getRowsum(objectNode).getIntValue();
}

Fixed version (ground truth):
@Override public void read(final IJsonNode node){
  if (node == null || !(node instanceof ObjectNode))   throw new IllegalArgumentException("String_Node_Str" + node);
  final ObjectNode objectNode=(ObjectNode)node;
  this.key=PointNodes.getId(objectNode).getJavaValue();
  this.values=new ArrayList<String>();
  for (  final IJsonNode valuesNode : PointNodes.getValues(objectNode))   this.values.add(((TextNode)valuesNode).getTextValue());
  this.rowsum=PointNodes.getRowsum(objectNode).getIntValue();
}
Program: 87593
Project: 87593
Buggy source:
@Override protected void reduce(final IArrayNode values,final JsonCollector out){
  System.out.println("String_Node_Str" + values);
  this.addPoints(values);
  this.cluster();
  this.emitClusters(out);
}

Fixed version (ground truth):
@Override protected void reduce(final IArrayNode values,final JsonCollector out){
  this.addPoints(values);
  this.cluster();
  this.emitClusters(out);
}
Program: 87594
Project: 87594
Buggy source:
public static IArrayNode getPoints(final ObjectNode clusterNode){
  return (IArrayNode)clusterNode.get(POINTS);
}

Fixed version (ground truth):
public static IArrayNode getPoints(final ObjectNode clusterNode){
  try {
    return (IArrayNode)clusterNode.get(POINTS);
  }
 catch (  ClassCastException e) {
    System.err.println(clusterNode);
    throw e;
  }
}
Program: 87595
Project: 87595
Buggy source:
@Override protected void map(final IJsonNode node,final JsonCollector out){
  System.out.println("String_Node_Str" + node);
  final ObjectNode clusterNode=(ObjectNode)node;
  final TextNode idNode=ClusterNodes.getId(clusterNode);
  final IArrayNode pointsNode=ClusterNodes.getPoints(clusterNode);
  for (  final IJsonNode pointNode : pointsNode) {
    this.outputNode.putAll((IObjectNode)pointNode);
    PointNodes.assignCluster(this.outputNode,idNode);
    out.collect(this.outputNode);
  }
}

Fixed version (ground truth):
@Override protected void map(final IJsonNode node,final JsonCollector out){
  final ObjectNode clusterNode=(ObjectNode)node;
  final TextNode idNode=ClusterNodes.getId(clusterNode);
  final IArrayNode pointsNode=ClusterNodes.getPoints(clusterNode);
  for (  final IJsonNode pointNode : pointsNode) {
    this.outputNode.putAll((IObjectNode)pointNode);
    PointNodes.assignCluster(this.outputNode,idNode);
    out.collect(this.outputNode);
  }
}
Program: 87596
Project: 87596
Buggy source:
@Override public ElementarySopremoModule asElementaryOperators(){
  final ElementarySopremoModule module=new ElementarySopremoModule(this.getName(),4,2);
  final Source initialClustersInput=module.getInput(0);
  final Source restPointsInput=module.getInput(1);
  final Source treeInput=module.getInput(2);
  final Source representationInput=module.getInput(3);
  final ClusterDisassemble disassemble=new ClusterDisassemble().withInputs(initialClustersInput);
  final PointMapper pointMapper=new PointMapper();
  pointMapper.setInput(PointMapper.POINT_INPUT_INDEX,restPointsInput);
  pointMapper.setInput(PointMapper.TREE_INPUT_INDEX,treeInput);
  final UnionAll pointUnionAll=new UnionAll().withInputs(disassemble,pointMapper);
  final RepresentationUpdate representationUpdate=new RepresentationUpdate().withInputs(representationInput,pointUnionAll);
  representationUpdate.setMaxClusterRadius(this.maxClusterRadius);
  representationUpdate.setMinPointCount(this.minPointCount);
  representationUpdate.setMaxClustroidShift(this.maxClustroidShift);
  representationUpdate.setRepresentationDetail(this.representationDetail);
  module.getOutput(0).setInputs(pointUnionAll);
  module.getOutput(1).setInputs(representationUpdate);
  return module;
}

Fixed version (ground truth):
@Override public ElementarySopremoModule asElementaryOperators(){
  final ElementarySopremoModule module=new ElementarySopremoModule(this.getName(),4,2);
  final Source initialClustersInput=module.getInput(0);
  final Source restPointsInput=module.getInput(1);
  final Source treeInput=module.getInput(2);
  final Source representationInput=module.getInput(3);
  final ClusterDisassemble disassemble=new ClusterDisassemble().withInputs(initialClustersInput);
  final PointMapper pointMapper=new PointMapper().withInputs(restPointsInput,treeInput);
  final UnionAll pointUnionAll=new UnionAll().withInputs(disassemble,pointMapper);
  final RepresentationUpdate representationUpdate=new RepresentationUpdate().withInputs(representationInput,pointUnionAll);
  representationUpdate.setMaxClusterRadius(this.maxClusterRadius);
  representationUpdate.setMinPointCount(this.minPointCount);
  representationUpdate.setMaxClustroidShift(this.maxClustroidShift);
  representationUpdate.setRepresentationDetail(this.representationDetail);
  module.getOutput(0).setInputs(pointUnionAll);
  module.getOutput(1).setInputs(representationUpdate);
  return module;
}
Program: 87597
Project: 87597
Buggy source:
@Override protected void cross(final IJsonNode pointNode,final IJsonNode treeNode,final JsonCollector out){
  System.out.println("String_Node_Str" + treeNode);
  System.out.println("String_Node_Str" + pointNode);
  final ClusterTree tree=new ClusterTree();
  tree.read(treeNode);
  final Point point=new Point();
  point.read(pointNode);
  final String clusterId=tree.findIdOfClusterNextTo(point);
  this.clusterIdNode.setValue(clusterId);
  PointNodes.assignCluster((ObjectNode)pointNode,this.clusterIdNode);
  System.out.println(pointNode);
  out.collect(pointNode);
}

Fixed version (ground truth):
@Override protected void cross(final IJsonNode pointNode,final IJsonNode treeNode,final JsonCollector out){
  final ClusterTree tree=new ClusterTree();
  tree.read(treeNode);
  final Point point=new Point();
  point.read(pointNode);
  final String clusterId=tree.findIdOfClusterNextTo(point);
  this.clusterIdNode.setValue(clusterId);
  PointNodes.assignCluster((ObjectNode)pointNode,this.clusterIdNode);
  out.collect(pointNode);
}