#fixed code
                                public void read(String filename){
        BufferedReader reader = getBufferedReader(filename);
        String line;
        Coordinate[] coords = null;
        int[] demands = null;
        Integer capacity = null;
        List<Integer> depotIds = new ArrayList<Integer>();
        boolean isCoordSection = false;
        boolean isDemandSection = false;
        boolean isDepotSection = false;
        int dimensions = 0;
        while( ( line = getLine(reader) ) != null ){
            if(line.startsWith("EOF")){
                break;
            }
            if(line.startsWith("DIMENSION")){
                String[] tokens = line.split(":");
                String dim = tokens[1].trim();
                dimensions = Integer.parseInt(dim);
                coords = new Coordinate[dimensions];
                demands = new int[dimensions];
                continue;
            }
            if(line.startsWith("CAPACITY")){
                String[] tokens = line.split(":");
                capacity = Integer.parseInt(tokens[1].trim());
                continue;
            }
            if(line.startsWith("NODE_COORD_SECTION")){
                isCoordSection = true;
                isDemandSection = false;
                isDepotSection = false;
                continue;
            }
            if(line.startsWith("DEMAND_SECTION")){
                isDemandSection = true;
                isCoordSection = false;
                isDepotSection = false;
                continue;
            }
            if(line.startsWith("DEPOT_SECTION")){
                isDepotSection = true;
                isDemandSection = false;
                isCoordSection = false;
                continue;
            }
            if(isCoordSection){
                if(coords == null) throw new IllegalStateException("DIMENSION tag missing");
                String[] tokens = line.trim().split("\\s+");
                coords[Integer.parseInt(tokens[0]) - 1] = Coordinate.newInstance(Double.parseDouble(tokens[1]), Double.parseDouble(tokens[2]));
                continue;
            }
            if(isDemandSection){
                if(demands == null) throw new IllegalStateException("DIMENSION tag missing");
                String[] tokens = line.trim().split("\\s+");
                demands[Integer.parseInt(tokens[0]) - 1] = Integer.parseInt(tokens[1]);
                continue;
            }
            if(isDepotSection){
                if(line.equals("-1")){
                    isDepotSection = false;
                }
                else{
                    depotIds.add(Integer.parseInt(line));
                }
            }
        }
        close(reader);
        vrpBuilder.setFleetSize(VehicleRoutingProblem.FleetSize.INFINITE);
        for(Integer depotId : depotIds){
            VehicleTypeImpl type = VehicleTypeImpl.Builder.newInstance("typeId").addCapacityDimension(0,capacity).build();
            VehicleImpl vehicle = VehicleImpl.Builder.newInstance("vehicle").setStartLocationId(depotId.toString())
                    .setStartLocationCoordinate(coords[depotId - 1]).setType(type).build();
            vrpBuilder.addVehicle(vehicle);
        }

        for (int i = 0; i < coords.length; i++) {
            String id = "" + (i + 1);
            if(depotIds.isEmpty()){
                if(i==0) {
                    VehicleImpl vehicle = VehicleImpl.Builder.newInstance("start")
                            .setStartLocation(Location.Builder.newInstance().setId(id)
                                    .setCoordinate(coords[i]).build())
                                    .build();
                    vrpBuilder.addVehicle(vehicle);
                    continue;
                }
            }
            Service service = Service.Builder.newInstance(id)
                    .setLocation(Location.Builder.newInstance().setId(id).setCoordinate(coords[i]).build())
                    .addSizeDimension(0, demands[i]).build();
            vrpBuilder.addJob(service);
        }



    }
#vulnerable code 
                                public void read(String filename){
        BufferedReader reader = getBufferedReader(filename);
        String line;
        Coordinate[] coords = null;
        Integer[] demands = null;
        Integer capacity = null;
        List<Integer> depotIds = new ArrayList<Integer>();
        boolean isCoordSection = false;
        boolean isDemandSection = false;
        boolean isDepotSection = false;
        while( ( line = getLine(reader) ) != null ){
            if(line.startsWith("DIMENSION")){
                String[] tokens = line.split(":");
                String dim = tokens[1].trim();
                coords = new Coordinate[Integer.parseInt(dim)];
                demands = new Integer[Integer.parseInt(dim)];
                continue;
            }
            if(line.startsWith("CAPACITY")){
                String[] tokens = line.split(":");
                capacity = Integer.parseInt(tokens[1].trim());
                continue;
            }
            if(line.startsWith("NODE_COORD_SECTION")){
                isCoordSection = true;
                isDemandSection = false;
                isDepotSection = false;
                continue;
            }
            if(line.startsWith("DEMAND_SECTION")){
                isDemandSection = true;
                isCoordSection = false;
                isDepotSection = false;
                continue;
            }
            if(line.startsWith("DEPOT_SECTION")){
                isDepotSection = true;
                isDemandSection = false;
                isCoordSection = false;
                continue;
            }
            if(isCoordSection){
                if(coords == null) throw new IllegalStateException("DIMENSION tag missing");
                String[] tokens = line.split("\\s+");
                coords[Integer.parseInt(tokens[0]) - 1] = Coordinate.newInstance(Double.parseDouble(tokens[1]), Double.parseDouble(tokens[2]));
                continue;
            }
            if(isDemandSection){
                if(demands == null) throw new IllegalStateException("DIMENSION tag missing");
                String[] tokens = line.split("\\s+");
                demands[Integer.parseInt(tokens[0]) - 1] = Integer.parseInt(tokens[1]);
                continue;
            }
            if(isDepotSection){
                if(line.equals("-1")){
                    isDepotSection = false;
                }
                else{
                    depotIds.add(Integer.parseInt(line));
                }
            }
        }
        close(reader);
        vrpBuilder.setFleetSize(VehicleRoutingProblem.FleetSize.INFINITE);
        for(Integer depotId : depotIds){
            VehicleTypeImpl type = VehicleTypeImpl.Builder.newInstance("typeId").addCapacityDimension(0,capacity).build();
            VehicleImpl vehicle = VehicleImpl.Builder.newInstance("vehicle").setStartLocationId(depotId.toString())
                    .setStartLocationCoordinate(coords[depotId - 1]).setType(type).build();
            vrpBuilder.addVehicle(vehicle);
        }
        for(int i=0;i<demands.length;i++){
            if(demands[i] == 0) continue;
            String id = "" + (i+1);
            Service service = Service.Builder.newInstance(id).setLocationId(id).setCoord(coords[i]).addSizeDimension(0,demands[i]).build();
            vrpBuilder.addJob(service);
        }

    } 
                            #location 71 
                            #vulnerability type NULL_DEREFERENCE