#vulnerable code 
                                @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    public OverrideDTO detailOverride(@PathVariable String id, @PathVariable String env) {
        Override override = overrideService.findById(id);
        if (override == null) {
            //TODO throw exception
        }
        OverrideDTO overrideDTO = new OverrideDTO();
        overrideDTO.setAddress(override.getAddress());
        overrideDTO.setApp(override.getApplication());
        overrideDTO.setEnabled(override.isEnabled());
        overrideDTO.setService(override.getService());
        paramsToOverrideDTO(override, overrideDTO);
        return overrideDTO;
    } 
                            #location 8 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    public OverrideDTO detailOverride(@PathVariable String id, @PathVariable String env) {
        Override override = overrideService.findById(id);
        if (override == null) {
            throw new ResourceNotFoundException("Unknown ID!");
        }
        OverrideDTO overrideDTO = new OverrideDTO();
        overrideDTO.setAddress(override.getAddress());
        overrideDTO.setApp(override.getApplication());
        overrideDTO.setEnabled(override.isEnabled());
        overrideDTO.setService(override.getService());
        paramsToOverrideDTO(override, overrideDTO);
        return overrideDTO;
    }