test_class.file: agent/plugins/servlet-plugin/src/test/java/org/glowroot/agent/plugin/servlet/_/ServletMessageSupplierTest.java
test_class.identifier: ServletMessageSupplierTest
test_case.body: @Test
      public void shouldNotMaskStrange() {
          // given
          List<Pattern> maskPatterns = ImmutableList.of(Pattern.compile(".*password.*"));
          String requestQueryString = "test=one&&&===&=&xpassworry=no=mask&&&==&test=two";
          // when
          String maskRequestQueryString =
                  ServletMessageSupplier.maskRequestQueryString(requestQueryString, maskPatterns);
          // then
          assertThat(maskRequestQueryString)
                  .isEqualTo("test=one&&&===&=&xpassworry=no=mask&&&==&test=two");
      }
test_case.class_method_signature: ServletMessageSupplierTest.shouldNotMaskStrange()
test_case.full_signature: @Test public void shouldNotMaskStrange()
test_case.identifier: shouldNotMaskStrange
test_case.invocations: of compile maskRequestQueryString isEqualTo assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldNotMaskStrange()
focal_class.declarator: MASK_TEXT = "****"
focal_class.modifier: private static final
focal_class.original_string: private static final String MASK_TEXT = "****";
focal_class.type: String
focal_class.var_name: MASK_TEXT
focal_class.declarator: requestMethod
focal_class.modifier: private final
focal_class.original_string: private final String requestMethod;
focal_class.type: String
focal_class.var_name: requestMethod
focal_class.declarator: requestContextPath
focal_class.modifier: private final
focal_class.original_string: private final String requestContextPath;
focal_class.type: String
focal_class.var_name: requestContextPath
focal_class.declarator: requestServletPath
focal_class.modifier: private final
focal_class.original_string: private final String requestServletPath;
focal_class.type: String
focal_class.var_name: requestServletPath
focal_class.declarator: requestPathInfo
focal_class.modifier: private final @Nullable
focal_class.original_string: private final @Nullable String requestPathInfo;
focal_class.type: String
focal_class.var_name: requestPathInfo
focal_class.declarator: requestUri
focal_class.modifier: private final
focal_class.original_string: private final String requestUri;
focal_class.type: String
focal_class.var_name: requestUri
focal_class.declarator: requestQueryString
focal_class.modifier: private final @Nullable
focal_class.original_string: private final @Nullable String requestQueryString;
focal_class.type: String
focal_class.var_name: requestQueryString
focal_class.declarator: requestParameters
focal_class.modifier: private volatile @MonotonicNonNull
focal_class.original_string: private volatile @MonotonicNonNull Map<String, Object> requestParameters;
focal_class.type: Map<String, Object>
focal_class.var_name: requestParameters
focal_class.declarator: requestHeaders
focal_class.modifier: private final
focal_class.original_string: private final Map<String, Object> requestHeaders;
focal_class.type: Map<String, Object>
focal_class.var_name: requestHeaders
focal_class.declarator: requestHostAndPortDetail
focal_class.modifier: private final @Nullable
focal_class.original_string: private final @Nullable RequestHostAndPortDetail requestHostAndPortDetail;
focal_class.type: RequestHostAndPortDetail
focal_class.var_name: requestHostAndPortDetail
focal_class.declarator: responseCode
focal_class.modifier: private volatile
focal_class.original_string: private volatile int responseCode;
focal_class.type: int
focal_class.var_name: responseCode
focal_class.declarator: responseHeaderComponent = new ResponseHeaderComponent()
focal_class.modifier: private final
focal_class.original_string: private final ResponseHeaderComponent responseHeaderComponent = new ResponseHeaderComponent();
focal_class.type: ResponseHeaderComponent
focal_class.var_name: responseHeaderComponent
focal_class.declarator: sessionAttributeInitialValueMap
focal_class.modifier: private final
focal_class.original_string: private final Map<String, String> sessionAttributeInitialValueMap;
focal_class.type: Map<String, String>
focal_class.var_name: sessionAttributeInitialValueMap
focal_class.declarator: sessionAttributeUpdatedValueMap
focal_class.modifier: private volatile @MonotonicNonNull
focal_class.original_string: private volatile @MonotonicNonNull ConcurrentMap<String, Optional<String>> sessionAttributeUpdatedValueMap;
focal_class.type: ConcurrentMap<String, Optional<String>>
focal_class.var_name: sessionAttributeUpdatedValueMap
focal_class.declarator: jaxRsParts
focal_class.modifier: private @Nullable
focal_class.original_string: private @Nullable List<String> jaxRsParts;
focal_class.type: List<String>
focal_class.var_name: jaxRsParts
focal_class.file: agent/plugins/servlet-plugin/src/main/java/org/glowroot/agent/plugin/servlet/_/ServletMessageSupplier.java
focal_class.identifier: ServletMessageSupplier
focal_class.interfaces: implements ServletRequestInfo
focal_class.class_method_signature: ServletMessageSupplier.ServletMessageSupplier(String requestMethod, String requestContextPath,
              String requestServletPath, @Nullable String requestPathInfo, String requestUri,
              @Nullable String requestQueryString, Map<String, Object> requestHeaders,
              @Nullable RequestHostAndPortDetail requestHostAndPortDetail,
              Map<String, String> sessionAttributeMap)
