Program: 159655
Project: 159655
Buggy source:
private void init(){
  game.addTableEventListener(new Listener<TableEvent>(){
    @Override public void event(    TableEvent event){
      try {
        PriorityTimer timer;
        UUID playerId;
switch (event.getEventType()) {
case UPDATE:
          updateGame();
        break;
case INFO:
      ChatManager.getInstance().broadcast(chatId,"String_Node_Str",event.getMessage(),MessageColor.BLACK);
    logger.debug(game.getId() + "String_Node_Str" + event.getMessage());
  break;
case STATUS:
ChatManager.getInstance().broadcast(chatId,"String_Node_Str",event.getMessage(),MessageColor.ORANGE,event.getWithTime());
logger.debug(game.getId() + "String_Node_Str" + event.getMessage());
break;
case REVEAL:
revealCards(event.getMessage(),event.getCards());
break;
case ERROR:
error(event.getMessage(),event.getException());
break;
case INIT_TIMER:
final UUID initPlayerId=event.getPlayerId();
if (initPlayerId == null) {
throw new IllegalStateException("String_Node_Str");
}
createPlayerTimer(event.getPlayerId(),game.getPriorityTime());
break;
case RESUME_TIMER:
playerId=event.getPlayerId();
if (playerId == null) {
throw new IllegalStateException("String_Node_Str");
}
timer=timers.get(playerId);
if (timer == null) {
Player player=game.getState().getPlayer(playerId);
if (player != null) {
timer=createPlayerTimer(event.getPlayerId(),player.getPriorityTimeLeft());
}
 else {
throw new IllegalStateException("String_Node_Str");
}
}
timer.resume();
break;
case PAUSE_TIMER:
playerId=event.getPlayerId();
if (playerId == null) {
throw new IllegalStateException("String_Node_Str");
}
timer=timers.get(playerId);
if (timer == null) {
throw new IllegalStateException("String_Node_Str" + playerId);
}
timer.pause();
break;
}
}
 catch (MageException ex) {
logger.fatal("String_Node_Str",ex);
}
}
}
);
game.addPlayerQueryEventListener(new Listener<PlayerQueryEvent>(){
@Override public void event(PlayerQueryEvent event){
logger.trace(new StringBuilder(event.getPlayerId().toString()).append("String_Node_Str").append(event.getQueryType()).append("String_Node_Str").append(event.getMessage()).toString());
try {
switch (event.getQueryType()) {
case ASK:
ask(event.getPlayerId(),event.getMessage());
break;
case PICK_TARGET:
target(event.getPlayerId(),event.getMessage(),event.getCards(),event.getPerms(),event.getTargets(),event.isRequired(),event.getOptions());
break;
case PICK_ABILITY:
target(event.getPlayerId(),event.getMessage(),event.getAbilities(),event.isRequired(),event.getOptions());
break;
case SELECT:
select(event.getPlayerId(),event.getMessage());
break;
case PLAY_MANA:
playMana(event.getPlayerId(),event.getMessage());
break;
case PLAY_X_MANA:
playXMana(event.getPlayerId(),event.getMessage());
break;
case CHOOSE_ABILITY:
chooseAbility(event.getPlayerId(),event.getAbilities());
break;
case CHOOSE_PILE:
choosePile(event.getPlayerId(),event.getMessage(),event.getPile1(),event.getPile2());
break;
case CHOOSE_MODE:
chooseMode(event.getPlayerId(),event.getModes());
break;
case CHOOSE:
choose(event.getPlayerId(),event.getMessage(),event.getChoices());
break;
case AMOUNT:
amount(event.getPlayerId(),event.getMessage(),event.getMin(),event.getMax());
break;
case LOOK:
lookAtCards(event.getPlayerId(),event.getMessage(),event.getCards());
break;
case PERSONAL_MESSAGE:
informPersonal(event.getPlayerId(),event.getMessage());
break;
}
}
 catch (MageException ex) {
logger.fatal("String_Node_Str",ex);
}
}
}
);
checkStart();
}

