Program: 158609
Project: 158609
Buggy source:
private void addTooltipContainer(){
  final JEditorPane cardInfoPane=(JEditorPane)Plugins.getInstance().getCardInfoPane();
  if (cardInfoPane == null) {
    return;
  }
  cardInfoPane.setSize(Constants.TOOLTIP_WIDTH_MIN,Constants.TOOLTIP_HEIGHT_MIN);
  cardInfoPane.setLocation(40,40);
  cardInfoPane.setBackground(new Color(0,0,0,0));
  MageRoundPane popupContainer=new MageRoundPane();
  popupContainer.setLayout(null);
  popupContainer.add(cardInfoPane);
  popupContainer.setVisible(false);
  popupContainer.setBounds(0,0,Constants.TOOLTIP_WIDTH_MIN + Constants.TOOLTIP_BORDER_WIDTH,Constants.TOOLTIP_HEIGHT_MIN + Constants.TOOLTIP_BORDER_WIDTH);
  desktopPane.add(popupContainer,JLayeredPane.POPUP_LAYER);
  ui.addComponent(MageComponents.CARD_INFO_PANE,cardInfoPane);
  ui.addComponent(MageComponents.POPUP_CONTAINER,popupContainer);
  JPanel cardPreviewContainer=new JPanel();
  cardPreviewContainer.setOpaque(false);
  cardPreviewContainer.setLayout(null);
  BigCard bigCard=new BigCard();
  bigCard.setSize(320,500);
  bigCard.setLocation(40,40);
  bigCard.setBackground(new Color(0,0,0,0));
  cardPreviewContainer.add(bigCard);
  cardPreviewContainer.setVisible(false);
  cardPreviewContainer.setBounds(0,0,320 + 80,500 + 30);
  ui.addComponent(MageComponents.CARD_PREVIEW_PANE,bigCard);
  ui.addComponent(MageComponents.CARD_PREVIEW_CONTAINER,cardPreviewContainer);
  desktopPane.add(cardPreviewContainer,JLayeredPane.POPUP_LAYER);
  JPanel cardPreviewContainerRotated=new JPanel();
  cardPreviewContainerRotated.setOpaque(false);
  cardPreviewContainerRotated.setLayout(null);
  bigCard=new BigCard(true);
  bigCard.setSize(500,350);
  bigCard.setLocation(40,40);
  bigCard.setBackground(new Color(0,0,0,0));
  cardPreviewContainerRotated.add(bigCard);
  cardPreviewContainerRotated.setVisible(false);
  cardPreviewContainerRotated.setBounds(0,0,500 + 80,420 + 30);
  ui.addComponent(MageComponents.CARD_PREVIEW_PANE_ROTATED,bigCard);
  ui.addComponent(MageComponents.CARD_PREVIEW_CONTAINER_ROTATED,cardPreviewContainerRotated);
  desktopPane.add(cardPreviewContainerRotated,JLayeredPane.POPUP_LAYER);
}

Fixed version (ground truth):
private void addTooltipContainer(){
  final JEditorPane cardInfoPane=(JEditorPane)Plugins.getInstance().getCardInfoPane();
  if (cardInfoPane == null) {
    return;
  }
  cardInfoPane.setSize(Constants.TOOLTIP_WIDTH_MIN,Constants.TOOLTIP_HEIGHT_MIN);
  cardInfoPane.setLocation(40,40);
  cardInfoPane.setBackground(new Color(0,0,0,0));
  MageRoundPane popupContainer=new MageRoundPane();
  popupContainer.setLayout(null);
  popupContainer.add(cardInfoPane);
  popupContainer.setVisible(false);
  popupContainer.setBounds(0,0,Constants.TOOLTIP_WIDTH_MIN + Constants.TOOLTIP_BORDER_WIDTH,Constants.TOOLTIP_HEIGHT_MIN + Constants.TOOLTIP_BORDER_WIDTH);
  desktopPane.add(popupContainer,JLayeredPane.POPUP_LAYER);
  UI.addComponent(MageComponents.CARD_INFO_PANE,cardInfoPane);
  UI.addComponent(MageComponents.POPUP_CONTAINER,popupContainer);
  JPanel cardPreviewContainer=new JPanel();
  cardPreviewContainer.setOpaque(false);
  cardPreviewContainer.setLayout(null);
  BigCard bigCard=new BigCard();
  bigCard.setSize(320,500);
  bigCard.setLocation(40,40);
  bigCard.setBackground(new Color(0,0,0,0));
  cardPreviewContainer.add(bigCard);
  cardPreviewContainer.setVisible(false);
  cardPreviewContainer.setBounds(0,0,320 + 80,500 + 30);
  UI.addComponent(MageComponents.CARD_PREVIEW_PANE,bigCard);
  UI.addComponent(MageComponents.CARD_PREVIEW_CONTAINER,cardPreviewContainer);
  desktopPane.add(cardPreviewContainer,JLayeredPane.POPUP_LAYER);
  JPanel cardPreviewContainerRotated=new JPanel();
  cardPreviewContainerRotated.setOpaque(false);
  cardPreviewContainerRotated.setLayout(null);
  bigCard=new BigCard(true);
  bigCard.setSize(500,350);
  bigCard.setLocation(40,40);
  bigCard.setBackground(new Color(0,0,0,0));
  cardPreviewContainerRotated.add(bigCard);
  cardPreviewContainerRotated.setVisible(false);
  cardPreviewContainerRotated.setBounds(0,0,500 + 80,420 + 30);
  UI.addComponent(MageComponents.CARD_PREVIEW_PANE_ROTATED,bigCard);
  UI.addComponent(MageComponents.CARD_PREVIEW_CONTAINER_ROTATED,cardPreviewContainerRotated);
  desktopPane.add(cardPreviewContainerRotated,JLayeredPane.POPUP_LAYER);
}