Program: 73732
Project: 73732
Buggy source:
/** 
 * Construct a SaveModelToDBFrame. Add swing Components to the frame. Add listeners for the "Save" and "Cancel" buttons.
 * @param model The model that is being saved to the database.
 */
public SaveModelToDBFrame(NamedObj model){
  super("String_Node_Str");
  setLayout(new BoxLayout(this.getContentPane(),BoxLayout.Y_AXIS));
  _modelToSave=model;
  _initialModelName=model.getName();
  _orignialAttributes=new ArrayList();
  _attributesListPanel=new AttributesListPanel(_modelToSave);
  _tabbedPane=new JTabbedPane();
  for (  Object attribute : _modelToSave.attributeList()) {
    if (attribute instanceof StringParameter) {
      if (((StringParameter)attribute).getName() != "String_Node_Str" && ((StringParameter)attribute).getName() != "String_Node_Str" && _attributesListPanel.isDBAttribute(((StringParameter)attribute).getName())) {
        _orignialAttributes.add((StringParameter)attribute);
      }
    }
  }
  JPanel topPanel=new JPanel();
  JPanel bottomPanel=new JPanel();
  _attributesListPanel.setAlignmentX(LEFT_ALIGNMENT);
  _tabbedPane.setAlignmentX(LEFT_ALIGNMENT);
  topPanel.setAlignmentX(LEFT_ALIGNMENT);
  bottomPanel.setAlignmentX(LEFT_ALIGNMENT);
  _attributesListPanel.setAlignmentY(TOP_ALIGNMENT);
  _tabbedPane.setAlignmentY(TOP_ALIGNMENT);
  topPanel.setAlignmentY(TOP_ALIGNMENT);
  bottomPanel.setAlignmentY(TOP_ALIGNMENT);
  topPanel.setLayout(new BoxLayout(topPanel,BoxLayout.Y_AXIS));
  _tabbedPane.setLayout(new BoxLayout(_tabbedPane,BoxLayout.Y_AXIS));
  topPanel.setBorder(BorderFactory.createEmptyBorder());
  _tabbedPane.addTab("String_Node_Str",_attributesListPanel);
  _tabbedPane.setMnemonicAt(0,KeyEvent.VK_1);
  _tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
  JButton save_Button;
  JButton cancel_Button;
  save_Button=new JButton("String_Node_Str");
  cancel_Button=new JButton("String_Node_Str");
  save_Button.setMnemonic(KeyEvent.VK_ENTER);
  cancel_Button.setMnemonic(KeyEvent.VK_ESCAPE);
  save_Button.setActionCommand("String_Node_Str");
  cancel_Button.setActionCommand("String_Node_Str");
  save_Button.setHorizontalTextPosition(SwingConstants.CENTER);
  cancel_Button.setHorizontalTextPosition(SwingConstants.CENTER);
  for (  Object stringParameter : _modelToSave.attributeList()) {
    if (stringParameter instanceof StringParameter && ((StringParameter)stringParameter).getName() != "String_Node_Str" && ((StringParameter)stringParameter).getName() != "String_Node_Str" && _attributesListPanel.isDBAttribute(((StringParameter)stringParameter).getName())) {
      _attributesListPanel.addAttribute((StringParameter)stringParameter);
    }
  }
  save_Button.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent event){
      try {
        if (!_isValid()) {
          _rollbackModel();
          return;
        }
        _saveModel();
      }
 catch (      NameDuplicationException e) {
        JOptionPane.showMessageDialog((Component)event.getSource(),"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str","String_Node_Str",JOptionPane.INFORMATION_MESSAGE,null);
        _rollbackModel();
      }
catch (      IllegalActionException e) {
        JOptionPane.showMessageDialog((Component)event.getSource(),"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str","String_Node_Str",JOptionPane.INFORMATION_MESSAGE,null);
        _rollbackModel();
      }
catch (      Exception e) {
        JOptionPane.showMessageDialog((Component)event.getSource(),"String_Node_Str" + "String_Node_Str","String_Node_Str",JOptionPane.INFORMATION_MESSAGE,null);
        _rollbackModel();
      }
    }
  }
);
  cancel_Button.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent event){
      _rollbackModel();
      setVisible(false);
    }
  }
);
  topPanel.add(_tabbedPane);
  bottomPanel.add(save_Button);
  bottomPanel.add(cancel_Button);
  add(topPanel);
  add(bottomPanel);
  validate();
  repaint();
}

