Source:
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { switch (localName) { case TaskListExternalizationConstants.NODE_TASK: checkState(currentBuilder == null, "Cannot begin reading a task while reading another task list element."); currentBuilder = new SaxTaskBuilder(repositoryModel, repositoryManager); currentBuilder.beginItem(attributes); break; case TaskListExternalizationConstants.NODE_QUERY: checkState(currentBuilder == null, "Cannot begin reading a query while reading another task list element."); currentBuilder = new SaxQueryBuilder(repositoryModel, repositoryManager); currentBuilder.beginItem(attributes); break; case TaskListExternalizationConstants.NODE_CATEGORY: checkState(currentBuilder == null, "Cannot begin reading a category while reading another task list element."); currentBuilder = new SaxCategoryBuilder(taskList); currentBuilder.beginItem(attributes); break; case TaskListExternalizationConstants.NODE_ATTRIBUTE: if (isOK(currentBuilder) && !currentBuilder.isAcceptingAttributeValues()) { currentBuilder.startAttribute(attributes); } break; case TaskListExternalizationConstants.NODE_SUB_TASK: checkState(currentBuilder instanceof SaxTaskBuilder, "Cannot read a sub task hit unless a reading a task"); recordHit(attributes, subTasks, (SaxTaskBuilder) currentBuilder); break; case TaskListExternalizationConstants.NODE_QUERY_HIT: checkState(currentBuilder instanceof SaxQueryBuilder, "Cannot read a query hit unless a reading a query"); recordHit(attributes, queryResults, (SaxQueryBuilder) currentBuilder); break; case TaskListExternalizationConstants.NODE_TASK_REFERENCE: checkState(currentBuilder instanceof SaxCategoryBuilder, "Cannot read a category hit unless reading a category"); recordHit(attributes, categorizedTasks, (SaxCategoryBuilder) currentBuilder); break; default: break; } if (!TaskListExternalizationConstants.NODE_TASK_LIST.equals(localName)) { orphanBuilder.startElement(localName, attributes); } }

Target:
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { switch (localName) { case TaskListExternalizationConstants.NODE_TASK: checkState(currentBuilder == null, "Cannot begin reading a task while reading another task list element."); currentBuilder = new SaxTaskBuilder(repositoryModel, repositoryManager); currentBuilder.beginItem(attributes); break; case TaskListExternalizationConstants.NODE_QUERY: checkState(currentBuilder == null, "Cannot begin reading a query while reading another task list element."); currentBuilder = new SaxQueryBuilder(repositoryModel, repositoryManager); currentBuilder.beginItem(attributes); break; case TaskListExternalizationConstants.NODE_CATEGORY: checkState(currentBuilder == null, "Cannot begin reading a category while reading another task list element."); currentBuilder = new SaxCategoryBuilder(taskList); currentBuilder.beginItem(attributes); break; case TaskListExternalizationConstants.NODE_ATTRIBUTE: if (isOK(currentBuilder) && !currentBuilder.isAcceptingAttributeValues()) { currentBuilder.startAttribute(attributes); } break; case TaskListExternalizationConstants.NODE_SUB_TASK: checkState(currentBuilder instanceof SaxTaskBuilder, "Cannot read a sub task hit unless reading a task"); recordHit(attributes, subTasks, (SaxTaskBuilder) currentBuilder); break; case TaskListExternalizationConstants.NODE_QUERY_HIT: checkState(currentBuilder instanceof SaxQueryBuilder, "Cannot read a query hit unless reading a query"); recordHit(attributes, queryResults, (SaxQueryBuilder) currentBuilder); break; case TaskListExternalizationConstants.NODE_TASK_REFERENCE: checkState(currentBuilder instanceof SaxCategoryBuilder, "Cannot read a category hit unless reading a category"); recordHit(attributes, categorizedTasks, (SaxCategoryBuilder) currentBuilder); break; default: break; } if (!TaskListExternalizationConstants.NODE_TASK_LIST.equals(localName)) { orphanBuilder.startElement(localName, attributes); } }