Program: 168510
Project: 168510
Buggy source:
/** 
 * Creates new form CatalogInfoPanel 
 */
public ExtentsInfoPanel(final BaseHFSFileSystemView fsView){
  initComponents();
  JTree dirTree=catalogTree;
  CommonBTNode iNode=fsView.getExtentsOverflowNode(-1);
  DefaultMutableTreeNode rootNode=new NoLeafMutableTreeNode(new BTNodeStorage(iNode,"String_Node_Str"));
  expandNode(rootNode,iNode,fsView);
  DefaultTreeModel model=new DefaultTreeModel(rootNode);
  dirTree.setModel(model);
  dirTree.addTreeWillExpandListener(new TreeWillExpandListener(){
    @Override public void treeWillExpand(    TreeExpansionEvent e) throws ExpandVetoException {
      TreePath tp=e.getPath();
      Object obj=tp.getLastPathComponent();
      if (obj instanceof DefaultMutableTreeNode) {
        DefaultMutableTreeNode dmtn=((DefaultMutableTreeNode)obj);
        Object obj2=dmtn.getUserObject();
        if (obj2 instanceof BTNodeStorage) {
          CommonBTNode node=((BTNodeStorage)obj2).getNode();
          expandNode(dmtn,node,fsView);
        }
 else         throw new RuntimeException("String_Node_Str");
      }
 else       throw new RuntimeException("String_Node_Str");
    }
    @Override public void treeWillCollapse(    TreeExpansionEvent e){
    }
  }
);
  final String INDEX_NAME="String_Node_Str";
  final String LEAF_NAME="String_Node_Str";
  final String PRINT_FIELDS_AREA_NAME="String_Node_Str";
  final String OTHER_NAME="String_Node_Str";
  final String FILE_NAME="String_Node_Str";
  final String FOLDER_NAME="String_Node_Str";
  final String FILE_THREAD_NAME="String_Node_Str";
  final String FOLDER_THREAD_NAME="String_Node_Str";
  final String STRUCT_VIEW_PANEL_NAME="String_Node_Str";
  final CardLayout clRoot=new CardLayout();
  final JPanel leafPanel=new JPanel();
  final CardLayout clLeaf=new CardLayout();
  leafPanel.setLayout(clLeaf);
  leafPanel.add(new JLabel("String_Node_Str",SwingConstants.CENTER),OTHER_NAME);
  leafPanel.add(new JLabel("String_Node_Str",SwingConstants.CENTER),FILE_THREAD_NAME);
  leafPanel.add(new JLabel("String_Node_Str",SwingConstants.CENTER),FOLDER_THREAD_NAME);
  final JScrollPane structViewPanelScroller=new JScrollPane();
  structViewPanelScroller.getVerticalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  structViewPanelScroller.getHorizontalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  leafPanel.add(structViewPanelScroller,STRUCT_VIEW_PANEL_NAME);
  final FileInfoPanel fileInfoPanel=new FileInfoPanel();
  JScrollPane fileInfoPanelScroller=new JScrollPane(fileInfoPanel);
  fileInfoPanelScroller.getVerticalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  fileInfoPanelScroller.getHorizontalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  leafPanel.add(fileInfoPanelScroller,FILE_NAME);
  final FolderInfoPanel folderInfoPanel=new FolderInfoPanel();
  JScrollPane folderInfoPanelScroller=new JScrollPane(folderInfoPanel);
  folderInfoPanelScroller.getVerticalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  folderInfoPanelScroller.getHorizontalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  leafPanel.add(folderInfoPanelScroller,FOLDER_NAME);
  final JTextArea printFieldsTextArea=new JTextArea(0,0);
  printFieldsTextArea.setEditable(false);
  printFieldsTextArea.setLineWrap(false);
  JScrollPane printFieldsTextAreaScroller=new JScrollPane(printFieldsTextArea);
  printFieldsTextAreaScroller.getVerticalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  printFieldsTextAreaScroller.getHorizontalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  leafPanel.add(printFieldsTextAreaScroller,PRINT_FIELDS_AREA_NAME);
  infoPanel.setLayout(clRoot);
  final JLabel indexNodeLabel=new JLabel("String_Node_Str",SwingConstants.CENTER);
  infoPanel.add(indexNodeLabel,INDEX_NAME);
  infoPanel.add(leafPanel,LEAF_NAME);
  catalogTree.addTreeSelectionListener(new TreeSelectionListener(){
    @Override public void valueChanged(    TreeSelectionEvent te){
      Object o=te.getPath().getLastPathComponent();
      if (o instanceof DefaultMutableTreeNode) {
        Object o2=((DefaultMutableTreeNode)o).getUserObject();
        if (o2 instanceof BTNodeStorage) {
          CommonBTNode btn=((BTNodeStorage)o2).getNode();
          CommonBTNodeDescriptor btnd=btn.getNodeDescriptor();
switch (btnd.getNodeType()) {
case INDEX:
            indexNodeLabel.setText("String_Node_Str" + btnd.getNumberOfRecords() + "String_Node_Str");
          break;
case LEAF:
        indexNodeLabel.setText("String_Node_Str" + btnd.getNumberOfRecords() + "String_Node_Str");
      break;
default :
    indexNodeLabel.setText("String_Node_Str");
}
clRoot.show(infoPanel,INDEX_NAME);
}
 else if (o2 instanceof ExtentLeafStorage) {
CommonHFSExtentLeafRecord rec=((ExtentLeafStorage)o2).getRecord();
if (rec instanceof StructElements) {
  Dictionary dict=((StructElements)rec).getStructElements();
  String label=dict.getTypeDescription();
  if (label == null)   label=dict.getTypeName();
  structViewPanelScroller.setViewportView(new StructViewPanel(label + "String_Node_Str",dict));
  clLeaf.show(leafPanel,STRUCT_VIEW_PANEL_NAME);
}
 else if (rec instanceof PrintableStruct) {
  PrintStream ps=new PrintStream(new JTextAreaOutputStream(System.err,printFieldsTextArea));
  printFieldsTextArea.setText("String_Node_Str");
  ((PrintableStruct)rec).print(ps,"String_Node_Str");
  ps.close();
  printFieldsTextArea.setCaretPosition(0);
  clLeaf.show(leafPanel,PRINT_FIELDS_AREA_NAME);
}
 else {
  System.err.println("String_Node_Str" + rec.getClass());
  clLeaf.show(leafPanel,OTHER_NAME);
}
clRoot.show(infoPanel,LEAF_NAME);
}
 else System.err.println("String_Node_Str" + o2.getClass().toString());
}
 else System.err.println("String_Node_Str" + o.getClass().toString());
}
}
);
}

