Program: 157783
Project: 157783
Buggy source:
private void reconnect(){
  logger.trace(userName + "String_Node_Str");
  for (  Entry<UUID,Table> entry : tables.entrySet()) {
    ccJoinedTable(entry.getValue().getRoomId(),entry.getValue().getId(),entry.getValue().isTournament());
  }
  for (  Entry<UUID,UUID> entry : userTournaments.entrySet()) {
    TournamentController tournamentController=TournamentManager.instance.getTournamentController(entry.getValue());
    if (tournamentController != null) {
      ccTournamentStarted(entry.getValue(),entry.getKey());
      tournamentController.rejoin(entry.getKey());
    }
  }
  for (  Entry<UUID,GameSessionPlayer> entry : gameSessions.entrySet()) {
    ccGameStarted(entry.getValue().getGameId(),entry.getKey());
    entry.getValue().init();
    GameManager.instance.sendPlayerString(entry.getValue().getGameId(),userId,"String_Node_Str");
  }
  for (  Entry<UUID,DraftSession> entry : draftSessions.entrySet()) {
    ccDraftStarted(entry.getValue().getDraftId(),entry.getKey());
    entry.getValue().init();
    entry.getValue().update();
  }
  for (  Entry<UUID,TournamentSession> entry : constructing.entrySet()) {
    entry.getValue().construct(0);
  }
  for (  Entry<UUID,Deck> entry : sideboarding.entrySet()) {
    Optional<TableController> controller=TableManager.instance.getController(entry.getKey());
    if (controller.isPresent()) {
      ccSideboard(entry.getValue(),entry.getKey(),controller.get().getRemainingTime(),controller.get().getOptions().isLimited());
    }
 else {
      logger.debug(getName() + "String_Node_Str" + entry.getKey());
    }
  }
  ServerMessagesUtil.instance.incReconnects();
  logger.trace(userName + "String_Node_Str");
}

Fixed version (ground truth):
private void reconnect(){
  logger.trace(userName + "String_Node_Str");
  for (  Entry<UUID,Table> entry : tables.entrySet()) {
    ccJoinedTable(entry.getValue().getRoomId(),entry.getValue().getId(),entry.getValue().isTournament());
  }
  for (Iterator<Entry<UUID,UUID>> iterator=userTournaments.entrySet().iterator(); iterator.hasNext(); ) {
    Entry<UUID,UUID> next=iterator.next();
    TournamentController tournamentController=TournamentManager.instance.getTournamentController(next.getValue());
    if (tournamentController != null) {
      ccTournamentStarted(next.getValue(),next.getKey());
      tournamentController.rejoin(next.getKey());
    }
 else {
      iterator.remove();
    }
  }
  for (  Entry<UUID,GameSessionPlayer> entry : gameSessions.entrySet()) {
    ccGameStarted(entry.getValue().getGameId(),entry.getKey());
    entry.getValue().init();
    GameManager.instance.sendPlayerString(entry.getValue().getGameId(),userId,"String_Node_Str");
  }
  for (  Entry<UUID,DraftSession> entry : draftSessions.entrySet()) {
    ccDraftStarted(entry.getValue().getDraftId(),entry.getKey());
    entry.getValue().init();
    entry.getValue().update();
  }
  for (  Entry<UUID,TournamentSession> entry : constructing.entrySet()) {
    entry.getValue().construct(0);
  }
  for (  Entry<UUID,Deck> entry : sideboarding.entrySet()) {
    Optional<TableController> controller=TableManager.instance.getController(entry.getKey());
    if (controller.isPresent()) {
      ccSideboard(entry.getValue(),entry.getKey(),controller.get().getRemainingTime(),controller.get().getOptions().isLimited());
    }
 else {
      logger.debug(getName() + "String_Node_Str" + entry.getKey());
    }
  }
  ServerMessagesUtil.instance.incReconnects();
  logger.trace(userName + "String_Node_Str");
}