Program: 44911
Project: 44911
Buggy source:
/** 
 * Creates a panel with directory tree attached to a specified folder panel.
 * @param folderPanel a folder panel to attach tree
 */
public FoldersTreePanel(FolderPanel folderPanel){
  super();
  this.folderPanel=folderPanel;
  setLayout(new BorderLayout());
  AttributeFileFilter dirFilter=new AttributeFileFilter(AttributeFileFilter.DIRECTORY);
  FileComparator sort=new FileComparator(FileComparator.NAME_CRITERION,true,true);
  model=new FilesTreeModel(dirFilter,sort);
  tree=new JTree(model);
  tree.setFont(ThemeCache.tableFont);
  tree.setBackground(ThemeCache.backgroundColors[ThemeCache.INACTIVE][ThemeCache.NORMAL]);
  tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
  tree.setExpandsSelectedPaths(true);
  tree.getModel().addTreeModelListener(this);
  JScrollPane sp=new JScrollPane(tree);
  sp.setBorder(null);
  add(sp,BorderLayout.CENTER);
  FoldersTreeRenderer renderer=new FoldersTreeRenderer(tree);
  tree.setCellRenderer(renderer);
  tree.addTreeSelectionListener(this);
  tree.addFocusListener(this);
  final JPopupMenu popup=new JPopupMenu();
  JMenuItem item=new JMenuItem(Translator.get("String_Node_Str"),KeyEvent.VK_R);
  item.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      model.refresh(tree.getSelectionPath());
    }
  }
);
  popup.add(item);
  tree.addMouseListener(new MouseAdapter(){
    public void mousePressed(    MouseEvent e){
      maybeShowPopup(e);
    }
    public void mouseReleased(    MouseEvent e){
      maybeShowPopup(e);
    }
    private void maybeShowPopup(    MouseEvent e){
      if (e.isPopupTrigger()) {
        popup.show(e.getComponent(),e.getX(),e.getY());
      }
    }
  }
);
  ThemeCache.addThemeListener(this);
}

Fixed version (ground truth):
/** 
 * Creates a panel with directory tree attached to a specified folder panel.
 * @param folderPanel a folder panel to attach tree
 */
public FoldersTreePanel(FolderPanel folderPanel){
  super();
  this.folderPanel=folderPanel;
  setLayout(new BorderLayout());
  chainedFileFilter=new AndFileFilter();
  AttributeFileFilter dirFilter=new AttributeFileFilter(AttributeFileFilter.DIRECTORY);
  chainedFileFilter.addFileFilter(dirFilter);
  filterHelper=new FileFilterHelper(chainedFileFilter);
  FileComparator sort=new FileComparator(FileComparator.NAME_CRITERION,true,true);
  model=new FilesTreeModel(chainedFileFilter,sort);
  tree=new JTree(model);
  tree.setFont(ThemeCache.tableFont);
  tree.setBackground(ThemeCache.backgroundColors[ThemeCache.INACTIVE][ThemeCache.NORMAL]);
  tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
  tree.setExpandsSelectedPaths(true);
  tree.getModel().addTreeModelListener(this);
  JScrollPane sp=new JScrollPane(tree);
  sp.setBorder(null);
  add(sp,BorderLayout.CENTER);
  FoldersTreeRenderer renderer=new FoldersTreeRenderer(tree);
  tree.setCellRenderer(renderer);
  tree.addTreeSelectionListener(this);
  tree.addFocusListener(this);
  final JPopupMenu popup=new JPopupMenu();
  JMenuItem item=new JMenuItem(Translator.get("String_Node_Str"),KeyEvent.VK_R);
  item.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      model.refresh(tree.getSelectionPath());
    }
  }
);
  popup.add(item);
  tree.addMouseListener(new MouseAdapter(){
    public void mousePressed(    MouseEvent e){
      maybeShowPopup(e);
    }
    public void mouseReleased(    MouseEvent e){
      maybeShowPopup(e);
    }
    private void maybeShowPopup(    MouseEvent e){
      if (e.isPopupTrigger()) {
        popup.show(e.getComponent(),e.getX(),e.getY());
      }
    }
  }
);
  ThemeCache.addThemeListener(this);
  MuConfiguration.addConfigurationListener(this);
}