Program: 86650
Project: 86650
Buggy source:
/** 
 * @param config
 * @param players
 * @param gameType
 * @param gameMap
 * @param dispatcher
 */
public Game(SeventhConfig config,final Players players,final GameType gameType,GameMap gameMap,EventDispatcher dispatcher){
  this.config=config;
  this.gameType=gameType;
  this.dispatcher=dispatcher;
  this.gameMap=gameMap;
  this.map=gameMap.getMap();
  this.graph=map.createMapGraph(new NodeData());
  this.gameTimers=new Timers(MAX_TIMERS);
  this.gameTriggers=new Triggers(this);
  this.entities=new Entity[MAX_ENTITIES];
  this.playerEntities=new PlayerEntity[MAX_PLAYERS];
  this.deadFrames=new int[MAX_ENTITIES];
  this.playerUpdates=new NetGameUpdate[MAX_ENTITIES];
  for (int i=0; i < this.playerUpdates.length; i++) {
    this.playerUpdates[i]=new NetGameUpdate();
  }
  this.bombTargets=new ArrayList<BombTarget>();
  this.vehicles=new ArrayList<Vehicle>();
  this.flags=new ArrayList<Flag>();
  this.doors=new ArrayList<Door>();
  this.smokeEntities=new ArrayList<Smoke>();
  this.soundEvents=new SoundEventPool(SeventhConstants.MAX_SOUNDS);
  this.lastFramesSoundEvents=new SoundEventPool(SeventhConstants.MAX_SOUNDS);
  this.aiSystem=new DefaultAISystem();
  this.random=new Random();
  this.players=players;
  this.gameState=new NetGameState();
  this.gamePartialStats=new NetGamePartialStats();
  this.gameStats=new NetGameStats();
  this.enableFOW=true;
  this.time=gameType.getMatchTime();
  this.TILE_WIDTH=map.getTileWidth();
  this.TILE_HEIGHT=map.getTileHeight();
  this.DISTANCE_CHECK=TILE_HEIGHT * TILE_WIDTH * 2;
  this.dispatcher.addEventListener(PlayerKilledEvent.class,new PlayerKilledListener(){
    @Override @EventMethod public void onPlayerKilled(    PlayerKilledEvent event){
      if (gameType.isInProgress()) {
        Player killed=event.getPlayer();
        killed.incrementDeaths();
        aiSystem.playerKilled(killed);
        Player killer=players.getPlayer(event.getKillerId());
        if (killer != null) {
          if (killed.getTeam().getId() == killer.getTeam().getId()) {
            killer.loseKill();
          }
 else           if (killed.getId() == killer.getId()) {
            killer.loseKill();
          }
 else {
            killer.incrementKills();
          }
        }
      }
    }
  }
);
  this.dispatcher.addEventListener(PlayerSpawnedEvent.class,new PlayerSpawnedListener(){
    @Override @EventMethod public void onPlayerSpawned(    PlayerSpawnedEvent event){
    }
  }
);
  this.dispatcher.addEventListener(SoundEmittedEvent.class,new SoundEmitterListener(){
    @Override @EventMethod public void onSoundEmitted(    SoundEmittedEvent event){
      soundEvents.emitSound(event);
    }
  }
);
  this.dispatcher.addEventListener(RoundStartedEvent.class,new RoundStartedListener(){
    @Override public void onRoundStarted(    RoundStartedEvent event){
      for (      Tile tile : map.getRemovedTiles()) {
        graph.removeNode(tile.getXIndex(),tile.getYIndex());
      }
      map.restoreDestroyedTiles();
      loadMapScripts();
      aiSystem.startOfRound(Game.this);
    }
  }
);
  this.dispatcher.addEventListener(RoundEndedEvent.class,new RoundEndedListener(){
    @Override public void onRoundEnded(    RoundEndedEvent event){
      gameTimers.removeTimers();
      gameTriggers.removeTriggers();
      aiSystem.endOfRound(Game.this);
    }
  }
);
  this.aiSystem.init(this);
  this.gameType.registerListeners(this,dispatcher);
  this.awardSystem=new PlayerAwardSystem(this);
}

