test_class.declarator: ctOne
test_class.modifier: private
test_class.original_string: private CoinTossing ctOne;
test_class.type: CoinTossing
test_class.var_name: ctOne
test_class.declarator: ctTwo
test_class.modifier: private
test_class.original_string: private CoinTossing ctTwo;
test_class.type: CoinTossing
test_class.var_name: ctTwo
test_class.declarator: testRuntime
test_class.modifier: private
test_class.original_string: private RuntimeForTests testRuntime;
test_class.type: RuntimeForTests
test_class.var_name: testRuntime
test_class.declarator: netOne
test_class.modifier: private
test_class.original_string: private Network netOne;
test_class.type: Network
test_class.var_name: netOne
test_class.declarator: netTwo
test_class.modifier: private
test_class.original_string: private Network netTwo;
test_class.type: Network
test_class.var_name: netTwo
test_class.file: tools/ot/src/test/java/dk/alexandra/fresco/tools/cointossing/TestCoinTossing.java
test_class.identifier: TestCoinTossing
test_case.body: @Test
    public void testCt() {
      int size = 10000;
      Callable<Exception> partyOneInit = this::initCtOne;
      Callable<Exception> partyTwoInit = this::initCtTwo;
      // run tasks and get ordered list of results
      List<Exception> initResults = testRuntime
          .runPerPartyTasks(Arrays.asList(partyOneInit, partyTwoInit));
      // Verify that no exception was thrown in init
      for (Exception current : initResults) {
        assertNull(current);
      }
      StrictBitVector tossOne = ctOne.toss(size);
      StrictBitVector tossTwo = ctTwo.toss(size);
      assertTrue(tossOne.equals(tossTwo));
      // Check that the toss is not a 0-string
      StrictBitVector zeroVec = new StrictBitVector(size);
      assertNotEquals(zeroVec, tossOne);
    }
test_case.class_method_signature: TestCoinTossing.testCt()
test_case.full_signature: @Test public void testCt()
test_case.identifier: testCt
test_case.invocations: runPerPartyTasks asList assertNull toss toss assertTrue equals assertNotEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCt()
focal_class.declarator: otherId
focal_class.modifier: private final
focal_class.original_string: private final int otherId;
focal_class.type: int
focal_class.var_name: otherId
focal_class.declarator: myId
focal_class.modifier: private final
focal_class.original_string: private final int myId;
focal_class.type: int
focal_class.var_name: myId
focal_class.declarator: rand
focal_class.modifier: private final
focal_class.original_string: private final Drbg rand;
focal_class.type: Drbg
focal_class.var_name: rand
focal_class.declarator: serializer
focal_class.modifier: private final
focal_class.original_string: private final ByteSerializer<HashBasedCommitment> serializer;
focal_class.type: ByteSerializer<HashBasedCommitment>
focal_class.var_name: serializer
focal_class.declarator: initialized = false
focal_class.modifier: private
focal_class.original_string: private boolean initialized = false;
focal_class.type: boolean
focal_class.var_name: initialized
focal_class.declarator: coinTossingPrg
focal_class.modifier: private
focal_class.original_string: private Drbg coinTossingPrg;
focal_class.type: Drbg
focal_class.var_name: coinTossingPrg
focal_class.file: tools/ot/src/main/java/dk/alexandra/fresco/tools/cointossing/CoinTossing.java
focal_class.identifier: CoinTossing
focal_class.class_method_signature: CoinTossing.CoinTossing(int myId, int otherId, Drbg rand)
focal_class.full_signature: public  CoinTossing(int myId, int otherId, Drbg rand)
focal_class.identifier: CoinTossing
focal_class.modifiers: public
focal_class.parameters: (int myId, int otherId, Drbg rand)
focal_class.signature:  CoinTossing(int myId, int otherId, Drbg rand)
focal_class.class_method_signature: CoinTossing.initialize(Network network)
focal_class.full_signature: public void initialize(Network network)
focal_class.identifier: initialize
focal_class.modifiers: public
focal_class.parameters: (Network network)
focal_class.return: void
focal_class.signature: void initialize(Network network)
focal_class.class_method_signature: CoinTossing.toss(int size)
focal_class.full_signature: public StrictBitVector toss(int size)
focal_class.identifier: toss
focal_class.modifiers: public
focal_class.parameters: (int size)
focal_class.return: StrictBitVector
focal_class.signature: StrictBitVector toss(int size)
focal_class.class_method_signature: CoinTossing.exchangeSeeds(byte[] seed, Network network)
focal_class.full_signature: private byte[] exchangeSeeds(byte[] seed, Network network)
focal_class.identifier: exchangeSeeds
focal_class.modifiers: private
focal_class.parameters: (byte[] seed, Network network)
focal_class.return: byte[]
focal_class.signature: byte[] exchangeSeeds(byte[] seed, Network network)
focal_method.body: public StrictBitVector toss(int size) {
      if (!initialized) {
        throw new IllegalStateException("Not initialized");
      }
      // Construct byte array with enough space by rounding up the amount of bytes
      // required to store the tosses
      byte[] res = new byte[(size + 8 - 1) / 8];
      coinTossingPrg.nextBytes(res);
      return new StrictBitVector(res);
    }
focal_method.class_method_signature: CoinTossing.toss(int size)
focal_method.full_signature: public StrictBitVector toss(int size)
focal_method.identifier: toss
focal_method.invocations: nextBytes
focal_method.modifiers: public
focal_method.parameters: (int size)
focal_method.return: StrictBitVector
focal_method.signature: StrictBitVector toss(int size)