docs: public IndexGroup[] process(final IndexEntry[] theIndexEntries, final IndexConfiguration theIndexConfiguration,
              final Locale theLocale) {
          final IndexCollator collator = new IndexCollator(theLocale);
  
          final ArrayList<MyIndexGroup> result = new ArrayList<MyIndexGroup>();
  
          final ConfigEntry[] entries = theIndexConfiguration.getEntries();
  
          final HashMap<String, IndexEntry> indexMap = createMap(theIndexEntries);
  
          //Creating array of index groups
          for (final ConfigEntry configEntry : entries) {
              final String label = configEntry.getLabel();
              final MyIndexGroup group = new MyIndexGroup(label,configEntry);
              result.add(group);
          }
          final MyIndexGroup[] IndexGroups = (MyIndexGroup[]) result.toArray(new MyIndexGroup[result.size()]);
  
          //Adding dependecies to group array
          for (int i = 0; i < IndexGroups.length; i++) {
              final MyIndexGroup thisGroup = IndexGroups[i];
              final String[] thisGroupMembers = thisGroup.getConfigEntry().getGroupMembers();
              for (int j = 0; j < IndexGroups.length; j++) {
                  if (j != i) {
                      final MyIndexGroup compGroup = IndexGroups[j];
                      final String[] compGroupMembers = compGroup.getConfigEntry().getGroupMembers();
                      if (doesStart(compGroupMembers, thisGroupMembers)) {
                          thisGroup.addChild(compGroup);
                      }
                  }
              }
          }
  
          /*
          for (int i = 0; i < IndexGroups.length; i++) {
              IndexGroups[i].printDebug();
          }
           */
  
          for (int i = 0; i < IndexGroups.length; i++) {
              final MyIndexGroup group = IndexGroups[i];
              final ConfigEntry configEntry = group.getConfigEntry();
  
              final String[] groupMembers = configEntry.getGroupMembers();
  
              if (groupMembers.length > 0) {
                  //Find entries by comaping first letter with a chars in current config entry
                  for (final String key : new ArrayList<String>(indexMap.keySet())) {
                      if (key.length() > 0) {
                          final String value = getValue((IndexEntry) indexMap.get(key));
                          //                        final char c = value.charAt(0);
                          if (configEntry.isInRange(value,collator)) {
                              final IndexEntry entry = (IndexEntry) indexMap.remove(key);
                              group.addEntry(entry);
                          }
                      }
                  }
              } else {
                  //Get index entries by range specified by two keys
                  final String key1 = configEntry.getKey();
                  String key2 = null;
                  if ((i + 1) < entries.length) {
                      final ConfigEntry nextEntry = entries[i + 1];
                      key2 = nextEntry.getKey();
                  }
                  final String[] indexMapKeys = getIndexKeysOfIndexesInRange(key1, key2, collator, indexMap);
  
                  for (final String mapKey : indexMapKeys) {
                      final IndexEntry entry = (IndexEntry) indexMap.remove(mapKey);
                      group.addEntry(entry);
                  }
              }
              /*
              if (group.getEntries().length > 0) {
                  result.add(group);
              }
               */
          }
  
          //If some terms remain uncategorized, and a recognized special character
          //group is available, place remaining terms in that group
          for (int i = 0; i < IndexGroups.length; i++) {
              final MyIndexGroup group = IndexGroups[i];
              final ConfigEntry configEntry = group.getConfigEntry();
              final String configKey = configEntry.getKey();
              if (configKey.equals(SPECIAL_CHARACTER_GROUP_KEY)) {
                for (final String key : new ArrayList<String>(indexMap.keySet())) {
                      if (key.length() > 0) {
                          final String value = getValue((IndexEntry) indexMap.get(key));
                          //                        final char c = value.charAt(0);
                          logger.info(MessageUtils.getMessage("PDFJ003I", value).toString());
                          final IndexEntry entry = (IndexEntry) indexMap.remove(key);
                          group.addEntry(entry);
                      }
                  }
              }
          }
  
          //No recognized "Special characters" group; uncategorized terms have no place to go, must be dropped
          if (!indexMap.isEmpty()) {
              for (final String key : new ArrayList<String>(indexMap.keySet())) {
                  if (key.length() > 0) {
                      final IndexEntry entry = (IndexEntry) indexMap.get(key);
                      logger.error(MessageUtils.getMessage("PDFJ001E", entry.toString()).toString());
                  }
              }
              if (IndexPreprocessorTask.failOnError) {
                  logger.error(MessageUtils.getMessage("PDFJ002E").toString());
                  IndexPreprocessorTask.processingFaild=true;
              }
          }
  
          final ArrayList<MyIndexGroup> cleanResult = new ArrayList<MyIndexGroup>();
          for (final MyIndexGroup indexGroup : IndexGroups) {
              if (indexGroup.getEntries().length > 0) {
                  cleanResult.add(indexGroup);
              }
          }
          final MyIndexGroup[] cleanIndexGroups = (MyIndexGroup[]) cleanResult.toArray(new MyIndexGroup[cleanResult.size()]);
          return cleanIndexGroups;
      }