Fixed version (ground truth):
/** 
 * @param config
 * @param players
 * @param gameType
 * @param gameMap
 * @param dispatcher
 */
public Game(SeventhConfig config,final Players players,final GameType gameType,GameMap gameMap,EventDispatcher dispatcher){
  this.config=config;
  this.gameType=gameType;
  this.dispatcher=dispatcher;
  this.gameMap=gameMap;
  this.map=gameMap.getMap();
  this.graph=map.createMapGraph(new NodeData());
  this.gameTimers=new Timers(MAX_TIMERS);
  this.gameTriggers=new Triggers(this);
  this.entities=new Entity[MAX_ENTITIES];
  this.playerEntities=new PlayerEntity[MAX_PLAYERS];
  this.deadFrames=new int[MAX_ENTITIES];
  this.playerUpdates=new NetGameUpdate[MAX_ENTITIES];
  for (int i=0; i < this.playerUpdates.length; i++) {
    this.playerUpdates[i]=new NetGameUpdate();
  }
  this.bombTargets=new ArrayList<BombTarget>();
  this.vehicles=new ArrayList<Vehicle>();
  this.flags=new ArrayList<Flag>();
  this.doors=new ArrayList<Door>();
  this.smokeEntities=new ArrayList<Smoke>();
  this.soundEvents=new SoundEventPool(SeventhConstants.MAX_SOUNDS);
  this.lastFramesSoundEvents=new SoundEventPool(SeventhConstants.MAX_SOUNDS);
  this.aiSystem=new DefaultAISystem();
  this.random=new Random();
  this.players=players;
  this.gameState=new NetGameState();
  this.gamePartialStats=new NetGamePartialStats();
  this.gameStats=new NetGameStats();
  this.enableFOW=true;
  this.time=gameType.getMatchTime();
  this.TILE_WIDTH=map.getTileWidth();
  this.TILE_HEIGHT=map.getTileHeight();
  this.DISTANCE_CHECK=TILE_HEIGHT * TILE_WIDTH * 2;
  this.dispatcher.addEventListener(PlayerKilledEvent.class,new PlayerKilledListener(){
    @Override @EventMethod public void onPlayerKilled(    PlayerKilledEvent event){
      if (gameType.isInProgress()) {
        Player killed=event.getPlayer();
        killed.incrementDeaths();
        aiSystem.playerKilled(killed);
        Player killer=players.getPlayer(event.getKillerId());
        if (killer != null) {
          if (killed.getTeam().getId() == killer.getTeam().getId()) {
            killer.loseKill();
          }
 else           if (killed.getId() == killer.getId()) {
            killer.loseKill();
          }
 else {
            killer.incrementKills();
          }
        }
      }
    }
  }
);
  this.dispatcher.addEventListener(PlayerSpawnedEvent.class,new PlayerSpawnedListener(){
    @Override @EventMethod public void onPlayerSpawned(    PlayerSpawnedEvent event){
    }
  }
);
  this.dispatcher.addEventListener(SoundEmittedEvent.class,new SoundEmitterListener(){
    @Override @EventMethod public void onSoundEmitted(    SoundEmittedEvent event){
      soundEvents.emitSound(event);
    }
  }
);
  this.dispatcher.addEventListener(RoundStartedEvent.class,new RoundStartedListener(){
    @Override public void onRoundStarted(    RoundStartedEvent event){
      for (int i=MAX_PLAYERS; i < deadFrames.length; i++) {
        deadFrames[i]=999;
      }
      for (      Tile tile : map.getRemovedTiles()) {
        graph.removeNode(tile.getXIndex(),tile.getYIndex());
      }
      map.restoreDestroyedTiles();
      loadMapScripts();
      aiSystem.startOfRound(Game.this);
    }
  }
);
  this.dispatcher.addEventListener(RoundEndedEvent.class,new RoundEndedListener(){
    @Override public void onRoundEnded(    RoundEndedEvent event){
      gameTimers.removeTimers();
      gameTriggers.removeTriggers();
      aiSystem.endOfRound(Game.this);
    }
  }
);
  this.aiSystem.init(this);
  this.gameType.registerListeners(this,dispatcher);
  this.awardSystem=new PlayerAwardSystem(this);
}