NullPointerException in Function updatePriority

I’m getting Null Pointer Exception while trying to fetch the index of the pair.

Here is the code for Graph : https://ide.codingblocks.com/s/238043

Here is the code for Heap:

Kindly help me figure it out.

In your heap code, while removing an element you need to first swap the first and last values and then peform the downheapify but in your code you were removing the last vaue without swapping which was causing a wrong vertex to get removed from the map and hence causing null pointer exception.

public T remove() throws Exception {
		if (list.isEmpty()) {
			throw new Exception("It's Empty.");
		}

		swap(0, list.size() - 1);
		T last = list.remove(list.size() - 1);
		map.remove(last);
		if (!list.isEmpty()) {
			downHeap(0);
		}

		return last;
	}