Source:
<code>public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { long startTime = System.currentTimeMillis(); TeeHttpServletRequest req = new TeeHttpServletRequest( (HttpServletRequest) request); TeeHttpServletResponse resp = new TeeHttpServletResponse( (HttpServletResponse) response); try { MDC.put("requestType", "req"); String requestUUID = UUID.randomUUID().toString(); MDC.put("requestUuid", requestUUID); String correlationId = ""; Enumeration<String> headerNames = (Enumeration<String>) ((HttpServletRequest) request) .getHeaderNames(); while (headerNames.hasMoreElements()) { String name = (String) headerNames.nextElement(); if ("X-Correlation-ID".equalsIgnoreCase(name)) { correlationId = ((HttpServletRequest) request).getHeader(name); } } if (StringUtils.isAlphanumeric(correlationId) && correlationId.length() <= CORRELATION_ID_LENGTH) { <START> MDC.put("csid", correlationId); <END> } else if (!StringUtils.isBlank(correlationId)) { log.info("Correlation Id must be alphanumeric and contain or fewer characters.", CORRELATION_ID_LENGTH); } req.setAttribute("requestUuid", requestUUID); resp.setHeader(customHeaderName, requestUUID); if (log.isDebugEnabled()) { log.debug("{}", ServletLogger.logRequest(req)); } else { log.info("{}", ServletLogger.logBasicRequestInfo(req)); } chain.doFilter(req, resp); if (log.isDebugEnabled()) { log.debug("{}", ServletLogger.logResponse(resp, startTime)); } else { log.info("{}", ServletLogger.logBasicResponseInfo(resp, startTime)); } resp.finish(); } finally { MDC.clear(); } }</code><technical_language>Please a constant for "csid"</technical_language>

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { long startTime = System.currentTimeMillis(); TeeHttpServletRequest req = new TeeHttpServletRequest( (HttpServletRequest) request); TeeHttpServletResponse resp = new TeeHttpServletResponse( (HttpServletResponse) response); try { MDC.put("requestType", "req"); String requestUUID = UUID.randomUUID().toString(); MDC.put("requestUuid", requestUUID); String correlationId = ""; Enumeration<String> headerNames = (Enumeration<String>) ((HttpServletRequest) request) .getHeaderNames(); while (headerNames.hasMoreElements()) { String name = (String) headerNames.nextElement(); if ("X-Correlation-ID".equalsIgnoreCase(name)) { correlationId = ((HttpServletRequest) request).getHeader(name); } } if (StringUtils.isAlphanumeric(correlationId) && correlationId.length() <= CORRELATION_ID_LENGTH) { MDC.put(CSID, correlationId); } else if (!StringUtils.isBlank(correlationId)) { log.info("Correlation Id must be alphanumeric and contain or fewer characters.", CORRELATION_ID_LENGTH); } req.setAttribute("requestUuid", requestUUID); resp.setHeader(customHeaderName, requestUUID); if (log.isDebugEnabled()) { log.debug("{}", ServletLogger.logRequest(req)); } else { log.info("{}", ServletLogger.logBasicRequestInfo(req)); } chain.doFilter(req, resp); if (log.isDebugEnabled()) { log.debug("{}", ServletLogger.logResponse(resp, startTime)); } else { log.info("{}", ServletLogger.logBasicResponseInfo(resp, startTime)); } resp.finish(); } finally { MDC.clear(); } }