code: public List<ComponentDto> selectByKeysAndBranches(DbSession session, Map<String, String> branchesByKey) {
      Set<String> dbKeys = branchesByKey.entrySet().stream()
        .map(entry -> generateBranchKey(entry.getKey(), entry.getValue()))
        .collect(toSet());
      return selectByDbKeys(session, dbKeys);
    }
docs: Return list of components that will will mix main and branch components.
  Please note that a project can only appear once in the list, it's not possible to ask for many branches on same project with this method.