test_class.file: central/src/test/java/org/glowroot/central/repo/AgentRollupIdsTest.java
test_class.identifier: AgentRollupIdsTest
test_case.body: @Test
      public void shouldGetAgentRollupIds() {
          assertThat(AgentRollupIds.getAgentRollupIds("aaa")).containsExactly("aaa");
          assertThat(AgentRollupIds.getAgentRollupIds("aaa::bbb")).containsExactly("aaa::bbb",
                  "aaa::");
          assertThat(AgentRollupIds.getAgentRollupIds("aaa::bbb::ccc"))
                  .containsExactly("aaa::bbb::ccc", "aaa::bbb::", "aaa::");
          assertThat(AgentRollupIds.getAgentRollupIds("a")).containsExactly("a");
          assertThat(AgentRollupIds.getAgentRollupIds("a::b")).containsExactly("a::b", "a::");
          assertThat(AgentRollupIds.getAgentRollupIds("a::b::c")).containsExactly("a::b::c", "a::b::",
                  "a::");
          assertThat(AgentRollupIds.getAgentRollupIds("a:b:c")).containsExactly("a:b:c");
          assertThat(AgentRollupIds.getAgentRollupIds("a:::b")).containsExactly("a:::b", "a:::");
          assertThat(AgentRollupIds.getAgentRollupIds("a:::b:::c")).containsExactly("a:::b:::c",
                  "a:::b:::", "a:::");
          assertThat(AgentRollupIds.getAgentRollupIds("a::::b")).containsExactly("a::::b", "a::::");
          assertThat(AgentRollupIds.getAgentRollupIds("a::::b::::c")).containsExactly("a::::b::::c",
                  "a::::b::::", "a::::");
          assertThat(AgentRollupIds.getAgentRollupIds("a:::::b")).containsExactly("a:::::b", "a:::::",
                  "a::");
          assertThat(AgentRollupIds.getAgentRollupIds("a:::::b:::::c")).containsExactly(
                  "a:::::b:::::c", "a:::::b:::::", "a:::::b::", "a:::::", "a::");
          assertThat(AgentRollupIds.getAgentRollupIds(":")).containsExactly(":");
          assertThat(AgentRollupIds.getAgentRollupIds("::")).containsExactly("::");
          assertThat(AgentRollupIds.getAgentRollupIds(":::")).containsExactly(":::");
          assertThat(AgentRollupIds.getAgentRollupIds("::::")).containsExactly("::::");
          assertThat(AgentRollupIds.getAgentRollupIds(":::::")).containsExactly(":::::");
          assertThat(AgentRollupIds.getAgentRollupIds("::::::")).containsExactly("::::::", ":::");
      }
test_case.class_method_signature: AgentRollupIdsTest.shouldGetAgentRollupIds()
test_case.full_signature: @Test public void shouldGetAgentRollupIds()
test_case.identifier: shouldGetAgentRollupIds
test_case.invocations: containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds containsExactly assertThat getAgentRollupIds
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldGetAgentRollupIds()
focal_class.file: central/src/main/java/org/glowroot/central/repo/AgentRollupIds.java
focal_class.identifier: AgentRollupIds
focal_class.class_method_signature: AgentRollupIds.AgentRollupIds()
focal_class.full_signature: private  AgentRollupIds()
focal_class.identifier: AgentRollupIds
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  AgentRollupIds()
focal_class.class_method_signature: AgentRollupIds.getAgentRollupIds(String agentRollupId)
focal_class.full_signature: public static List<String> getAgentRollupIds(String agentRollupId)
focal_class.identifier: getAgentRollupIds
focal_class.modifiers: public static
focal_class.parameters: (String agentRollupId)
focal_class.return: List<String>
focal_class.signature: List<String> getAgentRollupIds(String agentRollupId)
focal_class.class_method_signature: AgentRollupIds.getParent(String agentRollupId)
focal_class.full_signature: static @Nullable String getParent(String agentRollupId)
focal_class.identifier: getParent
focal_class.modifiers: static @Nullable
focal_class.parameters: (String agentRollupId)
focal_class.return: String
focal_class.signature: String getParent(String agentRollupId)
focal_method.body: public static List<String> getAgentRollupIds(String agentRollupId) {
          List<String> agentRollupIds = new ArrayList<>();
          agentRollupIds.add(agentRollupId);
          int separatorLen = "::".length();
          int lastFoundIndex;
          if (agentRollupId.endsWith("::")) {
              lastFoundIndex = agentRollupId.length() - separatorLen;
          } else {
              lastFoundIndex = agentRollupId.length();
          }
          int nextFoundIndex;
          // -1 because the agent rollup part must be at least 1 character
          while ((nextFoundIndex =
                  agentRollupId.lastIndexOf("::", lastFoundIndex - separatorLen - 1)) != -1) {
              if (nextFoundIndex == 0) {
                  break;
              }
              agentRollupIds.add(agentRollupId.substring(0, nextFoundIndex + separatorLen));
              lastFoundIndex = nextFoundIndex;
          }
          return agentRollupIds;
      }
focal_method.class_method_signature: AgentRollupIds.getAgentRollupIds(String agentRollupId)
focal_method.full_signature: public static List<String> getAgentRollupIds(String agentRollupId)
focal_method.identifier: getAgentRollupIds
focal_method.invocations: add length endsWith length length lastIndexOf add substring
focal_method.modifiers: public static
focal_method.parameters: (String agentRollupId)
focal_method.return: List<String>
focal_method.signature: List<String> getAgentRollupIds(String agentRollupId)