focal_class.full_signature: public  ServletMessageSupplier(String requestMethod, String requestContextPath,
              String requestServletPath, @Nullable String requestPathInfo, String requestUri,
              @Nullable String requestQueryString, Map<String, Object> requestHeaders,
              @Nullable RequestHostAndPortDetail requestHostAndPortDetail,
              Map<String, String> sessionAttributeMap)
focal_class.identifier: ServletMessageSupplier
focal_class.modifiers: public
focal_class.parameters: (String requestMethod, String requestContextPath,
              String requestServletPath, @Nullable String requestPathInfo, String requestUri,
              @Nullable String requestQueryString, Map<String, Object> requestHeaders,
              @Nullable RequestHostAndPortDetail requestHostAndPortDetail,
              Map<String, String> sessionAttributeMap)
focal_class.signature:  ServletMessageSupplier(String requestMethod, String requestContextPath,
              String requestServletPath, @Nullable String requestPathInfo, String requestUri,
              @Nullable String requestQueryString, Map<String, Object> requestHeaders,
              @Nullable RequestHostAndPortDetail requestHostAndPortDetail,
              Map<String, String> sessionAttributeMap)
focal_class.class_method_signature: ServletMessageSupplier.get()
focal_class.full_signature: @Override public Message get()
focal_class.identifier: get
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Message
focal_class.signature: Message get()
focal_class.class_method_signature: ServletMessageSupplier.getMethod()
focal_class.full_signature: @Override public String getMethod()
focal_class.identifier: getMethod
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getMethod()
focal_class.class_method_signature: ServletMessageSupplier.getContextPath()
focal_class.full_signature: @Override public String getContextPath()
focal_class.identifier: getContextPath
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getContextPath()
focal_class.class_method_signature: ServletMessageSupplier.getServletPath()
focal_class.full_signature: @Override public String getServletPath()
focal_class.identifier: getServletPath
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getServletPath()
focal_class.class_method_signature: ServletMessageSupplier.getPathInfo()
focal_class.full_signature: @Override public @Nullable String getPathInfo()
focal_class.identifier: getPathInfo
focal_class.modifiers: @Override public @Nullable
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPathInfo()
focal_class.class_method_signature: ServletMessageSupplier.getUri()
focal_class.full_signature: @Override public String getUri()
focal_class.identifier: getUri
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getUri()
focal_class.class_method_signature: ServletMessageSupplier.addJaxRsPart(String part)
focal_class.full_signature: @Override public void addJaxRsPart(String part)
focal_class.identifier: addJaxRsPart
focal_class.modifiers: @Override public
focal_class.parameters: (String part)
focal_class.return: void
focal_class.signature: void addJaxRsPart(String part)
focal_class.class_method_signature: ServletMessageSupplier.getJaxRsParts()
focal_class.full_signature: @Override public List<String> getJaxRsParts()
focal_class.identifier: getJaxRsParts
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getJaxRsParts()
focal_class.class_method_signature: ServletMessageSupplier.isRequestParametersCaptured()
focal_class.full_signature: public boolean isRequestParametersCaptured()
focal_class.identifier: isRequestParametersCaptured
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isRequestParametersCaptured()
focal_class.class_method_signature: ServletMessageSupplier.setCaptureRequestParameters(Map<String, Object> requestParameters)
focal_class.full_signature: public void setCaptureRequestParameters(Map<String, Object> requestParameters)
focal_class.identifier: setCaptureRequestParameters
focal_class.modifiers: public
focal_class.parameters: (Map<String, Object> requestParameters)
focal_class.return: void
focal_class.signature: void setCaptureRequestParameters(Map<String, Object> requestParameters)
focal_class.class_method_signature: ServletMessageSupplier.setResponseCode(int responseCode)
focal_class.full_signature: public void setResponseCode(int responseCode)
focal_class.identifier: setResponseCode
focal_class.modifiers: public
focal_class.parameters: (int responseCode)
focal_class.return: void
focal_class.signature: void setResponseCode(int responseCode)
focal_class.class_method_signature: ServletMessageSupplier.setResponseHeader(String name, String value)
focal_class.full_signature: public void setResponseHeader(String name, String value)
focal_class.identifier: setResponseHeader
focal_class.modifiers: public
focal_class.parameters: (String name, String value)
focal_class.return: void
focal_class.signature: void setResponseHeader(String name, String value)
focal_class.class_method_signature: ServletMessageSupplier.setResponseDateHeader(String name, long date)
focal_class.full_signature: public void setResponseDateHeader(String name, long date)
focal_class.identifier: setResponseDateHeader
focal_class.modifiers: public
focal_class.parameters: (String name, long date)
focal_class.return: void
focal_class.signature: void setResponseDateHeader(String name, long date)
focal_class.class_method_signature: ServletMessageSupplier.setResponseIntHeader(String name, int value)
focal_class.full_signature: public void setResponseIntHeader(String name, int value)
focal_class.identifier: setResponseIntHeader
focal_class.modifiers: public
focal_class.parameters: (String name, int value)
focal_class.return: void
focal_class.signature: void setResponseIntHeader(String name, int value)
focal_class.class_method_signature: ServletMessageSupplier.setResponseLongHeader(String name, long value)
focal_class.full_signature: public void setResponseLongHeader(String name, long value)
focal_class.identifier: setResponseLongHeader
focal_class.modifiers: public
focal_class.parameters: (String name, long value)
focal_class.return: void
focal_class.signature: void setResponseLongHeader(String name, long value)
focal_class.class_method_signature: ServletMessageSupplier.addResponseHeader(String name, String value)
focal_class.full_signature: public void addResponseHeader(String name, String value)
focal_class.identifier: addResponseHeader
focal_class.modifiers: public
focal_class.parameters: (String name, String value)
focal_class.return: void
focal_class.signature: void addResponseHeader(String name, String value)
focal_class.class_method_signature: ServletMessageSupplier.addResponseDateHeader(String name, long date)
focal_class.full_signature: public void addResponseDateHeader(String name, long date)
focal_class.identifier: addResponseDateHeader
focal_class.modifiers: public
focal_class.parameters: (String name, long date)
focal_class.return: void
focal_class.signature: void addResponseDateHeader(String name, long date)
focal_class.class_method_signature: ServletMessageSupplier.addResponseIntHeader(String name, int value)
focal_class.full_signature: public void addResponseIntHeader(String name, int value)
focal_class.identifier: addResponseIntHeader
focal_class.modifiers: public
focal_class.parameters: (String name, int value)
focal_class.return: void
focal_class.signature: void addResponseIntHeader(String name, int value)
focal_class.class_method_signature: ServletMessageSupplier.putSessionAttributeChangedValue(String attributeName,
              @Nullable String attributeValue)
