test_class.declarator: FLAT_TEMPLATES = new String[]{
              "/subsystem=undertow",
              "/subsystem=undertow/server=*",
              "/subsystem=undertow/server=*/host=*",
              "/subsystem=undertow/server=*/http-listener=*",
              "/subsystem=undertow/server=*/https-listener=*",
              "/subsystem=undertow/server=*/ajp-listener=*"
      }
test_class.modifier: private static final
test_class.original_string: private static final String[] FLAT_TEMPLATES = new String[]{
              "/subsystem=undertow",
              "/subsystem=undertow/server=*",
              "/subsystem=undertow/server=*/host=*",
              "/subsystem=undertow/server=*/http-listener=*",
              "/subsystem=undertow/server=*/https-listener=*",
              "/subsystem=undertow/server=*/ajp-listener=*"
      };
test_class.type: String[]
test_class.var_name: FLAT_TEMPLATES
test_class.declarator: RECURSIVE_TEMPLATES = Stream.concat(Arrays.stream(FLAT_TEMPLATES),
              Arrays.stream(new String[]{
                      // additional templates
                      "/subsystem=undertow/configuration=filter",
                      "/subsystem=undertow/configuration=filter/error-page=*",
                      "/subsystem=undertow/configuration=filter/expression-filter=*",
                      "/subsystem=undertow/configuration=filter/gzip=*",
                      "/subsystem=undertow/configuration=filter/mod-cluster=*",
                      "/subsystem=undertow/configuration=filter/mod-cluster=*/balancer=*",
                      "/subsystem=undertow/configuration=filter/mod-cluster=*/balancer=*/node=*",
                      "/subsystem=undertow/configuration=filter/mod-cluster=*/balancer=*/node=*/context=*",
                      "/subsystem=undertow/configuration=filter/mod-cluster=*/balancer=*/load-balancing-group=*",
                      "/subsystem=undertow/configuration=filter/rewrite=*",
                      "/subsystem=undertow/configuration=filter/connection-limit=*",
                      "/subsystem=undertow/configuration=filter/response-header=*",
                      "/subsystem=undertow/configuration=filter/custom-filter=*",
                      "/subsystem=undertow/configuration=handler",
                      "/subsystem=undertow/configuration=handler/file=*",
                      "/subsystem=undertow/configuration=handler/reverse-proxy=*",
                      "/subsystem=undertow/configuration=handler/reverse-proxy=*/host=*",
                      "/subsystem=undertow/servlet-container=*",
                      "/subsystem=undertow/servlet-container=*/welcome-file=*",
                      "/subsystem=undertow/servlet-container=*/mime-mapping=*",
                      "/subsystem=undertow/servlet-container=*/setting=jsp",
                      "/subsystem=undertow/servlet-container=*/setting=persistent-sessions",
                      "/subsystem=undertow/servlet-container=*/setting=session-cookie",
                      "/subsystem=undertow/servlet-container=*/setting=websockets",
                      "/subsystem=undertow/server=*/host=*/setting=access-log",
                      "/subsystem=undertow/server=*/host=*/setting=single-sign-on",
                      "/subsystem=undertow/server=*/host=*/location=*",
                      "/subsystem=undertow/server=*/host=*/location=*/filter-ref=*",
                      "/subsystem=undertow/server=*/host=*/filter-ref=*",
                      "/subsystem=undertow/buffer-cache=*",
              })).toArray(String[]::new)
test_class.modifier: private static final
test_class.original_string: private static final String[] RECURSIVE_TEMPLATES = Stream.concat(Arrays.stream(FLAT_TEMPLATES),
              Arrays.stream(new String[]{
                      // additional templates
                      "/subsystem=undertow/configuration=filter",
                      "/subsystem=undertow/configuration=filter/error-page=*",
                      "/subsystem=undertow/configuration=filter/expression-filter=*",
                      "/subsystem=undertow/configuration=filter/gzip=*",
                      "/subsystem=undertow/configuration=filter/mod-cluster=*",
                      "/subsystem=undertow/configuration=filter/mod-cluster=*/balancer=*",
                      "/subsystem=undertow/configuration=filter/mod-cluster=*/balancer=*/node=*",
                      "/subsystem=undertow/configuration=filter/mod-cluster=*/balancer=*/node=*/context=*",
                      "/subsystem=undertow/configuration=filter/mod-cluster=*/balancer=*/load-balancing-group=*",
                      "/subsystem=undertow/configuration=filter/rewrite=*",
                      "/subsystem=undertow/configuration=filter/connection-limit=*",
                      "/subsystem=undertow/configuration=filter/response-header=*",
                      "/subsystem=undertow/configuration=filter/custom-filter=*",
                      "/subsystem=undertow/configuration=handler",
                      "/subsystem=undertow/configuration=handler/file=*",
                      "/subsystem=undertow/configuration=handler/reverse-proxy=*",
                      "/subsystem=undertow/configuration=handler/reverse-proxy=*/host=*",
                      "/subsystem=undertow/servlet-container=*",
                      "/subsystem=undertow/servlet-container=*/welcome-file=*",
                      "/subsystem=undertow/servlet-container=*/mime-mapping=*",
                      "/subsystem=undertow/servlet-container=*/setting=jsp",
                      "/subsystem=undertow/servlet-container=*/setting=persistent-sessions",
                      "/subsystem=undertow/servlet-container=*/setting=session-cookie",
                      "/subsystem=undertow/servlet-container=*/setting=websockets",
                      "/subsystem=undertow/server=*/host=*/setting=access-log",
                      "/subsystem=undertow/server=*/host=*/setting=single-sign-on",
                      "/subsystem=undertow/server=*/host=*/location=*",
                      "/subsystem=undertow/server=*/host=*/location=*/filter-ref=*",
                      "/subsystem=undertow/server=*/host=*/filter-ref=*",
                      "/subsystem=undertow/buffer-cache=*",
              })).toArray(String[]::new);
