<commit_before>/*!
 * ${copyright}
 */

// Provides class sap.ui.core.format.ListFormat
sap.ui.define([
	'sap/ui/core/Locale',
	'sap/ui/core/LocaleData',
	"sap/base/Log",
	"sap/base/util/extend",
	"sap/base/util/isEmptyObject"
],
	function(Locale, LocaleData, Log, extend, isEmptyObject) {
	"use strict";

	/**
	 * Constructor for ListFormat - must not be used: To get a ListFormat instance, please use <code>ListFormat.getInstance()</code>.
	 *
	 * @class
	 * The ListFormat is a static class for formatting and parsing an array of strings in a locale-sensitive manner according
	 * to a set of format options.
	 *
	 * @public
	 * @hideconstructor
	 * @alias sap.ui.core.format.ListFormat
	 */
	var ListFormat = function() {
		// Do not use the constructor
		throw new Error();
	};

	ListFormat.oDefaultListFormat = {
		type: "standard",
		style: "wide"
	};

	/**
	 * Get an instance of the ListFormat which can be used for formatting.
	 *
	 * @param {object} [oFormatOptions] Object which defines the format options
	 * @param {sap.ui.core.Locale} [oLocale] Locale to get the formatter for
	 * @return {sap.ui.core.format.ListFormat} Instance of the ListFormat
	 * @public
	 *
	 */
	ListFormat.getInstance = function(oFormatOptions, oLocale) {
		return this.createInstance(oFormatOptions, oLocale);
	};

	/**
	 * Create an instance of the ListFormat.
	 *
	 * @param {object} [oFormatOptions] Object which defines the format options
	 * @param {{sap.ui.core.Locale}} [oLocale] Locale to get the formatter for
	 * @return {sap.ui.core.format.ListFormat} Instance of the ListFormat
	 * @private
	 */
	ListFormat.createInstance = function(oFormatOptions, oLocale){
		var oFormat = Object.create(this.prototype);

		if ( oFormatOptions instanceof Locale ) {
			oLocale = oFormatOptions;
			oFormatOptions = undefined;
		}

		if (!oLocale) {
			oLocale = sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale();
		}
		oFormat.oLocale = oLocale;
		oFormat.oLocaleData = LocaleData.getInstance(oLocale);
		oFormat.oOriginalFormatOptions = extend({}, this.oDefaultListFormat, oFormatOptions);

		return oFormat;

	};

	/**<commit_msg>[INTERNAL] sap.ui.core.format.ListFormat: fix typo<commit_after>/*!
 * ${copyright}
 */

// Provides class sap.ui.core.format.ListFormat
sap.ui.define([
	'sap/ui/core/Locale',
	'sap/ui/core/LocaleData',
	"sap/base/Log",
	"sap/base/util/extend",
	"sap/base/util/isEmptyObject"
],
	function(Locale, LocaleData, Log, extend, isEmptyObject) {
	"use strict";

	/**
	 * Constructor for ListFormat - must not be used: To get a ListFormat instance, please use <code>ListFormat.getInstance()</code>.
	 *
	 * @class
	 * The ListFormat is a static class for formatting and parsing an array of strings in a locale-sensitive manner according
	 * to a set of format options.
	 *
	 * @public
	 * @hideconstructor
	 * @alias sap.ui.core.format.ListFormat
	 */
	var ListFormat = function() {
		// Do not use the constructor
		throw new Error();
	};

	ListFormat.oDefaultListFormat = {
		type: "standard",
		style: "wide"
	};

	/**
	 * Get an instance of the ListFormat which can be used for formatting.
	 *
	 * @param {object} [oFormatOptions] Object which defines the format options
	 * @param {sap.ui.core.Locale} [oLocale] Locale to get the formatter for
	 * @return {sap.ui.core.format.ListFormat} Instance of the ListFormat
	 * @public
	 *
	 */
	ListFormat.getInstance = function(oFormatOptions, oLocale) {
		return this.createInstance(oFormatOptions, oLocale);
	};

	/**
	 * Create an instance of the ListFormat.
	 *
	 * @param {object} [oFormatOptions] Object which defines the format options
	 * @param {sap.ui.core.Locale} [oLocale] Locale to get the formatter for
	 * @return {sap.ui.core.format.ListFormat} Instance of the ListFormat
	 * @private
	 */
	ListFormat.createInstance = function(oFormatOptions, oLocale){
		var oFormat = Object.create(this.prototype);

		if ( oFormatOptions instanceof Locale ) {
			oLocale = oFormatOptions;
			oFormatOptions = undefined;
		}

		if (!oLocale) {
			oLocale = sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale();
		}
		oFormat.oLocale = oLocale;
		oFormat.oLocaleData = LocaleData.getInstance(oLocale);
		oFormat.oOriginalFormatOptions = extend({}, this.oDefaultListFormat, oFormatOptions);

		return oFormat;

	};

	/**
{'fraction_non_alphanumeric': 0.12508670520231213, 'fraction_numerical': 0.0, 'mean_word_length': 3.9496567505720823, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '131288', 'n_tokens_mistral': 1438, 'n_tokens_neox': 1338, 'n_words': 365}