Program: 143913
Project: 143913
Buggy source:
/** 
 * Initialize the Capture plugin. This sets up the menu entries and registers the plugin on the bus.
 */
public Capture(final PluginBus bus,final String id){
  super(bus,id);
  if (!personalJava) {
    frame=new Frame("String_Node_Str");
    frame.setLayout(new BorderLayout());
    frame.add(textArea=new TextArea(24,80),BorderLayout.CENTER);
    textArea.setFont(new Font("String_Node_Str",Font.PLAIN,12));
    frame.addWindowListener(new WindowAdapter(){
      public void windowClosing(      WindowEvent e){
        frame.setVisible(false);
      }
    }
);
    frame.pack();
    dialog=new Dialog(frame);
    dialog.setLayout(new BorderLayout());
    dialog.add(new Label("String_Node_Str"));
    Button close=new Button("String_Node_Str");
    dialog.add(close);
    close.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        dialog.setVisible(false);
      }
    }
);
    menu=new Menu("String_Node_Str");
    start=new MenuItem("String_Node_Str");
    start.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        if (debug > 0)         System.out.println("String_Node_Str");
        captureEnabled=true;
        start.setEnabled(false);
        stop.setEnabled(true);
      }
    }
);
    menu.add(start);
    stop=new MenuItem("String_Node_Str");
    stop.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        if (debug > 0)         System.out.println("String_Node_Str");
        captureEnabled=false;
        start.setEnabled(true);
        stop.setEnabled(false);
      }
    }
);
    stop.setEnabled(false);
    menu.add(stop);
    clear=new MenuItem("String_Node_Str");
    clear.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        if (debug > 0)         System.out.println("String_Node_Str");
        textArea.setText("String_Node_Str");
      }
    }
);
    menu.add(clear);
    menu.addSeparator();
    MenuItem view=new MenuItem("String_Node_Str");
    view.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        if (debug > 0)         System.out.println("String_Node_Str" + frame.isVisible());
        if (frame.isVisible()) {
          frame.setVisible(false);
          frame.hide();
        }
 else {
          frame.setVisible(true);
          frame.show();
        }
      }
    }
);
    menu.add(view);
  }
  bus.registerPluginListener(new ConfigurationListener(){
    public void setConfiguration(    PluginConfig config){
      String tmp;
      int i=1;
      while ((tmp=config.getProperty("String_Node_Str",id,i + "String_Node_Str")) != null) {
        try {
          String urlID="String_Node_Str" + i;
          URL remoteURL=new URL(tmp);
          remoteUrlList.put(urlID,remoteURL);
          if ((tmp=config.getProperty("String_Node_Str",id,i + "String_Node_Str")) != null) {
            remoteUrlList.put(urlID + "String_Node_Str",tmp);
          }
          if ((tmp=config.getProperty("String_Node_Str",id,i + "String_Node_Str")) != null) {
            save=new MenuItem("String_Node_Str" + tmp);
          }
 else {
            save=new MenuItem("String_Node_Str" + remoteURL.toString());
          }
          save.setEnabled(true);
          save.addActionListener(Capture.this);
          save.setActionCommand(urlID);
          menu.add(save);
          i++;
        }
 catch (        MalformedURLException e) {
          System.err.println("String_Node_Str" + e);
        }
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Initialize the Capture plugin. This sets up the menu entries and registers the plugin on the bus.
 */
public Capture(final PluginBus bus,final String id){
  super(bus,id);
  if (!personalJava) {
    frame=new Frame("String_Node_Str");
    frame.setLayout(new BorderLayout());
    frame.add(textArea=new TextArea(24,80),BorderLayout.CENTER);
    textArea.setFont(new Font("String_Node_Str",Font.PLAIN,12));
    frame.addWindowListener(new WindowAdapter(){
      public void windowClosing(      WindowEvent e){
        frame.setVisible(false);
      }
    }
);
    frame.pack();
    errorDialog=new Dialog(frame,"String_Node_Str",true);
    errorDialog.setLayout(new BorderLayout());
    errorDialog.add(new Label("String_Node_Str"),BorderLayout.NORTH);
    Panel panel=new Panel();
    Button button=new Button("String_Node_Str");
    panel.add(button);
    errorDialog.add(panel,BorderLayout.SOUTH);
    button.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        errorDialog.setVisible(false);
      }
    }
);
    fileDialog=new Dialog(frame,"String_Node_Str",true);
    fileDialog.setLayout(new BorderLayout());
    ActionListener saveFileListener=new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        String params=(String)remoteUrlList.get("String_Node_Str");
        params=params == null ? "String_Node_Str" : params + "String_Node_Str";
        remoteUrlList.put("String_Node_Str",params + "String_Node_Str" + URLEncoder.encode(fileName.getText()));
        saveFile("String_Node_Str");
        fileDialog.setVisible(false);
      }
    }
;
    panel=new Panel();
    panel.add(new Label("String_Node_Str"));
    panel.add(fileName=new TextField(30));
    fileName.addActionListener(saveFileListener);
    fileDialog.add(panel,BorderLayout.CENTER);
    panel=new Panel();
    panel.add(button=new Button("String_Node_Str"));
    button.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        fileDialog.setVisible(false);
      }
    }
);
    panel.add(button=new Button("String_Node_Str"));
    button.addActionListener(saveFileListener);
    fileDialog.add(panel,BorderLayout.SOUTH);
    fileDialog.pack();
    menu=new Menu("String_Node_Str");
    start=new MenuItem("String_Node_Str");
    start.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        if (debug > 0)         System.out.println("String_Node_Str");
        captureEnabled=true;
        start.setEnabled(false);
        stop.setEnabled(true);
      }
    }
);
    menu.add(start);
    stop=new MenuItem("String_Node_Str");
    stop.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        if (debug > 0)         System.out.println("String_Node_Str");
        captureEnabled=false;
        start.setEnabled(true);
        stop.setEnabled(false);
      }
    }
);
    stop.setEnabled(false);
    menu.add(stop);
    clear=new MenuItem("String_Node_Str");
    clear.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        if (debug > 0)         System.out.println("String_Node_Str");
        textArea.setText("String_Node_Str");
      }
    }
);
    menu.add(clear);
    menu.addSeparator();
    MenuItem view=new MenuItem("String_Node_Str");
    view.addActionListener(new ActionListener(){
      public void actionPerformed(      ActionEvent e){
        if (debug > 0)         System.out.println("String_Node_Str" + frame.isVisible());
        if (frame.isVisible()) {
          frame.setVisible(false);
          frame.hide();
        }
 else {
          frame.setVisible(true);
          frame.show();
        }
      }
    }
);
    menu.add(view);
  }
  bus.registerPluginListener(new ConfigurationListener(){
    public void setConfiguration(    PluginConfig config){
      String tmp;
      MenuItem save=new MenuItem("String_Node_Str");
      menu.add(save);
      if ((tmp=config.getProperty("String_Node_Str",id,"String_Node_Str")) != null) {
        try {
          remoteUrlList.put("String_Node_Str",new URL(tmp));
          if ((tmp=config.getProperty("String_Node_Str",id,"String_Node_Str")) != null) {
            remoteUrlList.put("String_Node_Str",tmp);
          }
          save.addActionListener(new ActionListener(){
            public void actionPerformed(            ActionEvent e){
              fileDialog.setVisible(true);
            }
          }
);
          save.addActionListener(Capture.this);
          save.setActionCommand("String_Node_Str");
        }
 catch (        MalformedURLException e) {
          System.err.println("String_Node_Str" + e);
        }
      }
 else {
        save.setEnabled(false);
      }
      int i=1;
      while ((tmp=config.getProperty("String_Node_Str",id,i + "String_Node_Str")) != null) {
        try {
          String urlID="String_Node_Str" + i;
          URL remoteURL=new URL(tmp);
          remoteUrlList.put(urlID,remoteURL);
          if ((tmp=config.getProperty("String_Node_Str",id,i + "String_Node_Str")) != null) {
            remoteUrlList.put(urlID + "String_Node_Str",tmp);
          }
          if ((tmp=config.getProperty("String_Node_Str",id,i + "String_Node_Str")) != null) {
            save=new MenuItem("String_Node_Str" + tmp);
          }
 else {
            save=new MenuItem("String_Node_Str" + remoteURL.toString());
          }
          save.setEnabled(true);
          save.addActionListener(Capture.this);
          save.setActionCommand(urlID);
          menu.add(save);
          i++;
        }
 catch (        MalformedURLException e) {
          System.err.println("String_Node_Str" + e);
        }
      }
    }
  }
);
  if (!personalJava) {
  }
}