Program: 62041
Project: 62041
Buggy source:
@Override public void run(){
  JPanel pan=new JPanel();
  pan.setBackground(Color.white);
  pan.setLayout(new BoxLayout(pan,BoxLayout.Y_AXIS));
  JComponent detailComponent;
  if (detail == null) {
    detailComponent=null;
  }
 else {
    final JTextArea detailTextArea=new JTextArea(detail);
    detailTextArea.setEditable(false);
    detailTextArea.setOpaque(false);
    detailTextArea.setFont(new JLabel().getFont());
    detailTextArea.setBackground(Color.white);
    detailComponent=detailTextArea;
  }
  JPanel header=new JPanel();
  header.setLayout(new BoxLayout(header,BoxLayout.X_AXIS));
  header.setBackground(Color.white);
  SimpleDateFormat format=new SimpleDateFormat("String_Node_Str");
  final String dateStr=format.format(new Date());
  JToggleButton copyButton=new JToggleButton(View.getIcon("String_Node_Str"));
  copyButton.setFocusPainted(false);
  copyButton.setBorderPainted(false);
  copyButton.setFocusable(false);
  copyButton.setContentAreaFilled(false);
  copyButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
  copyButton.setMargin(new Insets(2,2,2,2));
  copyButton.setToolTipText(translate("String_Node_Str"));
  copyButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      Clipboard clipboard=Toolkit.getDefaultToolkit().getSystemClipboard();
      StringSelection stringSelection=new StringSelection(dateStr + "String_Node_Str" + level.toString()+ "String_Node_Str"+ msg+ "String_Node_Str"+ detail);
      clipboard.setContents(stringSelection,null);
    }
  }
);
  final JToggleButton expandButton=new JToggleButton(View.getIcon("String_Node_Str"));
  expandButton.setFocusPainted(false);
  expandButton.setBorderPainted(false);
  expandButton.setFocusable(false);
  expandButton.setContentAreaFilled(false);
  expandButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
  expandButton.setMargin(new Insets(2,2,2,2));
  expandButton.setToolTipText(translate("String_Node_Str"));
  final JScrollPane scrollPane;
  if (detailComponent != null) {
    scrollPane=new JScrollPane(detailComponent);
    scrollPane.setAlignmentX(0f);
    scrollPane.setMinimumSize(new Dimension(getWidth(),500));
    scrollPane.setPreferredSize(new Dimension(getWidth(),500));
  }
 else {
    scrollPane=null;
  }
  if (detailComponent != null) {
    expandButton.addActionListener(new ActionListener(){
      @Override public void actionPerformed(      ActionEvent e){
        if (expandButton.isSelected()) {
          expandButton.setIcon(View.getIcon("String_Node_Str"));
        }
        scrollPane.setVisible(expandButton.isSelected());
        scrollPane.setMinimumSize(new Dimension(getWidth(),500));
        scrollPane.setSize(new Dimension(getWidth(),500));
        revalidate();
        repaint();
      }
    }
);
  }
  JLabel dateLabel=new JLabel(dateStr);
  dateLabel.setPreferredSize(new Dimension(140,25));
  dateLabel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
  header.add(dateLabel);
  JLabel levelLabel=new JLabel(level.getName());
  levelLabel.setPreferredSize(new Dimension(75,25));
  levelLabel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
  header.add(levelLabel);
  JTextArea msgLabel=new JTextArea(msg);
  msgLabel.setEditable(false);
  msgLabel.setOpaque(false);
  msgLabel.setFont(levelLabel.getFont());
  msgLabel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
  header.add(msgLabel);
  header.setAlignmentX(0f);
  if (detailComponent != null) {
    header.add(expandButton);
  }
  header.add(copyButton);
  pan.add(header);
  if (detailComponent != null) {
    pan.add(scrollPane);
    scrollPane.setVisible(false);
  }
  pan.setAlignmentX(0f);
  logView.add(pan);
  revalidate();
  repaint();
}

Fixed version (ground truth):
@Override public void run(){
  JPanel pan=new JPanel();
  pan.setBackground(Color.white);
  pan.setLayout(new BoxLayout(pan,BoxLayout.Y_AXIS));
  JComponent detailComponent;
  if (detail == null) {
    detailComponent=null;
  }
 else {
    final JTextArea detailTextArea=new JTextArea(detail);
    detailTextArea.setEditable(false);
    detailTextArea.setOpaque(false);
    detailTextArea.setFont(new JLabel().getFont());
    detailTextArea.setBackground(Color.white);
    detailComponent=detailTextArea;
  }
  JPanel header=new JPanel();
  header.setLayout(new BoxLayout(header,BoxLayout.X_AXIS));
  header.setBackground(Color.white);
  SimpleDateFormat format=new SimpleDateFormat("String_Node_Str");
  final String dateStr=format.format(new Date());
  JToggleButton copyButton=new JToggleButton(View.getIcon("String_Node_Str"));
  copyButton.setFocusPainted(false);
  copyButton.setBorderPainted(false);
  copyButton.setFocusable(false);
  copyButton.setContentAreaFilled(false);
  copyButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
  copyButton.setMargin(new Insets(2,2,2,2));
  copyButton.setToolTipText(translate("String_Node_Str"));
  copyButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      Clipboard clipboard=Toolkit.getDefaultToolkit().getSystemClipboard();
      StringSelection stringSelection=new StringSelection(dateStr + "String_Node_Str" + level.toString()+ "String_Node_Str"+ msg+ "String_Node_Str"+ detail);
      clipboard.setContents(stringSelection,null);
    }
  }
);
  final JToggleButton expandButton=new JToggleButton(collapseIcon);
  expandButton.setFocusPainted(false);
  expandButton.setBorderPainted(false);
  expandButton.setFocusable(false);
  expandButton.setContentAreaFilled(false);
  expandButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
  expandButton.setMargin(new Insets(2,2,2,2));
  expandButton.setToolTipText(translate("String_Node_Str"));
  final JScrollPane scrollPane;
  if (detailComponent != null) {
    scrollPane=new JScrollPane(detailComponent);
    scrollPane.setAlignmentX(0f);
  }
 else {
    scrollPane=null;
  }
  if (detailComponent != null) {
    expandButton.addActionListener(new ActionListener(){
      @Override public void actionPerformed(      ActionEvent e){
        expandButton.setIcon(expandButton.isSelected() ? expandIcon : collapseIcon);
        scrollPane.setVisible(expandButton.isSelected());
        revalidate();
        repaint();
      }
    }
);
  }
  JLabel dateLabel=new JLabel(dateStr);
  dateLabel.setPreferredSize(new Dimension(140,25));
  dateLabel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
  header.add(dateLabel);
  JLabel levelLabel=new JLabel(level.getName());
  levelLabel.setPreferredSize(new Dimension(75,25));
  levelLabel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
  header.add(levelLabel);
  JTextArea msgLabel=new JTextArea(msg);
  msgLabel.setEditable(false);
  msgLabel.setOpaque(false);
  msgLabel.setFont(levelLabel.getFont());
  msgLabel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
  header.add(msgLabel);
  header.setAlignmentX(0f);
  if (detailComponent != null) {
    header.add(expandButton);
  }
  header.add(copyButton);
  pan.add(header);
  if (detailComponent != null) {
    pan.add(scrollPane);
    scrollPane.setVisible(false);
  }
  pan.setAlignmentX(0f);
  logViewInner.add(pan);
  revalidate();
  repaint();
}