Program: 56100
Project: 56100
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void invoke() throws Exception {
  LOG.info("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
  final MemoryManager memoryManager=getEnvironment().getMemoryManager();
  final IOManager ioManager=getEnvironment().getIOManager();
  tempIterator=null;
  try {
    tempIterator=new SpillingResettableIterator<KeyValuePair<Key,Value>>(memoryManager,ioManager,reader,this.availableMemory,new KeyValuePairDeserializer<Key,Value>(stub.getOutKeyType(),stub.getOutValueType()),this);
    LOG.debug("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
    tempIterator.open();
    LOG.debug("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
    LOG.debug("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
    while (tempIterator.hasNext() && !this.taskCanceled) {
      KeyValuePair<Key,Value> pair=tempIterator.next();
      writer.emit(pair);
    }
    if (!this.taskCanceled) {
      LOG.debug("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
    }
  }
 catch (  MemoryAllocationException mae) {
    throw new RuntimeException("String_Node_Str",mae);
  }
catch (  ServiceException se) {
    throw new RuntimeException(se);
  }
catch (  IOException ioe) {
    throw new RuntimeException(ioe);
  }
catch (  Exception ie) {
    if (!this.taskCanceled) {
      LOG.error("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
      throw ie;
    }
  }
 finally {
    tempIterator.close();
  }
  if (!this.taskCanceled) {
    LOG.info("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
  }
 else {
    LOG.warn("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void invoke() throws Exception {
  LOG.info("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
  final MemoryManager memoryManager=getEnvironment().getMemoryManager();
  final IOManager ioManager=getEnvironment().getIOManager();
  tempIterator=null;
  try {
    tempIterator=new SpillingResettableIterator<KeyValuePair<Key,Value>>(memoryManager,ioManager,reader,this.availableMemory,new KeyValuePairDeserializer<Key,Value>(stub.getOutKeyType(),stub.getOutValueType()),this);
    LOG.debug("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
    tempIterator.open();
    LOG.debug("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
    LOG.debug("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
    while (tempIterator.hasNext() && !this.taskCanceled) {
      KeyValuePair<Key,Value> pair=tempIterator.next();
      writer.emit(pair);
    }
    if (!this.taskCanceled) {
      LOG.debug("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
    }
  }
 catch (  MemoryAllocationException mae) {
    throw new RuntimeException("String_Node_Str",mae);
  }
catch (  ServiceException se) {
    throw new RuntimeException(se);
  }
catch (  IOException ioe) {
    throw new RuntimeException(ioe);
  }
catch (  Exception ie) {
    if (!this.taskCanceled) {
      LOG.error("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
      throw ie;
    }
  }
 finally {
    if (tempIterator != null) {
      tempIterator.close();
    }
  }
  if (!this.taskCanceled) {
    LOG.info("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
  }
 else {
    LOG.warn("String_Node_Str" + this.getEnvironment().getTaskName() + "String_Node_Str"+ (this.getEnvironment().getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getEnvironment().getCurrentNumberOfSubtasks()+ "String_Node_Str");
  }
}