nus-yam/ex-repair huggingface dataset:
Program: 157756
Project: 157756
Buggy source:
@Override public synchronized void rollbackTurns(int turnsToRollback){
  if (gameOptions.rollbackTurnsAllowed) {
    int turnToGoTo=getTurnNum() - turnsToRollback;
    if (turnToGoTo < 1 || !gameStatesRollBack.containsKey(turnToGoTo)) {
      informPlayers(GameLog.getPlayerRequestColoredText("String_Node_Str" + turnsToRollback + "String_Node_Str"));
    }
 else {
      GameState restore=gameStatesRollBack.get(turnToGoTo);
      if (restore != null) {
        informPlayers(GameLog.getPlayerRequestColoredText("String_Node_Str" + restore.getTurnNum()));
        state.restoreForRollBack(restore);
        playerList.setCurrent(state.getPlayerByOrderId());
        gameStatesRollBack.put(getTurnNum(),state.copy());
        executingRollback=true;
        for (        Player playerObject : getPlayers().values()) {
          if (playerObject.isHuman() && playerObject.isInGame()) {
            playerObject.abort();
            playerObject.resetPlayerPassedActions();
          }
        }
        fireUpdatePlayersEvent();
      }
    }
  }
}

Fixed version (ground truth):
@Override public synchronized void rollbackTurns(int turnsToRollback){
  if (gameOptions.rollbackTurnsAllowed) {
    int turnToGoTo=getTurnNum() - turnsToRollback;
    if (turnToGoTo < 1 || !gameStatesRollBack.containsKey(turnToGoTo)) {
      informPlayers(GameLog.getPlayerRequestColoredText("String_Node_Str" + turnsToRollback + "String_Node_Str"));
    }
 else {
      GameState restore=gameStatesRollBack.get(turnToGoTo);
      if (restore != null) {
        informPlayers(GameLog.getPlayerRequestColoredText("String_Node_Str" + restore.getTurnNum()));
        state.restoreForRollBack(restore);
        playerList.setCurrent(state.getPlayerByOrderId());
        gameStatesRollBack.put(getTurnNum(),state.copy());
        executingRollback=true;
        for (        Player playerObject : getPlayers().values()) {
          if (playerObject.isHuman() && playerObject.isInGame()) {
            playerObject.resetStoredBookmark(this);
            playerObject.abort();
            playerObject.resetPlayerPassedActions();
          }
        }
        fireUpdatePlayersEvent();
      }
    }
  }
}
Program: 157758
Project: 157758
Buggy source:
protected void restoreState(int bookmark,String text,Game game){
  game.restoreState(bookmark,text);
  if (storedBookmark >= bookmark) {
    resetStoredBookmark(game);
  }
}

Fixed version (ground truth):
protected void restoreState(int bookmark,String text,Game game){
  if (storedBookmark > -1) {
    game.restoreState(bookmark,text);
    if (storedBookmark >= bookmark) {
      resetStoredBookmark(game);
    }
  }
}
Program: 157760
Project: 157760
Buggy source:
/** 
 * @param game
 * @param appliedEffects
 * @return the number that the player rolled
 */
@Override public int rollDice(Game game,ArrayList<UUID> appliedEffects,int numSides){
  int result=RandomUtil.nextInt(numSides) + 1;
  if (!game.isSimulation()) {
    game.informPlayers("String_Node_Str" + getLogName() + "String_Node_Str"+ result+ "String_Node_Str"+ numSides+ "String_Node_Str");
  }
  GameEvent event=new GameEvent(GameEvent.EventType.ROLL_DICE,playerId,null,playerId,result,true);
  event.setAppliedEffects(appliedEffects);
  event.setAmount(result);
  event.setData(numSides + "String_Node_Str");
  if (!game.replaceEvent(event)) {
    GameEvent ge=new GameEvent(GameEvent.EventType.DICE_ROLLED,playerId,null,playerId,event.getAmount(),event.getFlag());
    ge.setData(numSides + "String_Node_Str");
    game.fireEvent(ge);
  }
  return event.getAmount();
}

Fixed version (ground truth):
/** 
 * @param game
 * @param appliedEffects
 * @param numSides Number of sides the dice has
 * @return the number that the player rolled
 */
