Program: 3712
Project: 3712
Buggy source:
@Inject public FileInfoDialog(@Assisted PropertiableFile propertiable,@Assisted final FileInfoType type,FileInfoTabPanel fileInfoTabPanel,final FileInfoPanelFactory fileInfoFactory,LibraryManager libraryManager){
  super(GuiUtils.getMainFrame());
  this.libraryManager=libraryManager;
  tabPanel=fileInfoTabPanel;
  cardPanel=new JPanel(new BorderLayout());
  cardPanel.setPreferredSize(new Dimension(400,600));
  cards=new HashMap<Tabs,FileInfoPanel>();
  this.propertiableFile=propertiable;
  GuiUtils.assignResources(this);
  cardPanel.setOpaque(false);
  createTabs(propertiableFile,type);
  cards.put(Tabs.GENERAL,fileInfoFactory.createGeneralPanel(type,propertiableFile));
  cardPanel.add(cards.get(Tabs.GENERAL).getComponent());
  updateTitle(propertiableFile.getFileName());
  setLayout(new MigLayout("String_Node_Str"));
  getContentPane().setBackground(backgroundColor);
  overviewPanel=(FileInfoOverviewPanel)fileInfoFactory.createOverviewPanel(type,propertiableFile);
  add(overviewPanel.getComponent(),"String_Node_Str");
  add(tabPanel.getComponent(),"String_Node_Str");
  add(cardPanel,"String_Node_Str");
  createFooter();
  setPreferredSize(new Dimension(500,565));
  setDefaultCloseOperation(FileInfoDialog.DISPOSE_ON_CLOSE);
  if (type == FileInfoType.LOCAL_FILE) {
    setModalityType(ModalityType.APPLICATION_MODAL);
  }
  pack();
  setLocationRelativeTo(GuiUtils.getMainFrame());
  addComponentListener(new ComponentListener(){
    @Override public void componentHidden(    ComponentEvent e){
      dispose();
    }
    @Override public void componentMoved(    ComponentEvent e){
    }
    @Override public void componentResized(    ComponentEvent e){
    }
    @Override public void componentShown(    ComponentEvent e){
      if (okButton != null)       okButton.requestFocusInWindow();
    }
  }
);
  renameListener=new RenameListener(libraryManager);
  libraryManager.getLibraryManagedList().addPropertyChangeListener(renameListener);
  tabPanel.addSearchTabListener(new FileInfoTabListener(){
    @Override public void tabSelected(    Tabs tab){
      if (!cards.containsKey(tab)) {
        if (tab == Tabs.GENERAL) {
          cards.put(tab,fileInfoFactory.createGeneralPanel(type,propertiableFile));
        }
 else         if (tab == Tabs.SHARING) {
          cards.put(tab,fileInfoFactory.createSharingPanel(type,propertiableFile));
        }
 else         if (tab == Tabs.LIMITS) {
          Torrent torrent=(Torrent)propertiableFile.getProperty(FilePropertyKey.TORRENT);
          if (torrent != null && torrent.isEditable()) {
            cards.put(tab,fileInfoFactory.createLimitsPanel(type,propertiableFile));
          }
        }
 else         if (tab == Tabs.TRACKERS) {
          cards.put(tab,fileInfoFactory.createTrackersPanel(type,propertiableFile));
        }
 else         if (tab == Tabs.TRANSFERS) {
          cards.put(tab,fileInfoFactory.createTransferPanel(type,propertiableFile));
        }
 else         if (tab == Tabs.BITTORENT) {
          Torrent torrent=(Torrent)propertiableFile.getProperty(FilePropertyKey.TORRENT);
          if (torrent != null && torrent.hasMetaData()) {
            cards.put(tab,fileInfoFactory.createBittorentPanel(torrent));
          }
        }
 else         if (tab == Tabs.PIECES) {
          if (propertiableFile instanceof DownloadItem) {
            cards.put(tab,fileInfoFactory.createPiecesPanel(type,(DownloadItem)propertiableFile));
          }
 else {
            throw new IllegalStateException("String_Node_Str");
          }
        }
 else {
          throw new IllegalStateException("String_Node_Str" + tab);
        }
      }
      cardPanel.removeAll();
      cardPanel.add(cards.get(tab).getComponent());
      FileInfoDialog.this.validate();
      FileInfoDialog.this.repaint();
    }
  }
);
}

