nus-yam/ex-repair huggingface dataset:
Program: 112818
Project: 112818
Buggy source:
/** 
 * Play a turn This function is called by GameMaster, and it should return a BoardState resulting from the AI playing its turn.
 * @param turn Turn number, 1-based
 * @param board The board state at the beginning of the turn (after all card draws and minion deaths)
 * @param player The player playing the turn
 * @return
 * @throws HSException
 */
public BoardState playTurn(int turn,BoardState board,Player player0,Player player1) throws HSException {
  HearthTreeNode toRet=new HearthTreeNode(board);
  BoardStateFactory factory=new BoardStateFactory(player0.getDeck(),player1.getDeck());
  HearthTreeNode allMoves=factory.doMoves(toRet,this);
  HearthTreeNode bestPlay=allMoves.findMaxOfFunc(this);
  while (bestPlay instanceof StopNode) {
    HearthTreeNode allEffectsDone=((StopNode)bestPlay).finishAllEffects(player0.getDeck());
    HearthTreeNode allMovesAtferStopNode=factory.doMoves(allEffectsDone,this);
    bestPlay=allMovesAtferStopNode.findMaxOfFunc(this);
  }
  return bestPlay.data_;
}

Fixed version (ground truth):
/** 
 * Play a turn This function is called by GameMaster, and it should return a BoardState resulting from the AI playing its turn.
 * @param turn Turn number, 1-based
 * @param board The board state at the beginning of the turn (after all card draws and minion deaths)
 * @param player The player playing the turn
 * @return
 * @throws HSException
 */
public BoardState playTurn(int turn,BoardState board,Player player0,Player player1) throws HSException {
  HearthTreeNode toRet=new HearthTreeNode(board);
  BoardStateFactory factory=new BoardStateFactory(player0.getDeck(),player1.getDeck(),2000000000);
  HearthTreeNode allMoves=factory.doMoves(toRet,this);
  HearthTreeNode bestPlay=allMoves.findMaxOfFunc(this);
  while (bestPlay instanceof StopNode) {
    HearthTreeNode allEffectsDone=((StopNode)bestPlay).finishAllEffects(player0.getDeck());
    HearthTreeNode allMovesAtferStopNode=factory.doMoves(allEffectsDone,this);
    bestPlay=allMovesAtferStopNode.findMaxOfFunc(this);
  }
  return bestPlay.data_;
}
Program: 112819
Project: 112819
Buggy source:
/** 
 * Get the Hero
 * @return
 */
public Hero getHero(){
  return new Hero();
}

Fixed version (ground truth):
/** 
 * Get the Hero
 * @return
 */
public Hero getHero(){
  return hero_;
}
Program: 112821
Project: 112821
Buggy source:
@Before public void setup(){
  board=new HearthTreeNode(new BoardState(new Priest(),new Hero()));
  Minion minion0_0=new BoulderfistOgre();
  Minion minion0_1=new RaidLeader();
  Minion minion1_0=new BoulderfistOgre();
  Minion minion1_1=new RaidLeader();
  board.data_.placeCard_hand_p0(minion0_0);
  board.data_.placeCard_hand_p0(minion0_1);
  board.data_.placeCard_hand_p1(minion1_0);
  board.data_.placeCard_hand_p1(minion1_1);
  Card cards[]=new Card[10];
  for (int index=0; index < 10; ++index) {
    cards[index]=new TheCoin();
  }
  deck=new Deck(cards);
  Card fb=new WildGrowth();
  board.data_.placeCard_hand_p0(fb);
  board.data_.setMana_p0((byte)8);
  board.data_.setMana_p1((byte)8);
  board.data_.setMaxMana_p0((byte)8);
  board.data_.setMaxMana_p1((byte)8);
  HearthTreeNode tmpBoard=new HearthTreeNode(board.data_.flipPlayers());
  try {
    tmpBoard.data_.getCard_hand_p0(0).useOn(0,0,1,tmpBoard,deck);
    tmpBoard.data_.getCard_hand_p0(0).useOn(0,0,1,tmpBoard,deck);
  }
 catch (  HSInvalidPlayerIndexException e) {
    e.printStackTrace();
  }
  board=new HearthTreeNode(tmpBoard.data_.flipPlayers());
  try {
    board.data_.getCard_hand_p0(0).useOn(0,0,1,board,deck);
    board.data_.getCard_hand_p0(0).useOn(0,0,1,board,deck);
  }
 catch (  HSInvalidPlayerIndexException e) {
    e.printStackTrace();
  }
  board.data_.resetMana();
  board.data_.resetMinions();
}

