Source:
public TransactionParser getParser(KXmlParser parser) { String namespace = parser.getNamespace(); String name = parser.getName(); if (LedgerXmlParsers.STOCK_XML_NAMESPACE.equals(namespace)) { if (stockParser == null) { throw new RuntimeException("Couldn't process Stock transaction without initialization!"); } req(); return stockParser.getParser(parser); } else if ("case".equalsIgnoreCase(name)) { if (caseParser == null) { throw new RuntimeException("Couldn't receive Case transaction without initialization!"); } req(); return caseParser.getParser(parser); } else if ("registration".equalsIgnoreCase(name)) { if (userParser == null) { throw new RuntimeException("Couldn't receive User transaction without initialization!"); } req(); return userParser.getParser(parser); } else if (FixtureIndexSchemaParser.INDICE_SCHEMA.equalsIgnoreCase(name)) { return new FixtureIndexSchemaParser(parser, fixtureSchemas); } else if ("fixture".equalsIgnoreCase(name)) { String id = parser.getAttributeValue(null, "id"); String isIndexedAttr = parser.getAttributeValue(null, "indexed"); boolean isIndexed = "true".equals(isIndexedAttr); req(); if (isIndexed) { FixtureIndexSchema schema = fixtureSchemas.get(id); return buildIndexedFixtureParser(parser, id, schema); } else { return fixtureParser.getParser(parser); } } else if ("sync".equalsIgnoreCase(name) && "<LINK_0>".equals(namespace)) { return new TransactionParser<String>(parser) { @Override public void commit(String parsed) throws IOException { } @Override public String parse() throws InvalidStructureException, IOException, XmlPullParserException, UnfullfilledRequirementsException { this.checkNode("sync"); this.nextTag("restore_id"); String syncToken = parser.nextText(); if (syncToken == null) { throw new InvalidStructureException("Sync block must contain restore_id with valid ID inside!", parser); } sandbox.setSyncToken(syncToken); return syncToken; } }; } return null; }

Target:
public TransactionParser getParser(KXmlParser parser) { String namespace = parser.getNamespace(); String name = parser.getName(); if (LedgerXmlParsers.STOCK_XML_NAMESPACE.equals(namespace)) { if (stockParser == null) { throw new RuntimeException("Couldn't process Stock transaction without initialization!"); } req(); return stockParser.getParser(parser); } else if ("case".equalsIgnoreCase(name)) { if (caseParser == null) { throw new RuntimeException("Couldn't receive Case transaction without initialization!"); } req(); return caseParser.getParser(parser); } else if ("registration".equalsIgnoreCase(name)) { if (userParser == null) { throw new RuntimeException("Couldn't receive User transaction without initialization!"); } req(); return userParser.getParser(parser); } else if (FixtureIndexSchemaParser.INDICE_SCHEMA.equalsIgnoreCase(name)) { return new FixtureIndexSchemaParser(parser, fixtureSchemas, processedFixtures); } else if ("fixture".equalsIgnoreCase(name)) { String id = parser.getAttributeValue(null, "id"); String isIndexedAttr = parser.getAttributeValue(null, "indexed"); boolean isIndexed = "true".equals(isIndexedAttr); req(); processedFixtures.add(id); if (isIndexed) { FixtureIndexSchema schema = fixtureSchemas.get(id); return new IndexedFixtureXmlParser(parser, id, schema, sandbox); } else { return fixtureParser.getParser(parser); } } else if ("sync".equalsIgnoreCase(name) && "<LINK_0>".equals(namespace)) { return new TransactionParser<String>(parser) { @Override public void commit(String parsed) throws IOException { } @Override public String parse() throws InvalidStructureException, IOException, XmlPullParserException, UnfullfilledRequirementsException { this.checkNode("sync"); this.nextTag("restore_id"); String syncToken = parser.nextText(); if (syncToken == null) { throw new InvalidStructureException("Sync block must contain restore_id with valid ID inside!", parser); } sandbox.setSyncToken(syncToken); return syncToken; } }; } return null; }