<commit_before>//#JSCOVERAGE_IF 0


/**
* Misc bug fixes to Sencha Touch.
*
* Because Sencha Touch doesn't have a public repository, there is often a lag
* between the time a fix is available on the forums and the time it is in a
* release.  This file collects the ones we have found to be needed and
* puts them into a place where we can collect and use them across
* various projects.
*
* Each fix should include a description, link to forum posting, and a bug number.
*/

/*
* Ext.Map mapOptions not taking effect.
*
* forum: http://www.sencha.com/forum/showthread.php?182767
* bug: TOUCH-2223
*/
Ext.override('Ext.overrides.Map', {
   override: 'Ext.Map',
   getMapOptions: function() {
      return Ext.merge({}, this.options || this.getInitialConfig('mapOptions'));
   }
});


/*
* Override the parseStatus method to consider 0 as a failure.
*/
Ext.override('Ext.overrides.Connection', {
   override: 'Ext.data.Connection',

   parseStatus: function(status) {
      var ret_val = this.callParent(status);
      if(0 === status) {
         ret_val.success = false;
      }
      return ret_val;<commit_msg>Add override for Ext.data.Connection that makes a status of 0 be a failure.<commit_after>//#JSCOVERAGE_IF 0


/**
* Misc bug fixes to Sencha Touch.
*
* Because Sencha Touch doesn't have a public repository, there is often a lag
* between the time a fix is available on the forums and the time it is in a
* release.  This file collects the ones we have found to be needed and
* puts them into a place where we can collect and use them across
* various projects.
*
* Each fix should include a description, link to forum posting, and a bug number.
*/

/*
* Ext.Map mapOptions not taking effect.
*
* forum: http://www.sencha.com/forum/showthread.php?182767
* bug: TOUCH-2223
*/
Ext.override('Ext.overrides.Map', {
   override: 'Ext.Map',
   getMapOptions: function() {
      return Ext.merge({}, this.options || this.getInitialConfig('mapOptions'));
   }
});


/*
* Override the parseStatus method to consider 0 as a failure.
*/
Ext.define('Ext.overrides.Connection', {
   override: 'Ext.data.Connection',

   parseStatus: function(status) {
      var ret_val = this.callParent(arguments);

      if((0 === status) && (this.getZeroIsFailure())) {
         ret_val.success = false;
         //console.log('set to fail');
      }

      return ret_val;
{'fraction_non_alphanumeric': 0.11540093338990241, 'fraction_numerical': 0.011455239711497667, 'mean_word_length': 3.382899628252788, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2931379', 'n_tokens_mistral': 740, 'n_tokens_neox': 709, 'n_words': 259}