test_class.declarator: random
test_class.modifier: private
test_class.original_string: private ReplayablePseudoRandom random;
test_class.type: ReplayablePseudoRandom
test_class.var_name: random
test_class.file: gazeplay-commons/src/test/java/net/gazeplay/commons/random/ReplayablePseudoRandomTest.java
test_class.identifier: ReplayablePseudoRandomTest
test_case.body: @Test
      public void nextFloatTestDistribution() {
          int[] res = new int[10];
          int error = 0;
          for (int i = 0; i < 1000; i++) {
              float number = random.nextFloat();
              if (number > 1.0f) {
                  error++;
              } else if (number < 0.1f) {
                  res[0]++;
              } else if (number < 0.2f) {
                  res[1]++;
              } else if (number < 0.3f) {
                  res[2]++;
              } else if (number < 0.4f) {
                  res[3]++;
              } else if (number < 0.5f) {
                  res[4]++;
              } else if (number < 0.6f) {
                  res[5]++;
              } else if (number < 0.7f) {
                  res[6]++;
              } else if (number < 0.8f) {
                  res[7]++;
              } else if (number < 0.9f) {
                  res[8]++;
              } else if (number < 1.0f) {
                  res[9]++;
              }
          }
          // each possibility should at least appear half of the perfect distribution ( =(1/10)/2 = 0.05)
          assertTrue(res[0] / 1000d > 0.05);
          assertTrue(res[1] / 1000d > 0.05);
          assertTrue(res[2] / 1000d > 0.05);
          assertTrue(res[3] / 1000d > 0.05);
          assertTrue(res[4] / 1000d > 0.05);
          assertTrue(res[5] / 1000d > 0.05);
          assertTrue(res[6] / 1000d > 0.05);
          assertTrue(res[7] / 1000d > 0.05);
          assertTrue(res[8] / 1000d > 0.05);
          assertTrue(res[9] / 1000d > 0.05);
          assertEquals(0, error);
      }
test_case.class_method_signature: ReplayablePseudoRandomTest.nextFloatTestDistribution()
test_case.full_signature: @Test public void nextFloatTestDistribution()
test_case.identifier: nextFloatTestDistribution
test_case.invocations: nextFloat assertTrue assertTrue assertTrue assertTrue assertTrue assertTrue assertTrue assertTrue assertTrue assertTrue assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void nextFloatTestDistribution()
focal_class.declarator: seed
focal_class.modifier: private
focal_class.original_string: private double seed;
focal_class.type: double
focal_class.var_name: seed
focal_class.file: gazeplay-commons/src/main/java/net/gazeplay/commons/random/ReplayablePseudoRandom.java
focal_class.identifier: ReplayablePseudoRandom
focal_class.class_method_signature: ReplayablePseudoRandom.ReplayablePseudoRandom()
focal_class.full_signature: public  ReplayablePseudoRandom()
focal_class.identifier: ReplayablePseudoRandom
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  ReplayablePseudoRandom()
focal_class.class_method_signature: ReplayablePseudoRandom.ReplayablePseudoRandom(double seed)
focal_class.full_signature: public  ReplayablePseudoRandom(double seed)
focal_class.identifier: ReplayablePseudoRandom
focal_class.modifiers: public
focal_class.parameters: (double seed)
focal_class.signature:  ReplayablePseudoRandom(double seed)
focal_class.class_method_signature: ReplayablePseudoRandom.random()
focal_class.full_signature: public double random()
focal_class.identifier: random
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double random()
focal_class.class_method_signature: ReplayablePseudoRandom.nextInt(int bound)
focal_class.full_signature: public int nextInt(int bound)
focal_class.identifier: nextInt
focal_class.modifiers: public
focal_class.parameters: (int bound)
focal_class.return: int
focal_class.signature: int nextInt(int bound)
focal_class.class_method_signature: ReplayablePseudoRandom.nextDouble()
focal_class.full_signature: public double nextDouble()
focal_class.identifier: nextDouble
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double nextDouble()
focal_class.class_method_signature: ReplayablePseudoRandom.nextBoolean()
focal_class.full_signature: public boolean nextBoolean()
focal_class.identifier: nextBoolean
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean nextBoolean()
focal_class.class_method_signature: ReplayablePseudoRandom.nextFloat()
focal_class.full_signature: public float nextFloat()
focal_class.identifier: nextFloat
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: float
focal_class.signature: float nextFloat()
focal_class.class_method_signature: ReplayablePseudoRandom.getSeed()
focal_class.full_signature: public double getSeed()
focal_class.identifier: getSeed
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getSeed()
focal_class.class_method_signature: ReplayablePseudoRandom.setSeed(double seed)
focal_class.full_signature: public void setSeed(double seed)
focal_class.identifier: setSeed
focal_class.modifiers: public
focal_class.parameters: (double seed)
focal_class.return: void
focal_class.signature: void setSeed(double seed)
focal_method.body: public float nextFloat() {
          int randMax = Integer.MAX_VALUE;
          return (float) (this.random() / (double) randMax) / 2;
      }
focal_method.class_method_signature: ReplayablePseudoRandom.nextFloat()
focal_method.full_signature: public float nextFloat()
focal_method.identifier: nextFloat
focal_method.invocations: random
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: float
focal_method.signature: float nextFloat()