} else if (outerElement.equals(BugCollection.ERRORS_ELEMENT_NAME)) { if (qName.equals(BugCollection.ANALYSIS_ERROR_ELEMENT_NAME)) { analysisError.setMessage(textBuffer.toString()); bugCollection.addError(analysisError); } else if (qName.equals(BugCollection.ERROR_ELEMENT_NAME)) { if (stackTrace.size() > 0) { analysisError.setStackTrace(stackTrace.toArray(new String[stackTrace.size()])); } bugCollection.addError(analysisError); } else if (qName.equals(BugCollection.MISSING_CLASS_ELEMENT_NAME)) { bugCollection.addMissingClass(textBuffer.toString()); }  } else if (outerElement.equals(BugCollection.ERROR_ELEMENT_NAME)) { if (qName.equals(BugCollection.ERROR_MESSAGE_ELEMENT_NAME)) { analysisError.setMessage(textBuffer.toString()); } else if (qName.equals(BugCollection.ERROR_EXCEPTION_ELEMENT_NAME)) { analysisError.setExceptionMessage(textBuffer.toString()); } else if (qName.equals(BugCollection.ERROR_STACK_TRACE_ELEMENT_NAME)) { stackTrace.add(textBuffer.toString()); }
	public void endElement(String uri, String name, String qName) throws SAXException {		// URI should always be empty.		// So, qName is the name of the element.		if (elementStack.size() > 1) {			String outerElement = elementStack.get(elementStack.size() - 2);			if (outerElement.equals("BugCollection")) {				if (qName.equals("SummaryHTML"))					bugCollection.setSummaryHTML(textBuffer.toString());				else if (qName.equals("BugInstance"))					bugCollection.add(bugInstance);				else if (qName.equals(BugCollection.ANALYSIS_ERROR_ELEMENT_NAME))					bugCollection.addError(textBuffer.toString());				else if (qName.equals(BugCollection.MISSING_CLASS_ELEMENT_NAME))					bugCollection.addMissingClass(textBuffer.toString());			} else if (outerElement.equals("Project")) {				//System.out.println("Adding project element " + qName + ": " + textBuffer.toString());				if (qName.equals("Jar"))					project.addFile(textBuffer.toString());				else if (qName.equals("SrcDir"))					project.addSourceDir(textBuffer.toString());				else if (qName.equals("AuxClasspathEntry"))					project.addAuxClasspathEntry(textBuffer.toString());			} else if (outerElement.equals("BugInstance")) {				if (qName.equals("UserAnnotation")) {					bugInstance.setAnnotationText(textBuffer.toString());				}			}		}		elementStack.remove(elementStack.size() - 1);	}