Fixed version (ground truth):
/** 
 * Construct a SaveModelToDBFrame. Add swing Components to the frame. Add listeners for the "Save" and "Cancel" buttons.
 * @param model The model that is being saved to the database.
 */
public SaveModelToDBFrame(NamedObj model){
  super("String_Node_Str");
  setLayout(new BoxLayout(this.getContentPane(),BoxLayout.Y_AXIS));
  _modelToSave=model;
  _initialModelName=model.getName();
  _orignialAttributes=new ArrayList();
  _attributesListPanel=new AttributesListPanel(_modelToSave);
  _tabbedPane=new JTabbedPane();
  for (  Object attribute : _modelToSave.attributeList()) {
    if (attribute instanceof StringParameter) {
      if (((StringParameter)attribute).getName() != "String_Node_Str" && ((StringParameter)attribute).getName() != "String_Node_Str" && _attributesListPanel.isDBAttribute(((StringParameter)attribute).getName())) {
        _orignialAttributes.add((StringParameter)attribute);
      }
    }
  }
  JPanel topPanel=new JPanel();
  JPanel bottomPanel=new JPanel();
  _attributesListPanel.setAlignmentX(LEFT_ALIGNMENT);
  _tabbedPane.setAlignmentX(LEFT_ALIGNMENT);
  topPanel.setAlignmentX(LEFT_ALIGNMENT);
  bottomPanel.setAlignmentX(LEFT_ALIGNMENT);
  _attributesListPanel.setAlignmentY(TOP_ALIGNMENT);
  _tabbedPane.setAlignmentY(TOP_ALIGNMENT);
  topPanel.setAlignmentY(TOP_ALIGNMENT);
  bottomPanel.setAlignmentY(TOP_ALIGNMENT);
  topPanel.setLayout(new BoxLayout(topPanel,BoxLayout.Y_AXIS));
  _tabbedPane.setLayout(new BoxLayout(_tabbedPane,BoxLayout.Y_AXIS));
  topPanel.setBorder(BorderFactory.createEmptyBorder());
  _tabbedPane.addTab("String_Node_Str",_attributesListPanel);
  _tabbedPane.setMnemonicAt(0,KeyEvent.VK_1);
  _tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
  JButton save_Button;
  JButton cancel_Button;
  save_Button=new JButton("String_Node_Str");
  cancel_Button=new JButton("String_Node_Str");
  save_Button.setMnemonic(KeyEvent.VK_ENTER);
  cancel_Button.setMnemonic(KeyEvent.VK_ESCAPE);
  save_Button.setActionCommand("String_Node_Str");
  cancel_Button.setActionCommand("String_Node_Str");
  save_Button.setHorizontalTextPosition(SwingConstants.CENTER);
  cancel_Button.setHorizontalTextPosition(SwingConstants.CENTER);
  for (  Object stringParameter : _modelToSave.attributeList()) {
    if (stringParameter instanceof StringParameter && ((StringParameter)stringParameter).getName() != "String_Node_Str" && ((StringParameter)stringParameter).getName() != "String_Node_Str" && _attributesListPanel.isDBAttribute(((StringParameter)stringParameter).getName())) {
      _attributesListPanel.addAttribute((StringParameter)stringParameter);
    }
  }
  save_Button.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent event){
      try {
        if (!_isValid()) {
          _rollbackModel();
          return;
        }
        _saveModel();
      }
 catch (      NameDuplicationException e) {
        MessageHandler.error("String_Node_Str" + "String_Node_Str",e);
        _rollbackModel();
      }
catch (      IllegalActionException e) {
        MessageHandler.error("String_Node_Str" + "String_Node_Str",e);
        _rollbackModel();
      }
catch (      Exception e) {
        MessageHandler.error("String_Node_Str" + "String_Node_Str",e);
        _rollbackModel();
      }
    }
  }
);
  cancel_Button.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent event){
      _rollbackModel();
      setVisible(false);
    }
  }
);
  topPanel.add(_tabbedPane);
  bottomPanel.add(save_Button);
  bottomPanel.add(cancel_Button);
  add(topPanel);
  add(bottomPanel);
  validate();
  repaint();
}