<commit_before>(function(can, $) {
  
  can.Model.Cacheable("CMS.Models.PopulationSample", {
    root_object : "population_sample"
    , update : function(id, params) {
      var _params = this.process_args(params, ["population", "samples", "population_document_id", "sample_worksheet_document_id", "sample_evidence_document_id"]);
      return $.ajax({
        type : "put"
        , url : "/population_samples/" + id + ".json"
        , dataType : "json"
        , data : _params
      });
    }
  }, {

    init : function () {
        this._super && this._super.apply(this, arguments);

        var that = this;
<commit_msg>Story 47050927: Forcing population & sample counts to have value 0 if none provided, because not-a-number validation fails on empty string<commit_after>(function(can, $) {
  
  can.Model.Cacheable("CMS.Models.PopulationSample", {
    root_object : "population_sample"
    , update : function(id, params) {
      params.population || (params.population = 0);
      params.samples || (params.samples = 0);
      var _params = this.process_args(params, ["population", "samples", "population_document_id", "sample_worksheet_document_id", "sample_evidence_document_id"]);
      return $.ajax({
        type : "put"
        , url : "/population_samples/" + id + ".json"
        , dataType : "json"
        , data : _params
      });
    }
  }, {

    init : function () {
        this._super && this._super.apply(this, arguments);

        var that = this;

{'fraction_non_alphanumeric': 0.14266396213657878, 'fraction_numerical': 0.0074374577417173765, 'mean_word_length': 2.9257294429708223, 'pattern_counts': {'":': 0, '<': 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': '6978933', 'n_tokens_mistral': 466, 'n_tokens_neox': 435, 'n_words': 95}