Fixed version (ground truth):
@Inject public FileInfoDialog(@Assisted PropertiableFile propertiable,@Assisted final FileInfoType type,FileInfoTabPanel fileInfoTabPanel,final FileInfoPanelFactory fileInfoFactory,LibraryManager libraryManager){
  super(GuiUtils.getMainFrame());
  this.libraryManager=libraryManager;
  tabPanel=fileInfoTabPanel;
  cardPanel=new JPanel(new BorderLayout());
  cardPanel.setPreferredSize(new Dimension(400,600));
  cards=new HashMap<Tabs,FileInfoPanel>();
  this.propertiableFile=propertiable;
  GuiUtils.assignResources(this);
  cardPanel.setOpaque(false);
  createTabs(propertiableFile,type);
  cards.put(Tabs.GENERAL,fileInfoFactory.createGeneralPanel(type,propertiableFile));
  cardPanel.add(cards.get(Tabs.GENERAL).getComponent());
  updateTitle(propertiableFile.getFileName());
  setLayout(new MigLayout("String_Node_Str"));
  getContentPane().setBackground(backgroundColor);
  overviewPanel=(FileInfoOverviewPanel)fileInfoFactory.createOverviewPanel(type,propertiableFile);
  add(overviewPanel.getComponent(),"String_Node_Str");
  add(tabPanel.getComponent(),"String_Node_Str");
  add(cardPanel,"String_Node_Str");
  createFooter();
  setPreferredSize(new Dimension(500,565));
  setDefaultCloseOperation(FileInfoDialog.DISPOSE_ON_CLOSE);
  if (type == FileInfoType.LOCAL_FILE) {
    setModalityType(ModalityType.APPLICATION_MODAL);
  }
  pack();
  setLocationRelativeTo(GuiUtils.getMainFrame());
  addComponentListener(new ComponentListener(){
    @Override public void componentHidden(    ComponentEvent e){
      dispose();
    }
    @Override public void componentMoved(    ComponentEvent e){
    }
    @Override public void componentResized(    ComponentEvent e){
    }
    @Override public void componentShown(    ComponentEvent e){
      if (okButton != null)       okButton.requestFocusInWindow();
    }
  }
);
  renameListener=new RenameListener(libraryManager);
  libraryManager.getLibraryManagedList().addPropertyChangeListener(renameListener);
  tabPanel.addSearchTabListener(new FileInfoTabListener(){
    @Override public void tabSelected(    Tabs tab){
      if (!cards.containsKey(tab)) {
        if (tab == Tabs.GENERAL) {
          cards.put(tab,fileInfoFactory.createGeneralPanel(type,propertiableFile));
        }
 else         if (tab == Tabs.SHARING) {
          cards.put(tab,fileInfoFactory.createSharingPanel(type,propertiableFile));
        }
 else         if (tab == Tabs.LIMITS) {
          Torrent torrent=(Torrent)propertiableFile.getProperty(FilePropertyKey.TORRENT);
          if (torrent != null && torrent.isEditable()) {
            cards.put(tab,fileInfoFactory.createLimitsPanel(type,propertiableFile));
          }
        }
 else         if (tab == Tabs.TRACKERS) {
          cards.put(tab,fileInfoFactory.createTrackersPanel(type,propertiableFile));
        }
 else         if (tab == Tabs.TRANSFERS) {
          cards.put(tab,fileInfoFactory.createTransferPanel(type,propertiableFile));
        }
 else         if (tab == Tabs.BITTORENT) {
          Torrent torrent=(Torrent)propertiableFile.getProperty(FilePropertyKey.TORRENT);
          if (torrent != null && torrent.hasMetaData()) {
            cards.put(tab,fileInfoFactory.createBittorentPanel(torrent));
          }
        }
 else         if (tab == Tabs.PIECES) {
          if (propertiableFile instanceof DownloadItem) {
            cards.put(tab,fileInfoFactory.createPiecesPanel(type,(DownloadItem)propertiableFile));
          }
 else {
          }
        }
 else {
          throw new IllegalStateException("String_Node_Str" + tab);
        }
      }
      cardPanel.removeAll();
      cardPanel.add(cards.get(tab).getComponent());
      FileInfoDialog.this.validate();
      FileInfoDialog.this.repaint();
    }
  }
);
}