<commit_before>package com.continuuity.passport.http.handlers;

/**
 *
 */
public class Utils {

  //TODO: Clean up lot of these helper functions
  public static String getJsonError(String error) {
    return String.format("{\"error\" :, \"%s\" }", error);
  }

  public static String getJsonError(String error, Exception e) {
    return String.format("{\"error\":, \"%s . %s \" }", error, e.getMessage());
  }

  public static String getJsonError(String error, String reason) {
    return String.format("{\"error\":, \"%s , \"reason\" : \"%s \" }", error, reason);
  }

  public static String getJson(String status, String message) {
    return String.format("{\"status\":\"%s\",\"message\":\"%s\" }", status, message);
  }

  public static String getJson(String status, String message, Exception e) {
    String errorMessage = String.format("%s. %s", message, e.getMessage());
    return String.format("{\"status\":\"%s\",\"message\":\"%s\" }", status, errorMessage);
  }

  public static String getAuthenticatedJson(String result) {
    return String.format("{\"error\": null, \"result\": %s }", result);
  }

  public static String getAuthenticatedJson(String error, String result) {
    return String.format("{\"error\": \"%s\", \"result\": %s }", error, result);
  }

  public static String getNonceJson(int result) {
    return String.format("{\"error\": null, \"result\": %d }", result);
  }

  public static String getNonceJson(String error, int result) {
    return String.format("{\"error\": \"%s\", \"result\": %d }", error, result);
  }

  public static String getJsonOK() {
    return String.format("{\"error\": null }");
  }


}
<commit_msg>Fix missing quotes in error json<commit_after>package com.continuuity.passport.http.handlers;

/**
 *
 */
public class Utils {

  //TODO: Clean up lot of these helper functions
  public static String getJsonError(String error) {
    return String.format("{\"error\" :, \"%s\" }", error);
  }

  public static String getJsonError(String error, Exception e) {
    return String.format("{\"error\":, \"%s . %s \" }", error, e.getMessage());
  }

  public static String getJsonError(String error, String reason) {
    return String.format("{\"error\":, \"%s , \"reason\" : \"%s \" }", error, reason);
  }

  public static String getJson(String status, String message) {
    return String.format("{\"status\":\"%s\",\"message\":\"%s\" }", status, message);
  }

  public static String getJson(String status, String message, Exception e) {
    String errorMessage = String.format("%s. %s", message, e.getMessage());
    return String.format("{\"status\":\"%s\",\"message\":\"%s\" }", status, errorMessage);
  }

  public static String getAuthenticatedJson(String result) {
    return String.format("{\"error\": null, \"result\": \"%s\" }", result);
  }

  public static String getAuthenticatedJson(String error, String result) {
    return String.format("{\"error\": \"%s\", \"result\": \" %s \" }", error, result);
  }

  public static String getNonceJson(int result) {
    return String.format("{\"error\": null, \"result\": %d }", result);
  }

  public static String getNonceJson(String error, int result) {
    return String.format("{\"error\": \"%s\", \"result\": %d }", error, result);
  }

  public static String getJsonOK() {
    return String.format("{\"error\": null }");
  }


}

{'fraction_non_alphanumeric': 0.19874289134989523, 'fraction_numerical': 0.0, 'mean_word_length': 3.628808864265928, 'pattern_counts': {'":': 30, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1692961', 'n_tokens_mistral': 1034, 'n_tokens_neox': 1015, 'n_words': 277}