code: private Map<Integer,Set<Integer>> getCategoryArticleMap(Wikipedia pWiki, Set<Integer> pNodes) throws WikiPageNotFoundException {
          Map<Integer,Set<Integer>> categoryArticleMap = new HashMap<Integer,Set<Integer>>();
  
          int progress = 0;
          for (int node : pNodes) {
              progress++;
              ApiUtilities.printProgressInfo(progress, pNodes.size(), 10, ApiUtilities.ProgressInfoMode.TEXT, "Getting category-article map.");
  
              Category cat = pWiki.getCategory(node);
              if (cat != null) {
                  Set<Integer> pages = new HashSet<Integer>(cat.__getPages());
                  categoryArticleMap.put(node, pages);
              }
              else {
                  logger.info("{} is not a category.", node);
              }
          }
  
          return categoryArticleMap;
      }
docs: Building a mapping from categories to article sets.
  @param pWiki The wikipedia object.
  @param pNodes The category nodes that should be used to build the map.
  @return A mapping from categories to article sets.
  @throws WikiPageNotFoundException