test_class.type: String[]
test_class.var_name: RECURSIVE_TEMPLATES
test_class.file: meta/src/test/java/org/jboss/hal/meta/processing/CompositeRrdParserTest.java
test_class.identifier: CompositeRrdParserTest
test_case.body: @Test
      public void parseFlat() {
          List<Operation> operations = Arrays.stream(FLAT_TEMPLATES)
                  .map(template -> new Operation.Builder(AddressTemplate.of(template).resolve(StatementContext.NOOP),
                          READ_RESOURCE_DESCRIPTION_OPERATION
                  ).build())
                  .collect(toList());
          Composite composite = new Composite(operations);
  
          ModelNode modelNode = ExternalModelNode
                  .read(CompositeRrdParserTest.class.getResourceAsStream("composite_rrd_flat_description_only.dmr"));
          RrdResult rrdResult = new CompositeRrdParser(composite).parse(new CompositeResult(modelNode));
  
          assertResourceDescriptions(rrdResult, 6, FLAT_TEMPLATES);
      }
test_case.class_method_signature: CompositeRrdParserTest.parseFlat()
test_case.full_signature: @Test public void parseFlat()
test_case.identifier: parseFlat
test_case.invocations: collect map stream build resolve of toList read getResourceAsStream parse assertResourceDescriptions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void parseFlat()
focal_class.declarator: logger = LoggerFactory.getLogger(CompositeRrdParser.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(CompositeRrdParser.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: composite
focal_class.modifier: private final
focal_class.original_string: private final Composite composite;
focal_class.type: Composite
focal_class.var_name: composite
focal_class.file: meta/src/main/java/org/jboss/hal/meta/processing/CompositeRrdParser.java
focal_class.identifier: CompositeRrdParser
focal_class.class_method_signature: CompositeRrdParser.CompositeRrdParser(Composite composite)
focal_class.full_signature:   CompositeRrdParser(Composite composite)
focal_class.identifier: CompositeRrdParser
focal_class.parameters: (Composite composite)
focal_class.signature:  CompositeRrdParser(Composite composite)
focal_class.class_method_signature: CompositeRrdParser.parse(CompositeResult compositeResult)
focal_class.full_signature: public RrdResult parse(CompositeResult compositeResult)
focal_class.identifier: parse
focal_class.modifiers: public
focal_class.parameters: (CompositeResult compositeResult)
focal_class.return: RrdResult
focal_class.signature: RrdResult parse(CompositeResult compositeResult)
focal_class.class_method_signature: CompositeRrdParser.operationAddress(int index)
focal_class.full_signature: private ResourceAddress operationAddress(int index)
focal_class.identifier: operationAddress
focal_class.modifiers: private
focal_class.parameters: (int index)
focal_class.return: ResourceAddress
focal_class.signature: ResourceAddress operationAddress(int index)
focal_class.class_method_signature: CompositeRrdParser.makeFqAddress(ResourceAddress operationAddress, ResourceAddress resultAddress)
focal_class.full_signature: @SuppressWarnings("DuplicateStringLiteralInspection") private ResourceAddress makeFqAddress(ResourceAddress operationAddress, ResourceAddress resultAddress)
focal_class.identifier: makeFqAddress
focal_class.modifiers: @SuppressWarnings("DuplicateStringLiteralInspection") private
focal_class.parameters: (ResourceAddress operationAddress, ResourceAddress resultAddress)
focal_class.return: ResourceAddress
focal_class.signature: ResourceAddress makeFqAddress(ResourceAddress operationAddress, ResourceAddress resultAddress)
focal_method.body: public RrdResult parse(CompositeResult compositeResult) throws ParserException {
          int index = 0;
          RrdResult rrdResult = new RrdResult();
  
          for (ModelNode step : compositeResult) {
              if (step.isFailure()) {
                  throw new ParserException("Failed step 'step-" + (index + 1) + "' in composite rrd result: " + step
                          .getFailureDescription());
              }
  
              ModelNode stepResult = step.get(RESULT);
  
              if (stepResult.getType() == ModelType.LIST) {
                  // multiple rrd results each with its own address
                  for (ModelNode modelNode : stepResult.asList()) {
                      ModelNode result = modelNode.get(RESULT);
                      if (result.isDefined()) {
                          ResourceAddress operationAddress = operationAddress(index);
                          ResourceAddress resultAddress = new ResourceAddress(modelNode.get(ADDRESS));
                          ResourceAddress resolvedAddress = makeFqAddress(operationAddress, resultAddress);
  
                          new SingleRrdParser(rrdResult).parse(resolvedAddress, result);
                      }
                  }
  
              } else {
                  // a single rrd result
                  ResourceAddress address = operationAddress(index);
                  new SingleRrdParser(rrdResult).parse(address, stepResult);
              }
              index++;
          }
  
          return rrdResult;
      }
focal_method.class_method_signature: CompositeRrdParser.parse(CompositeResult compositeResult)
focal_method.full_signature: public RrdResult parse(CompositeResult compositeResult)
focal_method.identifier: parse
focal_method.invocations: isFailure getFailureDescription get getType asList get isDefined operationAddress get makeFqAddress parse operationAddress parse
focal_method.modifiers: public
focal_method.parameters: (CompositeResult compositeResult)
focal_method.return: RrdResult
focal_method.signature: RrdResult parse(CompositeResult compositeResult)