#fixed code
                              @Override
  protected int runWithJobId(final Namespace options, final HeliosClient client,
                             final PrintStream out, final boolean json, final JobId jobId,
                             final BufferedReader stdin)
      throws ExecutionException, InterruptedException, IOException {
    final List<String> hosts = options.getList(hostsArg.getDest());

    final Deployment deployment = new Deployment.Builder()
        .setGoal(Goal.STOP)
        .setJobId(jobId)
        .build();

    if (!json) {
      out.printf("Stopping %s on %s%n", jobId, hosts);
    }

    return Utils.setGoalOnHosts(client, out, json, hosts, deployment,
        options.getString(tokenArg.getDest()));
  }
#vulnerable code 
                              @Override
  protected int runWithJobId(final Namespace options, final HeliosClient client,
                             final PrintStream out, final boolean json, final JobId jobId,
                             final BufferedReader stdin)
      throws ExecutionException, InterruptedException, IOException {
    final List<String> hosts = options.getList(hostsArg.getDest());

    final Deployment deployment = new Deployment.Builder()
        .setGoal(Goal.STOP)
        .setJobId(jobId)
        .build();

    if (!json) {
      out.printf("Stopping %s on %s%n", jobId, hosts);
    }

    int code = 0;

    for (final String host : hosts) {
      if (!json) {
        out.printf("%s: ", host);
      }
      final String token = options.getString(tokenArg.getDest());
      final SetGoalResponse result = client.setGoal(deployment, host, token).get();
      if (result.getStatus() == SetGoalResponse.Status.OK) {
        if (json) {
          out.printf(result.toJsonString());
        } else {
          out.printf("done%n");
        }
      } else {
        if (json) {
          out.printf(result.toJsonString());
        } else {
          out.printf("failed: %s%n", result);
        }
        code = 1;
      }
    }

    return code;
  } 
                            #location 27 
                            #vulnerability type CHECKERS_PRINTF_ARGS