test_class.declarator: GRANDFATHER = "grandfather"
test_class.modifier: private final static
test_class.original_string: private final static String GRANDFATHER = "grandfather";
test_class.type: String
test_class.var_name: GRANDFATHER
test_class.declarator: PARENT = "parent"
test_class.modifier: private final static
test_class.original_string: private final static String PARENT = "parent";
test_class.type: String
test_class.var_name: PARENT
test_class.declarator: MOTHER = "mother"
test_class.modifier: private final static
test_class.original_string: private final static String MOTHER = "mother";
test_class.type: String
test_class.var_name: MOTHER
test_class.declarator: AUNT = "aunt"
test_class.modifier: private final static
test_class.original_string: private final static String AUNT = "aunt";
test_class.type: String
test_class.var_name: AUNT
test_class.declarator: CHILD = "child"
test_class.modifier: private final static
test_class.original_string: private final static String CHILD = "child";
test_class.type: String
test_class.var_name: CHILD
test_class.declarator: GRANDCHILD = "grandchild"
test_class.modifier: private final static
test_class.original_string: private final static String GRANDCHILD = "grandchild";
test_class.type: String
test_class.var_name: GRANDCHILD
test_class.declarator: STRANGER = "stranger"
test_class.modifier: private final static
test_class.original_string: private final static String STRANGER = "stranger";
test_class.type: String
test_class.var_name: STRANGER
test_class.declarator: nodeTypes
test_class.modifier: private static
test_class.original_string: private static Map<QName, TNodeType> nodeTypes;
test_class.type: Map<QName, TNodeType>
test_class.var_name: nodeTypes
test_class.declarator: grandFather = new QName("https://example.org/tosca/substiution", GRANDFATHER)
test_class.modifier: private static
test_class.original_string: private static QName grandFather = new QName("https://example.org/tosca/substiution", GRANDFATHER);
test_class.type: QName
test_class.var_name: grandFather
test_class.declarator: parent = new QName("https://example.org/tosca/substiution", PARENT)
test_class.modifier: private static
test_class.original_string: private static QName parent = new QName("https://example.org/tosca/substiution", PARENT);
test_class.type: QName
test_class.var_name: parent
test_class.declarator: child = new QName("https://example.org/tosca/substiution", CHILD)
test_class.modifier: private static
test_class.original_string: private static QName child = new QName("https://example.org/tosca/substiution", CHILD);
test_class.type: QName
test_class.var_name: child
test_class.declarator: grandChild = new QName("https://example.org/tosca/substiution", GRANDCHILD)
test_class.modifier: private static
test_class.original_string: private static QName grandChild = new QName("https://example.org/tosca/substiution", GRANDCHILD);
test_class.type: QName
test_class.var_name: grandChild
test_class.declarator: mother = new QName("https://example.org/tosca/substiution", MOTHER)
test_class.modifier: private static
test_class.original_string: private static QName mother = new QName("https://example.org/tosca/substiution", MOTHER);
test_class.type: QName
test_class.var_name: mother
test_class.declarator: aunt = new QName("https://my.example.org/tosca/substiution", AUNT)
test_class.modifier: private static
test_class.original_string: private static QName aunt = new QName("https://my.example.org/tosca/substiution", AUNT);
test_class.type: QName
test_class.var_name: aunt
test_class.declarator: stranger = new QName("ftp://example.org/stranger", STRANGER)
test_class.modifier: private static
test_class.original_string: private static QName stranger = new QName("ftp://example.org/stranger", STRANGER);
test_class.type: QName
test_class.var_name: stranger
test_class.file: org.eclipse.winery.model.adaptation/src/test/java/org/eclipse/winery/model/adaptation/substitution/SubstitutionUtilsTest.java
test_class.identifier: SubstitutionUtilsTest
test_case.body: @Test
      public void getSubstitutableTemplateMap() {
          List<TNodeTemplate> templates = Arrays.asList(
              new TNodeTemplate.Builder("id0", stranger).build(),
              new TNodeTemplate.Builder("id1", parent).build(),
              new TNodeTemplate.Builder("id2", grandFather).build(),
              new TNodeTemplate.Builder("id3", aunt).build()
          );
  
          Map<TNodeTemplate, List<Subtypes<TNodeType>>> substitutableTemplates = SubstitutionUtils.collectSubstitutableTemplates(templates, nodeTypes);
  
          assertEquals(2, substitutableTemplates.size());
          assertTrue(substitutableTemplates.entrySet()
              .removeIf(entry -> grandFather.equals(entry.getKey().getTypeAsQName()))
          );
          assertTrue(substitutableTemplates.entrySet()
              .removeIf(entry -> parent.equals(entry.getKey().getType()))
          );
      }
