<commit_before>import UIKit
import Contacts

/// Class used for managing various preferences within the app

class PreferencesManager {

	/// Initialises a `PreferencesManager` connected to the given `NSUserDefaults`.
	/// @param userDefaults The `NSUserDefaults` instance to use for persistant storage.
	/// @return An initialised `PreferencesManager` connected to the given `NSUserDefaults` instance.
	init(_ userDefaults: NSUserDefaults) {
		self.userDefaults = userDefaults
	}

	/// Initialises a `PreferencesManager` connected to the `NSUserDefaults` for the app group matching the given `suiteName`.
	/// @param suiteName The app group to use for persisting preferences (using `NSUserDefaults`).
	/// @return An initialised `PreferencesManager` connected to an `NSUserDefaults` instance.
	convenience init?(suiteName: String) {
		if suiteName.isEmpty {
			return nil
		}

		guard let sharedDefaults = NSUserDefaults(suiteName: suiteName) else {
			return nil
		}

		self.init(sharedDefaults)
	}

	/// Initialise and store a shared manager, based on the `suiteName` for the user defaults we want ot use for storage.
	static let sharedManager = PreferencesManager(suiteName: "group.com.jellystyle.Melissa")

	//! Instance of `NSUserDefaults` used for persistance of preferences.
	var userDefaults: NSUserDefaults

	// MARK: - Appearance

	class var tintColor: UIColor {
		get {
			return PreferencesManager.sharedManager?.tintColor ?? UINavigationBar.appearance().tintColor
		}
	}

	var tintColor: UIColor {
		get {
			return UIColor(red: 0.122, green: 0.463, blue: 0.804, alpha: 1)<commit_msg>Remove reference to UINavigationBar's tintColor<commit_after>import UIKit
import Contacts

/// Class used for managing various preferences within the app

class PreferencesManager {

	/// Initialises a `PreferencesManager` connected to the given `NSUserDefaults`.
	/// @param userDefaults The `NSUserDefaults` instance to use for persistant storage.
	/// @return An initialised `PreferencesManager` connected to the given `NSUserDefaults` instance.
	init(_ userDefaults: NSUserDefaults) {
		self.userDefaults = userDefaults
	}

	/// Initialises a `PreferencesManager` connected to the `NSUserDefaults` for the app group matching the given `suiteName`.
	/// @param suiteName The app group to use for persisting preferences (using `NSUserDefaults`).
	/// @return An initialised `PreferencesManager` connected to an `NSUserDefaults` instance.
	convenience init?(suiteName: String) {
		if suiteName.isEmpty {
			return nil
		}

		guard let sharedDefaults = NSUserDefaults(suiteName: suiteName) else {
			return nil
		}

		self.init(sharedDefaults)
	}

	/// Initialise and store a shared manager, based on the `suiteName` for the user defaults we want ot use for storage.
	static let sharedManager = PreferencesManager(suiteName: "group.com.jellystyle.Melissa")

	//! Instance of `NSUserDefaults` used for persistance of preferences.
	var userDefaults: NSUserDefaults

	// MARK: - Appearance

	/// Convenience endpoint for accessing the user-stored tintColor, which falls back to a default.
	class var tintColor: UIColor {
		get {
			return PreferencesManager.sharedManager?.tintColor ?? UIColor(red: 0.122, green: 0.463, blue: 0.804, alpha: 1)
		}
	}

	/// User-selected tint color for giving the app a little bit of customisation.
	var tintColor: UIColor? {
		get {
			return nil
{'fraction_non_alphanumeric': 0.08565500889152342, 'fraction_numerical': 0.007705986959098993, 'mean_word_length': 4.306603773584905, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2206490', 'n_tokens_mistral': 1041, 'n_tokens_neox': 935, 'n_words': 346}