focal_class.full_signature: public void putSessionAttributeChangedValue(String attributeName,
              @Nullable String attributeValue)
focal_class.identifier: putSessionAttributeChangedValue
focal_class.modifiers: public
focal_class.parameters: (String attributeName,
              @Nullable String attributeValue)
focal_class.return: void
focal_class.signature: void putSessionAttributeChangedValue(String attributeName,
              @Nullable String attributeValue)
focal_class.class_method_signature: ServletMessageSupplier.addSessionAttributeDetail(Map<String, Object> detail)
focal_class.full_signature: private void addSessionAttributeDetail(Map<String, Object> detail)
focal_class.identifier: addSessionAttributeDetail
focal_class.modifiers: private
focal_class.parameters: (Map<String, Object> detail)
focal_class.return: void
focal_class.signature: void addSessionAttributeDetail(Map<String, Object> detail)
focal_class.class_method_signature: ServletMessageSupplier.addMidRequestSessionAttributeDetail(Map<String, Object> detail)
focal_class.full_signature: @RequiresNonNull("sessionAttributeUpdatedValueMap") private void addMidRequestSessionAttributeDetail(Map<String, Object> detail)
focal_class.identifier: addMidRequestSessionAttributeDetail
focal_class.modifiers: @RequiresNonNull("sessionAttributeUpdatedValueMap") private
focal_class.parameters: (Map<String, Object> detail)
focal_class.return: void
focal_class.signature: void addMidRequestSessionAttributeDetail(Map<String, Object> detail)
focal_class.class_method_signature: ServletMessageSupplier.maskRequestQueryString(@Nullable String requestQueryString,
              List<Pattern> maskPatterns)
