test_class.declarator: INPUT_FILE = new File("src/test/resource/resfilter/xml/input.xml")
test_class.modifier: private static final
test_class.original_string: private static final File INPUT_FILE = new File("src/test/resource/resfilter/xml/input.xml");
test_class.type: File
test_class.var_name: INPUT_FILE
test_class.declarator: EXPECTED_WRITE_FILE = new File("src/test/resource/resfilter/xml/write-output.xml")
test_class.modifier: private static final
test_class.original_string: private static final File EXPECTED_WRITE_FILE = new File("src/test/resource/resfilter/xml/write-output.xml");
test_class.type: File
test_class.var_name: EXPECTED_WRITE_FILE
test_class.declarator: MERGE_INPUT_1_FILE = new File("src/test/resource/resfilter/xml/merge-input-1.xml")
test_class.modifier: private static final
test_class.original_string: private static final File MERGE_INPUT_1_FILE = new File("src/test/resource/resfilter/xml/merge-input-1.xml");
test_class.type: File
test_class.var_name: MERGE_INPUT_1_FILE
test_class.declarator: MERGE_INPUT_2_FILE = new File("src/test/resource/resfilter/xml/merge-input-2.xml")
test_class.modifier: private static final
test_class.original_string: private static final File MERGE_INPUT_2_FILE = new File("src/test/resource/resfilter/xml/merge-input-2.xml");
test_class.type: File
test_class.var_name: MERGE_INPUT_2_FILE
test_class.declarator: EXPECTED_MERGE_1_FILE = new File("src/test/resource/resfilter/xml/merge-output-1.xml")
test_class.modifier: private static final
test_class.original_string: private static final File EXPECTED_MERGE_1_FILE = new File("src/test/resource/resfilter/xml/merge-output-1.xml");
test_class.type: File
test_class.var_name: EXPECTED_MERGE_1_FILE
test_class.declarator: EXPECTED_MERGE_2_FILE = new File("src/test/resource/resfilter/xml/merge-output-2.xml")
test_class.modifier: private static final
test_class.original_string: private static final File EXPECTED_MERGE_2_FILE = new File("src/test/resource/resfilter/xml/merge-output-2.xml");
test_class.type: File
test_class.var_name: EXPECTED_MERGE_2_FILE
test_class.declarator: EXPECTED_INPUT_RES_LIST
test_class.modifier: private static final
test_class.original_string: private static final Collection<ResourceString> EXPECTED_INPUT_RES_LIST;
test_class.type: Collection<ResourceString>
test_class.var_name: EXPECTED_INPUT_RES_LIST
test_class.declarator: WRITE_BUNDLE
test_class.modifier: private static
test_class.original_string: private static LanguageBundle WRITE_BUNDLE;
test_class.type: LanguageBundle
test_class.var_name: WRITE_BUNDLE
test_class.declarator: MERGE_BUNDLE
test_class.modifier: private static
test_class.original_string: private static LanguageBundle MERGE_BUNDLE;
test_class.type: LanguageBundle
test_class.var_name: MERGE_BUNDLE
test_class.declarator: res = new AndroidStringsResource()
test_class.modifier: private static final
test_class.original_string: private static final AndroidStringsResource res = new AndroidStringsResource();
test_class.type: AndroidStringsResource
test_class.var_name: res
test_class.file: gp-res-filter/src/test/java/com/ibm/g11n/pipeline/resfilter/impl/AndroidStringsResourceTest.java
test_class.identifier: AndroidStringsResourceTest
test_case.body: @Test
      public void testParse() throws IOException, ResourceFilterException {
          assertTrue("The input test file <" + INPUT_FILE + "> does not exist.", INPUT_FILE.exists());
  
          try (InputStream is = new FileInputStream(INPUT_FILE)) {
              LanguageBundle bundle = res.parse(is, null);
              List<ResourceString> resStrList = new ArrayList<>(bundle.getResourceStrings());
              Collections.sort(resStrList, new ResourceStringComparator());
              assertEquals("ResourceStrings did not match.", EXPECTED_INPUT_RES_LIST, resStrList);
          }
      }
