SourceLineAnnotation primarySrcLine = selected.getPrimarySourceLineAnnotation(); Project project = getCurrentProject(); AnalysisRun analysisRun = getCurrentAnalysisRun(); if (project == null) throw new IllegalStateException("null project!"); if (analysisRun == null) throw new IllegalStateException("null analysis run!"); viewSource(project, analysisRun, primarySrcLine);
if (srcLine != currentSourceLineAnnotation) { Project project = getCurrentProject(); AnalysisRun analysisRun = getCurrentAnalysisRun(); if (project == null) throw new IllegalStateException("null project!"); if (analysisRun == null) throw new IllegalStateException("null analysis run!"); viewSource(project, analysisRun, srcLine);  currentSourceLineAnnotation = srcLine; }
    private void synchBugInstance(BugInstance selected) {         // If the bug is already the current one, then there's nothing to do         if (selected == currentBugInstance)            return;                  // If the details window is minimized, then the user can't see         // it and there is no point in updating it.         if (!viewBugDetailsItem.isSelected())             return;                // Show source code.	SourceLineAnnotation primarySrcLine = selected.getPrimarySourceLineAnnotation();	Project project = getCurrentProject();	AnalysisRun analysisRun = getCurrentAnalysisRun();	if (project == null) throw new IllegalStateException("null project!");	if (analysisRun == null) throw new IllegalStateException("null analysis run!");	viewSource(project, analysisRun, primarySrcLine);                // Show bug info.        showBugInfo(selected);                // Now the bug details are up to date.        currentBugInstance = selected;    }