Fixed version (ground truth):
@Before public void setup(){
  board=new HearthTreeNode(new BoardState(new Priest(),new Hero()));
  Minion minion0_0=new ChillwindYeti();
  Minion minion0_1=new ChillwindYeti();
  Minion minion1_0=new ChillwindYeti();
  Minion minion1_1=new ChillwindYeti();
  board.data_.placeCard_hand_p0(minion0_0);
  board.data_.placeCard_hand_p0(minion0_1);
  board.data_.placeCard_hand_p1(minion1_0);
  board.data_.placeCard_hand_p1(minion1_1);
  Card cards[]=new Card[10];
  for (int index=0; index < 10; ++index) {
    cards[index]=new TheCoin();
  }
  deck=new Deck(cards);
  board.data_.setMana_p0((byte)8);
  board.data_.setMana_p1((byte)8);
  board.data_.setMaxMana_p0((byte)8);
  board.data_.setMaxMana_p1((byte)8);
  HearthTreeNode tmpBoard=new HearthTreeNode(board.data_.flipPlayers());
  try {
    tmpBoard.data_.getCard_hand_p0(0).useOn(0,0,1,tmpBoard,deck);
    tmpBoard.data_.getCard_hand_p0(0).useOn(0,0,1,tmpBoard,deck);
  }
 catch (  HSInvalidPlayerIndexException e) {
    e.printStackTrace();
  }
  board=new HearthTreeNode(tmpBoard.data_.flipPlayers());
  try {
    board.data_.getCard_hand_p0(0).useOn(0,0,1,board,deck);
    board.data_.getCard_hand_p0(0).useOn(0,0,1,board,deck);
  }
 catch (  HSInvalidPlayerIndexException e) {
    e.printStackTrace();
  }
  board.data_.resetMana();
  board.data_.resetMinions();
}
Program: 112827
Project: 112827
Buggy source:
/** 
 * Called whenever another minion is summoned using a spell
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionSummonedEvent(int summonedMinionPlayerIndex,int summeonedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return boardState;
}

Fixed version (ground truth):
/** 
 * Called whenever another minion is summoned using a spell
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionSummonedEvent(int thisMinionPlayerIndex,int thisMinionIndex,int summonedMinionPlayerIndex,int summeonedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return boardState;
}
Program: 112828
Project: 112828
Buggy source:
/** 
 * Called whenever another minion is summoned using a spell
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionTransformedEvent(int transformedMinionPlayerIndex,int transformedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return boardState;
}

Fixed version (ground truth):
/** 
 * Called whenever another minion is summoned using a spell
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionTransformedEvent(int thisMinionPlayerIndex,int thisMinionIndex,int transformedMinionPlayerIndex,int transformedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return boardState;
}
Program: 112829
Project: 112829
Buggy source:
/** 
 * Called whenever another minion is damaged
 * @param playerIndex The index of the damaged minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the damaged minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionDamagedEvent(int damagedPlayerIndex,int damagedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return boardState;
}

Fixed version (ground truth):
/** 
 * Called whenever another minion is damaged
 * @param playerIndex The index of the damaged minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the damaged minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionDamagedEvent(int thisMinionPlayerIndex,int thisMinionIndex,int damagedPlayerIndex,int damagedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return boardState;
}
Program: 112832
Project: 112832
Buggy source:
/** 
 * Called whenever another minion dies
 * @param playerIndex The index of the dead minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the dead minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionDeadEvent(int deadMinionPlayerIndex,int deadMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return boardState;
}

Fixed version (ground truth):
/** 
 * Called whenever another minion dies
 * @param playerIndex The index of the dead minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the dead minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionDeadEvent(int thisMinionPlayerIndex,int thisMinionIndex,int deadMinionPlayerIndex,int deadMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return boardState;
}
Program: 112833
Project: 112833
Buggy source:
/** 
 * Called when this minion dies (destroyed) Always use this function to "kill" minions
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
public void destroyed(int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  health_=0;
  HearthTreeNode<BoardState> toRet=boardState;
  toRet=toRet.data_.getHero_p0().minionDeadEvent(thisPlayerIndex,thisMinionIndex,toRet,deck);
  for (int j=0; j < toRet.data_.getNumMinions_p0(); ++j) {
    toRet=toRet.data_.getMinion_p0(j).minionDeadEvent(thisPlayerIndex,thisMinionIndex,toRet,deck);
  }
  toRet=toRet.data_.getHero_p1().minionDeadEvent(thisPlayerIndex,thisMinionIndex,toRet,deck);
  for (int j=0; j < toRet.data_.getNumMinions_p1(); ++j) {
    toRet=toRet.data_.getMinion_p1(j).minionDeadEvent(thisPlayerIndex,thisMinionIndex,toRet,deck);
  }
}

Fixed version (ground truth):
/** 
 * Called when this minion dies (destroyed) Always use this function to "kill" minions
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
public void destroyed(int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  health_=0;
  HearthTreeNode<BoardState> toRet=boardState;
  toRet=toRet.data_.getHero_p0().minionDeadEvent(0,0,thisPlayerIndex,thisMinionIndex,toRet,deck);
  for (int j=0; j < toRet.data_.getNumMinions_p0(); ++j) {
    toRet=toRet.data_.getMinion_p0(j).minionDeadEvent(0,j + 1,thisPlayerIndex,thisMinionIndex,toRet,deck);
  }
  toRet=toRet.data_.getHero_p1().minionDeadEvent(1,0,thisPlayerIndex,thisMinionIndex,toRet,deck);
  for (int j=0; j < toRet.data_.getNumMinions_p1(); ++j) {
    toRet=toRet.data_.getMinion_p1(j).minionDeadEvent(1,j + 1,thisPlayerIndex,thisMinionIndex,toRet,deck);
  }
}
Program: 112834
Project: 112834
Buggy source:
/** 
 * Called whenever another minion comes on board
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionPlacedEvent(int placedMinionPlayerIndex,int placedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return boardState;
}

Fixed version (ground truth):
/** 
 * Called whenever another minion comes on board
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionPlacedEvent(int thisMinionPlayerIndex,int thisMinionIndex,int placedMinionPlayerIndex,int placedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return boardState;
}
Program: 112835
Project: 112835
Buggy source:
/** 
 * Called when this minion is silenced Override for the aura effect
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
public void silenced(int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  for (  Minion minion : boardState.data_.getMinions_p0()) {
    if (minion instanceof Murloc && minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
  for (  Minion minion : boardState.data_.getMinions_p1()) {
    if (minion instanceof Murloc && minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
}

Fixed version (ground truth):
/** 
 * Called when this minion is silenced Override for the aura effect
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
@Override public void silenced(int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  for (  Minion minion : boardState.data_.getMinions_p0()) {
    if (minion instanceof Murloc && minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
  for (  Minion minion : boardState.data_.getMinions_p1()) {
    if (minion instanceof Murloc && minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
}
Program: 112836
Project: 112836
Buggy source:
/** 
 * Called when this minion dies (destroyed) Override for the aura effect
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
public void destroyed(int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  for (  Minion minion : boardState.data_.getMinions_p0()) {
    if (minion instanceof Murloc && minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
  for (  Minion minion : boardState.data_.getMinions_p1()) {
    if (minion instanceof Murloc && minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
  super.destroyed(thisPlayerIndex,thisMinionIndex,boardState,deck);
}

Fixed version (ground truth):
/** 
 * Called when this minion dies (destroyed) Override for the aura effect
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
@Override public void destroyed(int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  for (  Minion minion : boardState.data_.getMinions_p0()) {
    if (minion instanceof Murloc && minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
  for (  Minion minion : boardState.data_.getMinions_p1()) {
    if (minion instanceof Murloc && minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
  super.destroyed(thisPlayerIndex,thisMinionIndex,boardState,deck);
}
Program: 112837
Project: 112837
Buggy source:
private HearthTreeNode<BoardState> doBuffs(int targetMinionPlayerIndex,int targetMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  Minion minion=boardState.data_.getMinion(targetMinionPlayerIndex,targetMinionIndex - 1);
  if (minion != this)   minion.setAttack((byte)(minion.getAttack() + 1));
  return boardState;
}

Fixed version (ground truth):
private HearthTreeNode<BoardState> doBuffs(int thisMinionPlayerIndex,int thisMinionIndex,int targetMinionPlayerIndex,int targetMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  Minion minion=boardState.data_.getMinion(targetMinionPlayerIndex,targetMinionIndex - 1);
  if (minion instanceof Murloc && minion != this)   minion.setAttack((byte)(minion.getAttack() + 1));
  return boardState;
}
Program: 112838
Project: 112838
Buggy source:
/** 
 * Called whenever another minion is placed on board Override for the aura effect
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override public HearthTreeNode<BoardState> minionPlacedEvent(int placedMinionPlayerIndex,int placedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return this.doBuffs(placedMinionPlayerIndex,placedMinionIndex,boardState,deck);
}

Fixed version (ground truth):
/** 
 * Called whenever another minion is placed on board Override for the aura effect
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override public HearthTreeNode<BoardState> minionPlacedEvent(int thisMinionPlayerIndex,int thisMinionIndex,int placedMinionPlayerIndex,int placedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return this.doBuffs(thisMinionPlayerIndex,thisMinionIndex,placedMinionPlayerIndex,placedMinionIndex,boardState,deck);
}
Program: 112839
Project: 112839
Buggy source:
/** 
 * Called whenever another minion comes on board Override for the aura effect
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionSummonedEvent(int summonedMinionPlayerIndex,int summeonedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return this.doBuffs(summonedMinionPlayerIndex,summeonedMinionIndex,boardState,deck);
}

Fixed version (ground truth):
/** 
 * Called whenever another minion comes on board Override for the aura effect
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override public HearthTreeNode<BoardState> minionSummonedEvent(int thisMinionPlayerIndex,int thisMinionIndex,int summonedMinionPlayerIndex,int summeonedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return this.doBuffs(thisMinionPlayerIndex,thisMinionIndex,summonedMinionPlayerIndex,summeonedMinionIndex,boardState,deck);
}
Program: 112840
Project: 112840
Buggy source:
/** 
 * Called whenever another minion is summoned using a spell
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionTransformedEvent(int transformedMinionPlayerIndex,int transformedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return this.doBuffs(transformedMinionPlayerIndex,transformedMinionIndex,boardState,deck);
}

Fixed version (ground truth):
/** 
 * Called whenever another minion is summoned using a spell
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override public HearthTreeNode<BoardState> minionTransformedEvent(int thisMinionPlayerIndex,int thisMinionIndex,int transformedMinionPlayerIndex,int transformedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return this.doBuffs(thisMinionPlayerIndex,thisMinionIndex,transformedMinionPlayerIndex,transformedMinionIndex,boardState,deck);
}
Program: 112842
Project: 112842
Buggy source:
/** 
 * Called when this minion is silenced Override for the aura effect
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
public void silenced(int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  for (  Minion minion : boardState.data_.getMinions_p0()) {
    if (minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
}

Fixed version (ground truth):
/** 
 * Called when this minion is silenced Override for the aura effect
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
@Override public void silenced(int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  for (  Minion minion : boardState.data_.getMinions(thisPlayerIndex)) {
    if (minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
}
Program: 112843
Project: 112843
Buggy source:
/** 
 * Called when this minion dies (destroyed) Override for the aura effect
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
public void destroyed(int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  for (  Minion minion : boardState.data_.getMinions_p0()) {
    if (minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
  super.destroyed(thisPlayerIndex,thisMinionIndex,boardState,deck);
}

Fixed version (ground truth):
/** 
 * Called when this minion dies (destroyed) Override for the aura effect
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
@Override public void destroyed(int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  for (  Minion minion : boardState.data_.getMinions(thisPlayerIndex)) {
    if (minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
  super.destroyed(thisPlayerIndex,thisMinionIndex,boardState,deck);
}
Program: 112844
Project: 112844
Buggy source:
private HearthTreeNode<BoardState> doBuffs(int targetMinionPlayerIndex,int targetMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck){
  if (targetMinionPlayerIndex == 1)   return boardState;
  Minion minion=boardState.data_.getMinion_p0(targetMinionIndex - 1);
  if (minion != this)   minion.setAttack((byte)(minion.getAttack() + 1));
  return boardState;
}

Fixed version (ground truth):
private HearthTreeNode<BoardState> doBuffs(int thisMinionPlayerIndex,int thisMinionIndex,int targetMinionPlayerIndex,int targetMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  if (targetMinionPlayerIndex != thisMinionPlayerIndex)   return boardState;
  Minion minion=boardState.data_.getMinion(thisMinionPlayerIndex,targetMinionIndex - 1);
  if (minion != this)   minion.setAttack((byte)(minion.getAttack() + 1));
  return boardState;
}
Program: 112845
Project: 112845
Buggy source:
/** 
 * Called whenever another minion is placed on board Override for the aura effect
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override public HearthTreeNode<BoardState> minionPlacedEvent(int placedMinionPlayerIndex,int placedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck){
  return this.doBuffs(placedMinionPlayerIndex,placedMinionIndex,boardState,deck);
}

Fixed version (ground truth):
/** 
 * Called whenever another minion is placed on board Override for the aura effect
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override public HearthTreeNode<BoardState> minionPlacedEvent(int thisMinionPlayerIndex,int thisMinionIndex,int placedMinionPlayerIndex,int placedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return this.doBuffs(thisMinionPlayerIndex,thisMinionIndex,placedMinionPlayerIndex,placedMinionIndex,boardState,deck);
}
Program: 112846
Project: 112846
Buggy source:
/** 
 * Called whenever another minion comes on board Override for the aura effect
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionSummonedEvent(int summonedMinionPlayerIndex,int summeonedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck){
  return this.doBuffs(summonedMinionPlayerIndex,summeonedMinionIndex,boardState,deck);
}

Fixed version (ground truth):
/** 
 * Called whenever another minion comes on board Override for the aura effect
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override public HearthTreeNode<BoardState> minionSummonedEvent(int thisMinionPlayerIndex,int thisMinionIndex,int summonedMinionPlayerIndex,int summeonedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return this.doBuffs(thisMinionPlayerIndex,thisMinionIndex,summonedMinionPlayerIndex,summeonedMinionIndex,boardState,deck);
}
Program: 112847
Project: 112847
Buggy source:
/** 
 * Called whenever another minion is summoned using a spell
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionTransformedEvent(int transformedMinionPlayerIndex,int transformedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck){
  return this.doBuffs(transformedMinionPlayerIndex,transformedMinionIndex,boardState,deck);
}

Fixed version (ground truth):
/** 
 * Called whenever another minion is summoned using a spell
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override public HearthTreeNode<BoardState> minionTransformedEvent(int thisMinionPlayerIndex,int thisMinionIndex,int transformedMinionPlayerIndex,int transformedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return this.doBuffs(thisMinionPlayerIndex,thisMinionIndex,transformedMinionPlayerIndex,transformedMinionIndex,boardState,deck);
}
Program: 112848
Project: 112848
Buggy source:
/** 
 * Called when this minion is silenced Override for the aura effect
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
public void silenced(int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  for (  Minion minion : boardState.data_.getMinions_p0()) {
    if (minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
}

Fixed version (ground truth):
/** 
 * Called when this minion is silenced Override for the aura effect
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
@Override public void silenced(int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  for (  Minion minion : boardState.data_.getMinions(thisPlayerIndex)) {
    if (minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
}
Program: 112849
Project: 112849
Buggy source:
/** 
 * Called when this minion dies (destroyed) Override for the aura effect
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
public void destroyed(int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  for (  Minion minion : boardState.data_.getMinions_p0()) {
    if (minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
  super.destroyed(thisPlayerIndex,thisMinionIndex,boardState,deck);
}

Fixed version (ground truth):
/** 
 * Called when this minion dies (destroyed) Override for the aura effect
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
@Override public void destroyed(int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  for (  Minion minion : boardState.data_.getMinions(thisPlayerIndex)) {
    if (minion != this) {
      minion.setAttack((byte)(minion.getAttack() - 1));
    }
  }
  super.destroyed(thisPlayerIndex,thisMinionIndex,boardState,deck);
}
Program: 112850
Project: 112850
Buggy source:
private HearthTreeNode<BoardState> doBuffs(int targetMinionPlayerIndex,int targetMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck){
  if (targetMinionPlayerIndex == 1)   return boardState;
  Minion minion=boardState.data_.getMinion_p0(targetMinionIndex - 1);
  if (minion != this)   minion.setAttack((byte)(minion.getAttack() + 1));
  return boardState;
}

Fixed version (ground truth):
private HearthTreeNode<BoardState> doBuffs(int thisMinionPlayerIndex,int thisMinionIndex,int targetMinionPlayerIndex,int targetMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  if (targetMinionPlayerIndex != thisMinionPlayerIndex)   return boardState;
  Minion minion=boardState.data_.getMinion(thisMinionPlayerIndex,targetMinionIndex - 1);
  if (minion != this)   minion.setAttack((byte)(minion.getAttack() + 1));
  return boardState;
}
Program: 112851
Project: 112851
Buggy source:
/** 
 * Called whenever another minion is placed on board Override for the aura effect
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override public HearthTreeNode<BoardState> minionPlacedEvent(int placedMinionPlayerIndex,int placedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck){
  return this.doBuffs(placedMinionPlayerIndex,placedMinionIndex,boardState,deck);
}

Fixed version (ground truth):
/** 
 * Called whenever another minion is placed on board Override for the aura effect
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override public HearthTreeNode<BoardState> minionPlacedEvent(int thisMinionPlayerIndex,int thisMinionIndex,int placedMinionPlayerIndex,int placedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return this.doBuffs(thisMinionPlayerIndex,thisMinionIndex,placedMinionPlayerIndex,placedMinionIndex,boardState,deck);
}
Program: 112852
Project: 112852
Buggy source:
/** 
 * Called whenever another minion comes on board Override for the aura effect
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionSummonedEvent(int summonedMinionPlayerIndex,int summeonedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck){
  return this.doBuffs(summonedMinionPlayerIndex,summeonedMinionIndex,boardState,deck);
}

Fixed version (ground truth):
/** 
 * Called whenever another minion comes on board Override for the aura effect
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override public HearthTreeNode<BoardState> minionSummonedEvent(int thisMinionPlayerIndex,int thisMinionIndex,int summonedMinionPlayerIndex,int summeonedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return this.doBuffs(thisMinionPlayerIndex,thisMinionIndex,summonedMinionPlayerIndex,summeonedMinionIndex,boardState,deck);
}
Program: 112853
Project: 112853
Buggy source:
/** 
 * Called whenever another minion is summoned using a spell
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
public HearthTreeNode<BoardState> minionTransformedEvent(int transformedMinionPlayerIndex,int transformedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck){
  return this.doBuffs(transformedMinionPlayerIndex,transformedMinionIndex,boardState,deck);
}

Fixed version (ground truth):
/** 
 * Called whenever another minion is summoned using a spell
 * @param playerIndex The index of the created minion's player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the created minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override public HearthTreeNode<BoardState> minionTransformedEvent(int thisMinionPlayerIndex,int thisMinionIndex,int transformedMinionPlayerIndex,int transformedMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  return this.doBuffs(thisMinionPlayerIndex,thisMinionIndex,transformedMinionPlayerIndex,transformedMinionIndex,boardState,deck);
}
Program: 112854
Project: 112854
Buggy source:
/** 
 * Use the card on the given target This card heals the target minion up to full health and gives it taunt.  Cannot be used on heroes.
 * @param thisCardIndex The index (position) of the card in the hand
 * @param playerIndex The index of the target player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the target minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override protected HearthTreeNode<BoardState> use_core(int thisCardIndex,int playerIndex,int minionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  if (minionIndex == 0) {
    return null;
  }
  Minion targetMinion=boardState.data_.getMinion(playerIndex,minionIndex - 1);
  targetMinion.setHealth((byte)(targetMinion.getHealth() * 2));
  if (targetMinion.getMaxHealth() < targetMinion.getHealth())   targetMinion.setMaxHealth(targetMinion.getHealth());
  return super.use_core(thisCardIndex,playerIndex,minionIndex,boardState,deck);
}

Fixed version (ground truth):
/** 
 * Use the card on the given target This card heals the target minion up to full health and gives it taunt.  Cannot be used on heroes.
 * @param thisCardIndex The index (position) of the card in the hand
 * @param playerIndex The index of the target player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the target minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override protected HearthTreeNode<BoardState> use_core(int thisCardIndex,int playerIndex,int minionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  if (minionIndex == 0) {
    return null;
  }
  Minion targetMinion=boardState.data_.getMinion(playerIndex,minionIndex - 1);
  byte healthDiff=targetMinion.getHealth();
  targetMinion.setHealth((byte)(targetMinion.getHealth() * 2));
  targetMinion.setMaxHealth((byte)(targetMinion.getMaxHealth() + healthDiff));
  return super.use_core(thisCardIndex,playerIndex,minionIndex,boardState,deck);
}
Program: 112855
Project: 112855
Buggy source:
/** 
 * Called when this minion takes damage Overridden from Minion.  Need to handle armor.
 * @param damage The amount of damage to take
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
@Override public void takeDamage(byte damage,int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  byte damageRemaining=(byte)(damage - armor_);
  if (damageRemaining > 0) {
    armor_=0;
    super.takeDamage(damageRemaining,thisPlayerIndex,thisMinionIndex,boardState,deck);
  }
 else {
    armor_=(byte)(armor_ - damage);
    super.takeDamage((byte)0,thisPlayerIndex,thisMinionIndex,boardState,deck);
  }
}

Fixed version (ground truth):
/** 
 * Called when this minion takes damage Overridden from Minion.  Need to handle armor.
 * @param damage The amount of damage to take
 * @param attackerPlayerIndex The player index of the attacker.  This is needed to do things like +spell damage.
 * @param thisPlayerIndex The player index of this minion
 * @param thisMinionIndex The minion index of this minion
 * @param boardState 
 * @param deck
 * @throws HSInvalidPlayerIndexException
 */
