code: private int getAvailableSlots(TaskTrackerStatus tts, TaskType type) {
      return getMaxSlots(tts, type) - occupiedSlotsAfterHeartbeat(tts, type);
    }
docs: Obtain the how many more slots can be scheduled on this tasktracker
  @param tts The status of the tasktracker
  @param type The type of the task to be scheduled
  @return the number of tasks can be scheduled