#vulnerable code 
                             public static UriComponentsBuilder getBuilder() {

		if (RequestContextHolder.getRequestAttributes() == null) {
			return UriComponentsBuilder.fromPath("/");
		}

		HttpServletRequest request = getCurrentRequest();
		ServletUriComponentsBuilder builder = ServletUriComponentsBuilder.fromServletMapping(request);

		// Spring 5.1 can handle X-Forwarded-Ssl headers...
		if (isSpringAtLeast5_1()) {
			return builder;
		} else {
			return handleXForwardedSslHeader(request, builder);
		}
	} 
                            #location 14 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             public static UriComponentsBuilder getBuilder() {

		if (RequestContextHolder.getRequestAttributes() == null) {
			return UriComponentsBuilder.fromPath("/");
		}

		return ServletUriComponentsBuilder.fromServletMapping(getCurrentRequest());
	}