<commit_before>/*
 * jQuery Alvaro's Collaptable 1.0
 *
 * Copyright (c) 2010 <NAME> - <EMAIL>
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * More info in http://github.com/alvaroveliz/aCollapTable
 */
(function($){
  $.fn.extend({ 
    aCollapTable: function(options) {
      var defaults = {
        startCollapsed : false
      };
      var options = $.extend(defaults, options);
      var self = this;  

      var _collaptable = function($element, $parent, $display)
      {
        parent = (typeof($parent) == 'undefined') ? $element.parents('tr').data('id') : $parent;
        display = (typeof($display) == 'undefined') ? ( ($element.hasClass('act-expanded')) ? 'none' : 'table-row' ) : $display;
        table = self;
        
        $('tr[data-parent='+parent+']', table).each(function(key, item){
          $(item).css('display', display);
          if ($(item).hasClass('act-tr-expanded')) {
            collaptable($element, $(item).data('id'), display);   
          }
        });

        if (display == 'none') {
          $element.html('<span class="i">+</span>').removeClass('act-expanded').addClass('act-collapsed');
          $element.parents('tr').addClass('act-tr-collapsed').removeClass('act-tr-expanded');
        }
        else {
          $element.html('<span class="i">-</span>').removeClass('act-collapsed').addClass('act-expanded');
          $element.parents('tr').addClass('act-tr-expanded').removeClass('act-tr-collapsed');
        }<commit_msg>Fix some errors<commit_after>/*
 * jQuery Alvaro's Collaptable 1.0
 *
 * Copyright (c) 2010 <NAME> - <EMAIL>
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * More info in http://github.com/alvaroveliz/aCollapTable
 */
(function($){
  $.fn.extend({ 
    aCollapTable: function(options) {
      var defaults = {
        startCollapsed : false
      };
      var options = $.extend(defaults, options);
      var self = this;  

      var _collaptable = function($element, $parent, $display)
      {
        parent = (typeof($parent) == 'undefined') ? $element.parents('tr').data('id') : $parent;
        display = (typeof($display) == 'undefined') ? ( ($element.hasClass('act-expanded')) ? 'none' : 'table-row' ) : $display;
        table = self;
        
        $('tr[data-parent='+parent+']', table).each(function(key, item){
          $(item).css('display', display);
          if ($(item).hasClass('act-tr-expanded')) {
            _collaptable($element, $(item).data('id'), display);   
          }
        });

        if (display == 'none') {
          $element.html('<span class="i">+</span>').removeClass('act-expanded').addClass('act-collapsed');
          $element.parents('tr').addClass('act-tr-collapsed').removeClass('act-tr-expanded');
        }
        else {
          $element.html('<span class="i">-</span>').removeClass('act-collapsed').addClass('act-expanded');
          $element.parents('tr').addClass('act-tr-expanded').removeClass('act-tr-collapsed');
        }
{'fraction_non_alphanumeric': 0.19889142484512554, 'fraction_numerical': 0.0039126181936746, 'mean_word_length': 2.7829839704069053, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '1766195', 'n_tokens_mistral': 954, 'n_tokens_neox': 940, 'n_words': 150}