sourceFinder.setSourceBaseList(project.getSourceDirList()); String sourceFile = analysisRun.getSourceFile(srcLine.getClassName());
sourceTextArea.setText("");      if (srcLine == null) return;   sourceFinder.setSourceBaseList(project.getSourceDirList()); String sourceFile = analysisRun.getSourceFile(srcLine.getClassName());
    private void viewSource(Project project, AnalysisRun analysisRun, SourceLineAnnotation srcLine) {	sourceFinder.setSourceBaseList(project.getSourceDirList());	String sourceFile = analysisRun.getSourceFile(srcLine.getClassName());	if (sourceFile == null) {	    System.out.println("No source file for class " + srcLine.getClassName());	    return;	}        // Get rid of old source code text	sourceTextArea.setText("");	// Try to open the source file and display its contents	// in the source text area.	try {	    InputStream in = sourceFinder.openSource(srcLine.getPackageName(), sourceFile);	    BufferedReader reader = new BufferedReader(new InputStreamReader(in));	    	    String line;	    while ((line = reader.readLine()) != null) {		sourceTextArea.append(line + "\n");	    }	    	    reader.close();	} catch (IOException e) {	    logger.logMessage(ConsoleLogger.ERROR, e.getMessage());	    return;	}        // Highlight the lines from the source annotation.        // Note that the source lines start at 1, while the line numbers        // in the text area start at 0.        try {            int selBegin = sourceTextArea.getLineStartOffset(srcLine.getStartLine() - 1);            int selEnd = sourceTextArea.getLineStartOffset(srcLine.getEndLine());            sourceTextArea.select(selBegin, selEnd);            sourceTextArea.getCaret().setSelectionVisible(true);        } catch (javax.swing.text.BadLocationException e) {            logger.logMessage(ConsoleLogger.ERROR, e.getMessage());        }    }