<commit_before><?php
/* This class is part of the XP framework
 *
 * $Id$ 
 */

  uses(
    'scriptlet.xml.workflow.AbstractState',
    'io.FileUtil',
    'io.File',
    'de.thekid.dialog.Album',
    'de.thekid.dialog.Update',
    'de.thekid.dialog.SingleShot',
    'util.PropertyManager'
  );

  /**
   * Abstract base class
   *
   * @purpose  Base class
   */
  class AbstractDialogState extends AbstractState {
    var
      $dataLocation = '';
    
    /**
     * Returns index
     *
     * @access  protected
     * @param   int i default 0 page number
     * @return  string[]
     */
    function getIndexPage($i= 0) {
      try(); {
        $index= unserialize(FileUtil::getContents(new File($this->dataLocation.'page_'.$i.'.idx')));
      } if (catch('IOException', $e)) {
        return throw($e);
      }
      return $index;
    }
    
    
    /**
     * Helper method<commit_msg>- QA: Remove superfluous whitespace<commit_after><?php
/* This class is part of the XP framework
 *
 * $Id$ 
 */

  uses(
    'scriptlet.xml.workflow.AbstractState',
    'io.FileUtil',
    'io.File',
    'de.thekid.dialog.Album',
    'de.thekid.dialog.Update',
    'de.thekid.dialog.SingleShot',
    'util.PropertyManager'
  );

  /**
   * Abstract base class
   *
   * @purpose  Base class
   */
  class AbstractDialogState extends AbstractState {
    var
      $dataLocation = '';
    
    /**
     * Returns index
     *
     * @access  protected
     * @param   int i default 0 page number
     * @return  string[]
     */
    function getIndexPage($i= 0) {
      try(); {
        $index= unserialize(FileUtil::getContents(new File($this->dataLocation.'page_'.$i.'.idx')));
      } if (catch('IOException', $e)) {
        return throw($e);
      }
      return $index;
    }
    
    /**
     * Helper method
{'fraction_non_alphanumeric': 0.1505257332595462, 'fraction_numerical': 0.002213613724405091, 'mean_word_length': 2.1334488734835357, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '17641', 'n_tokens_mistral': 608, 'n_tokens_neox': 588, 'n_words': 121}