test_class.declarator: topology
test_class.modifier: private
test_class.original_string: private TTopologyTemplate topology;
test_class.type: TTopologyTemplate
test_class.var_name: topology
test_class.file: org.eclipse.winery.repository/src/test/java/org/eclipse/winery/repository/targetallocation/util/AllocationUtilsTest.java
test_class.identifier: AllocationUtilsTest
test_class.superclass: extends TestWithGitBackedRepository
test_case.body: @Test
      public void getPermutations() {
          List<List<String>> possibilities = Arrays.asList(Arrays.asList("A", "B"), Arrays.asList("C", "D"));
  
          // bound
          List<List<String>> results = AllocationUtils.getPermutations(possibilities, 4);
          assertEquals(4, results.size());
          assertEquals("[[A, C], [A, D], [B, C], [B, D]]", results.toString());
          results = AllocationUtils.getPermutations(possibilities, 2);
          assertEquals(2, results.size());
          assertEquals("[[A, C], [A, D]]", results.toString());
  
          // negative max
          results = AllocationUtils.getPermutations(possibilities, -10);
          assertEquals(0, results.size());
  
          // special case of one element
          possibilities = Collections.singletonList(Arrays.asList("A", "B", "C"));
          results = AllocationUtils.getPermutations(possibilities, Integer.MAX_VALUE);
          assertEquals("[[A], [B], [C]]", results.toString());
      }
test_case.class_method_signature: AllocationUtilsTest.getPermutations()
test_case.full_signature: @Test public void getPermutations()
test_case.identifier: getPermutations
test_case.invocations: asList asList asList getPermutations assertEquals size assertEquals toString getPermutations assertEquals size assertEquals toString getPermutations assertEquals size singletonList asList getPermutations assertEquals toString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getPermutations()
focal_class.declarator: idCounter = 0
focal_class.modifier: public static
focal_class.original_string: public static long idCounter = 0;
focal_class.type: long
focal_class.var_name: idCounter
focal_class.declarator: repository = RepositoryFactory.getRepository()
focal_class.modifier: private static
focal_class.original_string: private static IRepository repository = RepositoryFactory.getRepository();
focal_class.type: IRepository
focal_class.var_name: repository
focal_class.file: org.eclipse.winery.repository/src/main/java/org/eclipse/winery/repository/targetallocation/util/AllocationUtils.java
focal_class.identifier: AllocationUtils
focal_class.class_method_signature: AllocationUtils.getPermutations(List<List<T>> possibilities, int max)
focal_class.full_signature: public static List<List<T>> getPermutations(List<List<T>> possibilities, int max)
focal_class.identifier: getPermutations
focal_class.modifiers: public static
focal_class.parameters: (List<List<T>> possibilities, int max)
focal_class.return: List<List<T>>
focal_class.signature: List<List<T>> getPermutations(List<List<T>> possibilities, int max)
focal_class.class_method_signature: AllocationUtils.getPermutations(List<List<T>> possibilities, List<List<T>> results,
                                              int depth, List<T> current, int max)
focal_class.full_signature: private static void getPermutations(List<List<T>> possibilities, List<List<T>> results,
                                              int depth, List<T> current, int max)
focal_class.identifier: getPermutations
focal_class.modifiers: private static
focal_class.parameters: (List<List<T>> possibilities, List<List<T>> results,
                                              int depth, List<T> current, int max)
focal_class.return: void
focal_class.signature: void getPermutations(List<List<T>> possibilities, List<List<T>> results,
                                              int depth, List<T> current, int max)
focal_class.class_method_signature: AllocationUtils.generateTargetLabelTopologies(TopologyWrapper topology,
                                                                        List<List<PermutationHelper>> permutations)
focal_class.full_signature: public static List<TopologyWrapper> generateTargetLabelTopologies(TopologyWrapper topology,
                                                                        List<List<PermutationHelper>> permutations)
focal_class.identifier: generateTargetLabelTopologies
focal_class.modifiers: public static
focal_class.parameters: (TopologyWrapper topology,
                                                                        List<List<PermutationHelper>> permutations)