Fixed version (ground truth):
private void init(){
  game.addTableEventListener(new Listener<TableEvent>(){
    @Override public void event(    TableEvent event){
      try {
        PriorityTimer timer;
        UUID playerId;
switch (event.getEventType()) {
case UPDATE:
          updateGame();
        break;
case INFO:
      ChatManager.getInstance().broadcast(chatId,"String_Node_Str",event.getMessage(),MessageColor.BLACK);
    logger.debug(game.getId() + "String_Node_Str" + event.getMessage());
  break;
case STATUS:
ChatManager.getInstance().broadcast(chatId,"String_Node_Str",event.getMessage(),MessageColor.ORANGE,event.getWithTime());
logger.debug(game.getId() + "String_Node_Str" + event.getMessage());
break;
case ERROR:
error(event.getMessage(),event.getException());
break;
case INIT_TIMER:
final UUID initPlayerId=event.getPlayerId();
if (initPlayerId == null) {
throw new MageException("String_Node_Str");
}
createPlayerTimer(event.getPlayerId(),game.getPriorityTime());
break;
case RESUME_TIMER:
playerId=event.getPlayerId();
if (playerId == null) {
throw new MageException("String_Node_Str");
}
timer=timers.get(playerId);
if (timer == null) {
Player player=game.getState().getPlayer(playerId);
if (player != null) {
timer=createPlayerTimer(event.getPlayerId(),player.getPriorityTimeLeft());
}
 else {
throw new MageException("String_Node_Str");
}
}
timer.resume();
break;
case PAUSE_TIMER:
playerId=event.getPlayerId();
if (playerId == null) {
throw new MageException("String_Node_Str");
}
timer=timers.get(playerId);
if (timer == null) {
throw new MageException("String_Node_Str" + playerId);
}
timer.pause();
break;
}
}
 catch (MageException ex) {
logger.fatal("String_Node_Str",ex);
}
}
}
);
game.addPlayerQueryEventListener(new Listener<PlayerQueryEvent>(){
@Override public void event(PlayerQueryEvent event){
logger.trace(new StringBuilder(event.getPlayerId().toString()).append("String_Node_Str").append(event.getQueryType()).append("String_Node_Str").append(event.getMessage()).toString());
try {
switch (event.getQueryType()) {
case ASK:
ask(event.getPlayerId(),event.getMessage());
break;
case PICK_TARGET:
target(event.getPlayerId(),event.getMessage(),event.getCards(),event.getPerms(),event.getTargets(),event.isRequired(),event.getOptions());
break;
case PICK_ABILITY:
target(event.getPlayerId(),event.getMessage(),event.getAbilities(),event.isRequired(),event.getOptions());
break;
case SELECT:
select(event.getPlayerId(),event.getMessage());
break;
case PLAY_MANA:
playMana(event.getPlayerId(),event.getMessage());
break;
case PLAY_X_MANA:
playXMana(event.getPlayerId(),event.getMessage());
break;
case CHOOSE_ABILITY:
chooseAbility(event.getPlayerId(),event.getAbilities());
break;
case CHOOSE_PILE:
choosePile(event.getPlayerId(),event.getMessage(),event.getPile1(),event.getPile2());
break;
case CHOOSE_MODE:
chooseMode(event.getPlayerId(),event.getModes());
break;
case CHOOSE:
choose(event.getPlayerId(),event.getMessage(),event.getChoices());
break;
case AMOUNT:
amount(event.getPlayerId(),event.getMessage(),event.getMin(),event.getMax());
break;
case PERSONAL_MESSAGE:
informPersonal(event.getPlayerId(),event.getMessage());
break;
}
}
 catch (MageException ex) {
logger.fatal("String_Node_Str",ex);
}
}
}
);
checkStart();
}