Program: 73248
Project: 73248
Buggy source:
/** 
 * Create a new NamedObj tree for dragging and dropping into the scene.
 */
public NamedObjectTree(){
  setBorder(new TitledBorder(null,"String_Node_Str",TitledBorder.LEADING,TitledBorder.TOP,null,null));
  setLayout(new BorderLayout());
  setSize(500,200);
  setPreferredSize(new Dimension(250,10));
  _search.setToolTipText("String_Node_Str");
  _search.setFocusable(true);
  _search.requestFocus();
  _search.addKeyListener(new KeyAdapter(){
    public void keyReleased(    KeyEvent e){
      AttributeTreeModel treeModel=(AttributeTreeModel)_tree.getModel();
      if ((_search.getText() != null) && (_search.getText().length() > 0)) {
        treeModel.applyFilter(_search.getText());
        for (int i=0; i < _tree.getRowCount(); i++) {
          _tree.expandRow(i);
        }
      }
 else {
        for (int i=0; i < _tree.getRowCount(); i++) {
          _tree.collapseRow(i);
        }
      }
    }
  }
);
  _tree=new PTree(new AttributeTreeModel(null));
  _tree.setRootVisible(false);
  _tree.setShowsRootHandles(true);
  _tree.setScrollsOnExpand(true);
  _tree.setCellRenderer(new PtolemyTreeCellRenderer(){
    @Override public Component getTreeCellRendererComponent(    JTree tree,    Object value,    boolean sel,    boolean expanded,    boolean leaf,    int row,    boolean hasFocus){
      super.getTreeCellRendererComponent(tree,value,sel,expanded,leaf,row,hasFocus);
      setText(((Nameable)value).getName());
      if ((_search.getText() != null) && (_search.getText().length() > 0)) {
        if ((!((Nameable)value).getFullName().toLowerCase().contains(_search.getText().toLowerCase()))) {
          setEnabled(false);
        }
      }
      return this;
    }
  }
);
  add(_search,BorderLayout.NORTH);
  add(new JScrollPane(_tree),BorderLayout.CENTER);
  JButton button=new JButton("String_Node_Str");
  button.setUI(new BasicButtonUI());
  button.setTransferHandler(new TransferHandler("String_Node_Str"));
  button.addMouseListener(new MouseAdapter(){
    @Override public void mousePressed(    MouseEvent e){
      JComponent c=(JComponent)e.getSource();
      TransferHandler handler=c.getTransferHandler();
      handler.exportAsDrag(c,e,TransferHandler.COPY);
    }
  }
);
  button.setFocusable(false);
  button.setBorder(BorderFactory.createEtchedBorder());
  button.setRolloverEnabled(true);
  add(button,BorderLayout.SOUTH);
}

Fixed version (ground truth):
/** 
 * Create a new NamedObj tree for dragging and dropping into the scene.
 */
public NamedObjectTree(){
  setBorder(new TitledBorder(null,"String_Node_Str",TitledBorder.LEADING,TitledBorder.TOP,null,null));
  setLayout(new BorderLayout());
  setSize(500,200);
  setPreferredSize(new Dimension(250,10));
  _search.setToolTipText("String_Node_Str");
  _search.setFocusable(true);
  _search.requestFocus();
  _search.addKeyListener(new KeyAdapter(){
    public void keyReleased(    KeyEvent e){
      AttributeTreeModel treeModel=(AttributeTreeModel)_tree.getModel();
      if ((_search.getText() != null) && (_search.getText().length() > 0)) {
        treeModel.applyFilter(_search.getText());
        for (int i=0; i < _tree.getRowCount(); i++) {
          _tree.expandRow(i);
        }
      }
 else {
        for (int i=0; i < _tree.getRowCount(); i++) {
          treeModel.applyFilter("String_Node_Str");
          _tree.collapseRow(i);
        }
      }
    }
  }
);
  _tree=new PTree(new AttributeTreeModel(null));
  _tree.setRootVisible(false);
  _tree.setShowsRootHandles(true);
  _tree.setScrollsOnExpand(true);
  _tree.setCellRenderer(new PtolemyTreeCellRenderer(){
    @Override public Component getTreeCellRendererComponent(    JTree tree,    Object value,    boolean sel,    boolean expanded,    boolean leaf,    int row,    boolean hasFocus){
      super.getTreeCellRendererComponent(tree,value,sel,expanded,leaf,row,hasFocus);
      setText(((Nameable)value).getName());
      if ((_search.getText() != null) && (_search.getText().length() > 0)) {
        if ((!((Nameable)value).getFullName().toLowerCase().contains(_search.getText().toLowerCase()))) {
          setEnabled(false);
        }
      }
      return this;
    }
  }
);
  add(_search,BorderLayout.NORTH);
  add(new JScrollPane(_tree),BorderLayout.CENTER);
  JButton button=new JButton("String_Node_Str");
  button.setUI(new BasicButtonUI());
  button.setTransferHandler(new TransferHandler("String_Node_Str"));
  button.addMouseListener(new MouseAdapter(){
    @Override public void mousePressed(    MouseEvent e){
      JComponent c=(JComponent)e.getSource();
      TransferHandler handler=c.getTransferHandler();
      handler.exportAsDrag(c,e,TransferHandler.COPY);
    }
  }
);
  button.setFocusable(false);
  button.setBorder(BorderFactory.createEtchedBorder());
  button.setRolloverEnabled(true);
  add(button,BorderLayout.SOUTH);
}