Program: 86762
Project: 86762
Buggy source:
/** 
 * @param serverContext
 * @param gameSession
 */
public InGameState(final ServerContext serverContext,final GameSession gameSession){
  this.serverContext=serverContext;
  this.gameSession=gameSession;
  this.players=gameSession.getPlayers();
  this.network=serverContext.getServer();
  this.clients=serverContext.getClients();
  this.listener=serverContext.getServerProtocolListener();
  this.dispatcher=gameSession.getEventDispatcher();
  this.game=gameSession.getGame();
  loadProperties(gameSession.getMap(),game);
  this.nextGameStatUpdate=GAME_STAT_UPDATE;
  this.nextGamePartialStatUpdate=GAME_PARTIAL_STAT_UPDATE;
  this.statsMessage=new GameStatsMessage();
  this.partialStatsMessage=new GamePartialStatsMessage();
  this.clientIterator=new RemoteClientIterator(){
    @Override public void onRemoteClient(    RemoteClient client){
      if (client.isReady()) {
        sendGameUpdateMessage(client.getId());
      }
      if (calculatePing) {
        int ping=client.getConnection().getReturnTripTime();
        client.getPlayer().setPing(ping);
      }
    }
  }
;
  this.dispatcher.addEventListener(PlayerKilledEvent.class,new PlayerKilledListener(){
    @Override @EventMethod public void onPlayerKilled(    PlayerKilledEvent event){
      PlayerKilledMessage msg=new PlayerKilledMessage();
      msg.deathType=event.getMeansOfDeath().netValue();
      msg.killedById=event.getKillerId();
      msg.playerId=event.getPlayer().getId();
      msg.posX=(short)event.getPos().x;
      msg.posY=(short)event.getPos().y;
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,msg);
    }
  }
);
  this.dispatcher.addEventListener(PlayerSpawnedEvent.class,new PlayerSpawnedListener(){
    @Override @EventMethod public void onPlayerSpawned(    PlayerSpawnedEvent event){
      PlayerSpawnedMessage msg=new PlayerSpawnedMessage();
      Player player=event.getPlayer();
      msg.playerId=player.getId();
      msg.posX=(short)event.getSpawnLocation().x;
      msg.posY=(short)event.getSpawnLocation().y;
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,msg);
    }
  }
);
  this.dispatcher.addEventListener(GameEndEvent.class,new GameEndListener(){
    @Override @EventMethod public void onGameEnd(    GameEndEvent event){
      if (!gameEnded) {
        GameEndedMessage msg=new GameEndedMessage();
        msg.stats=game.getNetGameStats();
        listener.queueSendToAll(Endpoint.FLAG_RELIABLE,msg);
        gameEnded=true;
      }
    }
  }
);
  this.dispatcher.addEventListener(RoundEndedEvent.class,new RoundEndedListener(){
    @Override @EventMethod public void onRoundEnded(    RoundEndedEvent event){
      RoundEndedMessage msg=new RoundEndedMessage();
      msg.stats=game.getNetGameStats();
      Team winner=event.getWinner();
      if (winner != null) {
        msg.winnerTeamId=winner.getId();
      }
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,msg);
    }
  }
);
  this.dispatcher.addEventListener(RoundStartedEvent.class,new RoundStartedListener(){
    @Override @EventMethod public void onRoundStarted(    RoundStartedEvent event){
      loadProperties(gameSession.getMap(),game);
      RoundStartedMessage msg=new RoundStartedMessage();
      msg.gameState=game.getNetGameState();
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,msg);
    }
  }
);
  this.dispatcher.addEventListener(BombPlantedEvent.class,new BombPlantedListener(){
    @Override @EventMethod public void onBombPlanted(    BombPlantedEvent event){
      int bombTargetId=event.getBombTarget() != null ? event.getBombTarget().getId() : Entity.INVALID_ENTITY_ID;
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,new BombPlantedMessage(bombTargetId));
    }
  }
);
  this.dispatcher.addEventListener(BombDisarmedEvent.class,new BombDisarmedListener(){
    @EventMethod @Override public void onBombDisarmedEvent(    BombDisarmedEvent event){
      int bombTargetId=event.getBombTarget() != null ? event.getBombTarget().getId() : Entity.INVALID_ENTITY_ID;
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,new BombDisarmedMessage(bombTargetId));
    }
  }
);
  this.dispatcher.addEventListener(BombExplodedMessage.class,new BombExplodedListener(){
    @EventMethod @Override public void onBombExplodedEvent(    BombExplodedEvent event){
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,new BombExplodedMessage());
    }
  }
);
  this.dispatcher.addEventListener(TileRemovedEvent.class,new TileRemovedListener(){
    @Override public void onTileRemoved(    TileRemovedEvent event){
      TileRemovedMessage msg=new TileRemovedMessage();
      msg.x=event.getTileX();
      msg.y=event.getTileY();
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,msg);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * @param serverContext
 * @param gameSession
 */
public InGameState(final ServerContext serverContext,final GameSession gameSession){
  this.serverContext=serverContext;
  this.gameSession=gameSession;
  this.players=gameSession.getPlayers();
  this.network=serverContext.getServer();
  this.clients=serverContext.getClients();
  this.listener=serverContext.getServerProtocolListener();
  this.dispatcher=gameSession.getEventDispatcher();
  this.game=gameSession.getGame();
  this.nextGameStatUpdate=GAME_STAT_UPDATE;
  this.nextGamePartialStatUpdate=GAME_PARTIAL_STAT_UPDATE;
  this.statsMessage=new GameStatsMessage();
  this.partialStatsMessage=new GamePartialStatsMessage();
  this.clientIterator=new RemoteClientIterator(){
    @Override public void onRemoteClient(    RemoteClient client){
      if (client.isReady()) {
        sendGameUpdateMessage(client.getId());
      }
      if (calculatePing) {
        int ping=client.getConnection().getReturnTripTime();
        client.getPlayer().setPing(ping);
      }
    }
  }
;
  this.dispatcher.addEventListener(PlayerKilledEvent.class,new PlayerKilledListener(){
    @Override @EventMethod public void onPlayerKilled(    PlayerKilledEvent event){
      PlayerKilledMessage msg=new PlayerKilledMessage();
      msg.deathType=event.getMeansOfDeath().netValue();
      msg.killedById=event.getKillerId();
      msg.playerId=event.getPlayer().getId();
      msg.posX=(short)event.getPos().x;
      msg.posY=(short)event.getPos().y;
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,msg);
    }
  }
);
  this.dispatcher.addEventListener(PlayerSpawnedEvent.class,new PlayerSpawnedListener(){
    @Override @EventMethod public void onPlayerSpawned(    PlayerSpawnedEvent event){
      PlayerSpawnedMessage msg=new PlayerSpawnedMessage();
      Player player=event.getPlayer();
      msg.playerId=player.getId();
      msg.posX=(short)event.getSpawnLocation().x;
      msg.posY=(short)event.getSpawnLocation().y;
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,msg);
    }
  }
);
  this.dispatcher.addEventListener(GameEndEvent.class,new GameEndListener(){
    @Override @EventMethod public void onGameEnd(    GameEndEvent event){
      if (!gameEnded) {
        GameEndedMessage msg=new GameEndedMessage();
        msg.stats=game.getNetGameStats();
        listener.queueSendToAll(Endpoint.FLAG_RELIABLE,msg);
        gameEnded=true;
      }
    }
  }
);
  this.dispatcher.addEventListener(RoundEndedEvent.class,new RoundEndedListener(){
    @Override @EventMethod public void onRoundEnded(    RoundEndedEvent event){
      RoundEndedMessage msg=new RoundEndedMessage();
      msg.stats=game.getNetGameStats();
      Team winner=event.getWinner();
      if (winner != null) {
        msg.winnerTeamId=winner.getId();
      }
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,msg);
    }
  }
);
  this.dispatcher.addEventListener(RoundStartedEvent.class,new RoundStartedListener(){
    @Override @EventMethod public void onRoundStarted(    RoundStartedEvent event){
      loadProperties(gameSession.getMap(),game);
      RoundStartedMessage msg=new RoundStartedMessage();
      msg.gameState=game.getNetGameState();
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,msg);
    }
  }
);
  this.dispatcher.addEventListener(BombPlantedEvent.class,new BombPlantedListener(){
    @Override @EventMethod public void onBombPlanted(    BombPlantedEvent event){
      int bombTargetId=event.getBombTarget() != null ? event.getBombTarget().getId() : Entity.INVALID_ENTITY_ID;
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,new BombPlantedMessage(bombTargetId));
    }
  }
);
  this.dispatcher.addEventListener(BombDisarmedEvent.class,new BombDisarmedListener(){
    @EventMethod @Override public void onBombDisarmedEvent(    BombDisarmedEvent event){
      int bombTargetId=event.getBombTarget() != null ? event.getBombTarget().getId() : Entity.INVALID_ENTITY_ID;
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,new BombDisarmedMessage(bombTargetId));
    }
  }
);
  this.dispatcher.addEventListener(BombExplodedMessage.class,new BombExplodedListener(){
    @EventMethod @Override public void onBombExplodedEvent(    BombExplodedEvent event){
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,new BombExplodedMessage());
    }
  }
);
  this.dispatcher.addEventListener(TileRemovedEvent.class,new TileRemovedListener(){
    @Override public void onTileRemoved(    TileRemovedEvent event){
      TileRemovedMessage msg=new TileRemovedMessage();
      msg.x=event.getTileX();
      msg.y=event.getTileY();
      listener.queueSendToAll(Endpoint.FLAG_RELIABLE,msg);
    }
  }
);
}