<commit_before>import HockeySDK
import os.log
import TroposCore
import UIKit

@UIApplicationMain
final class AppDelegate: UIResponder, UIApplicationDelegate {
    let applicationController = ApplicationController()
    var window: UIWindow?

    func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions _: [UIApplicationLaunchOptionsKey: Any]? = nil
    ) -> Bool {
        if isCurrentlyTesting {
            return true
        }

#if !DEBUG
        let hockeyManager = BITHockeyManager.shared()
        hockeyManager.configure(withIdentifier: TRHockeyIdentifier)
        hockeyManager.crashManager.crashManagerStatus = .autoSend
        hockeyManager.start()
        hockeyManager.authenticator.authenticateInstallation()

        AnalyticsController.shared.install()
#endif

        SettingsController().registerSettings()
        AppearanceController.configureAppearance()

        applicationController.setMinimumBackgroundFetchInterval(for: application)

        window = UIWindow(frame: UIScreen.main.bounds)
        window!.rootViewController = applicationController.rootViewController
        window!.makeKeyAndVisible()

        applicationController.updateWeather()

        return true
    }

    func applicationWillEnterForeground(_: UIApplication) {
        applicationController.updateWeather().subscribeError(weatherUpdateFailed)
    }

    func application(<commit_msg>Update weather when application becomes active<commit_after>import HockeySDK
import os.log
import TroposCore
import UIKit

@UIApplicationMain
final class AppDelegate: UIResponder, UIApplicationDelegate {
    let applicationController = ApplicationController()
    var window: UIWindow?

    func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions _: [UIApplicationLaunchOptionsKey: Any]? = nil
    ) -> Bool {
        if isCurrentlyTesting {
            return true
        }

#if !DEBUG
        let hockeyManager = BITHockeyManager.shared()
        hockeyManager.configure(withIdentifier: TRHockeyIdentifier)
        hockeyManager.crashManager.crashManagerStatus = .autoSend
        hockeyManager.start()
        hockeyManager.authenticator.authenticateInstallation()

        AnalyticsController.shared.install()
#endif

        SettingsController().registerSettings()
        AppearanceController.configureAppearance()

        applicationController.setMinimumBackgroundFetchInterval(for: application)

        window = UIWindow(frame: UIScreen.main.bounds)
        window!.rootViewController = applicationController.rootViewController
        window!.makeKeyAndVisible()

        return true
    }

    func applicationDidBecomeActive(_: UIApplication) {
        applicationController.updateWeather().subscribeError(weatherUpdateFailed)
    }

    func application(
{'fraction_non_alphanumeric': 0.06673728813559322, 'fraction_numerical': 0.0, 'mean_word_length': 3.591572123176661, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2756420', 'n_tokens_mistral': 691, 'n_tokens_neox': 656, 'n_words': 133}