Project project = getCurrentProject();  if (project.getNumJarFiles() == 0) { logger.logMessage(ConsoleLogger.ERROR, "Project " + project + " has no Jar files selected"); return; }  bugDescriptionEditorPane.setText(""); sourceTextArea.setText(""); AnalysisRun analysisRun = new AnalysisRun(project, this);  logger.logMessage(ConsoleLogger.INFO, "Beginning analysis of " + project);   RunAnalysisDialog dialog = new RunAnalysisDialog(this, analysisRun); dialog.setSize(400, 300); dialog.setLocationRelativeTo(null); dialog.setVisible(true);  if (dialog.isCompleted()) { logger.logMessage(ConsoleLogger.INFO, "Analysis " + project + " completed");
Project project = getCurrentProject();
    private void findBugsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_findBugsButtonActionPerformed        Project project = getCurrentProject();                if (project.getNumJarFiles() == 0) {            logger.logMessage(ConsoleLogger.ERROR, "Project " + project + " has no Jar files selected");            return;        }                bugDescriptionEditorPane.setText("");        sourceTextArea.setText("");        AnalysisRun analysisRun = new AnalysisRun(project, this);                logger.logMessage(ConsoleLogger.INFO, "Beginning analysis of " + project);                // Run the analysis!        RunAnalysisDialog dialog = new RunAnalysisDialog(this, analysisRun);        dialog.setSize(400, 300);        dialog.setLocationRelativeTo(null); // center the dialog        dialog.setVisible(true);                if (dialog.isCompleted()) {            logger.logMessage(ConsoleLogger.INFO, "Analysis " + project + " completed");	    // Report any errors that might have occurred during analysis	    analysisRun.reportAnalysisErrors();                        // Now we have an analysis run to look at            synchAnalysisRun(analysisRun);        } else {	    if (dialog.exceptionOccurred()) {		// The analysis was killed by an unexpected exception		Exception e = dialog.getException();		AnalysisErrorDialog err = new AnalysisErrorDialog(this, true);		err.addLine("Fatal analysis exception: " + e.toString());		StackTraceElement[] callList = e.getStackTrace();		for (int i = 0; i < callList.length; ++i)		    err.addLine("\t" + callList[i]);		err.finish();		err.setSize(650,500);                err.setLocationRelativeTo(null); // center the dialog		err.setVisible(true);	    } else {		// Cancelled by user                logger.logMessage(ConsoleLogger.INFO, "Analysis of " + project + " cancelled by user");	    }        }    }//GEN-LAST:event_findBugsButtonActionPerformed