Program: 55111
Project: 55111
Buggy source:
@Override public void run() throws Exception {
  final String brokerKey=brokerKey();
  final int workerIndex=getEnvironment().getIndexInSubtaskGroup();
  MutableHashTable<X,?> solutionSet=null;
  boolean waitForSolutionSetUpdate=config.getWaitForSolutionSetUpdate();
  boolean isWorksetIteration=config.getIsWorksetIteration();
  try {
    BlockingBackChannel backChannel=initBackChannel();
    SuperstepBarrier barrier=initSuperstepBarrier();
    SolutionSetUpdateBarrier solutionSetUpdateBarrier=null;
    feedbackDataInput=config.getIterationHeadPartialSolutionOrWorksetInputIndex();
    feedbackTypeSerializer=getInputSerializer(feedbackDataInput);
    excludeFromReset(feedbackDataInput);
    if (isWorksetIteration) {
      initialSolutionSetInput=config.getIterationHeadSolutionSetInputIndex();
      TypeSerializerFactory<X> solutionTypeSerializerFactory=config.getSolutionSetSerializer(userCodeClassLoader);
      solutionTypeSerializer=solutionTypeSerializerFactory.getSerializer();
      solutionSet=initHashTable();
      MutableObjectIterator<X> solutionSetInput=getInput(initialSolutionSetInput);
      readInitialSolutionSet(solutionSet,solutionSetInput);
      SolutionSetBroker.instance().handIn(brokerKey,solutionSet);
      if (waitForSolutionSetUpdate) {
        solutionSetUpdateBarrier=new SolutionSetUpdateBarrier();
        SolutionSetUpdateBarrierBroker.instance().handIn(brokerKey,solutionSetUpdateBarrier);
      }
    }
 else {
      initialSolutionSetInput=-1;
      @SuppressWarnings("String_Node_Str") TypeSerializer<X> solSer=(TypeSerializer<X>)feedbackTypeSerializer;
      solutionTypeSerializer=solSer;
    }
    aggregatorRegistry=new RuntimeAggregatorRegistry(config.getIterationAggregators());
    IterationAggregatorBroker.instance().handIn(brokerKey,aggregatorRegistry);
    DataInputView superstepResult=null;
    while (this.running && !terminationRequested()) {
      if (log.isInfoEnabled()) {
        log.info(formatLogString("String_Node_Str" + currentIteration() + "String_Node_Str"));
      }
      barrier.setup();
      if (waitForSolutionSetUpdate) {
        solutionSetUpdateBarrier.setup();
      }
      if (!inFirstIteration()) {
        feedBackSuperstepResult(superstepResult);
      }
      super.run();
      sendEndOfSuperstepToAllIterationOutputs();
      if (waitForSolutionSetUpdate) {
        solutionSetUpdateBarrier.waitForSolutionSetUpdate();
      }
      superstepResult=backChannel.getReadEndAfterSuperstepEnded();
      if (log.isInfoEnabled()) {
        log.info(formatLogString("String_Node_Str" + currentIteration() + "String_Node_Str"));
      }
      sendEventToSync(new WorkerDoneEvent(workerIndex,aggregatorRegistry.getAllAggregators()));
      if (log.isInfoEnabled()) {
        log.info(formatLogString("String_Node_Str" + currentIteration() + "String_Node_Str"));
      }
      barrier.waitForOtherWorkers();
      if (barrier.terminationSignaled()) {
        if (log.isInfoEnabled()) {
          log.info(formatLogString("String_Node_Str" + currentIteration() + "String_Node_Str"));
        }
        requestTermination();
      }
 else {
        incrementIterationCounter();
        String[] globalAggregateNames=barrier.getAggregatorNames();
        Value[] globalAggregates=barrier.getAggregates();
        aggregatorRegistry.updateGlobalAggregatesAndReset(globalAggregateNames,globalAggregates);
      }
    }
    if (log.isInfoEnabled()) {
      log.info(formatLogString("String_Node_Str" + currentIteration() + "String_Node_Str"));
    }
    if (isWorksetIteration) {
      streamSolutionSetToFinalOutput(solutionSet);
    }
 else {
      streamOutFinalOutputBulk(new InputViewIterator<X>(superstepResult,this.solutionTypeSerializer));
    }
  }
  finally {
    IterationAggregatorBroker.instance().remove(brokerKey);
    BlockingBackChannelBroker.instance().remove(brokerKey);
    if (isWorksetIteration) {
      SolutionSetBroker.instance().remove(brokerKey);
      if (waitForSolutionSetUpdate) {
        SolutionSetUpdateBarrierBroker.instance().remove(brokerKey);
      }
    }
    if (solutionSet != null) {
      solutionSet.close();
      solutionSet=null;
    }
  }
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  final String brokerKey=brokerKey();
  final int workerIndex=getEnvironment().getIndexInSubtaskGroup();
  MutableHashTable<X,?> solutionSet=null;
  boolean waitForSolutionSetUpdate=config.getWaitForSolutionSetUpdate();
  boolean isWorksetIteration=config.getIsWorksetIteration();
  try {
    BlockingBackChannel backChannel=initBackChannel();
    SuperstepBarrier barrier=initSuperstepBarrier();
    SolutionSetUpdateBarrier solutionSetUpdateBarrier=null;
    feedbackDataInput=config.getIterationHeadPartialSolutionOrWorksetInputIndex();
    feedbackTypeSerializer=getInputSerializer(feedbackDataInput);
    excludeFromReset(feedbackDataInput);
    if (isWorksetIteration) {
      initialSolutionSetInput=config.getIterationHeadSolutionSetInputIndex();
      TypeSerializerFactory<X> solutionTypeSerializerFactory=config.getSolutionSetSerializer(userCodeClassLoader);
      solutionTypeSerializer=solutionTypeSerializerFactory.getSerializer();
      solutionSet=initHashTable();
      @SuppressWarnings("String_Node_Str") MutableObjectIterator<X> solutionSetInput=(MutableObjectIterator<X>)createInputIterator(inputReaders[initialSolutionSetInput],solutionTypeSerializer);
      readInitialSolutionSet(solutionSet,solutionSetInput);
      SolutionSetBroker.instance().handIn(brokerKey,solutionSet);
      if (waitForSolutionSetUpdate) {
        solutionSetUpdateBarrier=new SolutionSetUpdateBarrier();
        SolutionSetUpdateBarrierBroker.instance().handIn(brokerKey,solutionSetUpdateBarrier);
      }
    }
 else {
      initialSolutionSetInput=-1;
      @SuppressWarnings("String_Node_Str") TypeSerializer<X> solSer=(TypeSerializer<X>)feedbackTypeSerializer;
      solutionTypeSerializer=solSer;
    }
    aggregatorRegistry=new RuntimeAggregatorRegistry(config.getIterationAggregators());
    IterationAggregatorBroker.instance().handIn(brokerKey,aggregatorRegistry);
    DataInputView superstepResult=null;
    while (this.running && !terminationRequested()) {
      if (log.isInfoEnabled()) {
        log.info(formatLogString("String_Node_Str" + currentIteration() + "String_Node_Str"));
      }
      barrier.setup();
      if (waitForSolutionSetUpdate) {
        solutionSetUpdateBarrier.setup();
      }
      if (!inFirstIteration()) {
        feedBackSuperstepResult(superstepResult);
      }
      super.run();
      sendEndOfSuperstepToAllIterationOutputs();
      if (waitForSolutionSetUpdate) {
        solutionSetUpdateBarrier.waitForSolutionSetUpdate();
      }
      superstepResult=backChannel.getReadEndAfterSuperstepEnded();
      if (log.isInfoEnabled()) {
        log.info(formatLogString("String_Node_Str" + currentIteration() + "String_Node_Str"));
      }
      sendEventToSync(new WorkerDoneEvent(workerIndex,aggregatorRegistry.getAllAggregators()));
      if (log.isInfoEnabled()) {
        log.info(formatLogString("String_Node_Str" + currentIteration() + "String_Node_Str"));
      }
      barrier.waitForOtherWorkers();
      if (barrier.terminationSignaled()) {
        if (log.isInfoEnabled()) {
          log.info(formatLogString("String_Node_Str" + currentIteration() + "String_Node_Str"));
        }
        requestTermination();
      }
 else {
        incrementIterationCounter();
        String[] globalAggregateNames=barrier.getAggregatorNames();
        Value[] globalAggregates=barrier.getAggregates();
        aggregatorRegistry.updateGlobalAggregatesAndReset(globalAggregateNames,globalAggregates);
      }
    }
    if (log.isInfoEnabled()) {
      log.info(formatLogString("String_Node_Str" + currentIteration() + "String_Node_Str"));
    }
    if (isWorksetIteration) {
      streamSolutionSetToFinalOutput(solutionSet);
    }
 else {
      streamOutFinalOutputBulk(new InputViewIterator<X>(superstepResult,this.solutionTypeSerializer));
    }
  }
  finally {
    IterationAggregatorBroker.instance().remove(brokerKey);
    BlockingBackChannelBroker.instance().remove(brokerKey);
    if (isWorksetIteration) {
      SolutionSetBroker.instance().remove(brokerKey);
      if (waitForSolutionSetUpdate) {
        SolutionSetUpdateBarrierBroker.instance().remove(brokerKey);
      }
    }
    if (solutionSet != null) {
      solutionSet.close();
      solutionSet=null;
    }
  }
}