<commit_before>/**
 * The slide menu widget
 * 
 * @class Widgets.com.chariti.slideMenu
 * @uses core
 */
var APP = require("core");

var sections = [];
var tabs = [];

/**
 * Initializes the slide menu
 * @param {Object} _params
 * @param {Object} _params.tabs The tab items to show in the side menu as defined by the JSON configuration file
 */
$.init = function(_params) {
	sections = [];
	tabs = [];

	// Add the Settings tab
	_params.tabs.push({
		id: "settings",
		image: "/icons/white/settings.png",
		title: "Settings"
	});

	// Creates a TableViewSection for each tab with a menuHeader property
	buildSections(_params.tabs);

	if(sections.length > 0) {
		var currentSection = -1;
	}

	for(var i = 0; i < _params.tabs.length; i++) {
		// Iterates through the created sections<commit_msg>Closes #212, menu header for Settings if using menu headers<commit_after>/**
 * The slide menu widget
 * 
 * @class Widgets.com.chariti.slideMenu
 * @uses core
 */
var APP = require("core");

var sections = [];
var tabs = [];

/**
 * Initializes the slide menu
 * @param {Object} _params
 * @param {Object} _params.tabs The tab items to show in the side menu as defined by the JSON configuration file
 */
$.init = function(_params) {
	var hasMenuHeaders = false;

	sections = [];
	tabs = [];

	// Check to see if we're using menu headers
	for(var i = 0; i < _params.tabs.length; i++) {
		if(_params.tabs[i].menuHeader) {
			hasMenuHeaders = true;
			break;
		}
	}

	// Add the Settings tab
	_params.tabs.push({
		id: "settings",
		title: "Settings",
		image: "/icons/white/settings.png",
		menuHeader: hasMenuHeaders ? "Application" : null
	});

	// Creates a TableViewSection for each tab with a menuHeader property
	buildSections(_params.tabs);

	if(sections.length > 0) {
		var currentSection = -1;
	}

	for(var i = 0; i < _params.tabs.length; i++) {
		// Iterates through the created sections
{'fraction_non_alphanumeric': 0.13749338974087785, 'fraction_numerical': 0.005288207297726071, 'mean_word_length': 3.4622641509433962, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, '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': '369349', 'n_tokens_mistral': 640, 'n_tokens_neox': 600, 'n_words': 201}