nus-yam/ex-repair huggingface dataset:
Program: 159629
Project: 159629
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Card card;
  Player player=game.getPlayer(source.getControllerId());
  ExileZone exile=game.getExile().createZone(source.getSourceId(),player.getName() + "String_Node_Str");
  int sourceCost=game.getCard(source.getSourceId()).getManaCost().convertedManaCost();
  do {
    card=player.getLibrary().removeFromTop(game);
    if (card == null) {
      break;
    }
    card.moveToExile(exile.getId(),exile.getName(),source.getId(),game);
  }
 while (card.getCardType().contains(CardType.LAND) || card.getManaCost().convertedManaCost() >= sourceCost);
  if (card != null) {
    if (player.chooseUse(outcome,"String_Node_Str" + card.getName() + "String_Node_Str",game)) {
      player.cast(card.getSpellAbility(),game,true);
      exile.remove(card.getId());
    }
  }
  while (exile.size() > 0) {
    card=exile.getRandom(game);
    exile.remove(card.getId());
    card.moveToZone(Zone.LIBRARY,source.getId(),game,false);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Card card;
  Player player=game.getPlayer(source.getControllerId());
  ExileZone exile=game.getExile().createZone(source.getSourceId(),player.getName() + "String_Node_Str");
  Card stackCard=game.getCard(targetPointer.getFirst(game,source));
  if (stackCard == null) {
    return false;
  }
  int sourceCost=stackCard.getManaCost().convertedManaCost();
  do {
    card=player.getLibrary().removeFromTop(game);
    if (card == null) {
      break;
    }
    card.moveToExile(exile.getId(),exile.getName(),source.getId(),game);
  }
 while (card.getCardType().contains(CardType.LAND) || card.getManaCost().convertedManaCost() >= sourceCost);
  if (card != null) {
    if (player.chooseUse(outcome,"String_Node_Str" + card.getName() + "String_Node_Str",game)) {
      player.cast(card.getSpellAbility(),game,true);
      exile.remove(card.getId());
    }
  }
  while (exile.size() > 0) {
    card=exile.getRandom(game);
    exile.remove(card.getId());
    card.moveToZone(Zone.LIBRARY,source.getId(),game,false);
  }
  return true;
}
Program: 159630
Project: 159630
Buggy source:
@Override public boolean apply(Game game,Ability source){
  UUID defenderId=game.getCombat().getDefendingPlayer(source.getSourceId());
  Player player=game.getPlayer(defenderId);
  if (player == null) {
    Permanent permanent=game.getPermanent(defenderId);
    player=game.getPlayer(permanent.getControllerId());
  }
  filter.add(new ControllerPredicate(TargetController.YOU));
  int amount=Math.min(count,game.getBattlefield().countAll(filter,player.getId(),game));
  Target target=new TargetControlledPermanent(amount,amount,filter,false);
  if (target.canChoose(player.getId(),game)) {
    boolean abilityApplied=false;
    while (!target.isChosen() && target.canChoose(player.getId(),game)) {
      player.choose(Outcome.Sacrifice,target,source.getSourceId(),game);
    }
    for (int idx=0; idx < target.getTargets().size(); idx++) {
      Permanent permanent=game.getPermanent((UUID)target.getTargets().get(idx));
      if (permanent != null) {
        abilityApplied|=permanent.sacrifice(source.getId(),game);
      }
    }
    return abilityApplied;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  UUID defenderId=game.getCombat().getDefendingPlayer(source.getSourceId());
  Player player=game.getPlayer(defenderId);
  if (player == null) {
    Permanent permanent=game.getPermanent(defenderId);
    player=game.getPlayer(permanent.getControllerId());
  }
  int amount=Math.min(count,game.getBattlefield().countAll(filter,player.getId(),game));
  Target target=new TargetControlledPermanent(amount,amount,filter,false);
  if (target.canChoose(player.getId(),game)) {
    boolean abilityApplied=false;
    while (!target.isChosen() && target.canChoose(player.getId(),game)) {
      player.choose(Outcome.Sacrifice,target,source.getSourceId(),game);
    }
    for (int idx=0; idx < target.getTargets().size(); idx++) {
      Permanent permanent=game.getPermanent((UUID)target.getTargets().get(idx));
      if (permanent != null) {
        abilityApplied|=permanent.sacrifice(source.getId(),game);
      }
    }
    return abilityApplied;
  }
  return false;
}
Program: 159631
Project: 159631
Buggy source:
@Override public void watch(GameEvent event,Game game){
  if (event.getType() == GameEvent.EventType.SPELL_CAST || event.getType() == GameEvent.EventType.ACTIVATED_ABILITY) {
    StackObject stackObject=game.getStack().getStackObject(event.getTargetId());
    if (stackObject != null && stackObject.getStackAbility() != null) {
      for (      Target target : stackObject.getStackAbility().getTargets()) {
        if (target instanceof TargetSpell && target.getFirstTarget() != null) {
          casted.put(getKey(target.getFirstTarget(),stackObject.getSourceId()),stackObject.getControllerId());
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void watch(GameEvent event,Game game){
  if (event.getType() == GameEvent.EventType.SPELL_CAST || event.getType() == GameEvent.EventType.ACTIVATED_ABILITY) {
    StackObject stackObject=game.getStack().getStackObject(event.getTargetId());
    if (stackObject == null) {
      stackObject=(StackObject)game.getLastKnownInformation(event.getTargetId(),Zone.STACK);
    }
    if (stackObject != null && stackObject.getStackAbility() != null) {
      for (      Target target : stackObject.getStackAbility().getTargets()) {
        if (target instanceof TargetSpell && target.getFirstTarget() != null) {
          casted.put(getKey(target.getFirstTarget(),stackObject.getSourceId()),stackObject.getControllerId());
        }
      }
    }
  }
}
Program: 159632
Project: 159632
Buggy source:
@Override public void watch(GameEvent event,Game game){
  if (condition == true) {
    return;
  }
  if (event.getType() == EventType.COUNTERED && game.getStack().getStackObject(event.getTargetId()).getCardType().contains(CardType.CREATURE) && game.getOpponents(controllerId).contains(event.getPlayerId())) {
    condition=true;
  }
}

Fixed version (ground truth):
@Override public void watch(GameEvent event,Game game){
  if (condition == true) {
    return;
  }
  if (event.getType() == EventType.COUNTERED) {
    StackObject stackObject=game.getStack().getStackObject(event.getTargetId());
    if (stackObject == null) {
      stackObject=(StackObject)game.getLastKnownInformation(event.getTargetId(),Zone.STACK);
    }
    StackObject counterObject=game.getStack().getStackObject(event.getSourceId());
    if (counterObject == null) {
      counterObject=(StackObject)game.getLastKnownInformation(event.getSourceId(),Zone.STACK);
    }
    if (stackObject != null && counterObject != null && stackObject.getCardType().contains(CardType.CREATURE) && game.getOpponents(controllerId).contains(counterObject.getControllerId())) {
      condition=true;
    }
  }
}
Program: 159633
Project: 159633
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Permanent target=game.getPermanent(source.getFirstTarget());
  if (target == null) {
    return false;
  }
  for (  Counter counter : target.getCounters().values()) {
    Counter newCounter=new Counter(counter.getName(),1);
    target.addCounters(newCounter,game);
    System.out.println("String_Node_Str" + target.getName() + counter.getName());
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Permanent target=game.getPermanent(source.getFirstTarget());
  if (target == null) {
    return false;
  }
  for (  Counter counter : target.getCounters().values()) {
    Counter newCounter=new Counter(counter.getName(),counter.getCount());
    target.addCounters(newCounter,game);
  }
  return true;
}
Program: 159634
Project: 159634
Buggy source:
@Override public Date getEndTime(){
  return endTime;
}

Fixed version (ground truth):
@Override public Date getEndTime(){
  if (endTime != null) {
    return new Date(endTime.getTime());
  }
  return null;
}
Program: 159635
Project: 159635
Buggy source:
@Override public boolean leave(UUID playerId){
  MatchPlayer mPlayer=getPlayer(playerId);
  if (mPlayer != null) {
    boolean result=players.remove(mPlayer);
synchronized (this) {
      this.notifyAll();
    }
    return result;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean leave(UUID playerId){
  MatchPlayer mPlayer=getPlayer(playerId);
  if (mPlayer != null) {
    mPlayer.setQuit(true);
synchronized (this) {
      this.notifyAll();
    }
    return true;
  }
  return false;
}
Program: 159636
Project: 159636
Buggy source:
@Override public Date getStartTime(){
  return startTime;
}

Fixed version (ground truth):
@Override public Date getStartTime(){
  return new Date(startTime.getTime());
}
Program: 159637
Project: 159637
Buggy source:
public CombatGroup(final CombatGroup group){
  this.blocked=group.blocked;
  this.defenderId=group.defenderId;
  this.defenderIsPlaneswalker=group.defenderIsPlaneswalker;
  this.attackers.addAll(group.attackers);
  this.blockers.addAll(group.blockers);
  this.blockerOrder.addAll(group.blockerOrder);
  this.attackerOrder.addAll(group.attackerOrder);
  this.players.putAll(group.players);
}

Fixed version (ground truth):
public CombatGroup(final CombatGroup group){
  this.attackers.addAll(group.attackers);
  this.blockers.addAll(group.blockers);
  this.blockerOrder.addAll(group.blockerOrder);
  this.attackerOrder.addAll(group.attackerOrder);
  this.players.putAll(group.players);
  this.blocked=group.blocked;
  this.defenderId=group.defenderId;
  this.defendingPlayerId=group.defendingPlayerId;
  this.defenderIsPlaneswalker=group.defenderIsPlaneswalker;
}
Program: 159638
Project: 159638
Buggy source:
@Override public boolean replaceEvent(GameEvent event,Ability source,Game game){
  Permanent p=game.getPermanent(event.getTargetId());
  if (p != null) {
    p.addCounters(CounterType.valueOf(event.getData().toUpperCase(Locale.ENGLISH)).createInstance(event.getAmount() * 2),game,event.getAppliedEffects());
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean replaceEvent(GameEvent event,Ability source,Game game){
  Permanent p=game.getPermanent(event.getTargetId());
  if (p != null) {
    String counterName=event.getData().toUpperCase(Locale.ENGLISH);
    Counter counter;
    if (counterName.equals("String_Node_Str")) {
      counter=CounterType.P1P1.createInstance(event.getAmount() * 2);
    }
 else     if (counterName.equals("String_Node_Str")) {
      counter=CounterType.M1M1.createInstance(event.getAmount() * 2);
    }
 else {
      counter=new Counter(counterName,event.getAmount() * 2);
    }
    p.addCounters(counter,game,event.getAppliedEffects());
  }
  return true;
}
Program: 159639
Project: 159639
Buggy source:
public SpellStack(final SpellStack stack){
  for (  StackObject spell : stack) {
    this.push(spell.copy());
  }
}

Fixed version (ground truth):
public SpellStack(final SpellStack stack){
  for (  StackObject spell : stack) {
    this.addLast(spell.copy());
  }
}
Program: 159640
Project: 159640
Buggy source:
public HashMap<RestrictionEffect,HashSet<Ability>> getApplicableRestrictionEffects(Permanent permanent,Game game){
  HashMap<RestrictionEffect,HashSet<Ability>> effects=new HashMap<RestrictionEffect,HashSet<Ability>>();
  for (  RestrictionEffect effect : restrictionEffects) {
    HashSet<Ability> abilities=restrictionEffects.getAbility(effect.getId());
    HashSet<Ability> applicableAbilities=new HashSet<Ability>();
    for (    Ability ability : abilities) {
      if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game,null,false)) {
        if (effect.applies(permanent,ability,game)) {
          applicableAbilities.add(ability);
        }
      }
    }
    if (!applicableAbilities.isEmpty()) {
      effects.put(effect,abilities);
    }
  }
  return effects;
}

Fixed version (ground truth):
public HashMap<RestrictionEffect,HashSet<Ability>> getApplicableRestrictionEffects(Permanent permanent,Game game){
  HashMap<RestrictionEffect,HashSet<Ability>> effects=new HashMap<RestrictionEffect,HashSet<Ability>>();
  for (  RestrictionEffect effect : restrictionEffects) {
    HashSet<Ability> abilities=restrictionEffects.getAbility(effect.getId());
    HashSet<Ability> applicableAbilities=new HashSet<Ability>();
    for (    Ability ability : abilities) {
      if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game,ability instanceof MageSingleton ? permanent : null,false)) {
        if (effect.applies(permanent,ability,game)) {
          applicableAbilities.add(ability);
        }
      }
    }
    if (!applicableAbilities.isEmpty()) {
      effects.put(effect,abilities);
    }
  }
  return effects;
}
Program: 159641
Project: 159641
Buggy source:
@Override public boolean apply(Game game,Ability source){
  if (!conditionChecked) {
    result=!condition.apply(game,source);
    conditionChecked=true;
  }
  return result;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  if (!conditionChecked) {
    result=condition.apply(game,source);
    conditionChecked=true;
  }
  return result;
}
Program: 159642
Project: 159642
Buggy source:
public KickerAbility(final KickerAbility ability){
  super(ability);
  this.kickerCosts=ability.kickerCosts;
  this.keywordText=ability.keywordText;
  this.reminderText=ability.reminderText;
  this.xManaValue=ability.xManaValue;
  this.zoneChangeCounter=ability.zoneChangeCounter;
}

Fixed version (ground truth):
public KickerAbility(final KickerAbility ability){
  super(ability);
  this.kickerCosts.addAll(ability.kickerCosts);
  this.keywordText=ability.keywordText;
  this.reminderText=ability.reminderText;
  this.xManaValue=ability.xManaValue;
  this.zoneChangeCounter=ability.zoneChangeCounter;
}
Program: 159643
Project: 159643
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Card card=game.getCard(source.getFirstTarget());
  if (card != null) {
    Player player=game.getPlayer(card.getOwnerId());
    if (player != null) {
      card.moveToZone(Zone.HAND,source.getSourceId(),game,false);
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  for (  UUID cardId : getTargetPointer().getTargets(game,source)) {
    Card card=game.getCard(cardId);
    if (card != null && game.getState().getZone(cardId).equals(Zone.GRAVEYARD)) {
      Player player=game.getPlayer(card.getOwnerId());
      if (player != null) {
        card.moveToZone(Zone.HAND,source.getSourceId(),game,false);
      }
    }
  }
  return true;
}
Program: 159644
Project: 159644
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Player you=game.getPlayer(source.getControllerId());
  Card molten=game.getCard(source.getSourceId());
  if (you != null) {
    ElementalToken token=new ElementalToken();
    token.putOntoBattlefield(2,game,source.getId(),source.getControllerId());
    if (you.flipCoin(game)) {
      molten.moveToZone(Zone.HAND,source.getId(),game,true);
      game.informPlayers(you.getName() + "String_Node_Str" + you.getName()+ "String_Node_Str");
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Player you=game.getPlayer(source.getControllerId());
  Card molten=game.getCard(source.getSourceId());
  if (you != null) {
    ElementalToken token=new ElementalToken();
    token.putOntoBattlefield(2,game,source.getId(),source.getControllerId());
    if (you.flipCoin(game)) {
      molten.moveToZone(Zone.HAND,source.getId(),game,true);
      game.informPlayers(new StringBuilder(you.getName()).append("String_Node_Str").append(you.getName()).append("String_Node_Str").toString());
    }
  }
  return false;
}
Program: 159645
Project: 159645
Buggy source:
@Override public boolean checkTrigger(GameEvent event,Game game){
  if (event.getType() == GameEvent.EventType.SPELL_CAST) {
    Spell spell=game.getStack().getSpell(event.getTargetId());
    if (spell != null && spell.getControllerId().equals(controllerId)) {
      int damageAmount=0;
      for (      Ability ability : (Abilities<Ability>)spell.getAbilities()) {
        if (ability instanceof KickerAbility) {
          damageAmount+=((KickerAbility)ability).getKickedCounter();
        }
      }
      if (damageAmount > 0) {
        this.getEffects().get(0).setValue("String_Node_Str",new Integer(damageAmount));
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean checkTrigger(GameEvent event,Game game){
  if (event.getType() == GameEvent.EventType.SPELL_CAST) {
    Spell spell=game.getStack().getSpell(event.getTargetId());
    if (spell != null && spell.getControllerId().equals(controllerId)) {
      int damageAmount=0;
      for (      Ability ability : (Abilities<Ability>)spell.getAbilities()) {
        if (ability instanceof KickerAbility) {
          damageAmount+=((KickerAbility)ability).getKickedCounter(game);
        }
      }
      if (damageAmount > 0) {
        this.getEffects().get(0).setValue("String_Node_Str",new Integer(damageAmount));
        return true;
      }
    }
  }
  return false;
}
Program: 159646
Project: 159646
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Card card=game.getCard(source.getSourceId());
  if (card != null) {
    for (    Ability ability : card.getAbilities()) {
      if (ability instanceof KickerAbility) {
        if (((KickerAbility)ability).isKicked()) {
          return true;
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Card card=game.getCard(source.getSourceId());
  if (card != null) {
    for (    Ability ability : card.getAbilities()) {
      if (ability instanceof KickerAbility) {
        if (((KickerAbility)ability).isKicked(game)) {
          return true;
        }
      }
    }
  }
  return false;
}
Program: 159647
Project: 159647
Buggy source:
@Override public int calculate(Game game,Ability source){
  int count=0;
  Card card=game.getCard(source.getSourceId());
  if (card != null) {
    for (    Ability ability : card.getAbilities()) {
      if (ability instanceof KickerAbility) {
        count+=((KickerAbility)ability).getKickedCounter();
      }
    }
  }
  return count;
}

Fixed version (ground truth):
@Override public int calculate(Game game,Ability source){
  int count=0;
  Card card=game.getCard(source.getSourceId());
  if (card != null) {
    for (    Ability ability : card.getAbilities()) {
      if (ability instanceof KickerAbility) {
        count+=((KickerAbility)ability).getKickedCounter(game);
      }
    }
  }
  return count;
}
Program: 159648
Project: 159648
Buggy source:
public KickerAbility(final KickerAbility ability){
  super(ability);
  this.kickerCosts=ability.kickerCosts;
  this.keywordText=ability.keywordText;
  this.reminderText=ability.reminderText;
  this.xManaValue=ability.xManaValue;
}

Fixed version (ground truth):
public KickerAbility(final KickerAbility ability){
  super(ability);
  this.kickerCosts=ability.kickerCosts;
  this.keywordText=ability.keywordText;
  this.reminderText=ability.reminderText;
  this.xManaValue=ability.xManaValue;
  this.zoneChangeCounter=ability.zoneChangeCounter;
}
Program: 159649
Project: 159649
Buggy source:
public boolean isKicked(){
  for (  OptionalAdditionalCost cost : kickerCosts) {
    if (cost.isActivated()) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean isKicked(Game game){
  Card card=game.getCard(sourceId);
  if (card != null && card.getZoneChangeCounter() <= zoneChangeCounter + 1) {
    for (    OptionalAdditionalCost cost : kickerCosts) {
      if (cost.isActivated()) {
        return true;
      }
    }
  }
 else {
    this.resetKicker();
  }
  return false;
}
Program: 159650
Project: 159650
Buggy source:
public void resetKicker(){
  for (  OptionalAdditionalCost cost : kickerCosts) {
    cost.reset();
  }
}

Fixed version (ground truth):
public void resetKicker(){
  for (  OptionalAdditionalCost cost : kickerCosts) {
    cost.reset();
  }
  zoneChangeCounter=0;
}
Program: 159652
Project: 159652
Buggy source:
public int getKickedCounter(){
  int counter=0;
  for (  OptionalAdditionalCost cost : kickerCosts) {
    counter+=cost.getActivateCount();
  }
  return counter;
}

Fixed version (ground truth):
public int getKickedCounter(Game game){
  if (isKicked(game)) {
    int counter=0;
    for (    OptionalAdditionalCost cost : kickerCosts) {
      counter+=cost.getActivateCount();
    }
    return counter;
  }
  return 0;
}
Program: 159656
Project: 159656
Buggy source:
@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);
}
}

Fixed version (ground truth):
@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);
}
}
Program: 159657
Project: 159657
Buggy source:
@Override public GameView getGameView(){
  Player player=game.getPlayer(playerId);
  player.setUserData(this.userData);
  GameView gameView=new GameView(game.getState(),game);
  gameView.setHand(new SimpleCardsView(player.getHand().getCards(game)));
  if (player.getPlayersUnderYourControl().size() > 0) {
    Map<String,SimpleCardsView> handCards=new HashMap<String,SimpleCardsView>();
    for (    UUID controlledPlayerId : player.getPlayersUnderYourControl()) {
      Player opponent=game.getPlayer(controlledPlayerId);
      handCards.put(opponent.getName(),new SimpleCardsView(opponent.getHand().getCards(game)));
    }
    gameView.setOpponentHands(handCards);
  }
  List<LookedAtView> list=new ArrayList<LookedAtView>();
  for (  Entry<String,Cards> entry : game.getState().getLookedAt(playerId).entrySet()) {
    list.add(new LookedAtView(entry.getKey(),entry.getValue(),game));
  }
  gameView.setLookedAt(list);
  game.getState().clearLookedAt();
  return gameView;
}

Fixed version (ground truth):
@Override public GameView getGameView(){
  Player player=game.getPlayer(playerId);
  player.setUserData(this.userData);
  GameView gameView=new GameView(game.getState(),game);
  gameView.setHand(new SimpleCardsView(player.getHand().getCards(game)));
  if (player.getPlayersUnderYourControl().size() > 0) {
    Map<String,SimpleCardsView> handCards=new HashMap<String,SimpleCardsView>();
    for (    UUID controlledPlayerId : player.getPlayersUnderYourControl()) {
      Player opponent=game.getPlayer(controlledPlayerId);
      handCards.put(opponent.getName(),new SimpleCardsView(opponent.getHand().getCards(game)));
    }
    gameView.setOpponentHands(handCards);
  }
  List<LookedAtView> list=new ArrayList<LookedAtView>();
  for (  Entry<String,Cards> entry : game.getState().getLookedAt(playerId).entrySet()) {
    list.add(new LookedAtView(entry.getKey(),entry.getValue(),game));
  }
  gameView.setLookedAt(list);
  game.getState().clearLookedAt(playerId);
  return gameView;
}
Program: 159658
Project: 159658
Buggy source:
public LookedAt getLookedAt(UUID playerId){
  if (lookedAt.get(playerId) == null) {
    LookedAt l=new LookedAt();
    lookedAt.put(playerId,l);
    return l;
  }
  return lookedAt.get(playerId);
}

Fixed version (ground truth):
public LookedAt getLookedAt(UUID playerId){
  if (lookedAt.get(playerId) == null) {
    LookedAt lookedAtCards=new LookedAt();
    lookedAt.put(playerId,lookedAtCards);
    return lookedAtCards;
  }
  return lookedAt.get(playerId);
}
Program: 159659
Project: 159659
Buggy source:
public void clearLookedAt(){
  lookedAt.clear();
}

Fixed version (ground truth):
public void clearLookedAt(UUID playerId){
  lookedAt.remove(playerId);
}
Program: 159660
Project: 159660
Buggy source:
@Override public void lookAtCards(String name,Cards cards,Game game){
  game.getState().getLookedAt(this.playerId).add(name,cards);
  game.fireLookAtCardsEvent(playerId,this.name + "String_Node_Str",cards);
}

Fixed version (ground truth):
@Override public void lookAtCards(String name,Cards cards,Game game){
  game.getState().getLookedAt(this.playerId).add(name,cards);
  game.fireUpdatePlayersEvent();
}
Program: 159661
Project: 159661
Buggy source:
@Override public boolean canActivate(UUID playerId,Game game){
  if (super.canActivate(playerId,game)) {
    Boolean activated=(Boolean)game.getState().getValue(this.originalId.toString() + "String_Node_Str");
    if (activated == null)     return true;
 else     return !activated;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean canActivate(UUID playerId,Game game){
  if (super.canActivate(playerId,game)) {
    Boolean activated=(Boolean)game.getState().getValue(CardUtil.getCardZoneString("String_Node_Str",sourceId,game));
    if (activated == null) {
      return true;
    }
 else {
      return !activated;
    }
  }
  return false;
}
Program: 159662
Project: 159662
Buggy source:
@Override public boolean activate(Game game,boolean noMana){
  if (canActivate(this.controllerId,game)) {
    if (super.activate(game,noMana)) {
      game.getState().setValue(this.originalId.toString() + "String_Node_Str",Boolean.TRUE);
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean activate(Game game,boolean noMana){
  if (canActivate(this.controllerId,game)) {
    if (super.activate(game,noMana)) {
      game.getState().setValue(CardUtil.getCardZoneString("String_Node_Str",sourceId,game),Boolean.TRUE);
      return true;
    }
  }
  return false;
}
Program: 159663
Project: 159663
Buggy source:
@Override public void reset(Game game){
  game.getState().setValue(this.originalId.toString() + "String_Node_Str",Boolean.FALSE);
}

Fixed version (ground truth):
@Override public void reset(Game game){
  game.getState().setValue(CardUtil.getCardZoneString("String_Node_Str",sourceId,game),Boolean.FALSE);
}
Program: 159664
Project: 159664
Buggy source:
/** 
 * Creates and saves a (card + zoneChangeCounter) specific exileId.
 * @param game
 * @param source - source ability
 * @return - the specific UUID
 */
public static UUID getCardExileZoneId(Game game,Ability source){
  UUID exileId=null;
  Card card=game.getCard(source.getSourceId());
  if (card != null) {
    exileId=(UUID)game.getState().getValue(new StringBuilder("String_Node_Str").append(source.getSourceId()).append(card.getZoneChangeCounter()).toString());
    if (exileId == null) {
      exileId=UUID.randomUUID();
      game.getState().setValue(new StringBuilder("String_Node_Str").append(source.getSourceId()).append(card.getZoneChangeCounter()).toString(),exileId);
    }
  }
  return exileId;
}

Fixed version (ground truth):
/** 
 * Creates and saves a (card + zoneChangeCounter) specific exileId.
 * @param game
 * @param source - source ability
 * @return - the specific UUID
 */
public static UUID getCardExileZoneId(Game game,Ability source){
  String key=getCardZoneString("String_Node_Str",source.getSourceId(),game);
  UUID exileId=(UUID)game.getState().getValue(key);
  if (exileId == null) {
    exileId=UUID.randomUUID();
    game.getState().setValue(key,exileId);
  }
  return exileId;
}
Program: 159665
Project: 159665
Buggy source:
public void eliminatePlayers(){
  if (match.getPlayer(player1.getPlayer().getId()).getWins() < match.getWinsNeeded()) {
    player1.setEliminated();
  }
  if (match.getPlayer(player2.getPlayer().getId()).getWins() < match.getWinsNeeded()) {
    player2.setEliminated();
  }
}

Fixed version (ground truth):
public void eliminatePlayers(){
  MatchPlayer mPlayer1=match.getPlayer(player1.getPlayer().getId());
  MatchPlayer mPlayer2=match.getPlayer(player2.getPlayer().getId());
  if (mPlayer1.hasQuit() || (!mPlayer2.hasQuit() && mPlayer1.getWins() < match.getWinsNeeded())) {
    player1.setEliminated();
  }
  if (mPlayer2.hasQuit() || (!mPlayer1.hasQuit() && mPlayer2.getWins() < match.getWinsNeeded())) {
    player2.setEliminated();
  }
}
Program: 159666
Project: 159666
Buggy source:
@Override public MasterOfDiversionEffect copy(){
  return new MasterOfDiversionEffect(this);
}

Fixed version (ground truth):
@Override public MasterOfDiversion copy(){
  return new MasterOfDiversion(this);
}
Program: 159667
Project: 159667
Buggy source:
@Override public boolean apply(Game game,Ability source){
  boolean conditionApplies=false;
switch (this.type) {
case FEWER_THAN:
    conditionApplies=game.getBattlefield().countAll(filter,source.getControllerId(),game) < this.count;
  break;
case MORE_THAN:
conditionApplies=game.getBattlefield().countAll(filter,source.getControllerId(),game) > this.count;
break;
case EQUAL_TO:
conditionApplies=game.getBattlefield().countAll(filter,source.getControllerId(),game) == this.count;
break;
}
if (this.condition != null) {
conditionApplies=conditionApplies && this.condition.apply(game,source);
}
return conditionApplies;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  boolean conditionApplies=false;
switch (this.type) {
case FEWER_THAN:
    conditionApplies=game.getBattlefield().count(filter,source.getSourceId(),source.getControllerId(),game) < this.count;
  break;
case MORE_THAN:
conditionApplies=game.getBattlefield().count(filter,source.getSourceId(),source.getControllerId(),game) > this.count;
break;
case EQUAL_TO:
conditionApplies=game.getBattlefield().count(filter,source.getSourceId(),source.getControllerId(),game) == this.count;
break;
}
if (this.condition != null) {
conditionApplies=conditionApplies && this.condition.apply(game,source);
}
return conditionApplies;
}
Program: 159668
Project: 159668
Buggy source:
@Override public boolean apply(Game game,Ability source){
  boolean conditionApplies=false;
switch (this.type) {
case FEWER_THAN:
    conditionApplies=game.getBattlefield().count(filter,source.getSourceId(),source.getControllerId(),game) < this.count;
  break;
case MORE_THAN:
conditionApplies=game.getBattlefield().count(filter,source.getSourceId(),source.getControllerId(),game) > this.count;
break;
case EQUAL_TO:
conditionApplies=game.getBattlefield().count(filter,source.getSourceId(),source.getControllerId(),game) == this.count;
break;
}
if (this.condition != null) {
conditionApplies=conditionApplies && this.condition.apply(game,source);
}
return conditionApplies;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  boolean conditionApplies=false;
switch (this.type) {
case FEWER_THAN:
    conditionApplies=game.getBattlefield().countControlled(filter,source.getSourceId(),source.getControllerId(),game) < this.count;
  break;
case MORE_THAN:
conditionApplies=game.getBattlefield().countControlled(filter,source.getSourceId(),source.getControllerId(),game) > this.count;
break;
case EQUAL_TO:
conditionApplies=game.getBattlefield().countControlled(filter,source.getSourceId(),source.getControllerId(),game) == this.count;
break;
}
if (this.condition != null) {
conditionApplies=conditionApplies && this.condition.apply(game,source);
}
return conditionApplies;
}
Program: 159669
Project: 159669
Buggy source:
@Override public void watch(GameEvent event,Game game){
  if (event.getType() == GameEvent.EventType.MANA_PAYED) {
    if (event.getSourceId().equals(this.sourceId)) {
      spells.add(event.getTargetId());
    }
  }
}

Fixed version (ground truth):
@Override public void watch(GameEvent event,Game game){
  if (event.getType() == GameEvent.EventType.MANA_PAYED) {
    if (game.getObject(event.getSourceId()).getName().equals("String_Node_Str")) {
      spells.add(event.getTargetId());
    }
  }
}
Program: 159671
Project: 159671
Buggy source:
public void showDialog(Deck deck){
  this.deck=deck;
  for (  String setCode : deck.getExpansionSetCodes()) {
    ExpansionInfo expansionInfo=ExpansionRepository.instance.getSetByCode(setCode);
    if (expansionInfo.hasBasicLands()) {
      this.setCodesland.add(expansionInfo.getCode());
    }
  }
  if (this.setCodesland.isEmpty()) {
    for (    String setCode : deck.getExpansionSetCodes()) {
      ExpansionInfo expansionInfo=ExpansionRepository.instance.getSetByCode(setCode);
      ExpansionInfo[] blockSets=ExpansionRepository.instance.getSetsFromBlock(expansionInfo.getBlockName());
      for (      ExpansionInfo blockSet : blockSets) {
        if (blockSet.hasBasicLands()) {
          this.setCodesland.add(blockSet.getCode());
        }
      }
    }
  }
  if (this.setCodesland.isEmpty()) {
    Random generator=new Random();
    ExpansionInfo[] landSets=ExpansionRepository.instance.getSetsWithBasicLandsByReleaseDate();
    if (landSets.length > 0) {
      this.setCodesland.add(landSets[generator.nextInt(landSets.length) - 1].getCode());
    }
  }
  if (this.setCodesland.isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  MageFrame.getDesktop().add(this,JLayeredPane.PALETTE_LAYER);
  this.setVisible(true);
}

Fixed version (ground truth):
public void showDialog(Deck deck){
  this.deck=deck;
  for (  String setCode : deck.getExpansionSetCodes()) {
    ExpansionInfo expansionInfo=ExpansionRepository.instance.getSetByCode(setCode);
    if (expansionInfo.hasBasicLands()) {
      this.setCodesland.add(expansionInfo.getCode());
    }
  }
  if (this.setCodesland.isEmpty()) {
    for (    String setCode : deck.getExpansionSetCodes()) {
      ExpansionInfo expansionInfo=ExpansionRepository.instance.getSetByCode(setCode);
      ExpansionInfo[] blockSets=ExpansionRepository.instance.getSetsFromBlock(expansionInfo.getBlockName());
      for (      ExpansionInfo blockSet : blockSets) {
        if (blockSet.hasBasicLands()) {
          this.setCodesland.add(blockSet.getCode());
        }
      }
    }
  }
  if (this.setCodesland.isEmpty()) {
    Random generator=new Random();
    List<ExpansionInfo> basicLandSets=ExpansionRepository.instance.getSetsWithBasicLandsByReleaseDate();
    if (basicLandSets.size() > 0) {
      this.setCodesland.add(basicLandSets.get(generator.nextInt(basicLandSets.size())).getCode());
    }
  }
  if (this.setCodesland.isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  MageFrame.getDesktop().add(this,JLayeredPane.PALETTE_LAYER);
  this.setVisible(true);
}
Program: 159673
Project: 159673
Buggy source:
@Override public boolean apply(Game game,Ability source){
  boolean conditionApplies=false;
switch (this.type) {
case FEWER_THAN:
    conditionApplies=game.getBattlefield().count(filter,source.getSourceId(),source.getControllerId(),game) < this.count;
  break;
case MORE_THAN:
conditionApplies=game.getBattlefield().count(filter,source.getSourceId(),source.getControllerId(),game) > this.count;
break;
case EQUAL_TO:
conditionApplies=game.getBattlefield().count(filter,source.getSourceId(),source.getControllerId(),game) == this.count;
break;
}
if (this.condition != null) {
conditionApplies=conditionApplies && this.condition.apply(game,source);
}
return conditionApplies;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  boolean conditionApplies=false;
switch (this.type) {
case FEWER_THAN:
    conditionApplies=game.getBattlefield().countAll(filter,source.getControllerId(),game) < this.count;
  break;
case MORE_THAN:
conditionApplies=game.getBattlefield().countAll(filter,source.getControllerId(),game) > this.count;
break;
case EQUAL_TO:
conditionApplies=game.getBattlefield().countAll(filter,source.getControllerId(),game) == this.count;
break;
}
if (this.condition != null) {
conditionApplies=conditionApplies && this.condition.apply(game,source);
}
return conditionApplies;
}
Program: 159674
Project: 159674
Buggy source:
private List<String> parseList(String list){
  return Arrays.asList(list.split(SEPARATOR));
}

Fixed version (ground truth):
private List<String> parseList(String list){
  if (list.isEmpty()) {
    return new ArrayList<String>();
  }
  return Arrays.asList(list.split(SEPARATOR));
}
Program: 159675
Project: 159675
Buggy source:
private void showPopup(final TransferData data,final Component parentComponent,final Point parentPoint){
  if (data.card.getRarity().equals(Rarity.NA)) {
    return;
  }
  if (data.component != null) {
    String showTooltips=PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_TOOLTIPS_ANY_ZONE,"String_Node_Str");
    if (showTooltips.equals("String_Node_Str")) {
      return;
    }
  }
  if (cardInfoPane == null) {
    PopupFactory factory=PopupFactory.getSharedInstance();
    popup=factory.getPopup(data.component,data.popupText,(int)data.locationOnScreen.getX() + data.popupOffsetX,(int)data.locationOnScreen.getY() + data.popupOffsetY + 40);
    popup.show();
    popup.hide();
    popup=factory.getPopup(data.component,data.popupText,(int)data.locationOnScreen.getX() + data.popupOffsetX,(int)data.locationOnScreen.getY() + data.popupOffsetY + 40);
    popup.show();
  }
 else {
    sumbitShowPopupTask(data,parentComponent,parentPoint);
  }
}

Fixed version (ground truth):
private void showPopup(final TransferData data,final Component parentComponent,final Point parentPoint){
  if (data.component != null) {
    String showTooltips=PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_TOOLTIPS_ANY_ZONE,"String_Node_Str");
    if (showTooltips.equals("String_Node_Str")) {
      return;
    }
  }
  if (cardInfoPane == null) {
    PopupFactory factory=PopupFactory.getSharedInstance();
    popup=factory.getPopup(data.component,data.popupText,(int)data.locationOnScreen.getX() + data.popupOffsetX,(int)data.locationOnScreen.getY() + data.popupOffsetY + 40);
    popup.show();
    popup.hide();
    popup=factory.getPopup(data.component,data.popupText,(int)data.locationOnScreen.getX() + data.popupOffsetX,(int)data.locationOnScreen.getY() + data.popupOffsetY + 40);
    popup.show();
  }
 else {
    sumbitShowPopupTask(data,parentComponent,parentPoint);
  }
}
Program: 159677
Project: 159677
Buggy source:
@Override public String getImageName(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getImageName(){
  return this.name;
}
Program: 159678
Project: 159678
Buggy source:
public Emblem(Emblem emblem){
  this.id=emblem.id;
  this.controllerId=emblem.controllerId;
  this.sourceId=emblem.sourceId;
  this.abilites=emblem.abilites.copy();
}

Fixed version (ground truth):
public Emblem(final Emblem emblem){
  this.id=emblem.id;
  this.controllerId=emblem.controllerId;
  this.sourceId=emblem.sourceId;
  this.abilites=emblem.abilites.copy();
}
Program: 159679
Project: 159679
Buggy source:
public Token(final Token token){
  super(token);
  this.description=token.description;
  this.tokenType=token.tokenType;
}

Fixed version (ground truth):
public Token(final Token token){
  super(token);
  this.description=token.description;
  this.tokenType=token.tokenType;
  this.lastAddedTokenId=token.lastAddedTokenId;
  this.originalCardNumber=token.originalCardNumber;
  this.originalExpansionSetCode=token.originalExpansionSetCode;
}
Program: 159680
Project: 159680
Buggy source:
@Override public Token apply(Card source){
  if (target == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  MageObject sourceObj=source;
  if (source instanceof PermanentToken) {
    sourceObj=((PermanentToken)source).getToken();
  }
 else   if (source instanceof PermanentCard) {
    sourceObj=((PermanentCard)source).getCard();
  }
  target.setName(sourceObj.getName());
  target.getColor().setColor(sourceObj.getColor());
  target.getManaCost().clear();
  target.getManaCost().add(sourceObj.getManaCost());
  target.getCardType().clear();
  for (  CardType type : sourceObj.getCardType()) {
    target.getCardType().add(type);
  }
  target.getSubtype().clear();
  for (  String type : sourceObj.getSubtype()) {
    target.getSubtype().add(type);
  }
  target.getSupertype().clear();
  for (  String type : sourceObj.getSupertype()) {
    target.getSupertype().add(type);
  }
  target.setOriginalExpansionSetCode(source.getExpansionSetCode());
  target.setOriginalCardNumber(source.getCardNumber());
  target.getAbilities().clear();
  for (  Ability ability0 : sourceObj.getAbilities()) {
    Ability ability=ability0.copy();
    ability.newId();
    ability.setSourceId(target.getId());
    target.addAbility(ability);
  }
  target.getPower().initValue(Integer.parseInt(sourceObj.getPower().toString()));
  target.getToughness().initValue(Integer.parseInt(sourceObj.getToughness().toString()));
  return target;
}

Fixed version (ground truth):
@Override public Token apply(Card source){
  if (target == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  MageObject sourceObj=source;
  if (source instanceof PermanentToken) {
    sourceObj=((PermanentToken)source).getToken();
    target.setOriginalExpansionSetCode(((Token)sourceObj).getOriginalExpansionSetCode());
    target.setOriginalCardNumber(((Token)sourceObj).getOriginalCardNumber());
  }
 else   if (source instanceof PermanentCard) {
    sourceObj=((PermanentCard)source).getCard();
    target.setOriginalExpansionSetCode(source.getExpansionSetCode());
    target.setOriginalCardNumber(source.getCardNumber());
  }
  target.setName(sourceObj.getName());
  target.getColor().setColor(sourceObj.getColor());
  target.getManaCost().clear();
  target.getManaCost().add(sourceObj.getManaCost());
  target.getCardType().clear();
  for (  CardType type : sourceObj.getCardType()) {
    target.getCardType().add(type);
  }
  target.getSubtype().clear();
  for (  String type : sourceObj.getSubtype()) {
    target.getSubtype().add(type);
  }
  target.getSupertype().clear();
  for (  String type : sourceObj.getSupertype()) {
    target.getSupertype().add(type);
  }
  target.getAbilities().clear();
  for (  Ability ability0 : sourceObj.getAbilities()) {
    Ability ability=ability0.copy();
    ability.newId();
    ability.setSourceId(target.getId());
    target.addAbility(ability);
  }
  target.getPower().initValue(Integer.parseInt(sourceObj.getPower().toString()));
  target.getToughness().initValue(Integer.parseInt(sourceObj.getToughness().toString()));
  return target;
}
Program: 159681
Project: 159681
Buggy source:
private void btnQuickStartActionPerformed(java.awt.event.ActionEvent evt){
  TableView table;
  try {
    File f=new File("String_Node_Str");
    if (!f.exists()) {
      JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
      return;
    }
    MatchOptions options=new MatchOptions("String_Node_Str","String_Node_Str");
    options.getPlayerTypes().add("String_Node_Str");
    options.getPlayerTypes().add("String_Node_Str");
    options.setDeckType("String_Node_Str");
    options.setAttackOption(MultiplayerAttackOption.LEFT);
    options.setRange(RangeOfInfluence.ALL);
    options.setWinsNeeded(1);
    table=session.createTable(roomId,options);
    session.joinTable(roomId,table.getTableId(),"String_Node_Str","String_Node_Str",1,DeckImporterUtil.importDeck("String_Node_Str"));
    session.joinTable(roomId,table.getTableId(),"String_Node_Str","String_Node_Str",5,DeckImporterUtil.importDeck("String_Node_Str"));
    session.startGame(roomId,table.getTableId());
  }
 catch (  Exception ex) {
    handleError(ex);
  }
}

Fixed version (ground truth):
private void btnQuickStartActionPerformed(java.awt.event.ActionEvent evt){
  TableView table;
  try {
    File f=new File("String_Node_Str");
    if (!f.exists()) {
      JOptionPane.showMessageDialog(null,"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
      return;
    }
    MatchOptions options=new MatchOptions("String_Node_Str","String_Node_Str");
    options.getPlayerTypes().add("String_Node_Str");
    options.getPlayerTypes().add("String_Node_Str");
    options.setDeckType("String_Node_Str");
    options.setAttackOption(MultiplayerAttackOption.LEFT);
    options.setRange(RangeOfInfluence.ALL);
    options.setWinsNeeded(1);
    options.setMatchTimeLimit(MatchTimeLimit.NONE);
    options.setFreeMulligans(2);
    table=session.createTable(roomId,options);
    session.joinTable(roomId,table.getTableId(),"String_Node_Str","String_Node_Str",1,DeckImporterUtil.importDeck("String_Node_Str"));
    session.joinTable(roomId,table.getTableId(),"String_Node_Str","String_Node_Str",5,DeckImporterUtil.importDeck("String_Node_Str"));
    session.startGame(roomId,table.getTableId());
  }
 catch (  Exception ex) {
    handleError(ex);
  }
}