Program: 103454
Project: 103454
Buggy source:
/** 
 * Creates an instance of <tt>ChatConversationPanel</tt>.
 * @param chatContainer The parent <tt>ChatConversationContainer</tt>.
 */
public ChatConversationPanel(ChatConversationContainer chatContainer){
  editorKit=new SIPCommHTMLEditorKit(this);
  this.chatContainer=chatContainer;
  isHistory=(chatContainer instanceof HistoryWindow);
  this.rightButtonMenu=new ChatRightButtonMenu(this);
  this.document=(HTMLDocument)editorKit.createDefaultDocument();
  this.chatTextPane.setEditorKitForContentType("String_Node_Str",editorKit);
  this.chatTextPane.setEditorKit(editorKit);
  this.chatTextPane.setEditable(false);
  this.chatTextPane.setDocument(document);
  this.chatTextPane.setDragEnabled(true);
  chatTextPane.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES,Boolean.TRUE);
  Constants.loadSimpleStyle(document.getStyleSheet(),chatTextPane.getFont());
  this.chatTextPane.addHyperlinkListener(this);
  this.chatTextPane.addMouseListener(this);
  this.chatTextPane.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
  this.setWheelScrollingEnabled(true);
  JPanel viewportView=new TransparentPanel(new BorderLayout());
  viewportView.add(chatTextPane);
  this.setViewportView(viewportView);
  this.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
  ToolTipManager.sharedInstance().registerComponent(chatTextPane);
  String copyLinkString=GuiActivator.getResources().getI18NString("String_Node_Str");
  copyLinkItem=new JMenuItem(copyLinkString,new ImageIcon(ImageLoader.getImage(ImageLoader.COPY_ICON)));
  copyLinkItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      StringSelection stringSelection=new StringSelection(currentHref);
      Clipboard clipboard=Toolkit.getDefaultToolkit().getSystemClipboard();
      clipboard.setContents(stringSelection,ChatConversationPanel.this);
    }
  }
);
  String openLinkString=GuiActivator.getResources().getI18NString("String_Node_Str");
  openLinkItem=new JMenuItem(openLinkString,new ImageIcon(ImageLoader.getImage(ImageLoader.BROWSER_ICON)));
  openLinkItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      GuiActivator.getBrowserLauncher().openURL(currentHref);
    }
  }
);
  openLinkItem.setMnemonic(GuiActivator.getResources().getI18nMnemonic("String_Node_Str"));
  copyLinkItem.setMnemonic(GuiActivator.getResources().getI18nMnemonic("String_Node_Str"));
  ComponentListener componentListener=new ComponentAdapter(){
    @Override public void componentResized(    ComponentEvent e){
synchronized (scrollToBottomRunnable) {
        if (!scrollToBottomIsPending)         return;
        scrollToBottomIsPending=false;
        SwingUtilities.invokeLater(scrollToBottomRunnable);
      }
    }
  }
;
  viewportView.addComponentListener(componentListener);
  getViewport().addComponentListener(componentListener);
}

Fixed version (ground truth):
/** 
 * Creates an instance of <tt>ChatConversationPanel</tt>.
 * @param chatContainer The parent <tt>ChatConversationContainer</tt>.
 */
public ChatConversationPanel(ChatConversationContainer chatContainer){
  editorKit=new SIPCommHTMLEditorKit(this);
  this.chatContainer=chatContainer;
  isHistory=(chatContainer instanceof HistoryWindow);
  this.rightButtonMenu=new ChatRightButtonMenu(this);
  this.document=(HTMLDocument)editorKit.createDefaultDocument();
  this.chatTextPane.setEditorKitForContentType("String_Node_Str",editorKit);
  this.chatTextPane.setEditorKit(editorKit);
  this.chatTextPane.setEditable(false);
  this.chatTextPane.setDocument(document);
  this.chatTextPane.setDragEnabled(true);
  chatTextPane.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES,Boolean.TRUE);
  Constants.loadSimpleStyle(document.getStyleSheet(),chatTextPane.getFont());
  this.chatTextPane.addHyperlinkListener(this);
  this.chatTextPane.addMouseListener(this);
  this.chatTextPane.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
  this.setWheelScrollingEnabled(true);
  this.setViewportView(chatTextPane);
  this.setBorder(null);
  this.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
  ToolTipManager.sharedInstance().registerComponent(chatTextPane);
  String copyLinkString=GuiActivator.getResources().getI18NString("String_Node_Str");
  copyLinkItem=new JMenuItem(copyLinkString,new ImageIcon(ImageLoader.getImage(ImageLoader.COPY_ICON)));
  copyLinkItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      StringSelection stringSelection=new StringSelection(currentHref);
      Clipboard clipboard=Toolkit.getDefaultToolkit().getSystemClipboard();
      clipboard.setContents(stringSelection,ChatConversationPanel.this);
    }
  }
);
  String openLinkString=GuiActivator.getResources().getI18NString("String_Node_Str");
  openLinkItem=new JMenuItem(openLinkString,new ImageIcon(ImageLoader.getImage(ImageLoader.BROWSER_ICON)));
  openLinkItem.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      GuiActivator.getBrowserLauncher().openURL(currentHref);
    }
  }
);
  openLinkItem.setMnemonic(GuiActivator.getResources().getI18nMnemonic("String_Node_Str"));
  copyLinkItem.setMnemonic(GuiActivator.getResources().getI18nMnemonic("String_Node_Str"));
  ComponentListener componentListener=new ComponentAdapter(){
    @Override public void componentResized(    ComponentEvent e){
synchronized (scrollToBottomRunnable) {
        if (!scrollToBottomIsPending)         return;
        scrollToBottomIsPending=false;
        SwingUtilities.invokeLater(scrollToBottomRunnable);
      }
    }
  }
;
  chatTextPane.addComponentListener(componentListener);
  getViewport().addComponentListener(componentListener);
}