#vulnerable code 
                                @Override
    public Collection<Job> ruinRoutes(Collection<VehicleRoute> vehicleRoutes) {
        if (vehicleRoutes.isEmpty()) {
            return Collections.emptyList();
        }
        int nOfJobs2BeRemoved = Math.min(ruinShareFactory.createNumberToBeRemoved(), noJobsToMemorize);
        if (nOfJobs2BeRemoved == 0) {
            return Collections.emptyList();
        }
        Job randomJob = RandomUtils.nextJob(vrp.getJobs().values(), random);
        return ruinRoutes(vehicleRoutes, randomJob, nOfJobs2BeRemoved);
    } 
                            #location 11 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Override
    public Collection<Job> ruinRoutes(Collection<VehicleRoute> vehicleRoutes) {
        if (vehicleRoutes.isEmpty()) {
            return Collections.emptyList();
        }
        int nOfJobs2BeRemoved = Math.min(ruinShareFactory.createNumberToBeRemoved(), noJobsToMemorize);
        if (nOfJobs2BeRemoved == 0) {
            return Collections.emptyList();
        }
        List<Job> jobs = getJobsWithLocation(vrp.getJobs().values());
        Job randomJob = RandomUtils.nextJob(jobs, random);
        return ruinRoutes(vehicleRoutes, randomJob, nOfJobs2BeRemoved);
    }