code: public Map<String, EntityDocument> getEntityDocumentsByTitle(
  			String siteKey, List<String> titles)
  			throws MediaWikiApiErrorException, IOException {
  		List<String> newTitles = new ArrayList<>();
  		newTitles.addAll(titles);
  		Map<String, EntityDocument> result = new HashMap<>();
  		boolean moreItems = !newTitles.isEmpty();
  
  		while (moreItems) {
  			List<String> subListOfTitles;
  			if (newTitles.size() <= maxListSize) {
  				subListOfTitles = newTitles;
  				moreItems = false;
  			} else {
  				subListOfTitles = newTitles.subList(0, maxListSize);
  			}
  			WbGetEntitiesActionData properties = new WbGetEntitiesActionData();
  			properties.titles = ApiConnection.implodeObjects(subListOfTitles);
  			properties.sites = siteKey;
  			result.putAll(getEntityDocumentMap(subListOfTitles.size(),
  					properties));
  			subListOfTitles.clear();
  		}
  		return result;
  	}
docs: Fetches the documents for the entities that have pages of the given
  titles on the given site. Site keys should be some site identifier known
  to the Wikibase site that is queried, such as "enwiki" for Wikidata.org.
  <p>
  Note: This method will not work properly if a filter is set for sites
  that excludes the requested site.
  
  @param siteKey
  wiki site id, e.g. "enwiki"
  @param titles
  list of string titles (e.g. "Douglas Adams") of requested
  entities
  @return map from titles for which data could be found to the documents
  that were retrieved
  @throws MediaWikiApiErrorException
  @throws IOException