<commit_before>import java.util.*;

class InvalidDataBindingException extends Exception
{
  public InvalidDataBindingException (String message)
  {
    super(message);
  }
}

class DataBinding {
  // A DataBinding takes a DataHandler and a DataBindingSchema
  // and returns an ArrayList of Primitives.

  DataHandler data_handler;
  DataBindingSchema data_binding_schema;

  DataBinding(DataHandler data_handler_, DataBindingSchema data_binding_schema_) {
    data_handler = data_handler_;
    data_binding_schema = data_binding_schema_;

    try {
      this.validate();
    }
    catch (Exception exc) {
      exc.printStackTrace();
    }
  }

  PrimitiveGroup bind() {

    ArrayList<Primitive> primitives = new ArrayList<Primitive>();
    PrimitiveGroup primitive_group = new PrimitiveGroup();

    String fill_color_type = data_binding_schema.get("fill_color_type");
    HashMap color_map;

    if (fill_color_type.equals("quantitative")) {
      color_map = colorify_quantitative();
    } else {
      color_map = colorify_qualitative();
    }


    // Location sorting procedures


    ArrayList<Float> sort_data = new ArrayList<Float>();

    for (int i = 0; i < data_handler.table.getRowCount (); i++) {
      TableRow row = data_handler.table.getRow(i);

      sort_data.add(row.getFloat(data_binding_schema.get("size")));
    }

    Float[] countries = sort_data.toArray(new Float[sort_data.size()]);
    ArrayIndexComparator comparator = new ArrayIndexComparator(countries);
    Integer[] indexes = comparator.createIndexArray();
    Arrays.sort(indexes, comparator);
    println(indexes);

    PVector[] locations = new PVector[indexes.length];<commit_msg>Code tidy.<commit_after>import java.util.*;

class InvalidDataBindingException extends Exception
{
  public InvalidDataBindingException (String message)
  {
    super(message);
  }
}

class DataBinding {
  // A DataBinding takes a DataHandler and a DataBindingSchema
  // and returns an ArrayList of Primitives.

  DataHandler data_handler;
  DataBindingSchema data_binding_schema;

  DataBinding(DataHandler data_handler_, DataBindingSchema data_binding_schema_) {
    data_handler = data_handler_;
    data_binding_schema = data_binding_schema_;

    try {
      this.validate();
    }
    catch (Exception exc) {
      exc.printStackTrace();
    }
  }

  PrimitiveGroup bind() {

    ArrayList<Primitive> primitives = new ArrayList<Primitive>();
    PrimitiveGroup primitive_group = new PrimitiveGroup();

    String fill_color_type = data_binding_schema.get("fill_color_type");
    HashMap color_map;

    if (fill_color_type.equals("quantitative")) {
      color_map = colorify_quantitative();
    } else {
      color_map = colorify_qualitative();
    }


    // Location sorting procedures
    ArrayList<Float> sort_data = new ArrayList<Float>();

    for (int i = 0; i < data_handler.table.getRowCount (); i++) {
      TableRow row = data_handler.table.getRow(i);

      sort_data.add(row.getFloat(data_binding_schema.get("size")));
    }

    Float[] countries = sort_data.toArray(new Float[sort_data.size()]);
    ArrayIndexComparator comparator = new ArrayIndexComparator(countries);
    Integer[] indexes = comparator.createIndexArray();
    Arrays.sort(indexes, comparator);
    println(indexes);

    PVector[] locations = new PVector[indexes.length];
{'fraction_non_alphanumeric': 0.10164917541229385, 'fraction_numerical': 0.0005997001499250374, 'mean_word_length': 4.001499250374812, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '1522070', 'n_tokens_mistral': 979, 'n_tokens_neox': 943, 'n_words': 206}