code: public int getNumberOfAvailableSlotsForGroup(AbstractID groupId) {
  		synchronized (lock) {
  			Map<ResourceID, List<SharedSlot>> available = availableSlotsPerJid.get(groupId);
  
  			if (available != null) {
  				Set<SharedSlot> set = new HashSet<SharedSlot>();
  
  				for (List<SharedSlot> list : available.values()) {
  					for (SharedSlot slot : list) {
  						set.add(slot);
  					}
  				}
  
  				return set.size();
  			}
  			else {
  				// if no entry exists for a JobVertexID so far, then the vertex with that ID can
  				// add a subtask into each shared slot of this group. Consequently, all
  				// of them are available for that JobVertexID.
  				return allSlots.size();
  			}
  		}
  	}
docs: Gets the number of shared slots into which the given group can place subtasks or
  nested task groups.
  
  @param groupId The ID of the group.
  @return The number of shared slots available to the given job vertex.