test_class.declarator: splitting = new Splitting()
test_class.modifier: private
test_class.original_string: private Splitting splitting = new Splitting();
test_class.type: Splitting
test_class.var_name: splitting
test_class.declarator: topologyTemplate
test_class.modifier: private
test_class.original_string: private TTopologyTemplate topologyTemplate;
test_class.type: TTopologyTemplate
test_class.var_name: topologyTemplate
test_class.declarator: topologyTemplate2
test_class.modifier: private
test_class.original_string: private TTopologyTemplate topologyTemplate2;
test_class.type: TTopologyTemplate
test_class.var_name: topologyTemplate2
test_class.file: org.eclipse.winery.repository/src/test/java/org/eclipse/winery/repository/splitting/SplittingTest.java
test_class.identifier: SplittingTest
test_class.superclass: extends TestWithGitBackedRepository
test_case.body: @Test
      public void splitSmallTopology() throws Exception {
          List<String> expectedIds = Arrays.asList("NT1", "NT1_2", "NT1_3-A", "NT1_3-B", "NT1_4-A", "NT1_4-B", "NT1_5-A", "NT1_5-B", "con37", "con45", "con_91-A-A", "con_57-B-B");
          List<TEntityTemplate> NodeTemplates = splitting.split(topologyTemplate).getNodeTemplateOrRelationshipTemplate();
  
          List<String> Ids = new ArrayList<>();
          for (TEntityTemplate nodeTemplate : NodeTemplates) {
              Ids.add(nodeTemplate.getId());
          }
  
          assertEquals(expectedIds, Ids);
      }
