Program: 45221
Project: 45221
Buggy source:
/** 
 * Notifies the reader that a new XML element is starting.
 */
public void startElement(String uri,String localName,String qName,Attributes attributes) throws SAXException {
  if (unknownElement != null) {
    if (Debug.ON)     Debug.trace("String_Node_Str" + qName);
    return;
  }
  if (qName.equals(ELEMENT_ROOT)) {
    if (state != STATE_UNKNOWN)     traceIllegalDeclaration(ELEMENT_ROOT);
    state=STATE_ROOT;
  }
 else   if (qName.equals(ELEMENT_TABLE)) {
    if (state != STATE_ROOT)     traceIllegalDeclaration(qName);
    state=STATE_TABLE;
  }
 else   if (qName.equals(ELEMENT_SHELL)) {
    if (state != STATE_ROOT)     traceIllegalDeclaration(qName);
    state=STATE_SHELL;
  }
 else   if (qName.equals(ELEMENT_EDITOR)) {
    if (state != STATE_ROOT)     traceIllegalDeclaration(qName);
    state=STATE_EDITOR;
  }
 else   if (qName.equals(ELEMENT_LOCATION_BAR)) {
    if (state != STATE_ROOT)     traceIllegalDeclaration(qName);
    state=STATE_LOCATION_BAR;
  }
 else   if (qName.equals(ELEMENT_SHELL_HISTORY)) {
    if (state != STATE_ROOT)     traceIllegalDeclaration(qName);
    state=STATE_SHELL_HISTORY;
  }
 else   if (qName.equals(ELEMENT_STATUS_BAR)) {
    if (state != STATE_ROOT)     traceIllegalDeclaration(qName);
    state=STATE_STATUS_BAR;
  }
 else   if (qName.equals(ELEMENT_HIDDEN)) {
    if (state != STATE_TABLE)     traceIllegalDeclaration(qName);
    state=STATE_HIDDEN;
  }
 else   if (qName.equals(ELEMENT_FOLDER)) {
    if (state != STATE_TABLE)     traceIllegalDeclaration(qName);
    state=STATE_FOLDER;
  }
 else   if (qName.equals(ELEMENT_ARCHIVE)) {
    if (state != STATE_TABLE)     traceIllegalDeclaration(qName);
    state=STATE_ARCHIVE;
  }
 else   if (qName.equals(ELEMENT_SYMLINK)) {
    if (state != STATE_TABLE)     traceIllegalDeclaration(qName);
    state=STATE_SYMLINK;
  }
 else   if (qName.equals(ELEMENT_MARKED)) {
    if (state != STATE_TABLE)     traceIllegalDeclaration(qName);
    state=STATE_MARKED;
  }
 else   if (qName.equals(ELEMENT_FILE)) {
    if (state != STATE_TABLE)     traceIllegalDeclaration(qName);
    state=STATE_FILE;
  }
 else   if (qName.equals(ELEMENT_ALTERNATE)) {
    if (state != STATE_TABLE)     traceIllegalDeclaration(qName);
    state=STATE_TABLE_ALTERNATE;
  }
 else   if (qName.equals(ELEMENT_NORMAL)) {
    if (state == STATE_SHELL)     state=STATE_SHELL_NORMAL;
 else     if (state == STATE_EDITOR)     state=STATE_EDITOR_NORMAL;
 else     if (state == STATE_LOCATION_BAR)     state=STATE_LOCATION_BAR_NORMAL;
 else     if (state == STATE_SHELL_HISTORY)     state=STATE_SHELL_HISTORY_NORMAL;
 else     if (state == STATE_HIDDEN)     state=STATE_HIDDEN_NORMAL;
 else     if (state == STATE_FOLDER)     state=STATE_FOLDER_NORMAL;
 else     if (state == STATE_ARCHIVE)     state=STATE_ARCHIVE_NORMAL;
 else     if (state == STATE_SYMLINK)     state=STATE_SYMLINK_NORMAL;
 else     if (state == STATE_MARKED)     state=STATE_MARKED_NORMAL;
 else     if (state == STATE_FILE)     state=STATE_FILE_NORMAL;
 else     if (state == STATE_TABLE)     state=STATE_TABLE_NORMAL;
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_SELECTED)) {
    if (state == STATE_SHELL)     state=STATE_SHELL_SELECTED;
 else     if (state == STATE_EDITOR)     state=STATE_EDITOR_SELECTED;
 else     if (state == STATE_LOCATION_BAR)     state=STATE_LOCATION_BAR_SELECTED;
 else     if (state == STATE_SHELL_HISTORY)     state=STATE_SHELL_HISTORY_SELECTED;
 else     if (state == STATE_HIDDEN)     state=STATE_HIDDEN_SELECTED;
 else     if (state == STATE_FOLDER)     state=STATE_FOLDER_SELECTED;
 else     if (state == STATE_ARCHIVE)     state=STATE_ARCHIVE_SELECTED;
 else     if (state == STATE_SYMLINK)     state=STATE_SYMLINK_SELECTED;
 else     if (state == STATE_MARKED)     state=STATE_MARKED_SELECTED;
 else     if (state == STATE_FILE)     state=STATE_FILE_SELECTED;
 else     if (state == STATE_TABLE)     state=STATE_TABLE_SELECTED;
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_FONT)) {
    if (state == STATE_SHELL)     template.setFont(ThemeData.SHELL_FONT,createFont(attributes));
 else     if (state == STATE_EDITOR)     template.setFont(ThemeData.EDITOR_FONT,createFont(attributes));
 else     if (state == STATE_LOCATION_BAR)     template.setFont(ThemeData.LOCATION_BAR_FONT,createFont(attributes));
 else     if (state == STATE_SHELL_HISTORY)     template.setFont(ThemeData.SHELL_HISTORY_FONT,createFont(attributes));
 else     if (state == STATE_STATUS_BAR)     template.setFont(ThemeData.STATUS_BAR_FONT,createFont(attributes));
 else     if (state == STATE_TABLE)     template.setFont(ThemeData.FILE_TABLE_FONT,createFont(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_INACTIVE_BACKGROUND)) {
    if (state == STATE_TABLE_NORMAL)     template.setColor(ThemeData.FILE_TABLE_INACTIVE_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_TABLE_SELECTED)     template.setColor(ThemeData.FILE_TABLE_INACTIVE_SELECTED_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_TABLE_ALTERNATE)     template.setColor(ThemeData.FILE_TABLE_INACTIVE_ALTERNATE_BACKGROUND_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_INACTIVE_FOREGROUND)) {
    if (state == STATE_FILE_NORMAL)     template.setColor(ThemeData.FILE_INACTIVE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_FOLDER_NORMAL)     template.setColor(ThemeData.FOLDER_INACTIVE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_ARCHIVE_NORMAL)     template.setColor(ThemeData.ARCHIVE_INACTIVE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SYMLINK_NORMAL)     template.setColor(ThemeData.SYMLINK_INACTIVE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_HIDDEN_NORMAL)     template.setColor(ThemeData.HIDDEN_FILE_INACTIVE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_MARKED_NORMAL)     template.setColor(ThemeData.MARKED_INACTIVE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_FILE_SELECTED)     template.setColor(ThemeData.FILE_INACTIVE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_FOLDER_SELECTED)     template.setColor(ThemeData.FOLDER_INACTIVE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_ARCHIVE_SELECTED)     template.setColor(ThemeData.ARCHIVE_INACTIVE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SYMLINK_SELECTED)     template.setColor(ThemeData.SYMLINK_INACTIVE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_HIDDEN_SELECTED)     template.setColor(ThemeData.HIDDEN_FILE_INACTIVE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_MARKED_SELECTED)     template.setColor(ThemeData.MARKED_INACTIVE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_BORDER)) {
    if (state == STATE_TABLE)     template.setColor(ThemeData.FILE_TABLE_BORDER_COLOR,createColor(attributes));
 else     if (state == STATE_STATUS_BAR)     template.setColor(ThemeData.STATUS_BAR_BORDER_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_INACTIVE_BORDER)) {
    if (state == STATE_TABLE)     template.setColor(ThemeData.FILE_TABLE_INACTIVE_BORDER_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_OUTLINE)) {
    if (state == STATE_TABLE)     template.setColor(ThemeData.FILE_TABLE_SELECTED_OUTLINE_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_INACTIVE_OUTLINE)) {
    if (state == STATE_TABLE)     template.setColor(ThemeData.FILE_TABLE_INACTIVE_SELECTED_OUTLINE_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_BACKGROUND)) {
    if (state == STATE_TABLE_NORMAL)     template.setColor(ThemeData.FILE_TABLE_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_TABLE_SELECTED)     template.setColor(ThemeData.FILE_TABLE_SELECTED_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_TABLE_ALTERNATE)     template.setColor(ThemeData.FILE_TABLE_ALTERNATE_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_TABLE_UNMATCHED)     template.setColor(ThemeData.FILE_TABLE_UNMATCHED_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_NORMAL)     template.setColor(ThemeData.SHELL_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_SELECTED)     template.setColor(ThemeData.SHELL_SELECTED_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_EDITOR_NORMAL)     template.setColor(ThemeData.EDITOR_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_EDITOR_SELECTED)     template.setColor(ThemeData.EDITOR_SELECTED_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_LOCATION_BAR_NORMAL)     template.setColor(ThemeData.LOCATION_BAR_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_LOCATION_BAR_SELECTED)     template.setColor(ThemeData.LOCATION_BAR_SELECTED_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_HISTORY_NORMAL)     template.setColor(ThemeData.SHELL_HISTORY_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_HISTORY_SELECTED)     template.setColor(ThemeData.SHELL_HISTORY_SELECTED_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_STATUS_BAR)     template.setColor(ThemeData.STATUS_BAR_BACKGROUND_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_PROGRESS)) {
    if (state == STATE_LOCATION_BAR)     template.setColor(ThemeData.LOCATION_BAR_PROGRESS_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_OK)) {
    if (state == STATE_STATUS_BAR)     template.setColor(ThemeData.STATUS_BAR_OK_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_WARNING)) {
    if (state == STATE_STATUS_BAR)     template.setColor(ThemeData.STATUS_BAR_WARNING_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_CRITICAL)) {
    if (state == STATE_STATUS_BAR)     template.setColor(ThemeData.STATUS_BAR_CRITICAL_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_FOREGROUND)) {
    if (state == STATE_HIDDEN_NORMAL)     template.setColor(ThemeData.HIDDEN_FILE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_HIDDEN_SELECTED)     template.setColor(ThemeData.HIDDEN_FILE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_TABLE_UNMATCHED)     template.setColor(ThemeData.FILE_TABLE_UNMATCHED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_FOLDER_NORMAL)     template.setColor(ThemeData.FOLDER_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_FOLDER_SELECTED)     template.setColor(ThemeData.FOLDER_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_ARCHIVE_NORMAL)     template.setColor(ThemeData.ARCHIVE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_ARCHIVE_SELECTED)     template.setColor(ThemeData.ARCHIVE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SYMLINK_NORMAL)     template.setColor(ThemeData.SYMLINK_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SYMLINK_SELECTED)     template.setColor(ThemeData.SYMLINK_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_MARKED_NORMAL)     template.setColor(ThemeData.MARKED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_MARKED_SELECTED)     template.setColor(ThemeData.MARKED_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_FILE_NORMAL)     template.setColor(ThemeData.FILE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_FILE_SELECTED)     template.setColor(ThemeData.FILE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_NORMAL)     template.setColor(ThemeData.SHELL_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_SELECTED)     template.setColor(ThemeData.SHELL_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_HISTORY_NORMAL)     template.setColor(ThemeData.SHELL_HISTORY_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_HISTORY_SELECTED)     template.setColor(ThemeData.SHELL_HISTORY_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_EDITOR_NORMAL)     template.setColor(ThemeData.EDITOR_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_EDITOR_SELECTED)     template.setColor(ThemeData.EDITOR_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_LOCATION_BAR_NORMAL)     template.setColor(ThemeData.LOCATION_BAR_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_LOCATION_BAR_SELECTED)     template.setColor(ThemeData.LOCATION_BAR_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_STATUS_BAR)     template.setColor(ThemeData.STATUS_BAR_FOREGROUND_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   traceIllegalDeclaration(qName);
}

Fixed version (ground truth):
/** 
 * Notifies the reader that a new XML element is starting.
 */
public void startElement(String uri,String localName,String qName,Attributes attributes) throws SAXException {
  if (unknownElement != null) {
    if (Debug.ON)     Debug.trace("String_Node_Str" + qName);
    return;
  }
  if (qName.equals(ELEMENT_ROOT)) {
    if (state != STATE_UNKNOWN)     traceIllegalDeclaration(ELEMENT_ROOT);
    state=STATE_ROOT;
  }
 else   if (qName.equals(ELEMENT_TABLE)) {
    if (state != STATE_ROOT)     traceIllegalDeclaration(qName);
    state=STATE_TABLE;
  }
 else   if (qName.equals(ELEMENT_SHELL)) {
    if (state != STATE_ROOT)     traceIllegalDeclaration(qName);
    state=STATE_SHELL;
  }
 else   if (qName.equals(ELEMENT_EDITOR)) {
    if (state != STATE_ROOT)     traceIllegalDeclaration(qName);
    state=STATE_EDITOR;
  }
 else   if (qName.equals(ELEMENT_LOCATION_BAR)) {
    if (state != STATE_ROOT)     traceIllegalDeclaration(qName);
    state=STATE_LOCATION_BAR;
  }
 else   if (qName.equals(ELEMENT_SHELL_HISTORY)) {
    if (state != STATE_ROOT)     traceIllegalDeclaration(qName);
    state=STATE_SHELL_HISTORY;
  }
 else   if (qName.equals(ELEMENT_STATUS_BAR)) {
    if (state != STATE_ROOT)     traceIllegalDeclaration(qName);
    state=STATE_STATUS_BAR;
  }
 else   if (qName.equals(ELEMENT_HIDDEN)) {
    if (state != STATE_TABLE)     traceIllegalDeclaration(qName);
    state=STATE_HIDDEN;
  }
 else   if (qName.equals(ELEMENT_FOLDER)) {
    if (state != STATE_TABLE)     traceIllegalDeclaration(qName);
    state=STATE_FOLDER;
  }
 else   if (qName.equals(ELEMENT_ARCHIVE)) {
    if (state != STATE_TABLE)     traceIllegalDeclaration(qName);
    state=STATE_ARCHIVE;
  }
 else   if (qName.equals(ELEMENT_SYMLINK)) {
    if (state != STATE_TABLE)     traceIllegalDeclaration(qName);
    state=STATE_SYMLINK;
  }
 else   if (qName.equals(ELEMENT_MARKED)) {
    if (state != STATE_TABLE)     traceIllegalDeclaration(qName);
    state=STATE_MARKED;
  }
 else   if (qName.equals(ELEMENT_FILE)) {
    if (state != STATE_TABLE)     traceIllegalDeclaration(qName);
    state=STATE_FILE;
  }
 else   if (qName.equals(ELEMENT_ALTERNATE)) {
    if (state != STATE_TABLE)     traceIllegalDeclaration(qName);
    state=STATE_TABLE_ALTERNATE;
  }
 else   if (qName.equals(ELEMENT_NORMAL)) {
    if (state == STATE_SHELL)     state=STATE_SHELL_NORMAL;
 else     if (state == STATE_EDITOR)     state=STATE_EDITOR_NORMAL;
 else     if (state == STATE_LOCATION_BAR)     state=STATE_LOCATION_BAR_NORMAL;
 else     if (state == STATE_SHELL_HISTORY)     state=STATE_SHELL_HISTORY_NORMAL;
 else     if (state == STATE_HIDDEN)     state=STATE_HIDDEN_NORMAL;
 else     if (state == STATE_FOLDER)     state=STATE_FOLDER_NORMAL;
 else     if (state == STATE_ARCHIVE)     state=STATE_ARCHIVE_NORMAL;
 else     if (state == STATE_SYMLINK)     state=STATE_SYMLINK_NORMAL;
 else     if (state == STATE_MARKED)     state=STATE_MARKED_NORMAL;
 else     if (state == STATE_FILE)     state=STATE_FILE_NORMAL;
 else     if (state == STATE_TABLE)     state=STATE_TABLE_NORMAL;
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_SELECTED)) {
    if (state == STATE_SHELL)     state=STATE_SHELL_SELECTED;
 else     if (state == STATE_EDITOR)     state=STATE_EDITOR_SELECTED;
 else     if (state == STATE_LOCATION_BAR)     state=STATE_LOCATION_BAR_SELECTED;
 else     if (state == STATE_SHELL_HISTORY)     state=STATE_SHELL_HISTORY_SELECTED;
 else     if (state == STATE_HIDDEN)     state=STATE_HIDDEN_SELECTED;
 else     if (state == STATE_FOLDER)     state=STATE_FOLDER_SELECTED;
 else     if (state == STATE_ARCHIVE)     state=STATE_ARCHIVE_SELECTED;
 else     if (state == STATE_SYMLINK)     state=STATE_SYMLINK_SELECTED;
 else     if (state == STATE_MARKED)     state=STATE_MARKED_SELECTED;
 else     if (state == STATE_FILE)     state=STATE_FILE_SELECTED;
 else     if (state == STATE_TABLE)     state=STATE_TABLE_SELECTED;
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_FONT)) {
    if (state == STATE_SHELL)     template.setFont(ThemeData.SHELL_FONT,createFont(attributes));
 else     if (state == STATE_EDITOR)     template.setFont(ThemeData.EDITOR_FONT,createFont(attributes));
 else     if (state == STATE_LOCATION_BAR)     template.setFont(ThemeData.LOCATION_BAR_FONT,createFont(attributes));
 else     if (state == STATE_SHELL_HISTORY)     template.setFont(ThemeData.SHELL_HISTORY_FONT,createFont(attributes));
 else     if (state == STATE_STATUS_BAR)     template.setFont(ThemeData.STATUS_BAR_FONT,createFont(attributes));
 else     if (state == STATE_TABLE)     template.setFont(ThemeData.FILE_TABLE_FONT,createFont(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_INACTIVE_BACKGROUND)) {
    if (state == STATE_TABLE_NORMAL)     template.setColor(ThemeData.FILE_TABLE_INACTIVE_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_TABLE_SELECTED)     template.setColor(ThemeData.FILE_TABLE_INACTIVE_SELECTED_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_TABLE_ALTERNATE)     template.setColor(ThemeData.FILE_TABLE_INACTIVE_ALTERNATE_BACKGROUND_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_INACTIVE_FOREGROUND)) {
    if (state == STATE_FILE_NORMAL)     template.setColor(ThemeData.FILE_INACTIVE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_FOLDER_NORMAL)     template.setColor(ThemeData.FOLDER_INACTIVE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_ARCHIVE_NORMAL)     template.setColor(ThemeData.ARCHIVE_INACTIVE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SYMLINK_NORMAL)     template.setColor(ThemeData.SYMLINK_INACTIVE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_HIDDEN_NORMAL)     template.setColor(ThemeData.HIDDEN_FILE_INACTIVE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_MARKED_NORMAL)     template.setColor(ThemeData.MARKED_INACTIVE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_FILE_SELECTED)     template.setColor(ThemeData.FILE_INACTIVE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_FOLDER_SELECTED)     template.setColor(ThemeData.FOLDER_INACTIVE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_ARCHIVE_SELECTED)     template.setColor(ThemeData.ARCHIVE_INACTIVE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SYMLINK_SELECTED)     template.setColor(ThemeData.SYMLINK_INACTIVE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_HIDDEN_SELECTED)     template.setColor(ThemeData.HIDDEN_FILE_INACTIVE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_MARKED_SELECTED)     template.setColor(ThemeData.MARKED_INACTIVE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_BORDER)) {
    if (state == STATE_TABLE)     template.setColor(ThemeData.FILE_TABLE_BORDER_COLOR,createColor(attributes));
 else     if (state == STATE_STATUS_BAR)     template.setColor(ThemeData.STATUS_BAR_BORDER_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_INACTIVE_BORDER)) {
    if (state == STATE_TABLE)     template.setColor(ThemeData.FILE_TABLE_INACTIVE_BORDER_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_OUTLINE)) {
    if (state == STATE_TABLE)     template.setColor(ThemeData.FILE_TABLE_SELECTED_OUTLINE_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_INACTIVE_OUTLINE)) {
    if (state == STATE_TABLE)     template.setColor(ThemeData.FILE_TABLE_INACTIVE_SELECTED_OUTLINE_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_UNMATCHED)) {
    if (state != STATE_TABLE)     traceIllegalDeclaration(qName);
    state=STATE_TABLE_UNMATCHED;
  }
 else   if (qName.equals(ELEMENT_BACKGROUND)) {
    if (state == STATE_TABLE_NORMAL)     template.setColor(ThemeData.FILE_TABLE_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_TABLE_SELECTED)     template.setColor(ThemeData.FILE_TABLE_SELECTED_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_TABLE_ALTERNATE)     template.setColor(ThemeData.FILE_TABLE_ALTERNATE_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_TABLE_UNMATCHED)     template.setColor(ThemeData.FILE_TABLE_UNMATCHED_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_NORMAL)     template.setColor(ThemeData.SHELL_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_SELECTED)     template.setColor(ThemeData.SHELL_SELECTED_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_EDITOR_NORMAL)     template.setColor(ThemeData.EDITOR_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_EDITOR_SELECTED)     template.setColor(ThemeData.EDITOR_SELECTED_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_LOCATION_BAR_NORMAL)     template.setColor(ThemeData.LOCATION_BAR_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_LOCATION_BAR_SELECTED)     template.setColor(ThemeData.LOCATION_BAR_SELECTED_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_HISTORY_NORMAL)     template.setColor(ThemeData.SHELL_HISTORY_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_HISTORY_SELECTED)     template.setColor(ThemeData.SHELL_HISTORY_SELECTED_BACKGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_STATUS_BAR)     template.setColor(ThemeData.STATUS_BAR_BACKGROUND_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_PROGRESS)) {
    if (state == STATE_LOCATION_BAR)     template.setColor(ThemeData.LOCATION_BAR_PROGRESS_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_OK)) {
    if (state == STATE_STATUS_BAR)     template.setColor(ThemeData.STATUS_BAR_OK_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_WARNING)) {
    if (state == STATE_STATUS_BAR)     template.setColor(ThemeData.STATUS_BAR_WARNING_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_CRITICAL)) {
    if (state == STATE_STATUS_BAR)     template.setColor(ThemeData.STATUS_BAR_CRITICAL_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   if (qName.equals(ELEMENT_FOREGROUND)) {
    if (state == STATE_HIDDEN_NORMAL)     template.setColor(ThemeData.HIDDEN_FILE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_HIDDEN_SELECTED)     template.setColor(ThemeData.HIDDEN_FILE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_TABLE_UNMATCHED)     template.setColor(ThemeData.FILE_TABLE_UNMATCHED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_FOLDER_NORMAL)     template.setColor(ThemeData.FOLDER_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_FOLDER_SELECTED)     template.setColor(ThemeData.FOLDER_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_ARCHIVE_NORMAL)     template.setColor(ThemeData.ARCHIVE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_ARCHIVE_SELECTED)     template.setColor(ThemeData.ARCHIVE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SYMLINK_NORMAL)     template.setColor(ThemeData.SYMLINK_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SYMLINK_SELECTED)     template.setColor(ThemeData.SYMLINK_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_MARKED_NORMAL)     template.setColor(ThemeData.MARKED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_MARKED_SELECTED)     template.setColor(ThemeData.MARKED_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_FILE_NORMAL)     template.setColor(ThemeData.FILE_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_FILE_SELECTED)     template.setColor(ThemeData.FILE_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_NORMAL)     template.setColor(ThemeData.SHELL_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_SELECTED)     template.setColor(ThemeData.SHELL_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_HISTORY_NORMAL)     template.setColor(ThemeData.SHELL_HISTORY_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_SHELL_HISTORY_SELECTED)     template.setColor(ThemeData.SHELL_HISTORY_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_EDITOR_NORMAL)     template.setColor(ThemeData.EDITOR_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_EDITOR_SELECTED)     template.setColor(ThemeData.EDITOR_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_LOCATION_BAR_NORMAL)     template.setColor(ThemeData.LOCATION_BAR_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_LOCATION_BAR_SELECTED)     template.setColor(ThemeData.LOCATION_BAR_SELECTED_FOREGROUND_COLOR,createColor(attributes));
 else     if (state == STATE_STATUS_BAR)     template.setColor(ThemeData.STATUS_BAR_FOREGROUND_COLOR,createColor(attributes));
 else     traceIllegalDeclaration(qName);
  }
 else   traceIllegalDeclaration(qName);
}