Program: 47286
Project: 47286
Buggy source:
public JComponent build(){
  Locale locale=new Locale(configuration.getLanguage());
  ComponentOrientation orientation=ComponentOrientation.getOrientation(locale);
  String colSpec=FormLayoutUtil.getColSpec(COL_SPEC,orientation);
  FormLayout layout=new FormLayout(colSpec,ROW_SPEC);
  PanelBuilder builder=new PanelBuilder(layout);
  builder.setBorder(Borders.DLU4_BORDER);
  builder.setOpaque(true);
  CellConstraints cc=new CellConstraints();
  JComponent availablePluginsHeading=builder.addSeparator(Messages.getString("String_Node_Str"),FormLayoutUtil.flip(cc.xyw(1,1,9),colSpec,orientation));
  availablePluginsHeading=(JComponent)availablePluginsHeading.getComponent(0);
  availablePluginsHeading.setFont(availablePluginsHeading.getFont().deriveFont(Font.BOLD));
  final String[] cols={Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")};
  final JTable table=new JTable(1,cols.length){
    @Override public boolean isCellEditable(    int rowIndex,    int vColIndex){
      return false;
    }
    @Override public String getToolTipText(    MouseEvent e){
      java.awt.Point p=e.getPoint();
      int rowIndex=rowAtPoint(p);
      if (rowIndex == 0) {
        return null;
      }
      DownloadPlugins plugin=plugins.get(rowIndex);
      return plugin.htmlString();
    }
  }
;
  refresh(table,cols);
  table.setRowHeight(22);
  table.setIntercellSpacing(new Dimension(8,0));
  TableColumn nameColumn=table.getColumnModel().getColumn(0);
  nameColumn.setMinWidth(70);
  TableColumn versionColumn=table.getColumnModel().getColumn(2);
  versionColumn.setPreferredWidth(45);
  TableColumn ratingColumn=table.getColumnModel().getColumn(2);
  ratingColumn.setPreferredWidth(45);
  TableColumn authorColumn=table.getColumnModel().getColumn(3);
  authorColumn.setMinWidth(150);
  TableColumn descriptionColumn=table.getColumnModel().getColumn(4);
  descriptionColumn.setMinWidth(300);
  JScrollPane pane=new JScrollPane(table);
  pane.setPreferredSize(new Dimension(200,200));
  builder.add(pane,FormLayoutUtil.flip(cc.xyw(1,3,9),colSpec,orientation));
  CustomJButton install=new CustomJButton(Messages.getString("String_Node_Str"));
  builder.add(install,FormLayoutUtil.flip(cc.xy(1,5),colSpec,orientation));
  install.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      if (!ExternalFactory.localPluginsInstalled()) {
        JOptionPane.showMessageDialog((JFrame)(SwingUtilities.getWindowAncestor((Component)PMS.get().getFrame())),Messages.getString("String_Node_Str"));
        return;
      }
      if (!configuration.isAdmin()) {
        JOptionPane.showMessageDialog((JFrame)(SwingUtilities.getWindowAncestor((Component)PMS.get().getFrame())),"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
        return;
      }
      final int[] rows=table.getSelectedRows();
      JPanel panel=new JPanel();
      GridLayout layout=new GridLayout(3,1);
      panel.setLayout(layout);
      final JFrame frame=new JFrame(Messages.getString("String_Node_Str"));
      frame.setSize(250,110);
      JProgressBar progressBar=new JProgressBar();
      progressBar.setIndeterminate(true);
      panel.add(progressBar);
      final JLabel label=new JLabel("String_Node_Str");
      final JLabel inst=new JLabel("String_Node_Str");
      panel.add(inst);
      panel.add(label);
      frame.add(panel);
      frame.setLocationRelativeTo(null);
      Runnable r=new Runnable(){
        @Override public void run(){
          for (int i=0; i < rows.length; i++) {
            if (rows[i] == 0) {
              continue;
            }
            DownloadPlugins plugin=plugins.get(rows[i] - 1);
            if (plugin.isOld()) {
              JOptionPane.showMessageDialog((JFrame)(SwingUtilities.getWindowAncestor((Component)PMS.get().getFrame())),"String_Node_Str" + plugin.getName() + "String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
              frame.setVisible(false);
              continue;
            }
            frame.setVisible(true);
            inst.setText(Messages.getString("String_Node_Str") + "String_Node_Str" + plugin.getName());
            try {
              plugin.install(label);
            }
 catch (            Exception e) {
            }
          }
          frame.setVisible(false);
        }
      }
;
      new Thread(r).start();
    }
  }
);
  CustomJButton refresh=new CustomJButton(Messages.getString("String_Node_Str") + "String_Node_Str" + Messages.getString("String_Node_Str"));
  builder.add(refresh,FormLayoutUtil.flip(cc.xy(3,5),colSpec,orientation));
  refresh.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      refresh(table,cols);
    }
  }
);
  JComponent cmp=builder.addSeparator(Messages.getString("String_Node_Str"),FormLayoutUtil.flip(cc.xyw(1,7,9),colSpec,orientation));
  cmp=(JComponent)cmp.getComponent(0);
  cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));
  pPlugins=new JPanel(new GridLayout());
  builder.add(pPlugins,FormLayoutUtil.flip(cc.xyw(1,9,9),colSpec,orientation));
  cmp=builder.addSeparator(Messages.getString("String_Node_Str"),FormLayoutUtil.flip(cc.xyw(1,11,9),colSpec,orientation));
  cmp=(JComponent)cmp.getComponent(0);
  cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));
  credTable.setRowHeight(10);
  credTable.setIntercellSpacing(new Dimension(8,0));
  TableColumn ownerColumn=credTable.getColumnModel().getColumn(0);
  ownerColumn.setMinWidth(70);
  TableColumn tagColumn=credTable.getColumnModel().getColumn(2);
  tagColumn.setPreferredWidth(45);
  TableColumn usrColumn=credTable.getColumnModel().getColumn(2);
  usrColumn.setPreferredWidth(45);
  TableColumn pwdColumn=credTable.getColumnModel().getColumn(3);
  pwdColumn.setPreferredWidth(45);
  pane=new JScrollPane(credTable);
  pane.setPreferredSize(new Dimension(200,200));
  builder.add(pane,FormLayoutUtil.flip(cc.xyw(1,13,9),colSpec,orientation));
  CustomJButton add=new CustomJButton(Messages.getString("String_Node_Str"));
  builder.add(add,FormLayoutUtil.flip(cc.xy(1,15),colSpec,orientation));
  add.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      addEditDialog(credTable,-1);
    }
  }
);
  CustomJButton edit=new CustomJButton(Messages.getString("String_Node_Str"));
  builder.add(edit,FormLayoutUtil.flip(cc.xy(3,15),colSpec,orientation));
  edit.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      addEditDialog(credTable,credTable.getSelectedRow());
    }
  }
);
  CustomJButton del=new CustomJButton(Messages.getString("String_Node_Str"));
  builder.add(del,FormLayoutUtil.flip(cc.xy(5,15),colSpec,orientation));
  del.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      int[] rows=credTable.getSelectedRows();
      if (rows.length > 0) {
        int n=JOptionPane.showConfirmDialog((JFrame)(SwingUtilities.getWindowAncestor((Component)PMS.get().getFrame())),Messages.getString("String_Node_Str"),"String_Node_Str",JOptionPane.YES_NO_OPTION);
        if (n == JOptionPane.YES_OPTION) {
          for (int i=0; i < rows.length; i++) {
            String key=(String)credTable.getValueAt(rows[i],0);
            if (StringUtils.isNotEmpty((String)credTable.getValueAt(rows[i],1))) {
              key=key + "String_Node_Str" + (String)credTable.getValueAt(rows[i],1);
            }
            cred.clearProperty(key);
          }
        }
        try {
          cred.save();
        }
 catch (        ConfigurationException e1) {
          LOGGER.warn("String_Node_Str" + e1);
        }
        refreshCred(credTable);
      }
    }
  }
);
  CustomJButton credEdit=new CustomJButton(Messages.getString("String_Node_Str"));
  credEdit.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      JPanel tPanel=new JPanel(new BorderLayout());
      final JTextArea textArea=new JTextArea();
      textArea.setFont(new Font("String_Node_Str",Font.PLAIN,12));
      JScrollPane scrollPane=new JScrollPane(textArea);
      scrollPane.setPreferredSize(new java.awt.Dimension(900,450));
      try {
        configuration.initCred();
      }
 catch (      IOException e2) {
        LOGGER.debug("String_Node_Str");
        return;
      }
      File f=configuration.getCredFile();
      try {
        FileInputStream fis=new FileInputStream(f);
        BufferedReader in=new BufferedReader(new InputStreamReader(fis));
        String line;
        StringBuilder sb=new StringBuilder();
        while ((line=in.readLine()) != null) {
          sb.append(line);
          sb.append("String_Node_Str");
        }
        textArea.setText(sb.toString());
        fis.close();
      }
 catch (      Exception e1) {
        return;
      }
      tPanel.add(scrollPane,BorderLayout.NORTH);
      Object[] options={Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")};
      if (JOptionPane.showOptionDialog((JFrame)(SwingUtilities.getWindowAncestor((Component)PMS.get().getFrame())),tPanel,Messages.getString("String_Node_Str"),JOptionPane.OK_CANCEL_OPTION,JOptionPane.PLAIN_MESSAGE,null,options,null) == JOptionPane.OK_OPTION) {
        String text=textArea.getText();
        try {
          FileOutputStream fos=new FileOutputStream(f);
          fos.write(text.getBytes());
          fos.flush();
          fos.close();
          PMS.getConfiguration().reload();
        }
 catch (        Exception e1) {
          JOptionPane.showMessageDialog((JFrame)(SwingUtilities.getWindowAncestor((Component)PMS.get().getFrame())),Messages.getString("String_Node_Str") + e1.toString());
        }
      }
    }
  }
);
  builder.add(credEdit,FormLayoutUtil.flip(cc.xy(7,15),colSpec,orientation));
  JPanel panel=builder.getPanel();
  JScrollPane scrollPane=new JScrollPane(panel,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  scrollPane.setBorder(BorderFactory.createEmptyBorder());
  return scrollPane;
}

