test_class.declarator: two = BigInteger.valueOf(2)
test_class.modifier: private final
test_class.original_string: private final BigInteger two = BigInteger.valueOf(2);
test_class.type: BigInteger
test_class.var_name: two
test_class.declarator: twoTo32 = BigInteger.ONE.shiftLeft(32)
test_class.modifier: private final
test_class.original_string: private final BigInteger twoTo32 = BigInteger.ONE.shiftLeft(32);
test_class.type: BigInteger
test_class.var_name: twoTo32
test_class.declarator: twoTo64 = BigInteger.ONE.shiftLeft(64)
test_class.modifier: private final
test_class.original_string: private final BigInteger twoTo64 = BigInteger.ONE.shiftLeft(64);
test_class.type: BigInteger
test_class.var_name: twoTo64
test_class.declarator: twoTo128 = BigInteger.ONE.shiftLeft(128)
test_class.modifier: private final
test_class.original_string: private final BigInteger twoTo128 = BigInteger.ONE.shiftLeft(128);
test_class.type: BigInteger
test_class.var_name: twoTo128
test_class.file: suite/spdz2k/src/test/java/dk/alexandra/fresco/suite/spdz2k/datatypes/TestCompUInt128.java
test_class.identifier: TestCompUInt128
test_case.body: @Test
    public void testMultiply() {
      assertEquals(
          BigInteger.ZERO,
          new CompUInt128(0).multiply(new CompUInt128(0)).toBigInteger()
      );
      assertEquals(
          BigInteger.ZERO,
          new CompUInt128(1).multiply(new CompUInt128(0)).toBigInteger()
      );
      assertEquals(
          BigInteger.ZERO,
          new CompUInt128(0).multiply(new CompUInt128(1)).toBigInteger()
      );
      assertEquals(
          BigInteger.ZERO,
          new CompUInt128(1024).multiply(new CompUInt128(0)).toBigInteger()
      );
      assertEquals(
          BigInteger.ZERO,
          new CompUInt128(twoTo128.subtract(BigInteger.ONE)).multiply(new CompUInt128(0))
              .toBigInteger()
      );
      assertEquals(
          BigInteger.ONE,
          new CompUInt128(1).multiply(new CompUInt128(1)).toBigInteger()
      );
      assertEquals(
          twoTo128.subtract(BigInteger.ONE),
          new CompUInt128(new CompUInt128(1))
              .multiply(new CompUInt128(twoTo128.subtract(BigInteger.ONE)))
              .toBigInteger()
      );
      assertEquals(
          twoTo128.subtract(BigInteger.ONE),
          new CompUInt128(twoTo128.subtract(BigInteger.ONE)).multiply(new CompUInt128(1))
              .toBigInteger()
      );
      // multiply no overflow
      assertEquals(
          new BigInteger("42").multiply(new BigInteger("7")),
          new CompUInt128(new BigInteger("42")).multiply(new CompUInt128(new BigInteger("7")))
              .toBigInteger()
      );
      // multiply with overflow
      assertEquals(
          new BigInteger("42").multiply(twoTo128.subtract(BigInteger.ONE)).mod(twoTo128),
          new CompUInt128(new BigInteger("42"))
              .multiply(new CompUInt128(twoTo128.subtract(BigInteger.ONE)))
              .toBigInteger()
      );
      assertEquals(
          twoTo64.multiply(twoTo64.add(BigInteger.TEN)).mod(twoTo128),
          new CompUInt128(twoTo64)
              .multiply(new CompUInt128(twoTo64.add(BigInteger.TEN)))
              .toBigInteger()
      );
    }