test_case.class_method_signature: SubstitutionUtilsTest.getSubstitutableTemplateMap()
test_case.full_signature: @Test public void getSubstitutableTemplateMap()
test_case.identifier: getSubstitutableTemplateMap
test_case.invocations: asList build build build build collectSubstitutableTemplates assertEquals size assertTrue removeIf entrySet equals getTypeAsQName getKey assertTrue removeIf entrySet equals getType getKey
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getSubstitutableTemplateMap()
focal_class.file: org.eclipse.winery.model.adaptation/src/main/java/org/eclipse/winery/model/adaptation/substitution/SubstitutionUtils.java
focal_class.identifier: SubstitutionUtils
focal_class.class_method_signature: SubstitutionUtils.collectSubstitutableTemplates(List<R> templates, Map<QName, T> types)
focal_class.full_signature: public static Map<R, List<Subtypes<T>>> collectSubstitutableTemplates(List<R> templates, Map<QName, T> types)
focal_class.identifier: collectSubstitutableTemplates
focal_class.modifiers: public static
focal_class.parameters: (List<R> templates, Map<QName, T> types)
focal_class.return: Map<R, List<Subtypes<T>>>
focal_class.signature: Map<R, List<Subtypes<T>>> collectSubstitutableTemplates(List<R> templates, Map<QName, T> types)
focal_class.class_method_signature: SubstitutionUtils.collectTypeHierarchy(Map<QName, T> types, QName parent)
focal_class.full_signature: public static Optional<List<Subtypes<T>>> collectTypeHierarchy(Map<QName, T> types, QName parent)
focal_class.identifier: collectTypeHierarchy
focal_class.modifiers: public static
focal_class.parameters: (Map<QName, T> types, QName parent)
focal_class.return: Optional<List<Subtypes<T>>>
focal_class.signature: Optional<List<Subtypes<T>>> collectTypeHierarchy(Map<QName, T> types, QName parent)
focal_class.class_method_signature: SubstitutionUtils.containsPatterns(List<TNodeTemplate> topologyNodes, Map<QName, TNodeType> nodeTypes)
focal_class.full_signature: public static boolean containsPatterns(List<TNodeTemplate> topologyNodes, Map<QName, TNodeType> nodeTypes)
focal_class.identifier: containsPatterns
focal_class.modifiers: public static
focal_class.parameters: (List<TNodeTemplate> topologyNodes, Map<QName, TNodeType> nodeTypes)
focal_class.return: boolean
focal_class.signature: boolean containsPatterns(List<TNodeTemplate> topologyNodes, Map<QName, TNodeType> nodeTypes)
focal_method.body: public static <R extends HasType, T extends HasInheritance> Map<R, List<Subtypes<T>>> collectSubstitutableTemplates(List<R> templates, Map<QName, T> types) {
          Map<R, List<Subtypes<T>>> substitutableTypes = new HashMap<>();
  
          templates.forEach(tNodeTemplate -> {
              QName nodeTemplateType = tNodeTemplate.getTypeAsQName();
              collectTypeHierarchy(types, nodeTemplateType)
                  .ifPresent(tNodeTypeSubtypes ->
                      substitutableTypes.put(tNodeTemplate, tNodeTypeSubtypes)
                  );
          });
  
          return substitutableTypes;
      }
focal_method.class_method_signature: SubstitutionUtils.collectSubstitutableTemplates(List<R> templates, Map<QName, T> types)
focal_method.full_signature: public static Map<R, List<Subtypes<T>>> collectSubstitutableTemplates(List<R> templates, Map<QName, T> types)
focal_method.identifier: collectSubstitutableTemplates
focal_method.invocations: forEach getTypeAsQName ifPresent collectTypeHierarchy put
focal_method.modifiers: public static
focal_method.parameters: (List<R> templates, Map<QName, T> types)
focal_method.return: Map<R, List<Subtypes<T>>>
focal_method.signature: Map<R, List<Subtypes<T>>> collectSubstitutableTemplates(List<R> templates, Map<QName, T> types)