Fixed version (ground truth):
/** 
 * Creates new form CatalogInfoPanel 
 */
public ExtentsInfoPanel(final BaseHFSFileSystemView fsView){
  initComponents();
  JTree dirTree=catalogTree;
  CommonBTNode iNode=fsView.getExtentsOverflowNode(-1);
  if (iNode == null) {
    DefaultTreeModel model=new DefaultTreeModel(new NoLeafMutableTreeNode("String_Node_Str"));
    dirTree.setModel(model);
    return;
  }
  DefaultMutableTreeNode rootNode=new NoLeafMutableTreeNode(new BTNodeStorage(iNode,"String_Node_Str"));
  expandNode(rootNode,iNode,fsView);
  DefaultTreeModel model=new DefaultTreeModel(rootNode);
  dirTree.setModel(model);
  dirTree.addTreeWillExpandListener(new TreeWillExpandListener(){
    @Override public void treeWillExpand(    TreeExpansionEvent e) throws ExpandVetoException {
      TreePath tp=e.getPath();
      Object obj=tp.getLastPathComponent();
      if (obj instanceof DefaultMutableTreeNode) {
        DefaultMutableTreeNode dmtn=((DefaultMutableTreeNode)obj);
        Object obj2=dmtn.getUserObject();
        if (obj2 instanceof BTNodeStorage) {
          CommonBTNode node=((BTNodeStorage)obj2).getNode();
          expandNode(dmtn,node,fsView);
        }
 else         throw new RuntimeException("String_Node_Str");
      }
 else       throw new RuntimeException("String_Node_Str");
    }
    @Override public void treeWillCollapse(    TreeExpansionEvent e){
    }
  }
);
  final String INDEX_NAME="String_Node_Str";
  final String LEAF_NAME="String_Node_Str";
  final String PRINT_FIELDS_AREA_NAME="String_Node_Str";
  final String OTHER_NAME="String_Node_Str";
  final String FILE_NAME="String_Node_Str";
  final String FOLDER_NAME="String_Node_Str";
  final String FILE_THREAD_NAME="String_Node_Str";
  final String FOLDER_THREAD_NAME="String_Node_Str";
  final String STRUCT_VIEW_PANEL_NAME="String_Node_Str";
  final CardLayout clRoot=new CardLayout();
  final JPanel leafPanel=new JPanel();
  final CardLayout clLeaf=new CardLayout();
  leafPanel.setLayout(clLeaf);
  leafPanel.add(new JLabel("String_Node_Str",SwingConstants.CENTER),OTHER_NAME);
  leafPanel.add(new JLabel("String_Node_Str",SwingConstants.CENTER),FILE_THREAD_NAME);
  leafPanel.add(new JLabel("String_Node_Str",SwingConstants.CENTER),FOLDER_THREAD_NAME);
  final JScrollPane structViewPanelScroller=new JScrollPane();
  structViewPanelScroller.getVerticalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  structViewPanelScroller.getHorizontalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  leafPanel.add(structViewPanelScroller,STRUCT_VIEW_PANEL_NAME);
  final FileInfoPanel fileInfoPanel=new FileInfoPanel();
  JScrollPane fileInfoPanelScroller=new JScrollPane(fileInfoPanel);
  fileInfoPanelScroller.getVerticalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  fileInfoPanelScroller.getHorizontalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  leafPanel.add(fileInfoPanelScroller,FILE_NAME);
  final FolderInfoPanel folderInfoPanel=new FolderInfoPanel();
  JScrollPane folderInfoPanelScroller=new JScrollPane(folderInfoPanel);
  folderInfoPanelScroller.getVerticalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  folderInfoPanelScroller.getHorizontalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  leafPanel.add(folderInfoPanelScroller,FOLDER_NAME);
  final JTextArea printFieldsTextArea=new JTextArea(0,0);
  printFieldsTextArea.setEditable(false);
  printFieldsTextArea.setLineWrap(false);
  JScrollPane printFieldsTextAreaScroller=new JScrollPane(printFieldsTextArea);
  printFieldsTextAreaScroller.getVerticalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  printFieldsTextAreaScroller.getHorizontalScrollBar().setUnitIncrement(UNIT_INCREMENT);
  leafPanel.add(printFieldsTextAreaScroller,PRINT_FIELDS_AREA_NAME);
  infoPanel.setLayout(clRoot);
  final JLabel indexNodeLabel=new JLabel("String_Node_Str",SwingConstants.CENTER);
  infoPanel.add(indexNodeLabel,INDEX_NAME);
  infoPanel.add(leafPanel,LEAF_NAME);
  catalogTree.addTreeSelectionListener(new TreeSelectionListener(){
    @Override public void valueChanged(    TreeSelectionEvent te){
      Object o=te.getPath().getLastPathComponent();
      if (o instanceof DefaultMutableTreeNode) {
        Object o2=((DefaultMutableTreeNode)o).getUserObject();
        if (o2 instanceof BTNodeStorage) {
          CommonBTNode btn=((BTNodeStorage)o2).getNode();
          CommonBTNodeDescriptor btnd=btn.getNodeDescriptor();
switch (btnd.getNodeType()) {
case INDEX:
            indexNodeLabel.setText("String_Node_Str" + btnd.getNumberOfRecords() + "String_Node_Str");
          break;
case LEAF:
        indexNodeLabel.setText("String_Node_Str" + btnd.getNumberOfRecords() + "String_Node_Str");
      break;
default :
    indexNodeLabel.setText("String_Node_Str");
}
clRoot.show(infoPanel,INDEX_NAME);
}
 else if (o2 instanceof ExtentLeafStorage) {
CommonHFSExtentLeafRecord rec=((ExtentLeafStorage)o2).getRecord();
if (rec instanceof StructElements) {
  Dictionary dict=((StructElements)rec).getStructElements();
  String label=dict.getTypeDescription();
  if (label == null)   label=dict.getTypeName();
  structViewPanelScroller.setViewportView(new StructViewPanel(label + "String_Node_Str",dict));
  clLeaf.show(leafPanel,STRUCT_VIEW_PANEL_NAME);
}
 else if (rec instanceof PrintableStruct) {
  PrintStream ps=new PrintStream(new JTextAreaOutputStream(System.err,printFieldsTextArea));
  printFieldsTextArea.setText("String_Node_Str");
  ((PrintableStruct)rec).print(ps,"String_Node_Str");
  ps.close();
  printFieldsTextArea.setCaretPosition(0);
  clLeaf.show(leafPanel,PRINT_FIELDS_AREA_NAME);
}
 else {
  System.err.println("String_Node_Str" + rec.getClass());
  clLeaf.show(leafPanel,OTHER_NAME);
}
clRoot.show(infoPanel,LEAF_NAME);
}
 else System.err.println("String_Node_Str" + o2.getClass().toString());
}
 else System.err.println("String_Node_Str" + o.getClass().toString());
}
}
);
}