Fixed version (ground truth):
public JComponent build(){
  Locale locale=new Locale(configuration.getLanguage());
  ComponentOrientation orientation=ComponentOrientation.getOrientation(locale);
  String colSpec=FormLayoutUtil.getColSpec(COL_SPEC,orientation);
  FormLayout layout=new FormLayout(colSpec,ROW_SPEC);
  PanelBuilder builder=new PanelBuilder(layout);
  builder.setBorder(Borders.DLU4_BORDER);
  builder.setOpaque(true);
  CellConstraints cc=new CellConstraints();
  JComponent availablePluginsHeading=builder.addSeparator(Messages.getString("String_Node_Str"),FormLayoutUtil.flip(cc.xyw(1,1,9),colSpec,orientation));
  availablePluginsHeading=(JComponent)availablePluginsHeading.getComponent(0);
  availablePluginsHeading.setFont(availablePluginsHeading.getFont().deriveFont(Font.BOLD));
  final String[] cols={Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")};
  final JTable table=new JTable(1,cols.length){
    @Override public boolean isCellEditable(    int rowIndex,    int vColIndex){
      return false;
    }
    @Override public String getToolTipText(    MouseEvent e){
      java.awt.Point p=e.getPoint();
      int rowIndex=rowAtPoint(p);
      if (rowIndex == 0) {
        return null;
      }
      DownloadPlugins plugin=plugins.get(rowIndex - 1);
      return plugin.htmlString();
    }
  }
;
  refresh(table,cols);
  table.setRowHeight(22);
  table.setIntercellSpacing(new Dimension(8,0));
  TableColumn nameColumn=table.getColumnModel().getColumn(0);
  nameColumn.setMinWidth(70);
  TableColumn versionColumn=table.getColumnModel().getColumn(2);
  versionColumn.setPreferredWidth(45);
  TableColumn ratingColumn=table.getColumnModel().getColumn(2);
  ratingColumn.setPreferredWidth(45);
  TableColumn authorColumn=table.getColumnModel().getColumn(3);
  authorColumn.setMinWidth(150);
  TableColumn descriptionColumn=table.getColumnModel().getColumn(4);
  descriptionColumn.setMinWidth(300);
  JScrollPane pane=new JScrollPane(table);
  pane.setPreferredSize(new Dimension(200,200));
  builder.add(pane,FormLayoutUtil.flip(cc.xyw(1,3,9),colSpec,orientation));
  CustomJButton install=new CustomJButton(Messages.getString("String_Node_Str"));
  builder.add(install,FormLayoutUtil.flip(cc.xy(1,5),colSpec,orientation));
  install.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      if (!ExternalFactory.localPluginsInstalled()) {
        JOptionPane.showMessageDialog((JFrame)(SwingUtilities.getWindowAncestor((Component)PMS.get().getFrame())),Messages.getString("String_Node_Str"));
        return;
      }
      if (!configuration.isAdmin()) {
        JOptionPane.showMessageDialog((JFrame)(SwingUtilities.getWindowAncestor((Component)PMS.get().getFrame())),"String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
        return;
      }
      final int[] rows=table.getSelectedRows();
      JPanel panel=new JPanel();
      GridLayout layout=new GridLayout(3,1);
      panel.setLayout(layout);
      final JFrame frame=new JFrame(Messages.getString("String_Node_Str"));
      frame.setSize(250,110);
      JProgressBar progressBar=new JProgressBar();
      progressBar.setIndeterminate(true);
      panel.add(progressBar);
      final JLabel label=new JLabel("String_Node_Str");
      final JLabel inst=new JLabel("String_Node_Str");
      panel.add(inst);
      panel.add(label);
      frame.add(panel);
      frame.setLocationRelativeTo(null);
      Runnable r=new Runnable(){
        @Override public void run(){
          for (int i=0; i < rows.length; i++) {
            if (rows[i] == 0) {
              continue;
            }
            DownloadPlugins plugin=plugins.get(rows[i] - 1);
            if (plugin.isOld()) {
              JOptionPane.showMessageDialog((JFrame)(SwingUtilities.getWindowAncestor((Component)PMS.get().getFrame())),"String_Node_Str" + plugin.getName() + "String_Node_Str","String_Node_Str",JOptionPane.ERROR_MESSAGE);
              frame.setVisible(false);
              continue;
            }
            frame.setVisible(true);
            inst.setText(Messages.getString("String_Node_Str") + "String_Node_Str" + plugin.getName());
            try {
              plugin.install(label);
            }
 catch (            Exception e) {
            }
          }
          frame.setVisible(false);
        }
      }
;
      new Thread(r).start();
    }
  }
);
  CustomJButton refresh=new CustomJButton(Messages.getString("String_Node_Str") + "String_Node_Str" + Messages.getString("String_Node_Str"));
  builder.add(refresh,FormLayoutUtil.flip(cc.xy(3,5),colSpec,orientation));
  refresh.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      refresh(table,cols);
    }
  }
);
  JComponent cmp=builder.addSeparator(Messages.getString("String_Node_Str"),FormLayoutUtil.flip(cc.xyw(1,7,9),colSpec,orientation));
  cmp=(JComponent)cmp.getComponent(0);
  cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));
  pPlugins=new JPanel(new GridLayout());
  builder.add(pPlugins,FormLayoutUtil.flip(cc.xyw(1,9,9),colSpec,orientation));
  cmp=builder.addSeparator(Messages.getString("String_Node_Str"),FormLayoutUtil.flip(cc.xyw(1,11,9),colSpec,orientation));
  cmp=(JComponent)cmp.getComponent(0);
  cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));
  credTable.setRowHeight(10);
  credTable.setIntercellSpacing(new Dimension(8,0));
  TableColumn ownerColumn=credTable.getColumnModel().getColumn(0);
  ownerColumn.setMinWidth(70);
  TableColumn tagColumn=credTable.getColumnModel().getColumn(2);
  tagColumn.setPreferredWidth(45);
  TableColumn usrColumn=credTable.getColumnModel().getColumn(2);
  usrColumn.setPreferredWidth(45);
  TableColumn pwdColumn=credTable.getColumnModel().getColumn(3);
  pwdColumn.setPreferredWidth(45);
  pane=new JScrollPane(credTable);
  pane.setPreferredSize(new Dimension(200,200));
  builder.add(pane,FormLayoutUtil.flip(cc.xyw(1,13,9),colSpec,orientation));
  CustomJButton add=new CustomJButton(Messages.getString("String_Node_Str"));
  builder.add(add,FormLayoutUtil.flip(cc.xy(1,15),colSpec,orientation));
  add.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      addEditDialog(credTable,-1);
    }
  }
);
  CustomJButton edit=new CustomJButton(Messages.getString("String_Node_Str"));
  builder.add(edit,FormLayoutUtil.flip(cc.xy(3,15),colSpec,orientation));
  edit.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      addEditDialog(credTable,credTable.getSelectedRow());
    }
  }
);
  CustomJButton del=new CustomJButton(Messages.getString("String_Node_Str"));
  builder.add(del,FormLayoutUtil.flip(cc.xy(5,15),colSpec,orientation));
  del.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      int[] rows=credTable.getSelectedRows();
      if (rows.length > 0) {
        int n=JOptionPane.showConfirmDialog((JFrame)(SwingUtilities.getWindowAncestor((Component)PMS.get().getFrame())),Messages.getString("String_Node_Str"),"String_Node_Str",JOptionPane.YES_NO_OPTION);
        if (n == JOptionPane.YES_OPTION) {
          for (int i=0; i < rows.length; i++) {
            String key=(String)credTable.getValueAt(rows[i],0);
            if (StringUtils.isNotEmpty((String)credTable.getValueAt(rows[i],1))) {
              key=key + "String_Node_Str" + (String)credTable.getValueAt(rows[i],1);
            }
            cred.clearProperty(key);
          }
        }
        try {
          cred.save();
        }
 catch (        ConfigurationException e1) {
          LOGGER.warn("String_Node_Str" + e1);
        }
        refreshCred(credTable);
      }
    }
  }
);
  CustomJButton credEdit=new CustomJButton(Messages.getString("String_Node_Str"));
  credEdit.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      JPanel tPanel=new JPanel(new BorderLayout());
      final JTextArea textArea=new JTextArea();
      textArea.setFont(new Font("String_Node_Str",Font.PLAIN,12));
      JScrollPane scrollPane=new JScrollPane(textArea);
      scrollPane.setPreferredSize(new java.awt.Dimension(900,450));
      try {
        configuration.initCred();
      }
 catch (      IOException e2) {
        LOGGER.debug("String_Node_Str");
        return;
      }
      File f=configuration.getCredFile();
      try {
        FileInputStream fis=new FileInputStream(f);
        BufferedReader in=new BufferedReader(new InputStreamReader(fis));
        String line;
        StringBuilder sb=new StringBuilder();
        while ((line=in.readLine()) != null) {
          sb.append(line);
          sb.append("String_Node_Str");
        }
        textArea.setText(sb.toString());
        fis.close();
      }
 catch (      Exception e1) {
        return;
      }
      tPanel.add(scrollPane,BorderLayout.NORTH);
      Object[] options={Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")};
      if (JOptionPane.showOptionDialog((JFrame)(SwingUtilities.getWindowAncestor((Component)PMS.get().getFrame())),tPanel,Messages.getString("String_Node_Str"),JOptionPane.OK_CANCEL_OPTION,JOptionPane.PLAIN_MESSAGE,null,options,null) == JOptionPane.OK_OPTION) {
        String text=textArea.getText();
        try {
          FileOutputStream fos=new FileOutputStream(f);
          fos.write(text.getBytes());
          fos.flush();
          fos.close();
          PMS.getConfiguration().reload();
        }
 catch (        Exception e1) {
          JOptionPane.showMessageDialog((JFrame)(SwingUtilities.getWindowAncestor((Component)PMS.get().getFrame())),Messages.getString("String_Node_Str") + e1.toString());
        }
      }
    }
  }
);
  builder.add(credEdit,FormLayoutUtil.flip(cc.xy(7,15),colSpec,orientation));
  JPanel panel=builder.getPanel();
  JScrollPane scrollPane=new JScrollPane(panel,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  scrollPane.setBorder(BorderFactory.createEmptyBorder());
  return scrollPane;
}