focal_class.full_signature: static @Nullable String maskRequestQueryString(@Nullable String requestQueryString,
              List<Pattern> maskPatterns)
focal_class.identifier: maskRequestQueryString
focal_class.modifiers: static @Nullable
focal_class.parameters: (@Nullable String requestQueryString,
              List<Pattern> maskPatterns)
focal_class.return: String
focal_class.signature: String maskRequestQueryString(@Nullable String requestQueryString,
              List<Pattern> maskPatterns)
focal_class.class_method_signature: ServletMessageSupplier.maskRequestParameters(
              @Nullable Map<String, Object> requestParameters, List<Pattern> maskPatterns)
focal_class.full_signature: private static @Nullable Map<String, Object> maskRequestParameters(
              @Nullable Map<String, Object> requestParameters, List<Pattern> maskPatterns)
focal_class.identifier: maskRequestParameters
focal_class.modifiers: private static @Nullable
focal_class.parameters: (
              @Nullable Map<String, Object> requestParameters, List<Pattern> maskPatterns)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> maskRequestParameters(
              @Nullable Map<String, Object> requestParameters, List<Pattern> maskPatterns)
focal_class.superclass: extends MessageSupplier
focal_method.body: static @Nullable String maskRequestQueryString(@Nullable String requestQueryString,
              List<Pattern> maskPatterns) {
          if (requestQueryString == null) {
              return null;
          }
          if (maskPatterns.isEmpty()) {
              return requestQueryString;
          }
          StringBuilder sb = new StringBuilder(requestQueryString.length());
          boolean existMaskedParameters = false;
          int keyStartIndex = 0;
          boolean inMaskedValue = false;
          for (int i = 0; i < requestQueryString.length(); i++) {
              char c = requestQueryString.charAt(i);
              switch (c) {
                  case '&':
                      sb.append('&');
                      keyStartIndex = sb.length();
                      inMaskedValue = false;
                      break;
                  case '=':
                      if (keyStartIndex == -1) {
                          // not in key
                          if (!inMaskedValue) {
                              sb.append(c);
                          }
                      } else {
                          String key = sb.substring(keyStartIndex, sb.length());
                          sb.append('=');
                          // converted to lower case for case-insensitive matching
                          // (patterns are lower case)
                          String keyLowerCase = key.toLowerCase(Locale.ENGLISH);
                          if (DetailCapture.matchesOneOf(keyLowerCase, maskPatterns)) {
                              inMaskedValue = true;
                              sb.append(MASK_TEXT);
                              existMaskedParameters = true;
                          }
                          keyStartIndex = -1;
                      }
                      break;
                  default:
                      if (!inMaskedValue) {
                          sb.append(c);
                      }
              }
          }
          if (existMaskedParameters) {
              return sb.toString();
          } else {
              // save the expense of toString() in common case
              return requestQueryString;
          }
      }
focal_method.class_method_signature: ServletMessageSupplier.maskRequestQueryString(@Nullable String requestQueryString,
              List<Pattern> maskPatterns)
focal_method.full_signature: static @Nullable String maskRequestQueryString(@Nullable String requestQueryString,
              List<Pattern> maskPatterns)
focal_method.identifier: maskRequestQueryString
focal_method.invocations: isEmpty length length charAt append length append substring length append toLowerCase matchesOneOf append append toString
focal_method.modifiers: static @Nullable
focal_method.parameters: (@Nullable String requestQueryString,
              List<Pattern> maskPatterns)
focal_method.return: String
focal_method.signature: String maskRequestQueryString(@Nullable String requestQueryString,
              List<Pattern> maskPatterns)