<commit_before>package com.arrayfire;

public class Statistics extends ArrayFire {
  static private native long afMean(long ref, int dim);

  static private native long afMeanWeighted(long ref, long weightsRef, int dim);

  static private native double afMeanAll(long ref);

  static private native double afMeanAllWeighted(long ref, long weightsRef);

  static private native FloatComplex afMeanAllFloatComplex(long ref);

  static private native DoubleComplex afMeanAllDoubleComplex(long ref);

  static private native FloatComplex afMeanAllFloatComplexWeighted(long ref, long weightsRef);

  static private native DoubleComplex afMeanAllDoubleComplexWeighted(long ref, long weightsRef);

  static private native long afVar(long ref, boolean isBiased, int dim);

  static private native long afVarWeighted(long ref, long weightsRef, int dim);

  static private native double afVarAll(long ref, boolean isBiased);

  static private native double afVarAllWeighted(long ref, long weightsRef);

  static private native FloatComplex afVarAllFloatComplex(long ref, boolean isBiased);

  static private native DoubleComplex afVarAllDoubleComplex(long ref, boolean isBiased);

  static private native FloatComplex afVarAllFloatComplexWeighted(long ref, long weightsRef);

  static private native DoubleComplex afVarAllDoubleComplexWeighted(long ref, long weightsRef);

  static public Array mean(final Array in, int dim) {
    return new Array(afMean(in.ref, dim));
  }

  static public Array mean(final Array in, final Array weights, int dim) {
    return new Array(afMeanWeighted(in.ref, weights.ref, dim));
  }

  static public <T> T mean(final Array in, Class<T> type) throws Exception {
    if (type == FloatComplex.class) {
      FloatComplex res = (FloatComplex) afMeanAllFloatComplex(in.ref);
      return type.cast(res);
    } else if (type == DoubleComplex.class) {
      DoubleComplex res = (DoubleComplex) afMeanAllDoubleComplex(in.ref);
      return type.cast(res);
    }

    double res = afMeanAll(in.ref);
    if (type == Float.class) {
      return type.cast(Float.valueOf((float) res));
    } else if (type == Double.class) {
      return type.cast(Double.valueOf((double) res));
    } else if (type == Integer.class) {
      return type.cast(Integer.valueOf((int) res));
    }
    throw new Exception("Unknown type");
  }

  static public <T> T mean(final Array in, final Array weights, Class<T> type) throws Exception {
    if (type == FloatComplex.class) {
      FloatComplex res = (FloatComplex) afMeanAllFloatComplexWeighted(in.ref, weights.ref);
      return type.cast(res);
    } else if (type == DoubleComplex.class) {
      System.out.println(Long.toString(weights.ref));
      DoubleComplex res = (DoubleComplex) afMeanAllDoubleComplexWeighted(in.ref, weights.ref);
      return type.cast(res);
    }

    double res = afMeanAllWeighted(in.ref, weights.ref);
    if (type == Float.class) {
      return type.cast(Float.valueOf((float) res));
    } else if (type == Double.class) {
      return type.cast(Double.valueOf((double) res));
    } else if (type == Integer.class) {
      return type.cast(Integer.valueOf((int) res));
    }
    throw new Exception("Unknown type");
  }

  static public Array var(final Array in, boolean isBiased, int dim) {
    return new Array(afVar(in.ref, isBiased, dim));
  }

  static public Array var(final Array in, final Array weights, int dim) {
    return new Array(afVarWeighted(in.ref, weights.ref, dim));
  }

  static public <T> T var(final Array in, boolean isBiased, Class<T> type) throws Exception {
    if (type == FloatComplex.class) {
      FloatComplex res = (FloatComplex) afVarAllFloatComplex(in.ref, isBiased);
      return type.cast(res);
    } else if (type == DoubleComplex.class) {
      DoubleComplex res = (DoubleComplex) afVarAllDoubleComplex(in.ref, isBiased);
      return type.cast(res);
    }

    double res = afVarAll(in.ref, isBiased);
    if (type == Float.class) {
      return type.cast(Float.valueOf((float) res));
    } else if (type == Double.class) {
      return type.cast(Double.valueOf((double) res));
    } else if (type == Integer.class) {
      return type.cast(Integer.valueOf((int) res));
    }
    throw new Exception("Unknown type");
  }

  static public <T> T var(final Array in, final Array weights, Class<T> type) throws Exception {
    if (type == FloatComplex.class) {
      FloatComplex res = (FloatComplex) afVarAllFloatComplexWeighted(in.ref, weights.ref);
      return type.cast(res);
    } else if (type == DoubleComplex.class) {
      System.out.println(Long.toString(weights.ref));
      DoubleComplex res = (DoubleComplex) afVarAllDoubleComplexWeighted(in.ref, weights.ref);
      return type.cast(res);
    }

    double res = afVarAllWeighted(in.ref, weights.ref);
    if (type == Float.class) {
      return type.cast(Float.valueOf((float) res));
    } else if (type == Double.class) {
      return type.cast(Double.valueOf((double) res));
    } else if (type == Integer.class) {
      return type.cast(Integer.valueOf((int) res));
    }
    throw new Exception("Unknown type");
  }
}<commit_msg>Removed print statements in Statistics.java<commit_after>package com.arrayfire;