@Override public int rollDice(Game game,ArrayList<UUID> appliedEffects,int numSides){
  int result=RandomUtil.nextInt(numSides) + 1;
  if (!game.isSimulation()) {
    game.informPlayers("String_Node_Str" + getLogName() + "String_Node_Str"+ result+ "String_Node_Str"+ numSides+ "String_Node_Str");
  }
  GameEvent event=new GameEvent(GameEvent.EventType.ROLL_DICE,playerId,null,playerId,result,true);
  event.setAppliedEffects(appliedEffects);
  event.setAmount(result);
  event.setData(numSides + "String_Node_Str");
  if (!game.replaceEvent(event)) {
    GameEvent ge=new GameEvent(GameEvent.EventType.DICE_ROLLED,playerId,null,playerId,event.getAmount(),event.getFlag());
    ge.setData(numSides + "String_Node_Str");
    game.fireEvent(ge);
  }
  return event.getAmount();
}
Program: 157762
Project: 157762
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  MageObject mageObject=game.getObject(source.getSourceId());
  if (controller != null & mageObject != null) {
    SubType subType=ChooseCreatureTypeEffect.getChoosenCreatureType(source.getSourceId(),game);
    if (subType != null) {
      FilterPermanent filter=new FilterCreaturePermanent("String_Node_Str");
      filter.add(Predicates.not(new SubtypePredicate(subType)));
      return new DestroyAllEffect(filter).apply(game,source);
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  Choice typeChoice=new ChoiceCreatureType(game.getObject(source.getSourceId()));
  if (controller != null && controller.choose(outcome,typeChoice,game)) {
    game.informPlayers(controller.getLogName() + "String_Node_Str" + typeChoice.getChoice());
    FilterCreaturePermanent filter=new FilterCreaturePermanent("String_Node_Str");
    filter.add(Predicates.not(new SubtypePredicate(SubType.byDescription(typeChoice.getChoice()))));
    return new DestroyAllEffect(filter).apply(game,source);
  }
  return false;
}
Program: 157763
Project: 157763
Buggy source:
@Override protected void actionWithSelectedCards(Cards cards,Game game,Ability source,String windowName){
  Player player=game.getPlayer(source.getControllerId());
  if (player != null && foundCardsToPick > 0) {
    if (!optional || player.chooseUse(Outcome.DrawCard,getMayText(),source,game)) {
      FilterCard pickFilter=filter.copy();
      pickFilter.setMessage(getPickText());
      TargetCard target=new TargetCard((upTo ? 0 : numberToPick.calculate(game,source,this)),numberToPick.calculate(game,source,this),Zone.LIBRARY,pickFilter);
      if (player.choose(Outcome.DrawCard,cards,target,game)) {
        Cards pickedCards=new CardsImpl(target.getTargets());
        cards.removeAll(pickedCards);
        if (targetPickedCards == Zone.LIBRARY && !putOnTopSelected) {
          player.putCardsOnBottomOfLibrary(pickedCards,game,source,true);
        }
 else {
          player.moveCards(pickedCards.getCards(game),targetPickedCards,source,game);
        }
        if (revealPickedCards) {
          player.revealCards(windowName,pickedCards,game);
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override protected void actionWithSelectedCards(Cards cards,Game game,Ability source,String windowName){
  Player player=game.getPlayer(source.getControllerId());
  if (player != null && foundCardsToPick > 0) {
    if (!optional || player.chooseUse(Outcome.DrawCard,getMayText(),source,game)) {
      FilterCard pickFilter=filter.copy();
      pickFilter.setMessage(getPickText());
      int number=min(cards.size(),numberToPick.calculate(game,source,this));
      TargetCard target=new TargetCard((upTo ? 0 : number),number,Zone.LIBRARY,pickFilter);
      if (player.choose(Outcome.DrawCard,cards,target,game)) {
        Cards pickedCards=new CardsImpl(target.getTargets());
        cards.removeAll(pickedCards);
        if (targetPickedCards == Zone.LIBRARY && !putOnTopSelected) {
          player.putCardsOnBottomOfLibrary(pickedCards,game,source,true);
        }
 else {
          player.moveCards(pickedCards.getCards(game),targetPickedCards,source,game);
        }
        if (revealPickedCards) {
          player.revealCards(windowName,pickedCards,game);
        }
      }
    }
  }
}
Program: 157764
Project: 157764
Buggy source:
/** 
 * Put the rest of the cards back to defined zone
 * @param source
 * @param player
 * @param cards
 * @param game
 */
protected void putCardsBack(Ability source,Player player,Cards cards,Game game){
switch (targetZoneLookedCards) {
case LIBRARY:
    if (putOnTop) {
      player.putCardsOnTopOfLibrary(cards,game,source,!backInRandomOrder);
    }
  break;
case GRAVEYARD:
player.moveCards(cards,Zone.GRAVEYARD,source,game);
break;
default :
}
}

Fixed version (ground truth):
/** 
 * Put the rest of the cards back to defined zone
 * @param source
 * @param player
 * @param cards
 * @param game
 */
protected void putCardsBack(Ability source,Player player,Cards cards,Game game){
switch (targetZoneLookedCards) {
case LIBRARY:
    if (putOnTop) {
      player.putCardsOnTopOfLibrary(cards,game,source,!backInRandomOrder);
    }
 else {
      player.putCardsOnBottomOfLibrary(cards,game,source,!backInRandomOrder);
    }
  break;
case GRAVEYARD:
player.moveCards(cards,Zone.GRAVEYARD,source,game);
break;
default :
}
}
Program: 157765
Project: 157765
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  Permanent sourcePermanent=game.getPermanentOrLKIBattlefield(source.getSourceId());
  if (controller != null && sourcePermanent != null) {
    UUID exileId=CardUtil.getCardExileZoneId(game,source);
    int numberOfCards=0;
    ExileZone exileZone=game.getExile().getExileZone(exileId);
    if (exileZone != null) {
      for (      Card card : exileZone.getCards(game)) {
        numberOfCards++;
        card.moveToZone(Zone.HAND,source.getSourceId(),game,true);
        card.setFaceDown(false,game);
      }
    }
    if (numberOfCards > 0) {
      game.informPlayers(sourcePermanent.getLogName() + "String_Node_Str" + controller.getLogName()+ "String_Node_Str"+ numberOfCards+ "String_Node_Str"+ (numberOfCards > 1 ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str");
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  Permanent sourcePermanent=game.getPermanentOrLKIBattlefield(source.getSourceId());
  if (controller != null && sourcePermanent != null) {
    UUID exileId=CardUtil.getCardExileZoneId(game,source.getSourceId(),true);
    int numberOfCards=0;
    ExileZone exileZone=game.getExile().getExileZone(exileId);
    if (exileZone != null) {
      for (      Card card : exileZone.getCards(game)) {
        numberOfCards++;
        card.moveToZone(Zone.HAND,source.getSourceId(),game,true);
        card.setFaceDown(false,game);
      }
    }
    if (numberOfCards > 0) {
      game.informPlayers(sourcePermanent.getLogName() + "String_Node_Str" + controller.getLogName()+ "String_Node_Str"+ numberOfCards+ "String_Node_Str"+ (numberOfCards > 1 ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str");
    }
    return true;
  }
  return false;
}
Program: 157766
Project: 157766
Buggy source:
@Override public boolean checkTrigger(GameEvent event,Game game){
  DamagedPlayerEvent damageEvent=(DamagedPlayerEvent)event;
  Permanent p=game.getPermanent(event.getSourceId());
  if (damageEvent.isCombatDamage() && p != null && p.getAttachments().contains(this.getSourceId())) {
    game.getState().setValue(new StringBuilder("String_Node_Str").append(getSourceId().toString()).toString(),new Integer(damageEvent.getAmount()));
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean checkTrigger(GameEvent event,Game game){
  DamagedPlayerEvent damageEvent=(DamagedPlayerEvent)event;
  Permanent damageSource=game.getPermanent(event.getSourceId());
  if (damageEvent.isCombatDamage() && damageSource != null && damageSource.getAttachments().contains(this.getSourceId())) {
    game.getState().setValue("String_Node_Str" + getSourceId(),damageEvent.getAmount());
    return true;
  }
  return false;
}
Program: 157767
Project: 157767
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Integer damage=(Integer)game.getState().getValue(new StringBuilder("String_Node_Str").append(source.getSourceId().toString()).toString());
  if (damage != null) {
    return (new CreateTokenEffect(new SaprolingToken(),damage.intValue()).apply(game,source));
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Integer damage=(Integer)game.getState().getValue("String_Node_Str" + source.getSourceId());
  if (damage != null) {
    return (new CreateTokenEffect(new SaprolingToken(),damage).apply(game,source));
  }
  return false;
}
Program: 157768
Project: 157768
Buggy source:
@Override public boolean replaceEvent(GameEvent event,Ability source,Game game){
  Player player=game.getPlayer(source.getControllerId());
  if (player != null) {
    TargetCardInHand target=new TargetCardInHand(new FilterLandCard());
    Cost cost=new DiscardTargetCost(target);
    if (cost.canPay(source,source.getSourceId(),source.getControllerId(),game) && player.chooseUse(outcome,"String_Node_Str",source,game) && player.chooseTarget(Outcome.Discard,target,source,game)) {
      player.discard(game.getCard(target.getFirstTarget()),source,game);
      return false;
    }
 else {
      Permanent permanent=game.getPermanent(event.getTargetId());
      if (permanent != null) {
        player.moveCards(permanent,Zone.GRAVEYARD,source,game);
      }
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean replaceEvent(GameEvent event,Ability source,Game game){
  Player player=game.getPlayer(source.getControllerId());
  if (player != null) {
    TargetCardInHand target=new TargetCardInHand(new FilterLandCard());
    Cost cost=new DiscardTargetCost(target);
    if (cost.canPay(source,source.getSourceId(),source.getControllerId(),game) && player.chooseUse(outcome,"String_Node_Str",source,game) && player.chooseTarget(Outcome.Discard,target,source,game)) {
      player.discard(game.getCard(target.getFirstTarget()),source,game);
      return false;
    }
 else {
      Permanent permanent=game.getPermanentEntering(event.getTargetId());
      if (permanent != null) {
        player.moveCards(permanent,Zone.GRAVEYARD,source,game);
      }
      return true;
    }
  }
  return false;
}
Program: 157769
Project: 157769
Buggy source:
@Override public Card getRandom(Game game){
  if (this.isEmpty()) {
    return null;
  }
  UUID[] cards=this.toArray(new UUID[this.size()]);
  return game.getCard(cards[RandomUtil.nextInt(cards.length)]);
}

Fixed version (ground truth):
@Override public Card getRandom(Game game){
  if (this.isEmpty()) {
    return null;
  }
  UUID[] cards=this.toArray(new UUID[this.size()]);
  MageObject object=game.getObject(cards[RandomUtil.nextInt(cards.length)]);
  if (object instanceof Card) {
    return (Card)object;
  }
  return null;
}
Program: 157770
Project: 157770
Buggy source:
@Override public boolean chooseTarget(Outcome outcome,Cards cards,TargetCard target,Ability source,Game game){
  if (cards.isEmpty()) {
    return !target.isRequired(source);
  }
  Card card=cards.getRandom(game);
  target.addTarget(card.getId(),source,game);
  return true;
}

Fixed version (ground truth):
@Override public boolean chooseTarget(Outcome outcome,Cards cards,TargetCard target,Ability source,Game game){
  if (cards.isEmpty()) {
    return !target.isRequired(source);
  }
  Card card=cards.getRandom(game);
  if (card != null) {
    target.addTarget(card.getId(),source,game);
    return true;
  }
  return false;
}
Program: 157771
Project: 157771
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  MageObject sourceObject=game.getObject(source.getSourceId());
  String cardName=(String)game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY);
  if (sourceObject != null && controller != null && cardName != null && !cardName.isEmpty()) {
    if (!controller.getHand().isEmpty()) {
      Cards revealed=new CardsImpl();
      Card card=controller.getHand().getRandom(game);
      revealed.add(card);
      controller.revealCards(sourceObject.getIdName(),revealed,game);
      if (card.getName().equals(cardName)) {
        Permanent creature=game.getPermanent(targetPointer.getFirst(game,source));
        if (creature != null) {
          creature.damage(2,source.getSourceId(),game,false,true);
          return true;
        }
        Player player=game.getPlayer(targetPointer.getFirst(game,source));
        if (player != null) {
          player.damage(2,source.getSourceId(),game,false,true);
          return true;
        }
        return false;
      }
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  MageObject sourceObject=game.getObject(source.getSourceId());
  String cardName=(String)game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY);
  if (sourceObject != null && controller != null && cardName != null && !cardName.isEmpty()) {
    if (!controller.getHand().isEmpty()) {
      Cards revealed=new CardsImpl();
      Card card=controller.getHand().getRandom(game);
      if (card == null) {
        return false;
      }
      revealed.add(card);
      controller.revealCards(sourceObject.getIdName(),revealed,game);
      if (card.getName().equals(cardName)) {
        Permanent creature=game.getPermanent(targetPointer.getFirst(game,source));
        if (creature != null) {
          creature.damage(2,source.getSourceId(),game,false,true);
          return true;
        }
        Player player=game.getPlayer(targetPointer.getFirst(game,source));
        if (player != null) {
          player.damage(2,source.getSourceId(),game,false,true);
          return true;
        }
        return false;
      }
    }
    return true;
  }
  return false;
}
Program: 157772
Project: 157772
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Player player=game.getPlayer(source.getControllerId());
  if (player == null) {
    return false;
  }
  Cards cards=new CardsImpl();
  boolean planeswalkerIncluded=false;
  for (int i=0; i < 7; i++) {
    Card card=player.getLibrary().removeFromTop(game);
    if (card != null) {
      cards.add(card);
      if (filter.match(card,game)) {
        planeswalkerIncluded=true;
      }
    }
  }
  player.lookAtCards("String_Node_Str",cards,game);
  if (planeswalkerIncluded) {
    TargetCard target=new TargetCard(0,2,Zone.LIBRARY,filter);
    if (player.choose(Outcome.DrawCard,cards,target,game)) {
      Cards pickedCards=new CardsImpl(target.getTargets());
      cards.removeAll(pickedCards);
      player.moveCards(pickedCards.getCards(game),Zone.BATTLEFIELD,source,game);
    }
  }
  while (!cards.isEmpty()) {
    Card card=cards.getRandom(game);
    if (card != null) {
      cards.remove(card);
      card.moveToZone(Zone.LIBRARY,source.getSourceId(),game,false);
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  if (controller == null) {
    return false;
  }
  Cards cards=new CardsImpl();
  boolean planeswalkerIncluded=false;
  for (int i=0; i < 7; i++) {
    Card card=controller.getLibrary().removeFromTop(game);
    if (card != null) {
      cards.add(card);
      if (filter.match(card,game)) {
        planeswalkerIncluded=true;
      }
    }
  }
  controller.lookAtCards("String_Node_Str",cards,game);
  if (planeswalkerIncluded) {
    TargetCard target=new TargetCard(0,2,Zone.LIBRARY,filter);
    if (controller.choose(Outcome.DrawCard,cards,target,game)) {
      Cards pickedCards=new CardsImpl(target.getTargets());
      cards.removeAll(pickedCards);
      controller.moveCards(pickedCards.getCards(game),Zone.BATTLEFIELD,source,game);
    }
  }
  controller.putCardsOnBottomOfLibrary(cards,game,source,false);
  return true;
}
Program: 157773
Project: 157773
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  MageObject sourceObject=game.getObject(source.getSourceId());
  if (controller != null && sourceObject != null) {
    Permanent targetCreature=game.getPermanent(getTargetPointer().getFirst(game,source));
    if (targetCreature != null) {
      Player controllerOfTargetCreature=game.getPlayer(targetCreature.getControllerId());
      if (controllerOfTargetCreature != null) {
        if (!controllerOfTargetCreature.getHand().isEmpty()) {
          Cards cards=new CardsImpl();
          Card card=controllerOfTargetCreature.getHand().getRandom(game);
          cards.add(card);
          controllerOfTargetCreature.revealCards(sourceObject.getName(),cards,game);
          int damage=card.getConvertedManaCost();
          targetCreature.damage(damage,source.getSourceId(),game,false,true);
          controllerOfTargetCreature.damage(damage,source.getSourceId(),game,false,true);
          return true;
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  MageObject sourceObject=game.getObject(source.getSourceId());
  if (controller != null && sourceObject != null) {
    Permanent targetCreature=game.getPermanent(getTargetPointer().getFirst(game,source));
    if (targetCreature != null) {
      Player controllerOfTargetCreature=game.getPlayer(targetCreature.getControllerId());
      if (controllerOfTargetCreature != null) {
        if (!controllerOfTargetCreature.getHand().isEmpty()) {
          Cards cards=new CardsImpl();
          Card card=controllerOfTargetCreature.getHand().getRandom(game);
          if (card != null) {
            cards.add(card);
            controllerOfTargetCreature.revealCards(sourceObject.getName(),cards,game);
            int damage=card.getConvertedManaCost();
            targetCreature.damage(damage,source.getSourceId(),game,false,true);
            controllerOfTargetCreature.damage(damage,source.getSourceId(),game,false,true);
            return true;
          }
        }
      }
    }
  }
  return false;
}
Program: 157774
Project: 157774
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Player player=game.getPlayer(source.getControllerId());
  if (player == null) {
    return false;
  }
  Cards cards=new CardsImpl();
  int count=source.getManaCostsToPay().getX();
  count=Math.min(player.getLibrary().size(),count);
  boolean legendaryIncluded=false;
  for (int i=0; i < count; i++) {
    Card card=player.getLibrary().removeFromTop(game);
    if (card != null) {
      cards.add(card);
      if (filter.match(card,game)) {
        legendaryIncluded=true;
      }
    }
  }
  player.lookAtCards("String_Node_Str",cards,game);
  if (!cards.isEmpty() && legendaryIncluded && player.chooseUse(outcome,"String_Node_Str",source,game)) {
    if (cards.size() == 1) {
      Card card=cards.getRandom(game);
      cards.remove(card);
      card.moveToZone(Zone.HAND,source.getSourceId(),game,false);
      return true;
    }
 else {
      TargetCard target=new TargetCard(Zone.LIBRARY,filter);
      if (player.choose(outcome,cards,target,game)) {
        Card card=cards.get(target.getFirstTarget(),game);
        if (card != null) {
          cards.remove(card);
          card.moveToZone(Zone.HAND,source.getSourceId(),game,false);
        }
      }
    }
  }
  while (!cards.isEmpty()) {
    Card card=cards.getRandom(game);
    if (card != null) {
      cards.remove(card);
      card.moveToZone(Zone.LIBRARY,source.getSourceId(),game,false);
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  MageObject sourceObject=source.getSourceObject(game);
  if (controller == null || sourceObject == null) {
    return false;
  }
  Cards cards=new CardsImpl();
  cards.addAll(controller.getLibrary().getTopCards(game,source.getManaCostsToPay().getX()));
  boolean legendaryIncluded=cards.count(filter,game) > 0;
  controller.lookAtCards(sourceObject.getIdName(),cards,game);
  if (!cards.isEmpty() && legendaryIncluded && controller.chooseUse(outcome,"String_Node_Str",source,game)) {
    if (cards.size() == 1) {
      controller.moveCards(cards,Zone.HAND,source,game);
      return true;
    }
 else {
      TargetCard target=new TargetCard(Zone.LIBRARY,filter);
      if (controller.choose(outcome,cards,target,game)) {
        Card card=cards.get(target.getFirstTarget(),game);
        if (card != null) {
          cards.remove(card);
          controller.moveCards(card,Zone.HAND,source,game);
        }
      }
    }
  }
  controller.putCardsOnBottomOfLibrary(cards,game,source,false);
  return true;
}
Program: 157775
Project: 157775
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(targetPointer.getFirst(game,source));
  MageObject sourceObject=source.getSourceObject(game);
  if (controller != null && sourceObject != null) {
    if (!controller.getHand().isEmpty()) {
      Cards revealed=new CardsImpl();
      Card card=controller.getHand().getRandom(game);
      revealed.add(card);
      controller.revealCards(sourceObject.getIdName(),revealed,game);
      controller.damage(card.getConvertedManaCost(),source.getSourceId(),game,false,true);
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(targetPointer.getFirst(game,source));
  MageObject sourceObject=source.getSourceObject(game);
  if (controller != null && sourceObject != null) {
    if (!controller.getHand().isEmpty()) {
      Cards revealed=new CardsImpl();
      Card card=controller.getHand().getRandom(game);
      if (card != null) {
        revealed.add(card);
        controller.revealCards(sourceObject.getIdName(),revealed,game);
        controller.damage(card.getConvertedManaCost(),source.getSourceId(),game,false,true);
        return true;
      }
      return false;
    }
    return true;
  }
  return false;
}
Program: 157776
Project: 157776
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  MageObject sourceObject=game.getObject(source.getSourceId());
  if (controller != null && controller.getLibrary().hasCards()) {
    CardsImpl cards=new CardsImpl();
    Library library=controller.getLibrary();
    Card card=null;
    do {
      card=library.removeFromTop(game);
      if (card != null) {
        cards.add(card);
      }
    }
 while (library.hasCards() && card != null && !card.isArtifact());
    if (!cards.isEmpty()) {
      controller.revealCards(sourceObject.getIdName(),cards,game);
    }
    int revealed=cards.size();
    if (card != null && card.isArtifact()) {
      controller.moveCards(card,Zone.BATTLEFIELD,source,game);
      cards.remove(card);
    }
    while (!cards.isEmpty()) {
      card=cards.getRandom(game);
      if (card != null) {
        cards.remove(card);
        controller.moveCardToLibraryWithInfo(card,source.getSourceId(),game,Zone.HAND,false,false);
      }
    }
    controller.damage(revealed,source.getSourceId(),game,false,true);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  MageObject sourceObject=game.getObject(source.getSourceId());
  if (controller != null && controller.getLibrary().hasCards()) {
    CardsImpl cards=new CardsImpl();
    Library library=controller.getLibrary();
    Card card=null;
    do {
      card=library.removeFromTop(game);
      if (card != null) {
        cards.add(card);
      }
    }
 while (library.hasCards() && card != null && !card.isArtifact());
    if (!cards.isEmpty()) {
      controller.revealCards(sourceObject.getIdName(),cards,game);
    }
    int revealed=cards.size();
    if (card != null && card.isArtifact()) {
      controller.moveCards(card,Zone.BATTLEFIELD,source,game);
      cards.remove(card);
    }
    controller.putCardsOnBottomOfLibrary(cards,game,source,false);
    controller.damage(revealed,source.getSourceId(),game,false,true);
    return true;
  }
  return false;
}
Program: 157777
Project: 157777
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Player you=game.getPlayer(source.getControllerId());
  MageObject sourceObject=game.getObject(source.getSourceId());
  String cardName=(String)game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY);
  if (sourceObject != null && you != null && cardName != null && !cardName.isEmpty()) {
    if (!you.getHand().isEmpty()) {
      Cards revealed=new CardsImpl();
      Card card=you.getHand().getRandom(game);
      revealed.add(card);
      you.revealCards(sourceObject.getName(),revealed,game);
      if (card.getName().equals(cardName)) {
        Permanent creature=game.getPermanent(targetPointer.getFirst(game,source));
        if (creature != null) {
          creature.damage(2,source.getSourceId(),game,false,true);
          return true;
        }
        Player player=game.getPlayer(targetPointer.getFirst(game,source));
        if (player != null) {
          player.damage(2,source.getSourceId(),game,false,true);
          return true;
        }
        return false;
      }
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Player you=game.getPlayer(source.getControllerId());
  MageObject sourceObject=game.getObject(source.getSourceId());
  String cardName=(String)game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY);
  if (sourceObject != null && you != null && cardName != null && !cardName.isEmpty()) {
    if (!you.getHand().isEmpty()) {
      Cards revealed=new CardsImpl();
      Card card=you.getHand().getRandom(game);
      if (card == null) {
        return false;
      }
      revealed.add(card);
      you.revealCards(sourceObject.getName(),revealed,game);
      if (card.getName().equals(cardName)) {
        Permanent creature=game.getPermanent(targetPointer.getFirst(game,source));
        if (creature != null) {
          creature.damage(2,source.getSourceId(),game,false,true);
          return true;
        }
        Player player=game.getPlayer(targetPointer.getFirst(game,source));
        if (player != null) {
          player.damage(2,source.getSourceId(),game,false,true);
          return true;
        }
        return false;
      }
    }
    return true;
  }
  return false;
}
Program: 157778
Project: 157778
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Player player=game.getPlayer(source.getControllerId());
  if (player != null) {
    Cards cards=player.getGraveyard();
    for (int i=0; i < 2 && !cards.isEmpty(); i++) {
      Card card=cards.getRandom(game);
      if (card != null) {
        card.moveToZone(Zone.HAND,source.getSourceId(),game,true);
        cards.remove(card);
        game.informPlayers(card.getName() + "String_Node_Str" + player.getLogName());
      }
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Player player=game.getPlayer(source.getControllerId());
  if (player != null) {
    Cards cards=player.getGraveyard();
    for (int i=0; i < 2 && !cards.isEmpty(); i++) {
      Card card=cards.getRandom(game);
      if (card != null) {
        card.moveToZone(Zone.HAND,source.getSourceId(),game,true);
        cards.remove(card);
        game.informPlayers(card.getName() + "String_Node_Str" + player.getLogName());
      }
 else {
        return false;
      }
    }
    return true;
  }
  return false;
}
Program: 157780
Project: 157780
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  if (controller != null) {
    ManaCosts cost=new ManaCostsImpl("String_Node_Str");
    if (controller.chooseUse(Outcome.Damage,"String_Node_Str" + cost.getText() + "String_Node_Str",source,game)) {
      int costX=controller.announceXMana(0,Integer.MAX_VALUE,"String_Node_Str",game,source);
      cost.add(new GenericManaCost(costX));
      if (cost.pay(source,game,source.getSourceId(),source.getControllerId(),false,null)) {
        controller.gainLife(costX,game);
        controller.drawCards(costX,game);
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  if (controller != null) {
    ManaCosts cost=new ManaCostsImpl("String_Node_Str");
    if (controller.chooseUse(Outcome.Damage,"String_Node_Str" + cost.getText() + "String_Node_Str",source,game)) {
      int costX=controller.announceXMana(0,Integer.MAX_VALUE,"String_Node_Str",game,source);
      cost.add(new GenericManaCost(costX));
      if (cost.pay(source,game,source.getSourceId(),source.getControllerId(),false,null)) {
        controller.resetStoredBookmark(game);
        controller.gainLife(costX,game);
        controller.drawCards(costX,game);
        return true;
      }
    }
  }
  return false;
}
Program: 157781
Project: 157781
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  if (controller != null) {
    ManaCosts cost=new ManaCostsImpl("String_Node_Str");
    if (controller.chooseUse(outcome,"String_Node_Str" + cost.getText() + "String_Node_Str",source,game)) {
      int costX=controller.announceXMana(0,Integer.MAX_VALUE,"String_Node_Str",game,source);
      cost.add(new GenericManaCost(costX));
      if (cost.pay(source,game,source.getSourceId(),source.getControllerId(),false,null)) {
        game.undo(id);
        CreateTokenEffect effect=new CreateTokenEffect(new TilonallisSummonerElementalToken(),costX,true,true);
        effect.apply(game,source);
        Effect exileEffect=new ExileTargetEffect(null,"String_Node_Str",Zone.BATTLEFIELD).setText("String_Node_Str");
        exileEffect.setTargetPointer(new FixedTargets(new CardsImpl(effect.getLastAddedTokenIds()),game));
        game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(Zone.ALL,exileEffect,TargetController.ANY,new InvertCondition(CitysBlessingCondition.instance)),source);
      }
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Player controller=game.getPlayer(source.getControllerId());
  if (controller != null) {
    ManaCosts cost=new ManaCostsImpl("String_Node_Str");
    if (controller.chooseUse(outcome,"String_Node_Str" + cost.getText() + "String_Node_Str",source,game)) {
      int costX=controller.announceXMana(0,Integer.MAX_VALUE,"String_Node_Str",game,source);
      cost.add(new GenericManaCost(costX));
      if (cost.pay(source,game,source.getSourceId(),source.getControllerId(),false,null)) {
        controller.resetStoredBookmark(game);
        CreateTokenEffect effect=new CreateTokenEffect(new TilonallisSummonerElementalToken(),costX,true,true);
        effect.apply(game,source);
        Effect exileEffect=new ExileTargetEffect(null,"String_Node_Str",Zone.BATTLEFIELD).setText("String_Node_Str");
        exileEffect.setTargetPointer(new FixedTargets(new CardsImpl(effect.getLastAddedTokenIds()),game));
        game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(Zone.ALL,exileEffect,TargetController.ANY,new InvertCondition(CitysBlessingCondition.instance)),source);
      }
    }
    return true;
  }
  return false;
}
Program: 157782
Project: 157782
Buggy source:
public void fireCallback(final ClientCallback call){
  try {
    call.setMessageId(messageId++);
    callbackHandler.handleCallbackOneway(new Callback(call));
  }
 catch (  HandleCallbackException ex) {
    UserManager.instance.getUser(userId).ifPresent(user -> {
      user.setUserState(User.UserState.Disconnected);
      logger.warn("String_Node_Str" + user.getName() + "String_Node_Str"+ userId+ "String_Node_Str"+ getBasicCause(ex).toString());
      logger.trace("String_Node_Str",ex);
      SessionManager.instance.disconnect(sessionId,LostConnection);
    }
);
  }
}

Fixed version (ground truth):
public void fireCallback(final ClientCallback call){
  if (error) {
    return;
  }
  try {
    call.setMessageId(messageId++);
    callbackHandler.handleCallbackOneway(new Callback(call));
  }
 catch (  HandleCallbackException ex) {
    error=true;
    UserManager.instance.getUser(userId).ifPresent(user -> {
      user.setUserState(User.UserState.Disconnected);
      logger.warn("String_Node_Str" + user.getName() + "String_Node_Str"+ userId+ "String_Node_Str"+ getBasicCause(ex).toString());
      logger.trace("String_Node_Str",ex);
      SessionManager.instance.disconnect(sessionId,LostConnection);
    }
);
  }
}
Program: 157784
Project: 157784
Buggy source:
@Override public boolean checkTrigger(GameEvent event,Game game){
  int attackerCount=0;
  if (game.getCombat().getAttackingPlayerId().equals(getControllerId())) {
    for (    UUID attacker : game.getCombat().getAttackers()) {
      if (filter.match(game.getPermanent(attacker),game)) {
        attackerCount++;
      }
    }
    return attackerCount >= 2;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean checkTrigger(GameEvent event,Game game){
  int attackerCount=0;
  if (game.getCombat() != null) {
    if (getControllerId().equals(game.getCombat().getAttackingPlayerId())) {
      for (      UUID attacker : game.getCombat().getAttackers()) {
        if (filter.match(game.getPermanent(attacker),game)) {
          attackerCount++;
        }
      }
      return attackerCount >= 2;
    }
  }
  return false;
}
Program: 157785
Project: 157785
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Permanent sourcePermanent=game.getPermanent(source.getSourceId());
  if (sourcePermanent != null) {
    int zcc=game.getState().getZoneChangeCounter(sourcePermanent.getId());
    if (zcc == source.getSourceObjectZoneChangeCounter() || zcc == source.getSourceObjectZoneChangeCounter() + 1) {
      Permanent permanent=game.getPermanent(getTargetPointer().getFirst(game,source));
      if (permanent != null) {
        return permanent.addAttachment(source.getSourceId(),game);
      }
 else {
        Player player=game.getPlayer(getTargetPointer().getFirst(game,source));
        if (player != null) {
          return player.addAttachment(source.getSourceId(),game);
        }
        if (source.getTargets().get(0) instanceof TargetCard) {
          Card card=game.getCard(getTargetPointer().getFirst(game,source));
          if (card != null) {
            return card.addAttachment(source.getSourceId(),game);
          }
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Permanent sourcePermanent=game.getPermanent(source.getSourceId());
  if (sourcePermanent != null) {
    int zcc=game.getState().getZoneChangeCounter(sourcePermanent.getId());
    if (zcc == source.getSourceObjectZoneChangeCounter() || zcc == source.getSourceObjectZoneChangeCounter() + 1) {
      Permanent permanent=game.getPermanent(getTargetPointer().getFirst(game,source));
      if (permanent != null) {
        return permanent.addAttachment(source.getSourceId(),game);
      }
 else {
        Player player=game.getPlayer(getTargetPointer().getFirst(game,source));
        if (player != null) {
          return player.addAttachment(source.getSourceId(),game);
        }
        if (!source.getTargets().isEmpty() && source.getTargets().get(0) instanceof TargetCard) {
          Card card=game.getCard(getTargetPointer().getFirst(game,source));
          if (card != null) {
            return card.addAttachment(source.getSourceId(),game);
          }
        }
      }
    }
  }
  return false;
}
Program: 157786
Project: 157786
Buggy source:
protected String createGameStartMessage(){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str");
  for (  MatchPlayer mp : this.getPlayers()) {
    sb.append("String_Node_Str").append(mp.getPlayer().getLogName());
    sb.append("String_Node_Str").append(mp.getWins()).append(mp.getWins() == 1 ? "String_Node_Str" : "String_Node_Str");
    if (mp.hasQuit()) {
      sb.append("String_Node_Str");
    }
    sb.append("String_Node_Str");
    sb.append("String_Node_Str").append(mp.getDeck().getDeckHashCode()).append("String_Node_Str");
  }
  if (getDraws() > 0) {
    sb.append("String_Node_Str").append(getDraws()).append("String_Node_Str");
  }
  sb.append("String_Node_Str").append("String_Node_Str").append(this.getOptions().isRated() ? "String_Node_Str" : "String_Node_Str").append("String_Node_Str");
  sb.append("String_Node_Str").append(this.getWinsNeeded()).append(this.getWinsNeeded() == 1 ? "String_Node_Str" : "String_Node_Str").append("String_Node_Str");
  sb.append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
protected String createGameStartMessage(){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str");
  for (  MatchPlayer mp : this.getPlayers()) {
    sb.append("String_Node_Str").append(mp.getPlayer().getLogName());
    sb.append("String_Node_Str").append(mp.getWins()).append(mp.getWins() == 1 ? "String_Node_Str" : "String_Node_Str");
    if (mp.hasQuit()) {
      sb.append("String_Node_Str");
    }
    sb.append("String_Node_Str");
    if (mp.getDeck() != null) {
      sb.append("String_Node_Str").append(mp.getDeck().getDeckHashCode()).append("String_Node_Str");
    }
  }
  if (getDraws() > 0) {
    sb.append("String_Node_Str").append(getDraws()).append("String_Node_Str");
  }
  sb.append("String_Node_Str").append("String_Node_Str").append(this.getOptions().isRated() ? "String_Node_Str" : "String_Node_Str").append("String_Node_Str");
  sb.append("String_Node_Str").append(this.getWinsNeeded()).append(this.getWinsNeeded() == 1 ? "String_Node_Str" : "String_Node_Str").append("String_Node_Str");
  sb.append("String_Node_Str");
  return sb.toString();
}
Program: 157788
Project: 157788
Buggy source:
@Override public boolean putCardsOnBottomOfLibrary(Cards cardsToLibrary,Game game,Ability source,boolean anyOrder){
  if (!cardsToLibrary.isEmpty()) {
    Cards cards=new CardsImpl(cardsToLibrary);
    if (!anyOrder) {
      while (!cards.isEmpty()) {
        UUID cardId=cards.getRandom(game).getId();
        cards.remove(cardId);
        moveObjectToLibrary(cardId,source == null ? null : source.getSourceId(),game,false,false);
      }
    }
 else {
      TargetCard target=new TargetCard(Zone.ALL,new FilterCard("String_Node_Str"));
      target.setRequired(true);
      while (cards.size() > 1) {
        this.choose(Outcome.Neutral,cards,target,game);
        if (!canRespond()) {
          return false;
        }
        UUID targetObjectId=target.getFirstTarget();
        cards.remove(targetObjectId);
        moveObjectToLibrary(targetObjectId,source == null ? null : source.getSourceId(),game,false,false);
        target.clearChosen();
      }
      if (cards.size() == 1) {
        moveObjectToLibrary(cards.iterator().next(),source == null ? null : source.getSourceId(),game,false,false);
      }
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean putCardsOnBottomOfLibrary(Cards cardsToLibrary,Game game,Ability source,boolean anyOrder){
  if (!cardsToLibrary.isEmpty()) {
    Cards cards=new CardsImpl(cardsToLibrary);
    if (!anyOrder) {
      while (!cards.isEmpty()) {
        Card card=cards.getRandom(game);
        if (card != null) {
          cards.remove(card);
          moveObjectToLibrary(card.getId(),source == null ? null : source.getSourceId(),game,false,false);
        }
      }
    }
 else {
      TargetCard target=new TargetCard(Zone.ALL,new FilterCard("String_Node_Str"));
      target.setRequired(true);
      while (cards.size() > 1) {
        this.choose(Outcome.Neutral,cards,target,game);
        if (!canRespond()) {
          return false;
        }
        UUID targetObjectId=target.getFirstTarget();
        cards.remove(targetObjectId);
        moveObjectToLibrary(targetObjectId,source == null ? null : source.getSourceId(),game,false,false);
        target.clearChosen();
      }
      if (cards.size() == 1) {
        moveObjectToLibrary(cards.iterator().next(),source == null ? null : source.getSourceId(),game,false,false);
      }
    }
  }
  return true;
}
Program: 157789
Project: 157789
Buggy source:
protected void initGame(Game game) throws GameException {
  addGame();
  shufflePlayers();
  for (  MatchPlayer matchPlayer : this.players) {
    if (!matchPlayer.hasQuit()) {
      matchPlayer.getPlayer().init(game);
      game.loadCards(matchPlayer.getDeck().getCards(),matchPlayer.getPlayer().getId());
      game.loadCards(matchPlayer.getDeck().getSideboard(),matchPlayer.getPlayer().getId());
      game.addPlayer(matchPlayer.getPlayer(),matchPlayer.getDeck());
      if (games.isEmpty()) {
        matchPlayer.getPlayer().setPriorityTimeLeft(options.getPriorityTime());
      }
 else {
        if (matchPlayer.getPriorityTimeLeft() > 0) {
          matchPlayer.getPlayer().setPriorityTimeLeft(matchPlayer.getPriorityTimeLeft());
        }
      }
    }
  }
  game.setPriorityTime(options.getPriorityTime());
}

Fixed version (ground truth):
protected void initGame(Game game) throws GameException {
  addGame();
  shufflePlayers();
  for (  MatchPlayer matchPlayer : this.players) {
    if (!matchPlayer.hasQuit() && matchPlayer.getDeck() != null) {
      matchPlayer.getPlayer().init(game);
      game.loadCards(matchPlayer.getDeck().getCards(),matchPlayer.getPlayer().getId());
      game.loadCards(matchPlayer.getDeck().getSideboard(),matchPlayer.getPlayer().getId());
      game.addPlayer(matchPlayer.getPlayer(),matchPlayer.getDeck());
      if (games.isEmpty()) {
        matchPlayer.getPlayer().setPriorityTimeLeft(options.getPriorityTime());
      }
 else {
        if (matchPlayer.getPriorityTimeLeft() > 0) {
          matchPlayer.getPlayer().setPriorityTimeLeft(matchPlayer.getPriorityTimeLeft());
        }
      }
    }
 else {
      if (matchPlayer.getDeck() == null) {
        logger.error("String_Node_Str" + this.getId() + "String_Node_Str"+ matchPlayer.getName()+ "String_Node_Str");
      }
    }
  }
  game.setPriorityTime(options.getPriorityTime());
}
Program: 157790
Project: 157790
Buggy source:
protected void specialAction(Game game){
  LinkedHashMap<UUID,SpecialAction> specialActions=game.getState().getSpecialActions().getControlledBy(playerId,false);
  if (!specialActions.isEmpty()) {
    updateGameStatePriority("String_Node_Str",game);
    if (!isExecutingMacro()) {
      game.fireGetChoiceEvent(playerId,name,null,new ArrayList<>(specialActions.values()));
    }
    waitForResponse(game);
    if (response.getUUID() != null) {
      if (specialActions.containsKey(response.getUUID())) {
        activateAbility(specialActions.get(response.getUUID()),game);
      }
    }
  }
}

Fixed version (ground truth):
protected void specialAction(Game game){
  LinkedHashMap<UUID,SpecialAction> specialActions=game.getState().getSpecialActions().getControlledBy(playerId,false);
  if (!specialActions.isEmpty()) {
    updateGameStatePriority("String_Node_Str",game);
    prepareForResponse(game);
    if (!isExecutingMacro()) {
      game.fireGetChoiceEvent(playerId,name,null,new ArrayList<>(specialActions.values()));
    }
    waitForResponse(game);
    if (response.getUUID() != null) {
      if (specialActions.containsKey(response.getUUID())) {
        activateAbility(specialActions.get(response.getUUID()),game);
      }
    }
  }
}