IResource resource = getUnderlyingResource(bug);
IResource resource = null; try { resource = getUnderlyingResource(bug); } catch (JavaModelException e1) {  e1.printStackTrace(); }
	protected void doReportBug(BugInstance bug) {		getBugList().add(bug);		String className = null;		String packageName = null;		if (bug.getPrimaryClass() != null) {			className = bug.getPrimaryClass().getClassName();			packageName = bug.getPrimaryClass().getPackageName();		}		if (DEBUG) {			System.out.println(				"BUG in class: "					+ packageName					+ "."					+ className					+ ": "					+ bug.getMessage()					+ " / Annotation: "					+ bug.getAnnotationText()					+ " / Source Line: "					+ bug.getPrimarySourceLineAnnotation());		}		IResource resource = getUnderlyingResource(bug);		if (resource != null) {			int startLine = bug.getPrimarySourceLineAnnotation().getStartLine();			if (DEBUG) {				System.out.println(					"Creating marker for "						+ resource.getLocation()						+ ": line "						+ startLine);			}			try {				IMarker marker = resource.createMarker(FindBugsMarker.NAME);				marker.setAttribute(IMarker.LINE_NUMBER, startLine);				marker.setAttribute(FindBugsMarker.BUG_TYPE, bug.getType());				marker.setAttribute(IMarker.MESSAGE, bug.getMessage());				marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING);			}			catch (CoreException e) {				e.printStackTrace();			}		}		advanceProgressMonitor();	}