test_case.class_method_signature: SplittingTest.splitSmallTopology()
test_case.full_signature: @Test public void splitSmallTopology()
test_case.identifier: splitSmallTopology
test_case.invocations: asList getNodeTemplateOrRelationshipTemplate split add getId assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void splitSmallTopology()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(Splitting.class)
focal_class.modifier: private static final
focal_class.original_string: private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(Splitting.class);
focal_class.type: org.slf4j.Logger
focal_class.var_name: LOGGER
focal_class.declarator: newRelationshipIdCounter = 100
focal_class.modifier: private static
focal_class.original_string: private static int newRelationshipIdCounter = 100;
focal_class.type: int
focal_class.var_name: newRelationshipIdCounter
focal_class.declarator: nodeTemplateIdCounter = 1
focal_class.modifier: private static
focal_class.original_string: private static int nodeTemplateIdCounter = 1;
focal_class.type: int
focal_class.var_name: nodeTemplateIdCounter
focal_class.declarator: IdCounter = 1
focal_class.modifier: private static
focal_class.original_string: private static int IdCounter = 1;
focal_class.type: int
focal_class.var_name: IdCounter
focal_class.declarator: initDirectSuccessors = new HashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<TNodeTemplate, Set<TNodeTemplate>> initDirectSuccessors = new HashMap<>();
focal_class.type: Map<TNodeTemplate, Set<TNodeTemplate>>
focal_class.var_name: initDirectSuccessors
focal_class.declarator: visitedNodeTemplates = new HashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<TNodeTemplate, Boolean> visitedNodeTemplates = new HashMap<>();
focal_class.type: Map<TNodeTemplate, Boolean>
focal_class.var_name: visitedNodeTemplates
focal_class.declarator: transitiveAndDirectSuccessors = new HashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<TNodeTemplate, Set<TNodeTemplate>> transitiveAndDirectSuccessors = new HashMap<>();
focal_class.type: Map<TNodeTemplate, Set<TNodeTemplate>>
focal_class.var_name: transitiveAndDirectSuccessors
focal_class.file: org.eclipse.winery.repository/src/main/java/org/eclipse/winery/repository/splitting/Splitting.java
focal_class.identifier: Splitting
focal_class.class_method_signature: Splitting.splitTopologyOfServiceTemplate(ServiceTemplateId id)
focal_class.full_signature: public ServiceTemplateId splitTopologyOfServiceTemplate(ServiceTemplateId id)
focal_class.identifier: splitTopologyOfServiceTemplate
focal_class.modifiers: public
focal_class.parameters: (ServiceTemplateId id)
focal_class.return: ServiceTemplateId
focal_class.signature: ServiceTemplateId splitTopologyOfServiceTemplate(ServiceTemplateId id)
focal_class.class_method_signature: Splitting.matchTopologyOfServiceTemplate(ServiceTemplateId id)
focal_class.full_signature: public ServiceTemplateId matchTopologyOfServiceTemplate(ServiceTemplateId id)
focal_class.identifier: matchTopologyOfServiceTemplate
focal_class.modifiers: public
focal_class.parameters: (ServiceTemplateId id)
focal_class.return: ServiceTemplateId
focal_class.signature: ServiceTemplateId matchTopologyOfServiceTemplate(ServiceTemplateId id)
focal_class.class_method_signature: Splitting.hasTargetLabels(TTopologyTemplate topologyTemplate)
focal_class.full_signature: private boolean hasTargetLabels(TTopologyTemplate topologyTemplate)
focal_class.identifier: hasTargetLabels
focal_class.modifiers: private
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: boolean
focal_class.signature: boolean hasTargetLabels(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: Splitting.composeServiceTemplates(String composedSolutionServiceTemplateID, List<ServiceTemplateId> serviceTemplateIds)
focal_class.full_signature: public ServiceTemplateId composeServiceTemplates(String composedSolutionServiceTemplateID, List<ServiceTemplateId> serviceTemplateIds)
focal_class.identifier: composeServiceTemplates
focal_class.modifiers: public
focal_class.parameters: (String composedSolutionServiceTemplateID, List<ServiceTemplateId> serviceTemplateIds)
focal_class.return: ServiceTemplateId
focal_class.signature: ServiceTemplateId composeServiceTemplates(String composedSolutionServiceTemplateID, List<ServiceTemplateId> serviceTemplateIds)
focal_class.class_method_signature: Splitting.resolveTopologyTemplate(ServiceTemplateId serviceTemplateId)
focal_class.full_signature: public void resolveTopologyTemplate(ServiceTemplateId serviceTemplateId)
focal_class.identifier: resolveTopologyTemplate
focal_class.modifiers: public
focal_class.parameters: (ServiceTemplateId serviceTemplateId)
focal_class.return: void
focal_class.signature: void resolveTopologyTemplate(ServiceTemplateId serviceTemplateId)
focal_class.class_method_signature: Splitting.checkValidTopology(TTopologyTemplate topologyTemplate)
focal_class.full_signature: public boolean checkValidTopology(TTopologyTemplate topologyTemplate)
focal_class.identifier: checkValidTopology
focal_class.modifiers: public
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: boolean
focal_class.signature: boolean checkValidTopology(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: Splitting.split(TTopologyTemplate topologyTemplate)
focal_class.full_signature: public TTopologyTemplate split(TTopologyTemplate topologyTemplate)
focal_class.identifier: split
focal_class.modifiers: public
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: TTopologyTemplate
focal_class.signature: TTopologyTemplate split(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: Splitting.getHostingInjectionOptions(TTopologyTemplate topologyTemplate)
focal_class.full_signature: public Map<String, List<TTopologyTemplate>> getHostingInjectionOptions(TTopologyTemplate topologyTemplate)
focal_class.identifier: getHostingInjectionOptions
focal_class.modifiers: public
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: Map<String, List<TTopologyTemplate>>
focal_class.signature: Map<String, List<TTopologyTemplate>> getHostingInjectionOptions(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: Splitting.hasNodeOpenRequirement(TTopologyTemplate topology, TNodeTemplate node)
focal_class.full_signature: private boolean hasNodeOpenRequirement(TTopologyTemplate topology, TNodeTemplate node)
focal_class.identifier: hasNodeOpenRequirement
focal_class.modifiers: private
focal_class.parameters: (TTopologyTemplate topology, TNodeTemplate node)
focal_class.return: boolean
focal_class.signature: boolean hasNodeOpenRequirement(TTopologyTemplate topology, TNodeTemplate node)
focal_class.class_method_signature: Splitting.getHostingMatchingOptionsWithDefaultLabeling(TTopologyTemplate topologyTemplate)
focal_class.full_signature: public Map<String, List<TTopologyTemplate>> getHostingMatchingOptionsWithDefaultLabeling(TTopologyTemplate topologyTemplate)
focal_class.identifier: getHostingMatchingOptionsWithDefaultLabeling
focal_class.modifiers: public
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: Map<String, List<TTopologyTemplate>>
focal_class.signature: Map<String, List<TTopologyTemplate>> getHostingMatchingOptionsWithDefaultLabeling(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: Splitting.hostMatchingWithDefaultHostSelection(TTopologyTemplate topologyTemplate)
focal_class.full_signature: public TTopologyTemplate hostMatchingWithDefaultHostSelection(TTopologyTemplate topologyTemplate)
focal_class.identifier: hostMatchingWithDefaultHostSelection
focal_class.modifiers: public
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: TTopologyTemplate
focal_class.signature: TTopologyTemplate hostMatchingWithDefaultHostSelection(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: Splitting.connectionMatchingWithDefaultConnectorSelection(TTopologyTemplate topologyTemplate)
focal_class.full_signature: public TTopologyTemplate connectionMatchingWithDefaultConnectorSelection(TTopologyTemplate topologyTemplate)
focal_class.identifier: connectionMatchingWithDefaultConnectorSelection
focal_class.modifiers: public
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: TTopologyTemplate
focal_class.signature: TTopologyTemplate connectionMatchingWithDefaultConnectorSelection(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: Splitting.injectNodeTemplates(TTopologyTemplate topologyTemplate, Map<String, TTopologyTemplate> injectNodes, InjectRemoval removal)
focal_class.full_signature: public TTopologyTemplate injectNodeTemplates(TTopologyTemplate topologyTemplate, Map<String, TTopologyTemplate> injectNodes, InjectRemoval removal)
focal_class.identifier: injectNodeTemplates
focal_class.modifiers: public
focal_class.parameters: (TTopologyTemplate topologyTemplate, Map<String, TTopologyTemplate> injectNodes, InjectRemoval removal)
focal_class.return: TTopologyTemplate
focal_class.signature: TTopologyTemplate injectNodeTemplates(TTopologyTemplate topologyTemplate, Map<String, TTopologyTemplate> injectNodes, InjectRemoval removal)
focal_class.class_method_signature: Splitting.getConnectionInjectionOptions(TTopologyTemplate topologyTemplate)
focal_class.full_signature: public Map<String, List<TTopologyTemplate>> getConnectionInjectionOptions(TTopologyTemplate topologyTemplate)
focal_class.identifier: getConnectionInjectionOptions
focal_class.modifiers: public
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: Map<String, List<TTopologyTemplate>>
focal_class.signature: Map<String, List<TTopologyTemplate>> getConnectionInjectionOptions(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: Splitting.injectConnectionNodeTemplates(TTopologyTemplate topologyTemplate, Map<String, TTopologyTemplate> selectedConnectionFragments)
focal_class.full_signature: public TTopologyTemplate injectConnectionNodeTemplates(TTopologyTemplate topologyTemplate, Map<String, TTopologyTemplate> selectedConnectionFragments)
focal_class.identifier: injectConnectionNodeTemplates
focal_class.modifiers: public
focal_class.parameters: (TTopologyTemplate topologyTemplate, Map<String, TTopologyTemplate> selectedConnectionFragments)
focal_class.return: TTopologyTemplate
focal_class.signature: TTopologyTemplate injectConnectionNodeTemplates(TTopologyTemplate topologyTemplate, Map<String, TTopologyTemplate> selectedConnectionFragments)
focal_class.class_method_signature: Splitting.getMatchingRelationshipType(TRequirement requirement, TCapability capability)
focal_class.full_signature: private TRelationshipType getMatchingRelationshipType(TRequirement requirement, TCapability capability)
focal_class.identifier: getMatchingRelationshipType
focal_class.modifiers: private
focal_class.parameters: (TRequirement requirement, TCapability capability)
focal_class.return: TRelationshipType
focal_class.signature: TRelationshipType getMatchingRelationshipType(TRequirement requirement, TCapability capability)
focal_class.class_method_signature: Splitting.reassignOutgoingRelationships(List<TRelationshipTemplate> outgoingRel, TNodeTemplate newSource)
focal_class.full_signature: private List<TRelationshipTemplate> reassignOutgoingRelationships(List<TRelationshipTemplate> outgoingRel, TNodeTemplate newSource)
focal_class.identifier: reassignOutgoingRelationships
focal_class.modifiers: private
focal_class.parameters: (List<TRelationshipTemplate> outgoingRel, TNodeTemplate newSource)
focal_class.return: List<TRelationshipTemplate>
focal_class.signature: List<TRelationshipTemplate> reassignOutgoingRelationships(List<TRelationshipTemplate> outgoingRel, TNodeTemplate newSource)
focal_class.class_method_signature: Splitting.reassignIncomingRelationships(List<TRelationshipTemplate> incomingRel, TNodeTemplate newTarget)
focal_class.full_signature: private List<TRelationshipTemplate> reassignIncomingRelationships(List<TRelationshipTemplate> incomingRel, TNodeTemplate newTarget)
focal_class.identifier: reassignIncomingRelationships
focal_class.modifiers: private
focal_class.parameters: (List<TRelationshipTemplate> incomingRel, TNodeTemplate newTarget)
focal_class.return: List<TRelationshipTemplate>
focal_class.signature: List<TRelationshipTemplate> reassignIncomingRelationships(List<TRelationshipTemplate> incomingRel, TNodeTemplate newTarget)
focal_class.class_method_signature: Splitting.getReplacementNodeTemplateCandidatesForMatching(TTopologyTemplate topologyTemplate, List<TNodeTemplate> matchingNodeTemplates)
focal_class.full_signature: protected List<TNodeTemplate> getReplacementNodeTemplateCandidatesForMatching(TTopologyTemplate topologyTemplate, List<TNodeTemplate> matchingNodeTemplates)
focal_class.identifier: getReplacementNodeTemplateCandidatesForMatching
focal_class.modifiers: protected
focal_class.parameters: (TTopologyTemplate topologyTemplate, List<TNodeTemplate> matchingNodeTemplates)
focal_class.return: List<TNodeTemplate>
focal_class.signature: List<TNodeTemplate> getReplacementNodeTemplateCandidatesForMatching(TTopologyTemplate topologyTemplate, List<TNodeTemplate> matchingNodeTemplates)
focal_class.class_method_signature: Splitting.getNodeTemplatesWithoutIncomingHostedOnRelationships(TTopologyTemplate topologyTemplate)
focal_class.full_signature: protected List<TNodeTemplate> getNodeTemplatesWithoutIncomingHostedOnRelationships(TTopologyTemplate topologyTemplate)
focal_class.identifier: getNodeTemplatesWithoutIncomingHostedOnRelationships
focal_class.modifiers: protected
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: List<TNodeTemplate>
focal_class.signature: List<TNodeTemplate> getNodeTemplatesWithoutIncomingHostedOnRelationships(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: Splitting.getNodeTemplatesWithoutOutgoingHostedOnRelationships(TTopologyTemplate topologyTemplate)
focal_class.full_signature: protected List<TNodeTemplate> getNodeTemplatesWithoutOutgoingHostedOnRelationships(TTopologyTemplate topologyTemplate)
focal_class.identifier: getNodeTemplatesWithoutOutgoingHostedOnRelationships
focal_class.modifiers: protected
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: List<TNodeTemplate>
focal_class.signature: List<TNodeTemplate> getNodeTemplatesWithoutOutgoingHostedOnRelationships(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: Splitting.getNodeTemplatesWhichPredecessorsHasNoPredecessors(TTopologyTemplate topologyTemplate)
focal_class.full_signature: protected List<TNodeTemplate> getNodeTemplatesWhichPredecessorsHasNoPredecessors(TTopologyTemplate topologyTemplate)
focal_class.identifier: getNodeTemplatesWhichPredecessorsHasNoPredecessors
focal_class.modifiers: protected
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: List<TNodeTemplate>
focal_class.signature: List<TNodeTemplate> getNodeTemplatesWhichPredecessorsHasNoPredecessors(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: Splitting.getHostedOnSuccessorsOfNodeTemplate(TTopologyTemplate topologyTemplate, TNodeTemplate nodeTemplate)
focal_class.full_signature: protected List<TNodeTemplate> getHostedOnSuccessorsOfNodeTemplate(TTopologyTemplate topologyTemplate, TNodeTemplate nodeTemplate)
focal_class.identifier: getHostedOnSuccessorsOfNodeTemplate
focal_class.modifiers: protected
focal_class.parameters: (TTopologyTemplate topologyTemplate, TNodeTemplate nodeTemplate)
focal_class.return: List<TNodeTemplate>
focal_class.signature: List<TNodeTemplate> getHostedOnSuccessorsOfNodeTemplate(TTopologyTemplate topologyTemplate, TNodeTemplate nodeTemplate)
focal_class.class_method_signature: Splitting.getHostedOnPredecessorsOfNodeTemplate(TTopologyTemplate topologyTemplate, TNodeTemplate nodeTemplate)
focal_class.full_signature: protected List<TNodeTemplate> getHostedOnPredecessorsOfNodeTemplate(TTopologyTemplate topologyTemplate, TNodeTemplate nodeTemplate)
focal_class.identifier: getHostedOnPredecessorsOfNodeTemplate
focal_class.modifiers: protected
focal_class.parameters: (TTopologyTemplate topologyTemplate, TNodeTemplate nodeTemplate)
focal_class.return: List<TNodeTemplate>
focal_class.signature: List<TNodeTemplate> getHostedOnPredecessorsOfNodeTemplate(TTopologyTemplate topologyTemplate, TNodeTemplate nodeTemplate)
focal_class.class_method_signature: Splitting.computeTransitiveClosure(TTopologyTemplate topologyTemplate)
focal_class.full_signature: public Map<TNodeTemplate, Set<TNodeTemplate>> computeTransitiveClosure(TTopologyTemplate topologyTemplate)
focal_class.identifier: computeTransitiveClosure
focal_class.modifiers: public
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: Map<TNodeTemplate, Set<TNodeTemplate>>
focal_class.signature: Map<TNodeTemplate, Set<TNodeTemplate>> computeTransitiveClosure(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: Splitting.computeNodeForTransitiveClosure(TNodeTemplate nodeTemplate)
focal_class.full_signature: private void computeNodeForTransitiveClosure(TNodeTemplate nodeTemplate)
focal_class.identifier: computeNodeForTransitiveClosure
focal_class.modifiers: private
focal_class.parameters: (TNodeTemplate nodeTemplate)
focal_class.return: void
focal_class.signature: void computeNodeForTransitiveClosure(TNodeTemplate nodeTemplate)
focal_class.class_method_signature: Splitting.getOpenRequirementsAndMatchingBasisCapabilityTypeNames(TTopologyTemplate topologyTemplate)
focal_class.full_signature: public Map<TRequirement, String> getOpenRequirementsAndMatchingBasisCapabilityTypeNames(TTopologyTemplate topologyTemplate)
focal_class.identifier: getOpenRequirementsAndMatchingBasisCapabilityTypeNames
focal_class.modifiers: public
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: Map<TRequirement, String>
focal_class.signature: Map<TRequirement, String> getOpenRequirementsAndMatchingBasisCapabilityTypeNames(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: Splitting.getOpenRequirements(TTopologyTemplate topologyTemplate)
focal_class.full_signature: public List<TRequirement> getOpenRequirements(TTopologyTemplate topologyTemplate)
focal_class.identifier: getOpenRequirements
focal_class.modifiers: public
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: List<TRequirement>
focal_class.signature: List<TRequirement> getOpenRequirements(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: Splitting.getBasisCapabilityType(QName capabilityTypeQName)
focal_class.full_signature: private TCapabilityType getBasisCapabilityType(QName capabilityTypeQName)
focal_class.identifier: getBasisCapabilityType
focal_class.modifiers: private
focal_class.parameters: (QName capabilityTypeQName)
focal_class.return: TCapabilityType
focal_class.signature: TCapabilityType getBasisCapabilityType(QName capabilityTypeQName)
focal_class.class_method_signature: Splitting.getRequiredCapabilityTypeQNameOfRequirement(TRequirement requirement)
focal_class.full_signature: private QName getRequiredCapabilityTypeQNameOfRequirement(TRequirement requirement)
focal_class.identifier: getRequiredCapabilityTypeQNameOfRequirement
focal_class.modifiers: private
focal_class.parameters: (TRequirement requirement)
focal_class.return: QName
focal_class.signature: QName getRequiredCapabilityTypeQNameOfRequirement(TRequirement requirement)
focal_class.class_method_signature: Splitting.getBasisRelationshipType(QName relationshipTypeQName)
focal_class.full_signature: public TRelationshipType getBasisRelationshipType(QName relationshipTypeQName)
focal_class.identifier: getBasisRelationshipType
focal_class.modifiers: public
focal_class.parameters: (QName relationshipTypeQName)
focal_class.return: TRelationshipType
focal_class.signature: TRelationshipType getBasisRelationshipType(QName relationshipTypeQName)
focal_class.class_method_signature: Splitting.addMatchingRelationshipTemplateToTopologyTemplate(TTopologyTemplate topologyTemplate, TRelationshipType relationshipType, TRequirement requirement, TCapability capability)
focal_class.full_signature: private void addMatchingRelationshipTemplateToTopologyTemplate(TTopologyTemplate topologyTemplate, TRelationshipType relationshipType, TRequirement requirement, TCapability capability)
focal_class.identifier: addMatchingRelationshipTemplateToTopologyTemplate
focal_class.modifiers: private
focal_class.parameters: (TTopologyTemplate topologyTemplate, TRelationshipType relationshipType, TRequirement requirement, TCapability capability)
focal_class.return: void
focal_class.signature: void addMatchingRelationshipTemplateToTopologyTemplate(TTopologyTemplate topologyTemplate, TRelationshipType relationshipType, TRequirement requirement, TCapability capability)
focal_class.class_method_signature: Splitting.equalsWithDifferentId(TNodeTemplate node1, TNodeTemplate node2)
focal_class.full_signature: private boolean equalsWithDifferentId(TNodeTemplate node1, TNodeTemplate node2)
focal_class.identifier: equalsWithDifferentId
focal_class.modifiers: private
focal_class.parameters: (TNodeTemplate node1, TNodeTemplate node2)
focal_class.return: boolean
focal_class.signature: boolean equalsWithDifferentId(TNodeTemplate node1, TNodeTemplate node2)
focal_method.body: public TTopologyTemplate split(TTopologyTemplate topologyTemplate) throws SplittingException {
          if (!checkValidTopology(topologyTemplate)) {
              throw new SplittingException("Topology is not valid");
          }
  
          // Copy for incremental removal of the processed nodes
          TTopologyTemplate topologyTemplateCopy = BackendUtils.clone(topologyTemplate);
  
          HashSet<TNodeTemplate> nodeTemplatesWhichPredecessorsHasNoPredecessors
              = new HashSet<>(getNodeTemplatesWhichPredecessorsHasNoPredecessors(topologyTemplateCopy));
  
          // Consider each node which hostedOn-predecessor nodes have no further hostedOn-predecessors
          while (!nodeTemplatesWhichPredecessorsHasNoPredecessors.isEmpty()) {
  
              for (TNodeTemplate currentNode : nodeTemplatesWhichPredecessorsHasNoPredecessors) {
  
                  List<TNodeTemplate> predecessors = getHostedOnPredecessorsOfNodeTemplate(topologyTemplateCopy, currentNode);
                  Set<String> predecessorsTargetLabel = new HashSet<>();
  
                  for (TNodeTemplate predecessor : predecessors) {
                      Optional<String> targetLabel = ModelUtilities.getTargetLabel(predecessor);
                      if (!targetLabel.isPresent()) {
                          LOGGER.error("No target label present");
                          LOGGER.error("id " + predecessor.getId());
                      }
  
                      //noinspection OptionalGetWithoutIsPresent
                      predecessorsTargetLabel.add(targetLabel.get().toLowerCase());
                  }
                  // If all predecessors have the same target label assign this label to the considered node
                  if (predecessorsTargetLabel.size() == 1) {
                      //noinspection OptionalGetWithoutIsPresent
                      ModelUtilities.setTargetLabel(currentNode, ModelUtilities.getTargetLabel(predecessors.get(0)).get());
                  } else {
  
                      List<TRelationshipTemplate> incomingRelationships
                          = ModelUtilities.getIncomingRelationshipTemplates(topologyTemplateCopy, currentNode);
                      List<TRelationshipTemplate> outgoingRelationships
                          = ModelUtilities.getOutgoingRelationshipTemplates(topologyTemplateCopy, currentNode);
  
                      // Otherwise, duplicate the considered node for each target label
                      for (String targetLabel : predecessorsTargetLabel) {
                          TNodeTemplate duplicatedNode = BackendUtils.clone(currentNode);
                          duplicatedNode.setId(Util.makeNCName(currentNode.getId() + "-" + targetLabel));
                          duplicatedNode.setName(Util.makeNCName(currentNode.getName() + "-" + targetLabel));
                          topologyTemplate.getNodeTemplateOrRelationshipTemplate().add(duplicatedNode);
                          topologyTemplateCopy.getNodeTemplateOrRelationshipTemplate().add(duplicatedNode);
                          ModelUtilities.setTargetLabel(duplicatedNode, targetLabel);
  
                          for (TRelationshipTemplate incomingRelationship : incomingRelationships) {
                              Object sourceElementIncommingRel = incomingRelationship.getSourceElement().getRef();
  
                              /*
                               * incoming hostedOn relationships from predecessors with the same label and not hostedOn
                               * relationships (e.g. conntectsTo) are assigned to the duplicated node.
                               * The origin relationships are duplicated
                               */
                              TNodeTemplate sourceNodeTemplate = ModelUtilities.getSourceNodeTemplateOfRelationshipTemplate(topologyTemplateCopy, incomingRelationship);
                              if (((ModelUtilities.getTargetLabel(sourceNodeTemplate).get()
                                  .equalsIgnoreCase(ModelUtilities.getTargetLabel(duplicatedNode).get())
                                  && getBasisRelationshipType(incomingRelationship.getType()).getValidTarget().getTypeRef().getLocalPart().equalsIgnoreCase("Container"))
                                  || !predecessors.contains(sourceNodeTemplate))) {
  
                                  List<TRelationshipTemplate> reassignRelationship = new ArrayList<>();
                                  reassignRelationship.add(incomingRelationship);
                                  //Reassign incoming relationships
                                  List<TRelationshipTemplate> reassignedRelationship
                                      = reassignIncomingRelationships(reassignRelationship, duplicatedNode);
                                  topologyTemplate.getNodeTemplateOrRelationshipTemplate().addAll(reassignedRelationship);
                                  topologyTemplateCopy.getNodeTemplateOrRelationshipTemplate().addAll(reassignedRelationship);
                              }
                          }
  
                          /*
                           * Reassign outgoing relationships. No difference between the relationship types.
                           * Origin outgoing relationships are duplicated and added to the duplicated node as source
                           */
                          List<TRelationshipTemplate> newOutgoingRelationships
                              = reassignOutgoingRelationships(outgoingRelationships, duplicatedNode);
                          topologyTemplate.getNodeTemplateOrRelationshipTemplate().addAll(newOutgoingRelationships);
                          topologyTemplateCopy.getNodeTemplateOrRelationshipTemplate().addAll(newOutgoingRelationships);
                      }
  
                      // Remove the original node and its relations from the origin topology template and the copy
                      topologyTemplate.getNodeTemplateOrRelationshipTemplate().remove(currentNode);
                      topologyTemplate.getNodeTemplateOrRelationshipTemplate().removeAll(outgoingRelationships);
                      topologyTemplate.getNodeTemplateOrRelationshipTemplate().removeAll(incomingRelationships);
                      topologyTemplateCopy.getNodeTemplateOrRelationshipTemplate().remove(currentNode);
                      topologyTemplateCopy.getNodeTemplateOrRelationshipTemplate().removeAll(outgoingRelationships);
                      topologyTemplateCopy.getNodeTemplateOrRelationshipTemplate().removeAll(incomingRelationships);
                  }
  
                  // Remove the hostedOn-predecessors of the considered node and their relations in the working copy
                  topologyTemplateCopy.getNodeTemplateOrRelationshipTemplate().removeAll(predecessors);
                  List<TRelationshipTemplate> removingRelationships =
                      topologyTemplateCopy.getRelationshipTemplates().stream()
                          .filter(rt -> predecessors.contains(ModelUtilities.getSourceNodeTemplateOfRelationshipTemplate(topologyTemplateCopy, rt))
                              || predecessors.contains(ModelUtilities.getTargetNodeTemplateOfRelationshipTemplate(topologyTemplateCopy, rt)))
                          .collect(Collectors.toList());
  
                  topologyTemplateCopy.getNodeTemplateOrRelationshipTemplate().removeAll(removingRelationships);
              }
              nodeTemplatesWhichPredecessorsHasNoPredecessors.clear();
              nodeTemplatesWhichPredecessorsHasNoPredecessors.addAll(getNodeTemplatesWhichPredecessorsHasNoPredecessors(topologyTemplateCopy));
          }
  
          return topologyTemplate;
      }
focal_method.class_method_signature: Splitting.split(TTopologyTemplate topologyTemplate)
focal_method.full_signature: public TTopologyTemplate split(TTopologyTemplate topologyTemplate)
focal_method.identifier: split
focal_method.invocations: checkValidTopology clone getNodeTemplatesWhichPredecessorsHasNoPredecessors isEmpty getHostedOnPredecessorsOfNodeTemplate getTargetLabel isPresent error error getId add toLowerCase get size setTargetLabel get getTargetLabel get getIncomingRelationshipTemplates getOutgoingRelationshipTemplates clone setId makeNCName getId setName makeNCName getName add getNodeTemplateOrRelationshipTemplate add getNodeTemplateOrRelationshipTemplate setTargetLabel getRef getSourceElement getSourceNodeTemplateOfRelationshipTemplate equalsIgnoreCase get getTargetLabel get getTargetLabel equalsIgnoreCase getLocalPart getTypeRef getValidTarget getBasisRelationshipType getType contains add reassignIncomingRelationships addAll getNodeTemplateOrRelationshipTemplate addAll getNodeTemplateOrRelationshipTemplate reassignOutgoingRelationships addAll getNodeTemplateOrRelationshipTemplate addAll getNodeTemplateOrRelationshipTemplate remove getNodeTemplateOrRelationshipTemplate removeAll getNodeTemplateOrRelationshipTemplate removeAll getNodeTemplateOrRelationshipTemplate remove getNodeTemplateOrRelationshipTemplate removeAll getNodeTemplateOrRelationshipTemplate removeAll getNodeTemplateOrRelationshipTemplate removeAll getNodeTemplateOrRelationshipTemplate collect filter stream getRelationshipTemplates contains getSourceNodeTemplateOfRelationshipTemplate contains getTargetNodeTemplateOfRelationshipTemplate toList removeAll getNodeTemplateOrRelationshipTemplate clear addAll getNodeTemplatesWhichPredecessorsHasNoPredecessors
focal_method.modifiers: public
focal_method.parameters: (TTopologyTemplate topologyTemplate)
focal_method.return: TTopologyTemplate
focal_method.signature: TTopologyTemplate split(TTopologyTemplate topologyTemplate)