Program: 86622
Project: 86622
Buggy source:
/** 
 * Adds an   {@link EventListener} to the supplied event name
 * @param eventName the event name to bind the listener to
 * @param function the listener
 */
public void addEventListener(final String eventName,final LeoObject function){
switch (eventName.toLowerCase()) {
case "String_Node_Str":
{
      this.dispatcher.addEventListener(BombDisarmedEvent.class,new BombDisarmedListener(){
        @Override public void onBombDisarmedEvent(        BombDisarmedEvent event){
          callFunction(eventName,function,event);
        }
      }
);
      break;
    }
case "String_Node_Str":
{
    this.dispatcher.addEventListener(BombExplodedEvent.class,new BombExplodedListener(){
      @Override public void onBombExplodedEvent(      BombExplodedEvent event){
        callFunction(eventName,function,event);
      }
    }
);
    break;
  }
case "String_Node_Str":
{
  this.dispatcher.addEventListener(BombPlantedEvent.class,new BombPlantedListener(){
    @Override public void onBombPlanted(    BombPlantedEvent event){
      callFunction(eventName,function,event);
    }
  }
);
  break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(FlagCapturedEvent.class,new FlagCapturedListener(){
  @Override public void onFlagCapturedEvent(  FlagCapturedEvent event){
    callFunction(eventName,function,event);
  }
}
);
break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(FlagReturnedEvent.class,new FlagReturnedListener(){
@Override public void onFlagReturnedEvent(FlagReturnedEvent event){
  callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(FlagStolenEvent.class,new FlagStolenListener(){
@Override public void onFlagStolenEvent(FlagStolenEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(GameEndEvent.class,new GameEndListener(){
@Override public void onGameEnd(GameEndEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(KillRollEvent.class,new KillRollListener(){
@Override public void onKillRoll(KillRollEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(KillStreakEvent.class,new KillStreakListener(){
@Override public void onKillStreak(KillStreakEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(PlayerAwardEvent.class,new PlayerAwardListener(){
@Override public void onPlayerAward(PlayerAwardEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(PlayerJoinedEvent.class,new PlayerJoinedListener(){
@Override public void onPlayerJoined(PlayerJoinedEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(PlayerKilledEvent.class,new PlayerKilledListener(){
@Override public void onPlayerKilled(PlayerKilledEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(PlayerLeftEvent.class,new PlayerLeftListener(){
@Override public void onPlayerLeft(PlayerLeftEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(PlayerSpawnedEvent.class,new PlayerSpawnedListener(){
@Override public void onPlayerSpawned(PlayerSpawnedEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(RoundEndedEvent.class,new RoundEndedListener(){
@Override public void onRoundEnded(RoundEndedEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(RoundStartedEvent.class,new RoundStartedListener(){
@Override public void onRoundStarted(RoundStartedEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(SoundEmittedEvent.class,new SoundEmitterListener(){
@Override public void onSoundEmitted(SoundEmittedEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(SurvivorEvent.class,new SurvivorEventListener(){
@Override public void onSurvivorEvent(SurvivorEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
this.dispatcher.addEventListener(TileRemovedEvent.class,new TileRemovedListener(){
@Override public void onTileRemoved(TileRemovedEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
default :
{
Cons.println("String_Node_Str" + eventName + "String_Node_Str");
}
}
}

Fixed version (ground truth):
/** 
 * Adds an   {@link EventListener} to the supplied event name
 * @param eventName the event name to bind the listener to
 * @param function the listener
 */
public void addEventListener(final String eventName,final LeoObject function){
switch (eventName.toLowerCase()) {
case "String_Node_Str":
{
      addEventListener(BombDisarmedEvent.class,new BombDisarmedListener(){
        @Override public void onBombDisarmedEvent(        BombDisarmedEvent event){
          callFunction(eventName,function,event);
        }
      }
);
      break;
    }
case "String_Node_Str":
{
    addEventListener(BombExplodedEvent.class,new BombExplodedListener(){
      @Override public void onBombExplodedEvent(      BombExplodedEvent event){
        callFunction(eventName,function,event);
      }
    }
);
    break;
  }
case "String_Node_Str":
{
  addEventListener(BombPlantedEvent.class,new BombPlantedListener(){
    @Override public void onBombPlanted(    BombPlantedEvent event){
      callFunction(eventName,function,event);
    }
  }
);
  break;
}
case "String_Node_Str":
{
addEventListener(FlagCapturedEvent.class,new FlagCapturedListener(){
  @Override public void onFlagCapturedEvent(  FlagCapturedEvent event){
    callFunction(eventName,function,event);
  }
}
);
break;
}
case "String_Node_Str":
{
addEventListener(FlagReturnedEvent.class,new FlagReturnedListener(){
@Override public void onFlagReturnedEvent(FlagReturnedEvent event){
  callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
addEventListener(FlagStolenEvent.class,new FlagStolenListener(){
@Override public void onFlagStolenEvent(FlagStolenEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
addEventListener(GameEndEvent.class,new GameEndListener(){
@Override public void onGameEnd(GameEndEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
addEventListener(KillRollEvent.class,new KillRollListener(){
@Override public void onKillRoll(KillRollEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
addEventListener(KillStreakEvent.class,new KillStreakListener(){
@Override public void onKillStreak(KillStreakEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
addEventListener(PlayerAwardEvent.class,new PlayerAwardListener(){
@Override public void onPlayerAward(PlayerAwardEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
addEventListener(PlayerJoinedEvent.class,new PlayerJoinedListener(){
@Override public void onPlayerJoined(PlayerJoinedEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
addEventListener(PlayerKilledEvent.class,new PlayerKilledListener(){
@Override public void onPlayerKilled(PlayerKilledEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
addEventListener(PlayerLeftEvent.class,new PlayerLeftListener(){
@Override public void onPlayerLeft(PlayerLeftEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
addEventListener(PlayerSpawnedEvent.class,new PlayerSpawnedListener(){
@Override public void onPlayerSpawned(PlayerSpawnedEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
addEventListener(RoundEndedEvent.class,new RoundEndedListener(){
@Override public void onRoundEnded(RoundEndedEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
addEventListener(RoundStartedEvent.class,new RoundStartedListener(){
@Override public void onRoundStarted(RoundStartedEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
addEventListener(SoundEmittedEvent.class,new SoundEmitterListener(){
@Override public void onSoundEmitted(SoundEmittedEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
addEventListener(SurvivorEvent.class,new SurvivorEventListener(){
@Override public void onSurvivorEvent(SurvivorEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
case "String_Node_Str":
{
addEventListener(TileRemovedEvent.class,new TileRemovedListener(){
@Override public void onTileRemoved(TileRemovedEvent event){
callFunction(eventName,function,event);
}
}
);
break;
}
default :
{
Cons.println("String_Node_Str" + eventName + "String_Node_Str");
}
}
}