#vulnerable code 
                              @Override
		public void informJobInserted(Job job2insert, VehicleRoute inRoute, double additionalCosts, double additionalTime) {
			if(job2insert instanceof Delivery){
				int loadAtDepot = (int) stateManager.getRouteState(inRoute, StateIdFactory.LOAD_AT_DEPOT).toDouble();
//				log.info("loadAtDepot="+loadAtDepot);
				stateManager.putRouteState(inRoute, StateIdFactory.LOAD_AT_DEPOT, new StateImpl(loadAtDepot + job2insert.getCapacityDemand()));
			}
			else if(job2insert instanceof Pickup || job2insert instanceof Service){
				int loadAtEnd = (int) stateManager.getRouteState(inRoute, StateIdFactory.LOAD).toDouble();
//				log.info("loadAtEnd="+loadAtEnd);
				stateManager.putRouteState(inRoute, StateIdFactory.LOAD, new StateImpl(loadAtEnd + job2insert.getCapacityDemand()));
			}
		} 
                            #location 4 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                              @Override
		public void informJobInserted(Job job2insert, VehicleRoute inRoute, double additionalCosts, double additionalTime) {
			if(job2insert instanceof Delivery){
				int loadAtDepot = (int) stateManager.getRouteState(inRoute, StateIdFactory.LOAD_AT_BEGINNING).toDouble();
//				log.info("loadAtDepot="+loadAtDepot);
				stateManager.putRouteState(inRoute, StateIdFactory.LOAD_AT_BEGINNING, new StateImpl(loadAtDepot + job2insert.getCapacityDemand()));
			}
			else if(job2insert instanceof Pickup || job2insert instanceof Service){
				int loadAtEnd = (int) stateManager.getRouteState(inRoute, StateIdFactory.LOAD).toDouble();
//				log.info("loadAtEnd="+loadAtEnd);
				stateManager.putRouteState(inRoute, StateIdFactory.LOAD, new StateImpl(loadAtEnd + job2insert.getCapacityDemand()));
			}
		}