int sumHotWater = CalculateSumHotWater(hotwater_map);
double hotwater = 0;
if (sumHotWater != 0) {
hotwater = (applianceTotal.get("Hotwater").doubleValue()); // null pointer exception here
if (hotwater != 0.0) {
hotwater /= sumHotWater;
}
}
applianceTotal.get("Hotwat
yields you anything. what do you expect it to get you ?