Source:
private static TransactionParserFactory getFactory(final SQLiteDatabase db, final boolean bulkProcessingEnabled) { final Hashtable<String, String> formInstanceNamespaces; if (CommCareApplication.instance().getCurrentApp() != null) { formInstanceNamespaces = FormSaveUtil.getNamespaceToFilePathMap(CommCareApplication.instance()); } else { formInstanceNamespaces = null; } return new TransactionParserFactory() { @Override public TransactionParser getParser(KXmlParser parser) { String namespace = parser.getNamespace(); if (namespace != null && formInstanceNamespaces != null && formInstanceNamespaces.containsKey(namespace)) { return new FormInstanceXmlParser(parser, CommCareApplication.instance(), Collections.unmodifiableMap(formInstanceNamespaces), CommCareApplication.instance().getCurrentApp().fsPath(GlobalConstants.FILE_CC_FORMS)); } else if(CaseXmlParser.CASE_XML_NAMESPACE.equals(parser.getNamespace()) && "case".equalsIgnoreCase(parser.getName())) { if(bulkProcessingEnabled) { return new AndroidBulkCaseXmlParser(parser, getCaseStorage(db), new EntityStorageCache("case", db, ReportingUtils.getAppId()), new AndroidCaseIndexTable(db)) { @Override protected SQLiteDatabase getDbHandle() { return db; } }; } else { return new AndroidCaseXmlParser(parser, getCaseStorage(db), new EntityStorageCache("case", db, ReportingUtils.getAppId()), new AndroidCaseIndexTable(db)) { @Override protected SQLiteDatabase getDbHandle() { return db; } }; } } else if (LedgerXmlParsers.STOCK_XML_NAMESPACE.equals(namespace)) { return new LedgerXmlParsers(parser, getLedgerStorage(db)); } return null; } }; }

Target:
private static TransactionParserFactory getFactory(final SQLiteDatabase db, final boolean bulkProcessingEnabled) { final Hashtable<String, String> formInstanceNamespaces; if (CommCareApplication.instance().getCurrentApp() != null) { formInstanceNamespaces = FormSaveUtil.getNamespaceToFilePathMap(CommCareApplication.instance()); } else { formInstanceNamespaces = null; } return new TransactionParserFactory() { @Override public TransactionParser getParser(KXmlParser parser) { String namespace = parser.getNamespace(); if (namespace != null && formInstanceNamespaces != null && formInstanceNamespaces.containsKey(namespace)) { return new FormInstanceXmlParser(parser, CommCareApplication.instance(), Collections.unmodifiableMap(formInstanceNamespaces), CommCareApplication.instance().getCurrentApp().fsPath(GlobalConstants.FILE_CC_FORMS)); } else if (CaseXmlParser.CASE_XML_NAMESPACE.equals(parser.getNamespace()) && "case".equalsIgnoreCase(parser.getName())) { EntityStorageCache entityStorageCache = null; if (CommCareApplication.instance().getCurrentApp() != null) { entityStorageCache = new EntityStorageCache("case", db, AppUtils.getCurrentAppId()); } if (bulkProcessingEnabled) { return new AndroidBulkCaseXmlParser(parser, getCaseStorage(db), entityStorageCache, new AndroidCaseIndexTable(db)) { @Override protected SQLiteDatabase getDbHandle() { return db; } }; } else { return new AndroidCaseXmlParser(parser, getCaseStorage(db), entityStorageCache, new AndroidCaseIndexTable(db)) { @Override protected SQLiteDatabase getDbHandle() { return db; } }; } } else if (LedgerXmlParsers.STOCK_XML_NAMESPACE.equals(namespace)) { return new LedgerXmlParsers(parser, getLedgerStorage(db)); } return null; } }; }