code: public void addVertex(JobVertex vertex) {
  		final JobVertexID id = vertex.getID();
  		JobVertex previous = taskVertices.put(id, vertex);
  
  		// if we had a prior association, restore and throw an exception
  		if (previous != null) {
  			taskVertices.put(id, previous);
  			throw new IllegalArgumentException("The JobGraph already contains a vertex with that id.");
  		}
  	}
docs: Adds a new task vertex to the job graph if it is not already included.
  
  @param vertex
  the new task vertex to be added