Program: 159534
Project: 159534
Buggy source:
@Override public void run(){
  try {
    logger.debug(callback.getMessageId() + "String_Node_Str" + callback.getMethod());
    if (callback.getMethod().equals("String_Node_Str")) {
      TableClientMessage message=(TableClientMessage)callback.getData();
      GameManager.getInstance().setCurrentPlayerUUID(message.getPlayerId());
      gameStarted(message.getGameId(),message.getPlayerId());
    }
 else     if (callback.getMethod().equals("String_Node_Str")) {
      TableClientMessage message=(TableClientMessage)callback.getData();
      tournamentStarted(message.getGameId(),message.getPlayerId());
    }
 else     if (callback.getMethod().equals("String_Node_Str")) {
      TableClientMessage message=(TableClientMessage)callback.getData();
      draftStarted(message.getGameId(),message.getPlayerId());
    }
 else     if (callback.getMethod().equals("String_Node_Str")) {
      replayGame(callback.getObjectId());
    }
 else     if (callback.getMethod().equals("String_Node_Str")) {
      showTournament((UUID)callback.getObjectId());
    }
 else     if (callback.getMethod().equals("String_Node_Str")) {
      watchGame((UUID)callback.getObjectId());
    }
 else     if (callback.getMethod().equals("String_Node_Str")) {
      ChatMessage message=(ChatMessage)callback.getData();
      ChatPanel panel=MageFrame.getChat(callback.getObjectId());
      if (panel != null) {
        if (message.getSoundToPlay() != null) {
switch (message.getSoundToPlay()) {
case PlayerLeft:
            AudioManager.playPlayerLeft();
          break;
case PlayerSubmittedDeck:
        AudioManager.playPlayerSubmittedDeck();
      break;
case PlayerWhispered:
    AudioManager.playPlayerWhispered();
  break;
}
}
if (!panel.isStartMessageDone()) {
createChatStartMessage(panel);
}
if (!message.getMessageType().equals(MessageType.GAME) && panel.getConnectedChat() != null) {
panel.getConnectedChat().receiveMessage(message.getUsername(),message.getMessage(),message.getTime(),message.getMessageType(),ChatMessage.MessageColor.BLACK);
}
 else {
panel.receiveMessage(message.getUsername(),message.getMessage(),message.getTime(),message.getMessageType(),message.getColor());
}
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
if (callback.getData() != null) {
ChatMessage message=(ChatMessage)callback.getData();
if (message.getColor().equals(ChatMessage.MessageColor.RED)) {
JOptionPane.showMessageDialog(null,message.getMessage(),"String_Node_Str",JOptionPane.WARNING_MESSAGE);
}
 else {
JOptionPane.showMessageDialog(null,message.getMessage(),"String_Node_Str",JOptionPane.INFORMATION_MESSAGE);
}
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
TableClientMessage message=(TableClientMessage)callback.getData();
joinedTable(message.getRoomId(),message.getTableId(),message.getFlag());
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.init((GameView)callback.getData());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.endMessage((String)callback.getData(),callback.getMessageId());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.updateGame((GameView)callback.getData());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.init((GameView)callback.getData());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.endMessage((String)callback.getData(),callback.getMessageId());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
frame.showErrorDialog("String_Node_Str",(String)callback.getData());
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.ask(message.getMessage(),message.getGameView(),callback.getMessageId());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.pickTarget(message.getMessage(),message.getCardsView(),message.getGameView(),message.getTargets(),message.isFlag(),message.getOptions(),callback.getMessageId());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.select(message.getMessage(),message.getGameView(),callback.getMessageId());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.pickAbility((AbilityPickerView)callback.getData());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.pickPile(message.getMessage(),message.getPile1(),message.getPile2());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.getChoice(message.getMessage(),message.getStrings());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.playMana(message.getMessage(),message.getGameView(),callback.getMessageId());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.playXMana(message.getMessage(),message.getGameView(),callback.getMessageId());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.getAmount(message.getMin(),message.getMax(),message.getMessage());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.updateGame((GameView)callback.getData());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
MageFrame.getInstance().showGameEndDialog((GameEndView)callback.getData());
}
 else if (callback.getMethod().equals("String_Node_Str")) {
List<String> messageData=(List<String>)callback.getData();
if (messageData.size() == 2) {
JOptionPane.showMessageDialog(null,messageData.get(1),messageData.get(0),JOptionPane.WARNING_MESSAGE);
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
if (callback.getMessageId() > messageId) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.inform(message.getMessage(),message.getGameView(),callback.getMessageId());
}
}
 else {
logger.warn("String_Node_Str");
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
JOptionPane.showMessageDialog(panel,message.getMessage(),"String_Node_Str",JOptionPane.INFORMATION_MESSAGE);
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
TableClientMessage message=(TableClientMessage)callback.getData();
DeckView deckView=message.getDeck();
Deck deck=DeckUtil.construct(deckView);
if (message.getFlag()) {
construct(deck,message.getTableId(),message.getTime());
}
 else {
sideboard(deck,message.getTableId(),message.getTime());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
TableClientMessage message=(TableClientMessage)callback.getData();
DeckView deckView=message.getDeck();
Deck deck=DeckUtil.construct(deckView);
construct(deck,message.getTableId(),message.getTime());
}
 else if (callback.getMethod().equals("String_Node_Str")) {
MageFrame.removeDraft(callback.getObjectId());
}
 else if (callback.getMethod().equals("String_Node_Str")) {
DraftClientMessage message=(DraftClientMessage)callback.getData();
DraftPanel panel=MageFrame.getDraft(callback.getObjectId());
if (panel != null) {
panel.loadBooster(message.getDraftPickView());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
DraftPanel panel=MageFrame.getDraft(callback.getObjectId());
if (panel != null) {
panel.updateDraft((DraftView)callback.getData());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
if (callback.getMessageId() > messageId) {
DraftClientMessage message=(DraftClientMessage)callback.getData();
}
 else {
logger.warn("String_Node_Str");
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
DraftClientMessage message=(DraftClientMessage)callback.getData();
DraftPanel panel=MageFrame.getDraft(callback.getObjectId());
if (panel != null) {
panel.loadBooster(message.getDraftPickView());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
}
messageId=callback.getMessageId();
}
 catch (Exception ex) {
handleException(ex);
}
}

Fixed version (ground truth):
@Override public void run(){
  try {
    logger.debug(callback.getMessageId() + "String_Node_Str" + callback.getMethod());
    if (callback.getMethod().equals("String_Node_Str")) {
      TableClientMessage message=(TableClientMessage)callback.getData();
      GameManager.getInstance().setCurrentPlayerUUID(message.getPlayerId());
      gameStarted(message.getGameId(),message.getPlayerId());
    }
 else     if (callback.getMethod().equals("String_Node_Str")) {
      TableClientMessage message=(TableClientMessage)callback.getData();
      tournamentStarted(message.getGameId(),message.getPlayerId());
    }
 else     if (callback.getMethod().equals("String_Node_Str")) {
      TableClientMessage message=(TableClientMessage)callback.getData();
      draftStarted(message.getGameId(),message.getPlayerId());
    }
 else     if (callback.getMethod().equals("String_Node_Str")) {
      replayGame(callback.getObjectId());
    }
 else     if (callback.getMethod().equals("String_Node_Str")) {
      showTournament((UUID)callback.getObjectId());
    }
 else     if (callback.getMethod().equals("String_Node_Str")) {
      watchGame((UUID)callback.getObjectId());
    }
 else     if (callback.getMethod().equals("String_Node_Str")) {
      ChatMessage message=(ChatMessage)callback.getData();
      ChatPanel panel=MageFrame.getChat(callback.getObjectId());
      if (panel != null) {
        if (message.getSoundToPlay() != null) {
switch (message.getSoundToPlay()) {
case PlayerLeft:
            AudioManager.playPlayerLeft();
          break;
case PlayerSubmittedDeck:
        AudioManager.playPlayerSubmittedDeck();
      break;
case PlayerWhispered:
    AudioManager.playPlayerWhispered();
  break;
}
}
if (!panel.isStartMessageDone()) {
createChatStartMessage(panel);
}
if (!message.getMessageType().equals(MessageType.GAME) && panel.getConnectedChat() != null) {
panel.getConnectedChat().receiveMessage(message.getUsername(),message.getMessage(),message.getTime(),message.getMessageType(),ChatMessage.MessageColor.BLACK);
}
 else {
panel.receiveMessage(message.getUsername(),message.getMessage(),message.getTime(),message.getMessageType(),message.getColor());
}
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
if (callback.getData() != null) {
ChatMessage message=(ChatMessage)callback.getData();
if (message.getColor().equals(ChatMessage.MessageColor.RED)) {
JOptionPane.showMessageDialog(null,message.getMessage(),"String_Node_Str",JOptionPane.WARNING_MESSAGE);
}
 else {
JOptionPane.showMessageDialog(null,message.getMessage(),"String_Node_Str",JOptionPane.INFORMATION_MESSAGE);
}
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
TableClientMessage message=(TableClientMessage)callback.getData();
joinedTable(message.getRoomId(),message.getTableId(),message.getFlag());
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.init((GameView)callback.getData());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.endMessage((String)callback.getData(),callback.getMessageId());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.updateGame((GameView)callback.getData());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.init((GameView)callback.getData());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.endMessage((String)callback.getData(),callback.getMessageId());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
frame.showErrorDialog("String_Node_Str",(String)callback.getData());
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.ask(message.getMessage(),message.getGameView(),callback.getMessageId());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.pickTarget(message.getMessage(),message.getCardsView(),message.getGameView(),message.getTargets(),message.isFlag(),message.getOptions(),callback.getMessageId());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.select(message.getMessage(),message.getGameView(),callback.getMessageId());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.pickAbility((AbilityPickerView)callback.getData());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.pickPile(message.getMessage(),message.getPile1(),message.getPile2());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.getChoice(message.getMessage(),message.getStrings());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.playMana(message.getMessage(),message.getGameView(),callback.getMessageId());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.playXMana(message.getMessage(),message.getGameView(),callback.getMessageId());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.getAmount(message.getMin(),message.getMax(),message.getMessage());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.updateGame((GameView)callback.getData());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
MageFrame.getInstance().showGameEndDialog((GameEndView)callback.getData());
}
 else if (callback.getMethod().equals("String_Node_Str")) {
List<String> messageData=(List<String>)callback.getData();
if (messageData.size() == 2) {
JOptionPane.showMessageDialog(null,messageData.get(1),messageData.get(0),JOptionPane.WARNING_MESSAGE);
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
if (callback.getMessageId() > gameInformMessageId) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
panel.inform(message.getMessage(),message.getGameView(),callback.getMessageId());
}
}
 else {
logger.warn(new StringBuilder("String_Node_Str").append("String_Node_Str").append(callback.getMessageId()).append("String_Node_Str").append(callback.getMethod()));
}
gameInformMessageId=messageId;
}
 else if (callback.getMethod().equals("String_Node_Str")) {
GameClientMessage message=(GameClientMessage)callback.getData();
GamePanel panel=MageFrame.getGame(callback.getObjectId());
if (panel != null) {
JOptionPane.showMessageDialog(panel,message.getMessage(),"String_Node_Str",JOptionPane.INFORMATION_MESSAGE);
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
TableClientMessage message=(TableClientMessage)callback.getData();
DeckView deckView=message.getDeck();
Deck deck=DeckUtil.construct(deckView);
if (message.getFlag()) {
construct(deck,message.getTableId(),message.getTime());
}
 else {
sideboard(deck,message.getTableId(),message.getTime());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
TableClientMessage message=(TableClientMessage)callback.getData();
DeckView deckView=message.getDeck();
Deck deck=DeckUtil.construct(deckView);
construct(deck,message.getTableId(),message.getTime());
}
 else if (callback.getMethod().equals("String_Node_Str")) {
MageFrame.removeDraft(callback.getObjectId());
}
 else if (callback.getMethod().equals("String_Node_Str")) {
DraftClientMessage message=(DraftClientMessage)callback.getData();
DraftPanel panel=MageFrame.getDraft(callback.getObjectId());
if (panel != null) {
panel.loadBooster(message.getDraftPickView());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
DraftPanel panel=MageFrame.getDraft(callback.getObjectId());
if (panel != null) {
panel.updateDraft((DraftView)callback.getData());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
if (callback.getMessageId() > messageId) {
DraftClientMessage message=(DraftClientMessage)callback.getData();
}
 else {
logger.warn("String_Node_Str");
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
DraftClientMessage message=(DraftClientMessage)callback.getData();
DraftPanel panel=MageFrame.getDraft(callback.getObjectId());
if (panel != null) {
panel.loadBooster(message.getDraftPickView());
}
}
 else if (callback.getMethod().equals("String_Node_Str")) {
}
messageId=callback.getMessageId();
}
 catch (Exception ex) {
handleException(ex);
}
}