Program: 56074
Project: 56074
Buggy source:
@Override public void run(){
  try {
    updateProgressListener(EProgressState.LOADING,0.1f);
    DataOutputStream replayFileStream=createReplayFileStream();
    IGameClock gameClock=MatchConstants.clock=networkConnector.getGameClock();
    gameClock.setReplayLogStream(replayFileStream);
    RandomSingleton.load(randomSeed);
    Movable.resetState();
    updateProgressListener(EProgressState.LOADING_MAP,0.3f);
    Thread imagePreloader=ImageProvider.getInstance().startPreloading();
    MainGridWithUiSettings gridWithUiState=mapCreator.loadMainGrid(availablePlayers);
    mainGrid=gridWithUiState.getMainGrid();
    PlayerState playerState=gridWithUiState.getPlayerState(playerId);
    RescheduleTimer.schedule(gameClock);
    updateProgressListener(EProgressState.LOADING_IMAGES,0.7f);
    statistics=new GameStatistics(gameClock);
    mainGrid.initForPlayer(playerId,playerState.getFogOfWar());
    mainGrid.startThreads();
    if (imagePreloader != null)     imagePreloader.join();
    waitForStartingGameListener();
    updateProgressListener(EProgressState.WAITING_FOR_OTHER_PLAYERS,0.98f);
    networkConnector.setStartFinished(true);
    waitForAllPlayersStartFinished(networkConnector);
    final IMapInterfaceConnector connector=startingGameListener.startFinished(this);
    connector.loadUIState(playerState.getUiState());
    GuiInterface guiInterface=new GuiInterface(connector,gameClock,networkConnector.getTaskScheduler(),mainGrid.getGuiInputGrid(),this,playerId,multiplayer);
    if (replayFileInputStream != null) {
      gameClock.loadReplayLogFromStream(replayFileInputStream);
    }
    gameClock.startExecution();
    gameRunning=true;
synchronized (stopMutex) {
      while (!stopped) {
        try {
          stopMutex.wait();
        }
 catch (        InterruptedException e) {
        }
      }
    }
    networkConnector.shutdown();
    gameClock.stopExecution();
    connector.shutdown();
    mainGrid.stopThreads();
    guiInterface.stop();
    RescheduleTimer.stop();
    Movable.resetState();
    Building.dropAllBuildings();
    System.setErr(systemErrorStream);
    System.setOut(systemOutStream);
  }
 catch (  MapLoadException e) {
    e.printStackTrace();
    reportFail(EGameError.MAPLOADING_ERROR,e);
  }
catch (  Exception e) {
    e.printStackTrace();
    reportFail(EGameError.UNKNOWN_ERROR,e);
  }
 finally {
    if (exitListener != null) {
      exitListener.gameExited(this);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    updateProgressListener(EProgressState.LOADING,0.1f);
    DataOutputStream replayFileStream=createReplayFileStream();
    IGameClock gameClock=MatchConstants.clock=networkConnector.getGameClock();
    gameClock.setReplayLogStream(replayFileStream);
    RandomSingleton.load(randomSeed);
    Movable.resetState();
    updateProgressListener(EProgressState.LOADING_MAP,0.3f);
    Thread imagePreloader=ImageProvider.getInstance().startPreloading();
    MainGridWithUiSettings gridWithUiState=mapCreator.loadMainGrid(availablePlayers);
    mainGrid=gridWithUiState.getMainGrid();
    PlayerState playerState=gridWithUiState.getPlayerState(playerId);
    RescheduleTimer.schedule(gameClock);
    updateProgressListener(EProgressState.LOADING_IMAGES,0.7f);
    statistics=new GameStatistics(gameClock);
    mainGrid.initForPlayer(playerId,playerState.getFogOfWar());
    mainGrid.startThreads();
    if (imagePreloader != null)     imagePreloader.join();
    waitForStartingGameListener();
    updateProgressListener(EProgressState.WAITING_FOR_OTHER_PLAYERS,0.98f);
    if (replayFileInputStream != null) {
      gameClock.loadReplayLogFromStream(replayFileInputStream);
    }
    networkConnector.setStartFinished(true);
    waitForAllPlayersStartFinished(networkConnector);
    final IMapInterfaceConnector connector=startingGameListener.startFinished(this);
    connector.loadUIState(playerState.getUiState());
    GuiInterface guiInterface=new GuiInterface(connector,gameClock,networkConnector.getTaskScheduler(),mainGrid.getGuiInputGrid(),this,playerId,multiplayer);
    gameClock.startExecution();
    gameRunning=true;
synchronized (stopMutex) {
      while (!stopped) {
        try {
          stopMutex.wait();
        }
 catch (        InterruptedException e) {
        }
      }
    }
    networkConnector.shutdown();
    gameClock.stopExecution();
    connector.shutdown();
    mainGrid.stopThreads();
    guiInterface.stop();
    RescheduleTimer.stop();
    Movable.resetState();
    Building.dropAllBuildings();
    System.setErr(systemErrorStream);
    System.setOut(systemOutStream);
  }
 catch (  MapLoadException e) {
    e.printStackTrace();
    reportFail(EGameError.MAPLOADING_ERROR,e);
  }
catch (  Exception e) {
    e.printStackTrace();
    reportFail(EGameError.UNKNOWN_ERROR,e);
  }
 finally {
    if (exitListener != null) {
      exitListener.gameExited(this);
    }
  }
}