Program: 173821
Project: 173821
Buggy source:
public void showUpgrades(){
  upgradePanel.removeAll();
  if (tokenMode && possibleTokenLays != null && possibleTokenLays.size() > 0) {
    Color fgColour=null;
    Color bgColour=null;
    String text=null;
    String description=null;
    TokenIcon icon;
    ActionLabel tokenLabel;
    tokenLabels=new ArrayList<ActionLabel>();
    for (    LayToken action : possibleTokenLays) {
      if (action instanceof LayBaseToken) {
        PublicCompanyI comp=((LayBaseToken)action).getCompany();
        fgColour=comp.getFgColour();
        bgColour=comp.getBgColour();
        description=text=comp.getName();
      }
 else       if (action instanceof LayBonusToken) {
        fgColour=Color.BLACK;
        bgColour=Color.WHITE;
        BonusToken token=(BonusToken)action.getSpecialProperty().getToken();
        description=token.getName();
        text="String_Node_Str" + token.getValue();
      }
      icon=new TokenIcon(25,fgColour,bgColour,text);
      tokenLabel=new ActionLabel(icon);
      tokenLabel.setName(description);
      tokenLabel.setText(description);
      tokenLabel.setBackground(defaultLabelBgColour);
      tokenLabel.setOpaque(true);
      tokenLabel.setVisible(true);
      tokenLabel.setBorder(border);
      tokenLabel.addMouseListener(this);
      tokenLabel.addPossibleAction(action);
      tokenLabels.add(tokenLabel);
      upgradePanel.add(tokenLabel);
    }
    setSelectedToken();
  }
 else   if (orUIManager.tileUpgrades == null) {
  }
 else   if (orUIManager.tileUpgrades.size() == 0) {
    orUIManager.setMessage(LocalText.getText("String_Node_Str"));
  }
 else {
    for (    TileI tile : orUIManager.tileUpgrades) {
      BufferedImage hexImage=getHexImage(tile.getId());
      ImageIcon hexIcon=new ImageIcon(hexImage);
      hexIcon.setImage(hexIcon.getImage().getScaledInstance((int)(hexIcon.getIconWidth() * GUIHex.NORMAL_SCALE * 0.8),(int)(hexIcon.getIconHeight() * GUIHex.NORMAL_SCALE * 0.8),Image.SCALE_SMOOTH));
      JLabel hexLabel=new JLabel(hexIcon);
      hexLabel.setName(tile.getName());
      hexLabel.setText("String_Node_Str" + tile.getExternalId());
      hexLabel.setOpaque(true);
      hexLabel.setVisible(true);
      hexLabel.setBorder(border);
      hexLabel.addMouseListener(this);
      upgradePanel.add(hexLabel);
    }
  }
  upgradePanel.add(doneButton);
  upgradePanel.add(cancelButton);
  repaint();
}

Fixed version (ground truth):
public void showUpgrades(){
  upgradePanel.removeAll();
  if (tokenMode && possibleTokenLays != null && possibleTokenLays.size() > 0) {
    Color fgColour=null;
    Color bgColour=null;
    String text=null;
    String description=null;
    TokenIcon icon;
    ActionLabel tokenLabel;
    tokenLabels=new ArrayList<ActionLabel>();
    for (    LayToken action : possibleTokenLays) {
      if (action instanceof LayBaseToken) {
        PublicCompanyI comp=((LayBaseToken)action).getCompany();
        fgColour=comp.getFgColour();
        bgColour=comp.getBgColour();
        description=text=comp.getName();
      }
 else       if (action instanceof LayBonusToken) {
        fgColour=Color.BLACK;
        bgColour=Color.WHITE;
        BonusToken token=(BonusToken)action.getSpecialProperty().getToken();
        description=token.getName();
        text="String_Node_Str" + token.getValue();
      }
      icon=new TokenIcon(25,fgColour,bgColour,text);
      tokenLabel=new ActionLabel(icon);
      tokenLabel.setName(description);
      tokenLabel.setText(description);
      tokenLabel.setBackground(defaultLabelBgColour);
      tokenLabel.setOpaque(true);
      tokenLabel.setVisible(true);
      tokenLabel.setBorder(border);
      tokenLabel.addMouseListener(this);
      tokenLabel.addPossibleAction(action);
      tokenLabels.add(tokenLabel);
      upgradePanel.add(tokenLabel);
    }
    setSelectedToken();
  }
 else   if (orUIManager.tileUpgrades == null) {
  }
 else   if (orUIManager.tileUpgrades.size() == 0) {
    orUIManager.setMessage(LocalText.getText("String_Node_Str"));
  }
 else {
    for (    TileI tile : orUIManager.tileUpgrades) {
      BufferedImage hexImage=getHexImage(tile.getId());
      ImageIcon hexIcon=new ImageIcon(hexImage);
      hexIcon.setImage(hexIcon.getImage().getScaledInstance((int)(hexIcon.getIconWidth() * GUIHex.NORMAL_SCALE * 0.8),(int)(hexIcon.getIconHeight() * GUIHex.NORMAL_SCALE * 0.8),Image.SCALE_SMOOTH));
      HexLabel hexLabel=new HexLabel(hexIcon,tile.getId());
      hexLabel.setName(tile.getName());
      hexLabel.setText("String_Node_Str" + tile.getExternalId());
      hexLabel.setOpaque(true);
      hexLabel.setVisible(true);
      hexLabel.setBorder(border);
      hexLabel.addMouseListener(this);
      upgradePanel.add(hexLabel);
    }
  }
  upgradePanel.add(doneButton);
  upgradePanel.add(cancelButton);
  repaint();
}