DefaultMutableTreeNode node = (DefaultMutableTreeNode) value; Object obj = node.getUserObject();
        public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel,        boolean expanded, boolean leaf, int row, boolean hasFocus) {                        super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);                        // Set the icon, depending on what kind of node it is            DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;            Object obj = node.getUserObject();            if (obj instanceof BugInstance) {                setIcon(bugIcon);            } else if (obj instanceof ClassAnnotation) {                setIcon(classIcon);            } else if (obj instanceof MethodAnnotation) {                setIcon(methodIcon);            } else if (obj instanceof FieldAnnotation) {                setIcon(fieldIcon);            } else if (obj instanceof SourceLineAnnotation) {                setIcon(sourceFileIcon);            } else if (obj instanceof BugInstanceGroup) {                // This is a "group" node                BugInstanceGroup groupNode = (BugInstanceGroup) obj;                String groupType = groupNode.getGroupType();                if (groupType == GROUP_BY_CLASS) {                    setIcon(classIcon);                } else if (groupType == GROUP_BY_PACKAGE) {                    setIcon(packageIcon);                } else if (groupType == GROUP_BY_BUG_TYPE) {                    setIcon(bugGroupIcon);                }            } else {                setIcon(null);            }                        return this;        }