focal_class.return: List<TopologyWrapper>
focal_class.signature: List<TopologyWrapper> generateTargetLabelTopologies(TopologyWrapper topology,
                                                                        List<List<PermutationHelper>> permutations)
focal_class.class_method_signature: AllocationUtils.getPolicyTemplates(TNodeTemplate nodeTemplate)
focal_class.full_signature: public static List<TPolicyTemplate> getPolicyTemplates(TNodeTemplate nodeTemplate)
focal_class.identifier: getPolicyTemplates
focal_class.modifiers: public static
focal_class.parameters: (TNodeTemplate nodeTemplate)
focal_class.return: List<TPolicyTemplate>
focal_class.signature: List<TPolicyTemplate> getPolicyTemplates(TNodeTemplate nodeTemplate)
focal_class.class_method_signature: AllocationUtils.toPolicyTemplate(TPolicy policy)
focal_class.full_signature: public static TPolicyTemplate toPolicyTemplate(TPolicy policy)
focal_class.identifier: toPolicyTemplate
focal_class.modifiers: public static
focal_class.parameters: (TPolicy policy)
focal_class.return: TPolicyTemplate
focal_class.signature: TPolicyTemplate toPolicyTemplate(TPolicy policy)
focal_class.class_method_signature: AllocationUtils.deepcopy(TTopologyTemplate topologyTemplate)
focal_class.full_signature: public static TTopologyTemplate deepcopy(TTopologyTemplate topologyTemplate)
focal_class.identifier: deepcopy
focal_class.modifiers: public static
focal_class.parameters: (TTopologyTemplate topologyTemplate)
focal_class.return: TTopologyTemplate
focal_class.signature: TTopologyTemplate deepcopy(TTopologyTemplate topologyTemplate)
focal_class.class_method_signature: AllocationUtils.deepcopy(TTopologyTemplate topologyTemplate, boolean changeNames)
focal_class.full_signature: public static TTopologyTemplate deepcopy(TTopologyTemplate topologyTemplate, boolean changeNames)
focal_class.identifier: deepcopy
focal_class.modifiers: public static
focal_class.parameters: (TTopologyTemplate topologyTemplate, boolean changeNames)
focal_class.return: TTopologyTemplate
focal_class.signature: TTopologyTemplate deepcopy(TTopologyTemplate topologyTemplate, boolean changeNames)
focal_class.class_method_signature: AllocationUtils.clone(TNodeTemplate nodeTemplate, boolean changeNames)
focal_class.full_signature: public static TNodeTemplate clone(TNodeTemplate nodeTemplate, boolean changeNames)
focal_class.identifier: clone
focal_class.modifiers: public static
focal_class.parameters: (TNodeTemplate nodeTemplate, boolean changeNames)
focal_class.return: TNodeTemplate
focal_class.signature: TNodeTemplate clone(TNodeTemplate nodeTemplate, boolean changeNames)
focal_class.class_method_signature: AllocationUtils.clone(TRelationshipTemplate relationshipTemplate, boolean changeNames)
focal_class.full_signature: public static TRelationshipTemplate clone(TRelationshipTemplate relationshipTemplate, boolean changeNames)
focal_class.identifier: clone
focal_class.modifiers: public static
focal_class.parameters: (TRelationshipTemplate relationshipTemplate, boolean changeNames)
focal_class.return: TRelationshipTemplate
focal_class.signature: TRelationshipTemplate clone(TRelationshipTemplate relationshipTemplate, boolean changeNames)
focal_method.body: public static <T> List<List<T>> getPermutations(List<List<T>> possibilities, int max) {
          List<List<T>> results = new ArrayList<>();
          getPermutations(possibilities, results, 0, new ArrayList<>(), max);
          return results;
      }
focal_method.class_method_signature: AllocationUtils.getPermutations(List<List<T>> possibilities, int max)
focal_method.full_signature: public static List<List<T>> getPermutations(List<List<T>> possibilities, int max)
focal_method.identifier: getPermutations
focal_method.invocations: getPermutations
focal_method.modifiers: public static
focal_method.parameters: (List<List<T>> possibilities, int max)
focal_method.return: List<List<T>>
focal_method.signature: List<List<T>> getPermutations(List<List<T>> possibilities, int max)