public class Statistics extends ArrayFire {
  static private native long afMean(long ref, int dim);

  static private native long afMeanWeighted(long ref, long weightsRef, int dim);

  static private native double afMeanAll(long ref);

  static private native double afMeanAllWeighted(long ref, long weightsRef);

  static private native FloatComplex afMeanAllFloatComplex(long ref);

  static private native DoubleComplex afMeanAllDoubleComplex(long ref);

  static private native FloatComplex afMeanAllFloatComplexWeighted(long ref, long weightsRef);

  static private native DoubleComplex afMeanAllDoubleComplexWeighted(long ref, long weightsRef);

  static private native long afVar(long ref, boolean isBiased, int dim);

  static private native long afVarWeighted(long ref, long weightsRef, int dim);

  static private native double afVarAll(long ref, boolean isBiased);

  static private native double afVarAllWeighted(long ref, long weightsRef);

  static private native FloatComplex afVarAllFloatComplex(long ref, boolean isBiased);

  static private native DoubleComplex afVarAllDoubleComplex(long ref, boolean isBiased);

  static private native FloatComplex afVarAllFloatComplexWeighted(long ref, long weightsRef);

  static private native DoubleComplex afVarAllDoubleComplexWeighted(long ref, long weightsRef);

  static public Array mean(final Array in, int dim) {
    return new Array(afMean(in.ref, dim));
  }

  static public Array mean(final Array in, final Array weights, int dim) {
    return new Array(afMeanWeighted(in.ref, weights.ref, dim));
  }

  static public <T> T mean(final Array in, Class<T> type) throws Exception {
    if (type == FloatComplex.class) {
      FloatComplex res = (FloatComplex) afMeanAllFloatComplex(in.ref);
      return type.cast(res);
    } else if (type == DoubleComplex.class) {
      DoubleComplex res = (DoubleComplex) afMeanAllDoubleComplex(in.ref);
      return type.cast(res);
    }

    double res = afMeanAll(in.ref);
    if (type == Float.class) {
      return type.cast(Float.valueOf((float) res));
    } else if (type == Double.class) {
      return type.cast(Double.valueOf((double) res));
    } else if (type == Integer.class) {
      return type.cast(Integer.valueOf((int) res));
    }
    throw new Exception("Unknown type");
  }

  static public <T> T mean(final Array in, final Array weights, Class<T> type) throws Exception {
    if (type == FloatComplex.class) {
      FloatComplex res = (FloatComplex) afMeanAllFloatComplexWeighted(in.ref, weights.ref);
      return type.cast(res);
    } else if (type == DoubleComplex.class) {
      DoubleComplex res = (DoubleComplex) afMeanAllDoubleComplexWeighted(in.ref, weights.ref);
      return type.cast(res);
    }

    double res = afMeanAllWeighted(in.ref, weights.ref);
    if (type == Float.class) {
      return type.cast(Float.valueOf((float) res));
    } else if (type == Double.class) {
      return type.cast(Double.valueOf((double) res));
    } else if (type == Integer.class) {
      return type.cast(Integer.valueOf((int) res));
    }
    throw new Exception("Unknown type");
  }

  static public Array var(final Array in, boolean isBiased, int dim) {
    return new Array(afVar(in.ref, isBiased, dim));
  }

  static public Array var(final Array in, final Array weights, int dim) {
    return new Array(afVarWeighted(in.ref, weights.ref, dim));
  }

  static public <T> T var(final Array in, boolean isBiased, Class<T> type) throws Exception {
    if (type == FloatComplex.class) {
      FloatComplex res = (FloatComplex) afVarAllFloatComplex(in.ref, isBiased);
      return type.cast(res);
    } else if (type == DoubleComplex.class) {
      DoubleComplex res = (DoubleComplex) afVarAllDoubleComplex(in.ref, isBiased);
      return type.cast(res);
    }

    double res = afVarAll(in.ref, isBiased);
    if (type == Float.class) {
      return type.cast(Float.valueOf((float) res));
    } else if (type == Double.class) {
      return type.cast(Double.valueOf((double) res));
    } else if (type == Integer.class) {
      return type.cast(Integer.valueOf((int) res));
    }
    throw new Exception("Unknown type");
  }

  static public <T> T var(final Array in, final Array weights, Class<T> type) throws Exception {
    if (type == FloatComplex.class) {
      FloatComplex res = (FloatComplex) afVarAllFloatComplexWeighted(in.ref, weights.ref);
      return type.cast(res);
    } else if (type == DoubleComplex.class) {
      DoubleComplex res = (DoubleComplex) afVarAllDoubleComplexWeighted(in.ref, weights.ref);
      return type.cast(res);
    }

    double res = afVarAllWeighted(in.ref, weights.ref);
    if (type == Float.class) {
      return type.cast(Float.valueOf((float) res));
    } else if (type == Double.class) {
      return type.cast(Double.valueOf((double) res));
    } else if (type == Integer.class) {
      return type.cast(Integer.valueOf((int) res));
    }
    throw new Exception("Unknown type");
  }
}
{'fraction_non_alphanumeric': 0.11160362490149724, 'fraction_numerical': 0.0, 'mean_word_length': 3.885948026948989, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '1051065', 'n_tokens_mistral': 2996, 'n_tokens_neox': 2908, 'n_words': 884}