test_class.file: demos/distance/src/test/java/dk/alexandra/fresco/demo/TestDistanceDemo.java
test_class.identifier: TestDistanceDemo
test_case.body: @Test(expected = IllegalArgumentException.class)
    public void testDistanceCmdLine2PartyWithNoInputY() throws Exception {
      DistanceDemo.main(
          new String[]{"-i", "1", "-p", "1:localhost:8081", "-p", "2:localhost:8082",
              "-p", "3:localhost:8083", "-s", "dummyArithmetic", "-x", "20"});
      fail();
    }
test_case.class_method_signature: TestDistanceDemo.testDistanceCmdLine2PartyWithNoInputY()
test_case.full_signature: @Test(expected = IllegalArgumentException.class) public void testDistanceCmdLine2PartyWithNoInputY()
test_case.identifier: testDistanceCmdLine2PartyWithNoInputY
test_case.invocations: main fail
test_case.modifiers: @Test(expected = IllegalArgumentException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDistanceCmdLine2PartyWithNoInputY()
focal_class.declarator: log = LoggerFactory.getLogger(DistanceDemo.class)
focal_class.modifier: private static
focal_class.original_string: private static Logger log = LoggerFactory.getLogger(DistanceDemo.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: myId
focal_class.modifier: private
focal_class.original_string: private int myId;
focal_class.type: int
focal_class.var_name: myId
focal_class.declarator: myX
focal_class.modifier: private
focal_class.original_string: private int myX;
focal_class.type: int
focal_class.var_name: myX
focal_class.declarator: myY
focal_class.modifier: private
focal_class.original_string: private int myY;
focal_class.type: int
focal_class.var_name: myY
focal_class.file: demos/distance/src/main/java/dk/alexandra/fresco/demo/DistanceDemo.java
focal_class.identifier: DistanceDemo
focal_class.interfaces: implements Application<BigInteger, ProtocolBuilderNumeric>
focal_class.class_method_signature: DistanceDemo.DistanceDemo(int id, int x, int y)
focal_class.full_signature: public  DistanceDemo(int id, int x, int y)
focal_class.identifier: DistanceDemo
focal_class.modifiers: public
focal_class.parameters: (int id, int x, int y)
focal_class.signature:  DistanceDemo(int id, int x, int y)
focal_class.class_method_signature: DistanceDemo.buildComputation(ProtocolBuilderNumeric producer)
focal_class.full_signature: @Override public DRes<BigInteger> buildComputation(ProtocolBuilderNumeric producer)
focal_class.identifier: buildComputation
focal_class.modifiers: @Override public
focal_class.parameters: (ProtocolBuilderNumeric producer)
focal_class.return: DRes<BigInteger>
focal_class.signature: DRes<BigInteger> buildComputation(ProtocolBuilderNumeric producer)
focal_class.class_method_signature: DistanceDemo.main(String[] args)
focal_class.full_signature: public static void main(String[] args)
focal_class.identifier: main
focal_class.modifiers: public static
focal_class.parameters: (String[] args)
focal_class.return: void
focal_class.signature: void main(String[] args)
focal_method.body: public static <ResourcePoolT extends ResourcePool> void main(String[] args) throws IOException {
      CmdLineUtil<ResourcePoolT, ProtocolBuilderNumeric> cmdUtil = new CmdLineUtil<>();
      int x = 0;
      int y = 0;
      cmdUtil.addOption(Option.builder("x").desc("The integer x coordinate of this party. "
          + "Note only party 1 and 2 should supply this input.").hasArg().build());
      cmdUtil.addOption(Option.builder("y").desc("The integer y coordinate of this party. "
          + "Note only party 1 and 2 should supply this input").hasArg().build());
      CommandLine cmd = cmdUtil.parse(args);
      NetworkConfiguration networkConfiguration = cmdUtil.getNetworkConfiguration();
  
      if (networkConfiguration.getMyId() == 1 || networkConfiguration.getMyId() == 2) {
        if (!cmd.hasOption("x") || !cmd.hasOption("y")) {
          cmdUtil.displayHelp();
          throw new IllegalArgumentException("Party 1 and 2 must submit input");
        } else {
          x = Integer.parseInt(cmd.getOptionValue("x"));
          y = Integer.parseInt(cmd.getOptionValue("y"));
        }
      } else {
        if (cmd.hasOption("x") || cmd.hasOption("y")) {
          throw new IllegalArgumentException("Only party 1 and 2 should submit input");
        }
      }
  
      DistanceDemo distDemo = new DistanceDemo(networkConfiguration.getMyId(), x, y);
      SecureComputationEngine<ResourcePoolT, ProtocolBuilderNumeric> sce = cmdUtil.getSce();
      ResourcePoolT resourcePool = cmdUtil.getResourcePool();
      BigInteger bigInteger = sce.runApplication(distDemo, resourcePool, cmdUtil.getNetwork());
      double dist = Math.sqrt(bigInteger.doubleValue());
      log.info("Distance between party 1 and 2 is: " + dist);
      cmdUtil.closeNetwork();
      sce.shutdownSCE();
  
    }
focal_method.class_method_signature: DistanceDemo.main(String[] args)
focal_method.full_signature: public static void main(String[] args)
focal_method.identifier: main
focal_method.invocations: addOption build hasArg desc builder addOption build hasArg desc builder parse getNetworkConfiguration getMyId getMyId hasOption hasOption displayHelp parseInt getOptionValue parseInt getOptionValue hasOption hasOption getMyId getSce getResourcePool runApplication getNetwork sqrt doubleValue info closeNetwork shutdownSCE
focal_method.modifiers: public static
focal_method.parameters: (String[] args)
focal_method.return: void
focal_method.signature: void main(String[] args)