test_case.class_method_signature: AndroidStringsResourceTest.testParse()
test_case.full_signature: @Test public void testParse()
test_case.identifier: testParse
test_case.invocations: assertTrue exists parse getResourceStrings sort assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testParse()
focal_class.declarator: CHAR_SET = "UTF-8"
focal_class.modifier: private static final
focal_class.original_string: private static final String CHAR_SET = "UTF-8";
focal_class.type: String
focal_class.var_name: CHAR_SET
focal_class.declarator: RESOURCES_STRING = "resources"
focal_class.modifier: private static final
focal_class.original_string: private static final String RESOURCES_STRING = "resources";
focal_class.type: String
focal_class.var_name: RESOURCES_STRING
focal_class.declarator: NAME_STRING = "name"
focal_class.modifier: private static final
focal_class.original_string: private static final String NAME_STRING = "name";
focal_class.type: String
focal_class.var_name: NAME_STRING
focal_class.declarator: STR_STRING = "string"
focal_class.modifier: private static final
focal_class.original_string: private static final String STR_STRING = "string";
focal_class.type: String
focal_class.var_name: STR_STRING
focal_class.declarator: STR_ARRAY = "string-array"
focal_class.modifier: private static final
focal_class.original_string: private static final String STR_ARRAY = "string-array";
focal_class.type: String
focal_class.var_name: STR_ARRAY
focal_class.declarator: PLURAL_STRING = "plural"
focal_class.modifier: private static final
focal_class.original_string: private static final String PLURAL_STRING = "plural";
focal_class.type: String
focal_class.var_name: PLURAL_STRING
focal_class.declarator: PLURALS_STRING = "plurals"
focal_class.modifier: private static final
focal_class.original_string: private static final String PLURALS_STRING = "plurals";
focal_class.type: String
focal_class.var_name: PLURALS_STRING
focal_class.declarator: QUANTITY_STRING = "quantity"
focal_class.modifier: private static final
focal_class.original_string: private static final String QUANTITY_STRING = "quantity";
focal_class.type: String
focal_class.var_name: QUANTITY_STRING
focal_class.declarator: ITEM_STRING = "item"
focal_class.modifier: private static final
focal_class.original_string: private static final String ITEM_STRING = "item";
focal_class.type: String
focal_class.var_name: ITEM_STRING
focal_class.declarator: STR_ARRAY_OPEN_TAG_PTRN = "^(\\s*<string-array\\s*name=\".*\">).*"
focal_class.modifier: private static final
focal_class.original_string: private static final String STR_ARRAY_OPEN_TAG_PTRN = "^(\\s*<string-array\\s*name=\".*\">).*";
focal_class.type: String
focal_class.var_name: STR_ARRAY_OPEN_TAG_PTRN
focal_class.declarator: STR_ARRAY_CLOSE_TAG_PTRN = ".*(\\s*</string-array\\s*>)$"
focal_class.modifier: private static final
focal_class.original_string: private static final String STR_ARRAY_CLOSE_TAG_PTRN = ".*(\\s*</string-array\\s*>)$";
focal_class.type: String
focal_class.var_name: STR_ARRAY_CLOSE_TAG_PTRN
focal_class.declarator: STR_OPEN_TAG_PTRN = "^(\\s*<string\\s*name=\".*\">).*"
focal_class.modifier: private static final
focal_class.original_string: private static final String STR_OPEN_TAG_PTRN = "^(\\s*<string\\s*name=\".*\">).*";
focal_class.type: String
focal_class.var_name: STR_OPEN_TAG_PTRN
focal_class.declarator: STR_CLOSE_TAG_PTRN = ".*(\\s*</string\\s*>)$"
focal_class.modifier: private static final
focal_class.original_string: private static final String STR_CLOSE_TAG_PTRN = ".*(\\s*</string\\s*>)$";
focal_class.type: String
focal_class.var_name: STR_CLOSE_TAG_PTRN
focal_class.declarator: PLURALS_OPEN_TAG_PTRN = "^(\\s*<plurals\\s*name=\".*\">).*"
focal_class.modifier: private static final
focal_class.original_string: private static final String PLURALS_OPEN_TAG_PTRN = "^(\\s*<plurals\\s*name=\".*\">).*";
focal_class.type: String
focal_class.var_name: PLURALS_OPEN_TAG_PTRN
focal_class.declarator: PLURALS_CLOSE_TAG_PTRN = ".*(\\s*</plurals\\s*>)$"
focal_class.modifier: private static final
focal_class.original_string: private static final String PLURALS_CLOSE_TAG_PTRN = ".*(\\s*</plurals\\s*>)$";
focal_class.type: String
focal_class.var_name: PLURALS_CLOSE_TAG_PTRN
focal_class.declarator: PLURAL_ENTIRY_PTRN = "{0}, plural, {1}"
focal_class.modifier: private static final
focal_class.original_string: private static final String PLURAL_ENTIRY_PTRN = "{0}, plural, {1}";
focal_class.type: String
focal_class.var_name: PLURAL_ENTIRY_PTRN
focal_class.file: gp-res-filter/src/main/java/com/ibm/g11n/pipeline/resfilter/impl/AndroidStringsResource.java
focal_class.identifier: AndroidStringsResource
focal_class.class_method_signature: AndroidStringsResource.parse(InputStream inStream, FilterOptions options)
focal_class.full_signature: @Override public LanguageBundle parse(InputStream inStream, FilterOptions options)
focal_class.identifier: parse
focal_class.modifiers: @Override public
focal_class.parameters: (InputStream inStream, FilterOptions options)
focal_class.return: LanguageBundle
focal_class.signature: LanguageBundle parse(InputStream inStream, FilterOptions options)
focal_class.class_method_signature: AndroidStringsResource.collectResourceStrings(NodeList nodeList, int startSeqNum, Collection<ResourceString> resStrings)
focal_class.full_signature: private int collectResourceStrings(NodeList nodeList, int startSeqNum, Collection<ResourceString> resStrings)
focal_class.identifier: collectResourceStrings
focal_class.modifiers: private
focal_class.parameters: (NodeList nodeList, int startSeqNum, Collection<ResourceString> resStrings)
focal_class.return: int
focal_class.signature: int collectResourceStrings(NodeList nodeList, int startSeqNum, Collection<ResourceString> resStrings)
focal_class.class_method_signature: AndroidStringsResource.write(OutputStream outStream, LanguageBundle languageBundle, FilterOptions options)
focal_class.full_signature: @Override public void write(OutputStream outStream, LanguageBundle languageBundle, FilterOptions options)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (OutputStream outStream, LanguageBundle languageBundle, FilterOptions options)
focal_class.return: void
focal_class.signature: void write(OutputStream outStream, LanguageBundle languageBundle, FilterOptions options)
focal_class.class_method_signature: AndroidStringsResource.merge(InputStream baseStream, OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.full_signature: @Override public void merge(InputStream baseStream, OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.identifier: merge
focal_class.modifiers: @Override public
focal_class.parameters: (InputStream baseStream, OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.return: void
focal_class.signature: void merge(InputStream baseStream, OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.class_method_signature: AndroidStringsResource.getTabStr(String str)
focal_class.full_signature: static String getTabStr(String str)
focal_class.identifier: getTabStr
focal_class.modifiers: static
focal_class.parameters: (String str)
focal_class.return: String
focal_class.signature: String getTabStr(String str)
focal_class.class_method_signature: AndroidStringsResource.getSpacesSize(String whitespace)
focal_class.full_signature: static int getSpacesSize(String whitespace)
focal_class.identifier: getSpacesSize
focal_class.modifiers: static
focal_class.parameters: (String whitespace)
focal_class.return: int
focal_class.signature: int getSpacesSize(String whitespace)
focal_class.class_method_signature: AndroidStringsResource.formatMessage(String openingTag, String message, String closingTag, String whitespace,
              BreakIterator brkItr)
focal_class.full_signature: static String formatMessage(String openingTag, String message, String closingTag, String whitespace,
              BreakIterator brkItr)
focal_class.identifier: formatMessage
focal_class.modifiers: static
focal_class.parameters: (String openingTag, String message, String closingTag, String whitespace,
              BreakIterator brkItr)
focal_class.return: String
focal_class.signature: String formatMessage(String openingTag, String message, String closingTag, String whitespace,
              BreakIterator brkItr)
focal_class.class_method_signature: AndroidStringsResource.containPluralString(String inputString)
focal_class.full_signature: static boolean containPluralString(String inputString)
focal_class.identifier: containPluralString
focal_class.modifiers: static
focal_class.parameters: (String inputString)
focal_class.return: boolean
focal_class.signature: boolean containPluralString(String inputString)
focal_class.class_method_signature: AndroidStringsResource.getPluralString(String inputString)
focal_class.full_signature: static String getPluralString(String inputString)
focal_class.identifier: getPluralString
focal_class.modifiers: static
focal_class.parameters: (String inputString)
focal_class.return: String
focal_class.signature: String getPluralString(String inputString)
focal_class.class_method_signature: AndroidStringsResource.getPluralCategories(String inputString)
focal_class.full_signature: static Map<String, String> getPluralCategories(String inputString)
focal_class.identifier: getPluralCategories
focal_class.modifiers: static
focal_class.parameters: (String inputString)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> getPluralCategories(String inputString)
focal_class.superclass: extends ResourceFilter
focal_method.body: @Override
      public LanguageBundle parse(InputStream inStream, FilterOptions options)
              throws IOException, ResourceFilterException {
  
          DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
          DocumentBuilder builder = null;
          try {
              builder = factory.newDocumentBuilder();
          } catch (ParserConfigurationException e) {
              // runtime problem
              throw new ResourceFilterException(e);
          }
  
          Document document = null;
          try {
              document = builder.parse(inStream);
          } catch (SAXException e) {
              throw new IllegalResourceFormatException(e);
          }
  
          Element elem = document.getDocumentElement();
          NodeList nodeList = elem.getChildNodes();
          List<ResourceString> resStrings = new LinkedList<>();
          collectResourceStrings(nodeList, 1 /* the first sequence number */, resStrings);
  
          LanguageBundle bundle = new LanguageBundle();
          bundle.setResourceStrings(resStrings);
  
          return bundle;
      }
focal_method.class_method_signature: AndroidStringsResource.parse(InputStream inStream, FilterOptions options)
focal_method.full_signature: @Override public LanguageBundle parse(InputStream inStream, FilterOptions options)
focal_method.identifier: parse
focal_method.invocations: newInstance newDocumentBuilder parse getDocumentElement getChildNodes collectResourceStrings setResourceStrings
focal_method.modifiers: @Override public
focal_method.parameters: (InputStream inStream, FilterOptions options)
focal_method.return: LanguageBundle
focal_method.signature: LanguageBundle parse(InputStream inStream, FilterOptions options)