test_class.file: outland-feature-java/src/test/java/outland/feature/OptionSelectorWeightedTest.java
test_class.identifier: OptionSelectorWeightedTest
test_case.body: @Test
    public void testBaseCases() {
  
      final ArrayList<FeatureOption> itemList1 = Lists.newArrayList(
          FeatureOption.newBuilder().setWeight(0).build(),
          FeatureOption.newBuilder().setWeight(10000).build()
      );
      OptionSelectorWeighted or1 = new OptionSelectorWeighted(itemList1);
      IntStream.range(0, 10000).forEach(i -> assertTrue(10000 == or1.select().getWeight()));
  
      final ArrayList<FeatureOption> itemList2 = Lists.newArrayList(
          FeatureOption.newBuilder().setWeight(10000).build()
      );
      OptionSelectorWeighted or2 = new OptionSelectorWeighted(itemList2);
      IntStream.range(0, 10000).forEach(i -> assertTrue(10000 == or2.select().getWeight()));
    }
test_case.class_method_signature: OptionSelectorWeightedTest.testBaseCases()
test_case.full_signature: @Test public void testBaseCases()
test_case.identifier: testBaseCases
test_case.invocations: newArrayList build setWeight newBuilder build setWeight newBuilder forEach range assertTrue getWeight select newArrayList build setWeight newBuilder forEach range assertTrue getWeight select
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBaseCases()
focal_class.declarator: wheel
focal_class.modifier: private final
focal_class.original_string: private final double[] wheel;
focal_class.type: double[]
focal_class.var_name: wheel
focal_class.declarator: values
focal_class.modifier: private final
focal_class.original_string: private final FeatureOption[] values;
focal_class.type: FeatureOption[]
focal_class.var_name: values
focal_class.file: outland-feature-java/src/main/java/outland/feature/OptionSelectorWeighted.java
focal_class.identifier: OptionSelectorWeighted
focal_class.class_method_signature: OptionSelectorWeighted.OptionSelectorWeighted(List<FeatureOption> options)
focal_class.full_signature:   OptionSelectorWeighted(List<FeatureOption> options)
focal_class.identifier: OptionSelectorWeighted
focal_class.parameters: (List<FeatureOption> options)
focal_class.signature:  OptionSelectorWeighted(List<FeatureOption> options)
focal_class.class_method_signature: OptionSelectorWeighted.select()
focal_class.full_signature:  FeatureOption select()
focal_class.identifier: select
focal_class.parameters: ()
focal_class.return: FeatureOption
focal_class.signature: FeatureOption select()
focal_class.class_method_signature: OptionSelectorWeighted.buildValues(List<FeatureOption> options)
focal_class.full_signature: private FeatureOption[] buildValues(List<FeatureOption> options)
focal_class.identifier: buildValues
focal_class.modifiers: private
focal_class.parameters: (List<FeatureOption> options)
focal_class.return: FeatureOption[]
focal_class.signature: FeatureOption[] buildValues(List<FeatureOption> options)
focal_class.class_method_signature: OptionSelectorWeighted.buildWheel(List<FeatureOption> options)
focal_class.full_signature: private double[] buildWheel(List<FeatureOption> options)
focal_class.identifier: buildWheel
focal_class.modifiers: private
focal_class.parameters: (List<FeatureOption> options)
focal_class.return: double[]
focal_class.signature: double[] buildWheel(List<FeatureOption> options)
focal_class.class_method_signature: OptionSelectorWeighted.normalize(int weight)
focal_class.full_signature: private double normalize(int weight)
focal_class.identifier: normalize
focal_class.modifiers: private
focal_class.parameters: (int weight)
focal_class.return: double
focal_class.signature: double normalize(int weight)
focal_method.body: FeatureOption select() {
      final double randomValue = Math.random();
      int idx = Arrays.binarySearch(wheel, randomValue);
      if (idx < 0) {
        idx = -idx - 1;
      }
      return values[idx];
    }
focal_method.class_method_signature: OptionSelectorWeighted.select()
focal_method.full_signature:  FeatureOption select()
focal_method.identifier: select
focal_method.invocations: random binarySearch
focal_method.parameters: ()
focal_method.return: FeatureOption
focal_method.signature: FeatureOption select()