@Override public void takeDamage(byte damage,int attackerPlayerIndex,int thisPlayerIndex,int thisMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  byte damageRemaining=(byte)(damage - armor_);
  if (damageRemaining > 0) {
    armor_=0;
    super.takeDamage(damageRemaining,attackerPlayerIndex,thisPlayerIndex,thisMinionIndex,boardState,deck);
  }
 else {
    armor_=(byte)(armor_ - damage);
    super.takeDamage((byte)0,attackerPlayerIndex,thisPlayerIndex,thisMinionIndex,boardState,deck);
  }
}
Program: 112858
Project: 112858
Buggy source:
public void attack(Minion minion,int targetPlayerIndex,int targetMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  minion.takeDamage(damage_,targetPlayerIndex,targetMinionIndex,boardState,deck,true);
}

Fixed version (ground truth):
public void attack(Minion minion,int targetPlayerIndex,int targetMinionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  minion.takeDamage(damage_,0,targetPlayerIndex,targetMinionIndex,boardState,deck,true);
}
Program: 112859
Project: 112859
Buggy source:
/** 
 * Use the card on the given target This card damages all enemy minions by 1
 * @param thisCardIndex The index (position) of the card in the hand
 * @param playerIndex The index of the target player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the target minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override protected HearthTreeNode<BoardState> use_core(int thisCardIndex,int playerIndex,int minionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  if (playerIndex == 0) {
    return null;
  }
  if (minionIndex > 0) {
    return null;
  }
  for (int indx=0; indx < boardState.data_.getNumMinions_p1(); ++indx) {
    Minion targetMinion=boardState.data_.getMinion_p1(indx);
    targetMinion.takeDamage((byte)1,1,indx + 1,boardState,deck,true);
  }
  Iterator<Minion> iter=boardState.data_.getMinions_p1().iterator();
  while (iter.hasNext()) {
    Minion targetMinion=iter.next();
    if (targetMinion.getHealth() <= 0) {
      iter.remove();
    }
  }
  return super.use_core(thisCardIndex,playerIndex,minionIndex,boardState,deck);
}

Fixed version (ground truth):
/** 
 * Use the card on the given target This card damages all enemy minions by 1
 * @param thisCardIndex The index (position) of the card in the hand
 * @param playerIndex The index of the target player.  0 if targeting yourself or your own minions, 1 if targeting the enemy
 * @param minionIndex The index of the target minion.
 * @param boardState The BoardState before this card has performed its action.  It will be manipulated and returned.
 * @return The boardState is manipulated and returned
 */
@Override protected HearthTreeNode<BoardState> use_core(int thisCardIndex,int playerIndex,int minionIndex,HearthTreeNode<BoardState> boardState,Deck deck) throws HSInvalidPlayerIndexException {
  if (playerIndex == 0) {
    return null;
  }
  if (minionIndex > 0) {
    return null;
  }
  for (int indx=0; indx < boardState.data_.getNumMinions_p1(); ++indx) {
    Minion targetMinion=boardState.data_.getMinion_p1(indx);
    targetMinion.takeDamage((byte)1,0,1,indx + 1,boardState,deck,true);
  }
  Iterator<Minion> iter=boardState.data_.getMinions_p1().iterator();
  while (iter.hasNext()) {
    Minion targetMinion=iter.next();
    if (targetMinion.getHealth() <= 0) {
      iter.remove();
    }
  }
  return super.use_core(thisCardIndex,playerIndex,minionIndex,boardState,deck);
}