summaryTopPanel.add(bugSummaryComponent(b));
summaryTopPanel.add(bugSummaryComponent(b, bug));
	private void updateSummaryTab(BugLeafNode node)	{		final BugInstance bug = node.getBug();		final ArrayList<BugAnnotation> primaryAnnotations = new ArrayList<BugAnnotation>();		boolean classIncluded = false;				//This ensures the order of the primary annotations of the bug		if(bug.getPrimarySourceLineAnnotation() != null)			primaryAnnotations.add(bug.getPrimarySourceLineAnnotation());		if(bug.getPrimaryMethod() != null)			primaryAnnotations.add(bug.getPrimaryMethod());		if(bug.getPrimaryField() != null)			primaryAnnotations.add(bug.getPrimaryField());				/*		 * This makes the primary class annotation appear only when		 * the visible field and method primary annotations don't have		 * the same class.		 */		if(bug.getPrimaryClass() != null){			FieldAnnotation primeField = bug.getPrimaryField();			MethodAnnotation primeMethod = bug.getPrimaryMethod();			ClassAnnotation primeClass = bug.getPrimaryClass();			String fieldClass = "";			String methodClass = "";			if(primeField != null)				fieldClass = primeField.getClassName();			if(primeMethod != null)				methodClass = primeMethod.getClassName();						if((primaryAnnotations.size() < 2) || (!(primeClass.getClassName().equals(fieldClass) || 					primeClass.getClassName().equals(methodClass)))){				primaryAnnotations.add(primeClass);				classIncluded = true;			}		}				final boolean classIncluded2 = classIncluded;				SwingUtilities.invokeLater(new Runnable(){			public void run(){				summaryTopPanel.removeAll();								summaryTopPanel.add(bugSummaryComponent(bug.getMessageWithoutPrefix()));				for(BugAnnotation b : primaryAnnotations)					summaryTopPanel.add(bugSummaryComponent(b));												if(!classIncluded2 && bug.getPrimaryClass() != null)					primaryAnnotations.add(bug.getPrimaryClass());								for(Iterator<BugAnnotation> i = bug.annotationIterator(); i.hasNext();){					BugAnnotation b = i.next();					boolean cont = true;					for(BugAnnotation p : primaryAnnotations)						if(p == b)							cont = false;										if(cont)						summaryTopPanel.add(bugSummaryComponent(b));				}								summaryHtmlArea.setText(bug.getBugPattern().getDetailHTML());												summaryTopPanel.add(Box.createVerticalGlue());				summaryTopPanel.revalidate();								SwingUtilities.invokeLater(new Runnable(){					public void run(){						summaryHtmlScrollPane.getVerticalScrollBar().setValue(summaryHtmlScrollPane.getVerticalScrollBar().getMinimum());					}				});			}		});	}