Program: 50531
Project: 50531
Buggy source:
public void actionPerformed(ActionEvent e){
  if (dontUpdate) {
    return;
  }
  Object o=e.getSource();
  if (o == txtName)   myRecipe.setName(txtName.getText());
 else   if (o == brewerNameText)   myRecipe.setBrewer(brewerNameText.getText());
 else   if (o == preBoilText) {
    if (myRecipe.getPreBoilVol(myRecipe.getVolUnits()) != Double.parseDouble(preBoilText.getText())) {
      myRecipe.setPreBoil(new Quantity(myRecipe.getVolUnits(),Double.parseDouble(preBoilText.getText())));
      displayRecipe();
    }
  }
 else   if (o == finalWortVolText) {
    if (myRecipe.getFinalWortVol(myRecipe.getVolUnits()) != Double.parseDouble(finalWortVolText.getText())) {
      myRecipe.setPostBoil(new Quantity(myRecipe.getVolUnits(),Double.parseDouble(finalWortVolText.getText())));
      displayRecipe();
    }
  }
 else   if (o == evapText) {
    myRecipe.setEvap(Double.parseDouble(evapText.getText()));
    displayRecipe();
  }
 else   if (o == boilMinText) {
    String s=boilMinText.getText();
    if (s.indexOf('.') > 0) {
      s=s.substring(0,s.indexOf('.'));
    }
    myRecipe.setBoilMinutes(Integer.parseInt(s));
    displayRecipe();
  }
 else   if (o == maltTotalUnitsComboBox) {
    String u=(String)maltTotalUnitsComboModel.getSelectedItem();
    if (myRecipe != null) {
      myRecipe.setMaltUnits(u);
      displayRecipe();
    }
  }
 else   if (o == btnAddMalt) {
    if (myRecipe != null) {
      Fermentable f=new Fermentable(myRecipe.getMaltUnits());
      myRecipe.addMalt(f);
      maltTable.updateUI();
      displayRecipe();
    }
  }
 else   if (o == btnDelMalt) {
    if (myRecipe != null) {
      int i=maltTable.getSelectedRow();
      myRecipe.delMalt(i);
      maltTable.updateUI();
      displayRecipe();
    }
  }
 else   if (o == hopsTotalUnitsComboBox) {
    String u=(String)hopsTotalUnitsComboModel.getSelectedItem();
    if (myRecipe != null) {
      myRecipe.setHopsUnits(u);
      displayRecipe();
    }
  }
 else   if (o == btnAddHop) {
    if (myRecipe != null) {
      Hop h=new Hop(myRecipe.getHopUnits(),preferences.getProperty("String_Node_Str"));
      myRecipe.addHop(h);
      hopsTable.updateUI();
      displayRecipe();
    }
  }
 else   if (o == btnDelHop) {
    if (myRecipe != null) {
      int i=hopsTable.getSelectedRow();
      myRecipe.delHop(i);
      hopsTable.updateUI();
      displayRecipe();
    }
  }
 else   if (o == cmbYeast) {
    Yeast y=(Yeast)cmbYeastModel.getSelectedItem();
    if (myRecipe != null && y != myRecipe.getYeastObj()) {
      myRecipe.setYeast(y);
    }
    String st=SBStringUtils.multiLineToolTip(40,y.getDescription());
    cmbYeast.setToolTipText(st);
  }
 else   if (o == cmbSizeUnits) {
    String q=(String)cmbSizeUnits.getSelectedItem();
    if (myRecipe != null && q != myRecipe.getVolUnits()) {
      myRecipe.setVolUnits(q);
      displayRecipe();
    }
  }
 else   if (o == alcMethodCombo) {
    recipeSettingsActionPerformed(e);
  }
 else   if (o == ibuMethodCombo) {
    recipeSettingsActionPerformed(e);
  }
 else   if (o == colourMethodCombo) {
    recipeSettingsActionPerformed(e);
  }
 else   if (o == evapMethodCombo) {
    recipeSettingsActionPerformed(e);
  }
 else   if (o == maltComboBox) {
    Fermentable f=(Fermentable)cmbMaltModel.getSelectedItem();
    int i=maltTable.getSelectedRow();
    if (myRecipe != null && i != -1) {
      Fermentable f2=myRecipe.getFermentable(i);
      if (f2 != null) {
        f2.setLov(f.getLov());
        f2.setPppg(f.getPppg());
        f2.setDescription(f.getDescription());
        f2.setMashed(f.getMashed());
        f2.setSteep(f.getSteep());
        f2.setCost(f.getCostPerU());
      }
    }
  }
 else   if (o == maltUnitsComboBox) {
    String u=(String)cmbMaltUnitsModel.getSelectedItem();
    int i=maltTable.getSelectedRow();
    if (myRecipe != null && i != -1) {
      Fermentable f2=myRecipe.getFermentable(i);
      if (f2 != null) {
        f2.convertTo(u);
        myRecipe.calcMaltTotals();
        displayRecipe();
      }
    }
  }
 else   if (o == hopComboBox) {
    Hop h=(Hop)cmbHopsModel.getSelectedItem();
    int i=hopsTable.getSelectedRow();
    if (myRecipe != null && i != -1) {
      Hop h2=myRecipe.getHop(i);
      h2.setAlpha(h.getAlpha());
      h2.setDescription(h.getDescription());
      h2.setCost(h.getCostPerU());
    }
  }
 else   if (o == hopsUnitsComboBox) {
    String u=(String)cmbHopsUnitsModel.getSelectedItem();
    int i=hopsTable.getSelectedRow();
    if (myRecipe != null && i != -1) {
      Hop h=myRecipe.getHop(i);
      h.convertTo(u);
      myRecipe.calcHopsTotals();
      displayRecipe();
    }
  }
 else   if (o == txtDate) {
    java.util.Date newDate=txtDate.getDate();
    java.util.Date oldDate=myRecipe.getCreated().getTime();
    if (!oldDate.equals(newDate)) {
      myRecipe.setCreated(newDate);
    }
  }
 else   if (o == cmbStyle) {
    Style st=(Style)cmbStyleModel.getSelectedItem();
    if (myRecipe != null && st != myRecipe.getStyleObj()) {
      myRecipe.setStyle(st);
      stylePanel.setStyle(st);
    }
    cmbStyle.setToolTipText(SBStringUtils.multiLineToolTip(50,st.getDescription()));
  }
 else   if (o == saveButton) {
    saveFile();
  }
 else   if (o == findButton) {
    FindDialog fd=new FindDialog(this);
    fd.setModal(true);
    fd.setVisible(true);
  }
 else   if (o == printButton) {
    PrintDialog pd=new PrintDialog(this);
    pd.setModal(true);
    pd.setVisible(true);
  }
 else   if (o == copyButton) {
    Clipboard clipboard=getToolkit().getSystemClipboard();
    StringSelection ss=new StringSelection(myRecipe.toText());
    clipboard.setContents(ss,ss);
  }
 else   if (o == aboutMenuItem) {
    aboutDlg=new AboutDialog(this,version + "String_Node_Str" + edition);
    aboutDlg.setVisible(true);
  }
 else   if (o == helpMenuItem) {
    String urlString=SBStringUtils.getAppPath("String_Node_Str") + "String_Node_Str";
    Debug.print(urlString);
    AbstractLogger logger=new SystemLogger();
    BrowserLauncher launcher;
    try {
      launcher=new BrowserLauncher(logger);
      BrowserLauncherRunner runner=new BrowserLauncherRunner(launcher,urlString,null);
      Thread launcherThread=new Thread(runner);
      launcherThread.start();
    }
 catch (    BrowserLaunchingInitializingException ex) {
      ex.printStackTrace();
    }
catch (    UnsupportedOperatingSystemException ex) {
      ex.printStackTrace();
    }
  }
 else   if (o == conversionToolMenuItem) {
    ConversionDialog convTool=new ConversionDialog(this);
    convTool.setModal(true);
    convTool.setVisible(true);
  }
 else   if (o == hydrometerToolMenuItem) {
    HydrometerToolDialog hydroTool=new HydrometerToolDialog(this);
    hydroTool.setModal(true);
    hydroTool.setVisible(true);
  }
 else   if (o == extractPotentialMenuItem) {
    PotentialExtractCalcDialog extCalc=new PotentialExtractCalcDialog(this);
    extCalc.setModal(true);
    extCalc.setVisible(true);
  }
 else   if (o == refractometerMenuItem) {
    RefractometerDialog refract=new RefractometerDialog(this);
    refract.setModal(true);
    refract.setVisible(true);
  }
 else   if (o == maltPercentMenuItem) {
    MaltPercentDialog maltPercent=new MaltPercentDialog(this);
    maltPercent.setModal(true);
    maltPercent.setVisible(true);
  }
 else   if (o == scalRecipeMenuItem) {
    ScaleRecipeDialog scaleRecipe=new ScaleRecipeDialog(this);
    scaleRecipe.setModal(true);
    scaleRecipe.setVisible(true);
  }
 else   if (o == editPrefsMenuItem) {
    PreferencesDialog d=new PreferencesDialog(this);
    d.setVisible(true);
  }
 else   if (o == exitMenuItem) {
    processWindowEvent(new WindowEvent(this,WindowEvent.WINDOW_CLOSING));
    System.exit(0);
  }
 else   if (o == printMenuItem) {
    PrintDialog pd=new PrintDialog(this);
    pd.setModal(true);
    pd.setVisible(true);
  }
 else   if (o == clipboardMenuItem) {
    Clipboard clipboard=getToolkit().getSystemClipboard();
    StringSelection s=new StringSelection(myRecipe.toText());
    clipboard.setContents(s,s);
  }
 else   if (o == exportTextMenuItem) {
    fileChooser.resetChoosableFileFilters();
    String[] ext={"String_Node_Str"};
    sbFileFilter saveFileFilter=new sbFileFilter(ext,"String_Node_Str");
    fileChooser.setFileFilter(saveFileFilter);
    fileChooser.setSelectedFile(new File(myRecipe.getName() + "String_Node_Str"));
    int returnVal=fileChooser.showSaveDialog(mainMenuBar);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
      File file=fileChooser.getSelectedFile();
      try {
        FileWriter out=new FileWriter(file);
        out.write(myRecipe.toText());
        out.close();
      }
 catch (      Exception ex) {
        showError(ex);
      }
    }
 else {
      Debug.print("String_Node_Str");
    }
  }
 else   if (o == exportHTMLmenu) {
    fileChooser.resetChoosableFileFilters();
    String[] ext={"String_Node_Str","String_Node_Str"};
    sbFileFilter saveFileFilter=new sbFileFilter(ext,"String_Node_Str");
    fileChooser.setFileFilter(saveFileFilter);
    fileChooser.setSelectedFile(new File(myRecipe.getName() + "String_Node_Str"));
    int returnVal=fileChooser.showSaveDialog(mainMenuBar);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
      File file=fileChooser.getSelectedFile();
      try {
        saveAsHTML(file,"String_Node_Str",null);
      }
 catch (      Exception ex) {
        showError(ex);
      }
    }
 else {
      Debug.print("String_Node_Str");
    }
  }
 else   if (o == saveAsMenuItem) {
    saveAs();
  }
 else   if (o == saveMenuItem) {
    saveFile();
  }
 else   if (o == findFileMenuItem) {
    FindDialog fd=new FindDialog(this);
    fd.setModal(true);
    fd.setVisible(true);
  }
 else   if (o == openFileMenuItem) {
    fileChooser.resetChoosableFileFilters();
    String[] ext={"String_Node_Str","String_Node_Str","String_Node_Str"};
    String desc="String_Node_Str";
    sbFileFilter openFileFilter=new sbFileFilter(ext,desc);
    fileChooser.setFileFilter(openFileFilter);
    int returnVal=fileChooser.showOpenDialog(mainMenuBar);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
      File file=fileChooser.getSelectedFile();
      Debug.print("String_Node_Str" + file.getName() + "String_Node_Str");
      OpenImport oi=new OpenImport();
      myRecipe=oi.openFile(file);
      currentFile=file;
      if (oi.getFileType().equals("String_Node_Str")) {
        JOptionPane.showMessageDialog(null,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str",JOptionPane.INFORMATION_MESSAGE);
      }
      if (oi.getFileType().equals("String_Node_Str")) {
        JOptionPane.showMessageDialog(null,"String_Node_Str" + "String_Node_Str" + "String_Node_Str","String_Node_Str",JOptionPane.INFORMATION_MESSAGE);
      }
      attachRecipeData();
      checkIngredientsInDB();
      myRecipe.setDirty(false);
      myRecipe.calcMaltTotals();
      myRecipe.calcHopsTotals();
      myRecipe.mash.calcMashSchedule();
      displayRecipe();
    }
 else {
      Debug.print("String_Node_Str");
    }
  }
 else   if (o == newFileMenuItem) {
    setRecipe(new Recipe(),null);
    myRecipe.setDirty(false);
    displayRecipe();
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  if (dontUpdate) {
    return;
  }
  Object o=e.getSource();
  if (o == txtName)   myRecipe.setName(txtName.getText());
 else   if (o == brewerNameText)   myRecipe.setBrewer(brewerNameText.getText());
 else   if (o == preBoilText) {
    double x=round(myRecipe.getPreBoilVol(myRecipe.getVolUnits()),2);
    double y=round(Double.parseDouble(preBoilText.getText()),2);
    if (x != y) {
      Debug.print("String_Node_Str" + x + "String_Node_Str"+ y);
      myRecipe.setPreBoil(new Quantity(myRecipe.getVolUnits(),Double.parseDouble(preBoilText.getText())));
      displayRecipe();
    }
  }
 else   if (o == finalWortVolText) {
    double x=round(myRecipe.getFinalWortVol(myRecipe.getVolUnits()),2);
    double y=round(Double.parseDouble(finalWortVolText.getText()),2);
    if (x != y) {
      Debug.print("String_Node_Str" + x + "String_Node_Str"+ y);
      myRecipe.setPostBoil(new Quantity(myRecipe.getVolUnits(),Double.parseDouble(finalWortVolText.getText())));
      displayRecipe();
    }
  }
 else   if (o == evapText) {
    myRecipe.setEvap(Double.parseDouble(evapText.getText()));
    displayRecipe();
  }
 else   if (o == boilMinText) {
    String s=boilMinText.getText();
    if (s.indexOf('.') > 0) {
      s=s.substring(0,s.indexOf('.'));
    }
    myRecipe.setBoilMinutes(Integer.parseInt(s));
    displayRecipe();
  }
 else   if (o == maltTotalUnitsComboBox) {
    String u=(String)maltTotalUnitsComboModel.getSelectedItem();
    if (myRecipe != null) {
      myRecipe.setMaltUnits(u);
      displayRecipe();
    }
  }
 else   if (o == btnAddMalt) {
    if (myRecipe != null) {
      Fermentable f=new Fermentable(myRecipe.getMaltUnits());
      myRecipe.addMalt(f);
      maltTable.updateUI();
      displayRecipe();
    }
  }
 else   if (o == btnDelMalt) {
    if (myRecipe != null) {
      int i=maltTable.getSelectedRow();
      myRecipe.delMalt(i);
      maltTable.updateUI();
      displayRecipe();
    }
  }
 else   if (o == hopsTotalUnitsComboBox) {
    String u=(String)hopsTotalUnitsComboModel.getSelectedItem();
    if (myRecipe != null) {
      myRecipe.setHopsUnits(u);
      displayRecipe();
    }
  }
 else   if (o == btnAddHop) {
    if (myRecipe != null) {
      Hop h=new Hop(myRecipe.getHopUnits(),preferences.getProperty("String_Node_Str"));
      myRecipe.addHop(h);
      hopsTable.updateUI();
      displayRecipe();
    }
  }
 else   if (o == btnDelHop) {
    if (myRecipe != null) {
      int i=hopsTable.getSelectedRow();
      myRecipe.delHop(i);
      hopsTable.updateUI();
      displayRecipe();
    }
  }
 else   if (o == cmbYeast) {
    Yeast y=(Yeast)cmbYeastModel.getSelectedItem();
    if (myRecipe != null && y != myRecipe.getYeastObj()) {
      myRecipe.setYeast(y);
    }
    String st=SBStringUtils.multiLineToolTip(40,y.getDescription());
    cmbYeast.setToolTipText(st);
  }
 else   if (o == cmbSizeUnits) {
    String q=(String)cmbSizeUnits.getSelectedItem();
    if (myRecipe != null && q != myRecipe.getVolUnits()) {
      myRecipe.setVolUnits(q);
      displayRecipe();
    }
  }
 else   if (o == alcMethodCombo) {
    recipeSettingsActionPerformed(e);
  }
 else   if (o == ibuMethodCombo) {
    recipeSettingsActionPerformed(e);
  }
 else   if (o == colourMethodCombo) {
    recipeSettingsActionPerformed(e);
  }
 else   if (o == evapMethodCombo) {
    recipeSettingsActionPerformed(e);
  }
 else   if (o == maltComboBox) {
    Fermentable f=(Fermentable)cmbMaltModel.getSelectedItem();
    int i=maltTable.getSelectedRow();
    if (myRecipe != null && i != -1) {
      Fermentable f2=myRecipe.getFermentable(i);
      if (f2 != null) {
        f2.setLov(f.getLov());
        f2.setPppg(f.getPppg());
        f2.setDescription(f.getDescription());
        f2.setMashed(f.getMashed());
        f2.setSteep(f.getSteep());
        f2.setCost(f.getCostPerU());
      }
    }
  }
 else   if (o == maltUnitsComboBox) {
    String u=(String)cmbMaltUnitsModel.getSelectedItem();
    int i=maltTable.getSelectedRow();
    if (myRecipe != null && i != -1) {
      Fermentable f2=myRecipe.getFermentable(i);
      if (f2 != null) {
        f2.convertTo(u);
        myRecipe.calcMaltTotals();
        displayRecipe();
      }
    }
  }
 else   if (o == hopComboBox) {
    Hop h=(Hop)cmbHopsModel.getSelectedItem();
    int i=hopsTable.getSelectedRow();
    if (myRecipe != null && i != -1) {
      Hop h2=myRecipe.getHop(i);
      h2.setAlpha(h.getAlpha());
      h2.setDescription(h.getDescription());
      h2.setCost(h.getCostPerU());
    }
  }
 else   if (o == hopsUnitsComboBox) {
    String u=(String)cmbHopsUnitsModel.getSelectedItem();
    int i=hopsTable.getSelectedRow();
    if (myRecipe != null && i != -1) {
      Hop h=myRecipe.getHop(i);
      h.convertTo(u);
      myRecipe.calcHopsTotals();
      displayRecipe();
    }
  }
 else   if (o == txtDate) {
    java.util.Date newDate=txtDate.getDate();
    java.util.Date oldDate=myRecipe.getCreated().getTime();
    if (!oldDate.equals(newDate)) {
      myRecipe.setCreated(newDate);
    }
  }
 else   if (o == cmbStyle) {
    Style st=(Style)cmbStyleModel.getSelectedItem();
    if (myRecipe != null && st != myRecipe.getStyleObj()) {
      myRecipe.setStyle(st);
      stylePanel.setStyle(st);
    }
    cmbStyle.setToolTipText(SBStringUtils.multiLineToolTip(50,st.getDescription()));
  }
 else   if (o == saveButton) {
    saveFile();
  }
 else   if (o == findButton) {
    FindDialog fd=new FindDialog(this);
    fd.setModal(true);
    fd.setVisible(true);
  }
 else   if (o == printButton) {
    PrintDialog pd=new PrintDialog(this);
    pd.setModal(true);
    pd.setVisible(true);
  }
 else   if (o == copyButton) {
    Clipboard clipboard=getToolkit().getSystemClipboard();
    StringSelection ss=new StringSelection(myRecipe.toText());
    clipboard.setContents(ss,ss);
  }
 else   if (o == aboutMenuItem) {
    aboutDlg=new AboutDialog(this,version + "String_Node_Str" + edition);
    aboutDlg.setVisible(true);
  }
 else   if (o == helpMenuItem) {
    String urlString=SBStringUtils.getAppPath("String_Node_Str") + "String_Node_Str";
    Debug.print(urlString);
    AbstractLogger logger=new SystemLogger();
    BrowserLauncher launcher;
    try {
      launcher=new BrowserLauncher(logger);
      BrowserLauncherRunner runner=new BrowserLauncherRunner(launcher,urlString,null);
      Thread launcherThread=new Thread(runner);
      launcherThread.start();
    }
 catch (    BrowserLaunchingInitializingException ex) {
      ex.printStackTrace();
    }
catch (    UnsupportedOperatingSystemException ex) {
      ex.printStackTrace();
    }
  }
 else   if (o == conversionToolMenuItem) {
    ConversionDialog convTool=new ConversionDialog(this);
    convTool.setModal(true);
    convTool.setVisible(true);
  }
 else   if (o == hydrometerToolMenuItem) {
    HydrometerToolDialog hydroTool=new HydrometerToolDialog(this);
    hydroTool.setModal(true);
    hydroTool.setVisible(true);
  }
 else   if (o == extractPotentialMenuItem) {
    PotentialExtractCalcDialog extCalc=new PotentialExtractCalcDialog(this);
    extCalc.setModal(true);
    extCalc.setVisible(true);
  }
 else   if (o == refractometerMenuItem) {
    RefractometerDialog refract=new RefractometerDialog(this);
    refract.setModal(true);
    refract.setVisible(true);
  }
 else   if (o == maltPercentMenuItem) {
    MaltPercentDialog maltPercent=new MaltPercentDialog(this);
    maltPercent.setModal(true);
    maltPercent.setVisible(true);
  }
 else   if (o == scalRecipeMenuItem) {
    ScaleRecipeDialog scaleRecipe=new ScaleRecipeDialog(this);
    scaleRecipe.setModal(true);
    scaleRecipe.setVisible(true);
  }
 else   if (o == editPrefsMenuItem) {
    PreferencesDialog d=new PreferencesDialog(this);
    d.setVisible(true);
  }
 else   if (o == exitMenuItem) {
    processWindowEvent(new WindowEvent(this,WindowEvent.WINDOW_CLOSING));
    System.exit(0);
  }
 else   if (o == printMenuItem) {
    PrintDialog pd=new PrintDialog(this);
    pd.setModal(true);
    pd.setVisible(true);
  }
 else   if (o == clipboardMenuItem) {
    Clipboard clipboard=getToolkit().getSystemClipboard();
    StringSelection s=new StringSelection(myRecipe.toText());
    clipboard.setContents(s,s);
  }
 else   if (o == exportTextMenuItem) {
    fileChooser.resetChoosableFileFilters();
    String[] ext={"String_Node_Str"};
    sbFileFilter saveFileFilter=new sbFileFilter(ext,"String_Node_Str");
    fileChooser.setFileFilter(saveFileFilter);
    fileChooser.setSelectedFile(new File(myRecipe.getName() + "String_Node_Str"));
    int returnVal=fileChooser.showSaveDialog(mainMenuBar);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
      File file=fileChooser.getSelectedFile();
      try {
        FileWriter out=new FileWriter(file);
        out.write(myRecipe.toText());
        out.close();
      }
 catch (      Exception ex) {
        showError(ex);
      }
    }
 else {
      Debug.print("String_Node_Str");
    }
  }
 else   if (o == exportHTMLmenu) {
    fileChooser.resetChoosableFileFilters();
    String[] ext={"String_Node_Str","String_Node_Str"};
    sbFileFilter saveFileFilter=new sbFileFilter(ext,"String_Node_Str");
    fileChooser.setFileFilter(saveFileFilter);
    fileChooser.setSelectedFile(new File(myRecipe.getName() + "String_Node_Str"));
    int returnVal=fileChooser.showSaveDialog(mainMenuBar);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
      File file=fileChooser.getSelectedFile();
      try {
        saveAsHTML(file,"String_Node_Str",null);
      }
 catch (      Exception ex) {
        showError(ex);
      }
    }
 else {
      Debug.print("String_Node_Str");
    }
  }
 else   if (o == saveAsMenuItem) {
    saveAs();
  }
 else   if (o == saveMenuItem) {
    saveFile();
  }
 else   if (o == findFileMenuItem) {
    FindDialog fd=new FindDialog(this);
    fd.setModal(true);
    fd.setVisible(true);
  }
 else   if (o == openFileMenuItem) {
    fileChooser.resetChoosableFileFilters();
    String[] ext={"String_Node_Str","String_Node_Str","String_Node_Str"};
    String desc="String_Node_Str";
    sbFileFilter openFileFilter=new sbFileFilter(ext,desc);
    fileChooser.setFileFilter(openFileFilter);
    int returnVal=fileChooser.showOpenDialog(mainMenuBar);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
      File file=fileChooser.getSelectedFile();
      Debug.print("String_Node_Str" + file.getName() + "String_Node_Str");
      OpenImport oi=new OpenImport();
      myRecipe=oi.openFile(file);
      currentFile=file;
      if (oi.getFileType().equals("String_Node_Str")) {
        JOptionPane.showMessageDialog(null,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str",JOptionPane.INFORMATION_MESSAGE);
      }
      if (oi.getFileType().equals("String_Node_Str")) {
        JOptionPane.showMessageDialog(null,"String_Node_Str" + "String_Node_Str" + "String_Node_Str","String_Node_Str",JOptionPane.INFORMATION_MESSAGE);
      }
      attachRecipeData();
      checkIngredientsInDB();
      myRecipe.setDirty(false);
      myRecipe.calcMaltTotals();
      myRecipe.calcHopsTotals();
      myRecipe.mash.calcMashSchedule();
      displayRecipe();
    }
 else {
      Debug.print("String_Node_Str");
    }
  }
 else   if (o == newFileMenuItem) {
    setRecipe(new Recipe(),null);
    myRecipe.setDirty(false);
    displayRecipe();
  }
}