test_case.class_method_signature: TestCompUInt128.testMultiply()
test_case.full_signature: @Test public void testMultiply()
test_case.identifier: testMultiply
test_case.invocations: assertEquals toBigInteger multiply assertEquals toBigInteger multiply assertEquals toBigInteger multiply assertEquals toBigInteger multiply assertEquals toBigInteger multiply subtract assertEquals toBigInteger multiply assertEquals subtract toBigInteger multiply subtract assertEquals subtract toBigInteger multiply subtract assertEquals multiply toBigInteger multiply assertEquals mod multiply subtract toBigInteger multiply subtract assertEquals mod multiply add toBigInteger multiply add
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMultiply()
focal_class.declarator: ONE = new CompUInt128(1)
focal_class.modifier: private static final
focal_class.original_string: private static final CompUInt128 ONE = new CompUInt128(1);
focal_class.type: CompUInt128
focal_class.var_name: ONE
focal_class.declarator: high
focal_class.modifier: private final
focal_class.original_string: private final long high;
focal_class.type: long
focal_class.var_name: high
focal_class.declarator: mid
focal_class.modifier: private final
focal_class.original_string: private final int mid;
focal_class.type: int
focal_class.var_name: mid
focal_class.declarator: low
focal_class.modifier: private final
focal_class.original_string: private final int low;
focal_class.type: int
focal_class.var_name: low
focal_class.file: suite/spdz2k/src/main/java/dk/alexandra/fresco/suite/spdz2k/datatypes/CompUInt128.java
focal_class.identifier: CompUInt128
focal_class.interfaces: implements CompUInt<UInt64, UInt64, CompUInt128>
focal_class.class_method_signature: CompUInt128.CompUInt128(byte[] bytes)
focal_class.full_signature: public  CompUInt128(byte[] bytes)
focal_class.identifier: CompUInt128
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes)
focal_class.signature:  CompUInt128(byte[] bytes)
focal_class.class_method_signature: CompUInt128.CompUInt128(byte[] bytes, boolean requiresPadding)
focal_class.full_signature: public  CompUInt128(byte[] bytes, boolean requiresPadding)
focal_class.identifier: CompUInt128
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes, boolean requiresPadding)
focal_class.signature:  CompUInt128(byte[] bytes, boolean requiresPadding)
focal_class.class_method_signature: CompUInt128.CompUInt128(BigInteger value)
focal_class.full_signature: public  CompUInt128(BigInteger value)
focal_class.identifier: CompUInt128
focal_class.modifiers: public
focal_class.parameters: (BigInteger value)
focal_class.signature:  CompUInt128(BigInteger value)
focal_class.class_method_signature: CompUInt128.CompUInt128(long high, int mid, int low)
focal_class.full_signature:   CompUInt128(long high, int mid, int low)
focal_class.identifier: CompUInt128
focal_class.parameters: (long high, int mid, int low)
focal_class.signature:  CompUInt128(long high, int mid, int low)
focal_class.class_method_signature: CompUInt128.CompUInt128(UInt64 value)
focal_class.full_signature:   CompUInt128(UInt64 value)
focal_class.identifier: CompUInt128
focal_class.parameters: (UInt64 value)
focal_class.signature:  CompUInt128(UInt64 value)
focal_class.class_method_signature: CompUInt128.CompUInt128(long value)
focal_class.full_signature:   CompUInt128(long value)
focal_class.identifier: CompUInt128
focal_class.parameters: (long value)
focal_class.signature:  CompUInt128(long value)
focal_class.class_method_signature: CompUInt128.CompUInt128(CompUInt128 other)
focal_class.full_signature:   CompUInt128(CompUInt128 other)
focal_class.identifier: CompUInt128
focal_class.parameters: (CompUInt128 other)
focal_class.signature:  CompUInt128(CompUInt128 other)
focal_class.class_method_signature: CompUInt128.add(CompUInt128 other)
focal_class.full_signature: @Override public CompUInt128 add(CompUInt128 other)
focal_class.identifier: add
focal_class.modifiers: @Override public
focal_class.parameters: (CompUInt128 other)
focal_class.return: CompUInt128
focal_class.signature: CompUInt128 add(CompUInt128 other)
focal_class.class_method_signature: CompUInt128.multiply(CompUInt128 other)
focal_class.full_signature: @Override public CompUInt128 multiply(CompUInt128 other)
focal_class.identifier: multiply
focal_class.modifiers: @Override public
focal_class.parameters: (CompUInt128 other)
focal_class.return: CompUInt128
focal_class.signature: CompUInt128 multiply(CompUInt128 other)
focal_class.class_method_signature: CompUInt128.subtract(CompUInt128 other)
focal_class.full_signature: @Override public CompUInt128 subtract(CompUInt128 other)
focal_class.identifier: subtract
focal_class.modifiers: @Override public
focal_class.parameters: (CompUInt128 other)
focal_class.return: CompUInt128
focal_class.signature: CompUInt128 subtract(CompUInt128 other)
focal_class.class_method_signature: CompUInt128.negateUInt()
focal_class.full_signature: @Override public CompUInt128 negateUInt()
focal_class.identifier: negateUInt
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: CompUInt128
focal_class.signature: CompUInt128 negateUInt()
focal_class.class_method_signature: CompUInt128.isZero()
focal_class.full_signature: @Override public boolean isZero()
focal_class.identifier: isZero
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isZero()
focal_class.class_method_signature: CompUInt128.toBigInteger()
focal_class.full_signature: @Override public BigInteger toBigInteger()
focal_class.identifier: toBigInteger
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: BigInteger
focal_class.signature: BigInteger toBigInteger()
focal_class.class_method_signature: CompUInt128.getLeastSignificant()
focal_class.full_signature: @Override public UInt64 getLeastSignificant()
focal_class.identifier: getLeastSignificant
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: UInt64
focal_class.signature: UInt64 getLeastSignificant()
focal_class.class_method_signature: CompUInt128.getMostSignificant()
focal_class.full_signature: @Override public UInt64 getMostSignificant()
focal_class.identifier: getMostSignificant
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: UInt64
focal_class.signature: UInt64 getMostSignificant()
focal_class.class_method_signature: CompUInt128.getLeastSignificantAsHigh()
focal_class.full_signature: @Override public UInt64 getLeastSignificantAsHigh()
focal_class.identifier: getLeastSignificantAsHigh
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: UInt64
focal_class.signature: UInt64 getLeastSignificantAsHigh()
focal_class.class_method_signature: CompUInt128.toLong()
focal_class.full_signature: @Override public long toLong()
focal_class.identifier: toLong
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long toLong()
focal_class.class_method_signature: CompUInt128.toInt()
focal_class.full_signature: @Override public int toInt()
focal_class.identifier: toInt
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int toInt()
focal_class.class_method_signature: CompUInt128.shiftLowIntoHigh()
focal_class.full_signature: @Override public CompUInt128 shiftLowIntoHigh()
focal_class.identifier: shiftLowIntoHigh
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: CompUInt128
focal_class.signature: CompUInt128 shiftLowIntoHigh()
focal_class.class_method_signature: CompUInt128.getLowBitLength()
focal_class.full_signature: @Override public int getLowBitLength()
focal_class.identifier: getLowBitLength
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getLowBitLength()
focal_class.class_method_signature: CompUInt128.getHighBitLength()
focal_class.full_signature: @Override public int getHighBitLength()
focal_class.identifier: getHighBitLength
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getHighBitLength()
focal_class.class_method_signature: CompUInt128.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: CompUInt128.toByteArray()
focal_class.full_signature: @Override public byte[] toByteArray()
focal_class.identifier: toByteArray
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] toByteArray()
focal_class.class_method_signature: CompUInt128.extractValue(FieldElement element)
focal_class.full_signature: static BigInteger extractValue(FieldElement element)
focal_class.identifier: extractValue
focal_class.modifiers: static
focal_class.parameters: (FieldElement element)
focal_class.return: BigInteger
focal_class.signature: BigInteger extractValue(FieldElement element)
focal_class.class_method_signature: CompUInt128.toByteArrayLong(byte[] bytes, int start, long value)
focal_class.full_signature: private void toByteArrayLong(byte[] bytes, int start, long value)
focal_class.identifier: toByteArrayLong
focal_class.modifiers: private
focal_class.parameters: (byte[] bytes, int start, long value)
focal_class.return: void
focal_class.signature: void toByteArrayLong(byte[] bytes, int start, long value)
focal_class.class_method_signature: CompUInt128.toByteArray(byte[] bytes, int start, int value)
focal_class.full_signature: private void toByteArray(byte[] bytes, int start, int value)
focal_class.identifier: toByteArray
focal_class.modifiers: private
focal_class.parameters: (byte[] bytes, int start, int value)
focal_class.return: void
focal_class.signature: void toByteArray(byte[] bytes, int start, int value)
focal_class.class_method_signature: CompUInt128.toLong(byte[] bytes, int start)
focal_class.full_signature: private static long toLong(byte[] bytes, int start)
focal_class.identifier: toLong
focal_class.modifiers: private static
focal_class.parameters: (byte[] bytes, int start)
focal_class.return: long
focal_class.signature: long toLong(byte[] bytes, int start)
focal_class.class_method_signature: CompUInt128.toInt(byte[] bytes, int start)
focal_class.full_signature: private static int toInt(byte[] bytes, int start)
focal_class.identifier: toInt
focal_class.modifiers: private static
focal_class.parameters: (byte[] bytes, int start)
focal_class.return: int
focal_class.signature: int toInt(byte[] bytes, int start)
focal_method.body: @Override
    public CompUInt128 multiply(CompUInt128 other) {
      long thisLowAsLong = UInt.toUnLong(this.low);
      long thisMidAsLong = UInt.toUnLong(this.mid);
      long otherLowAsLong = UInt.toUnLong(other.low);
      long otherMidAsLong = UInt.toUnLong(other.mid);
  
      // low
      long t1 = thisLowAsLong * otherLowAsLong;
      long t2 = thisLowAsLong * otherMidAsLong;
      long t3 = thisLowAsLong * other.high;
  
      // mid
      long t4 = thisMidAsLong * otherLowAsLong;
      long t5 = thisMidAsLong * otherMidAsLong;
      int t6 = (int) (this.mid * other.high);
  
      // high
      long t7 = this.high * otherLowAsLong;
      int t8 = (int) (this.high * other.mid);
      // we don't need the product of this.high and other.high since those overflow 2^128
  
      long m1 = (t1 >>> 32) + (t2 & 0xffffffffL);
      int m2 = (int) m1;
      long newMid = UInt.toUnLong(m2) + (t4 & 0xffffffffL);
  
      long newHigh = (t2 >>> 32)
          + t3
          + (t4 >>> 32)
          + t5
          + (UInt.toUnLong(t6) << 32)
          + t7
          + (UInt.toUnLong(t8) << 32)
          + (m1 >>> 32)
          + (newMid >>> 32);
      return new CompUInt128(newHigh, (int) newMid, (int) t1);
    }
focal_method.class_method_signature: CompUInt128.multiply(CompUInt128 other)
focal_method.full_signature: @Override public CompUInt128 multiply(CompUInt128 other)
focal_method.identifier: multiply
focal_method.invocations: toUnLong toUnLong toUnLong toUnLong toUnLong toUnLong toUnLong
focal_method.modifiers: @Override public
focal_method.parameters: (CompUInt128 other)
focal_method.return: CompUInt128
focal_method.signature: CompUInt128 multiply(CompUInt128 other)