Project emptyProject = new Project(DEFAULT_PROJECT_NAME); AnalysisRun analysisRun = new AnalysisRun(emptyProject, this);
Project project = currentProject != null ? currentProject : new Project(DEFAULT_PROJECT_NAME); AnalysisRun analysisRun = new AnalysisRun(project, this);
    private void loadBugsItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadBugsItemActionPerformed        // FIXME: offer to save current project and bugs                try {                        JFileChooser chooser = new JFileChooser(currentDirectory);            chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);            chooser.setFileFilter(xmlFileFilter);                    int result = chooser.showDialog(this, "Load bugs");            if (result != JFileChooser.CANCEL_OPTION) {                File selectedFile = chooser.getSelectedFile();                                Project emptyProject = new Project(DEFAULT_PROJECT_NAME);                AnalysisRun analysisRun = new AnalysisRun(emptyProject, this);                                analysisRun.loadBugsFromFile(selectedFile);                                setProject(emptyProject);                synchAnalysisRun(analysisRun);            }        } catch (Exception e) {            e.printStackTrace();            logger.logMessage(ConsoleLogger.ERROR, "Could not load bugs: " + e.toString());        }            }//GEN-LAST:event_loadBugsItemActionPerformed