<commit_before>import UIKit

public struct ScheduleReminder {
    
    public static func perform(date: NSDate) {
        let notification = self.notification(date)
        UIApplication.sharedApplication().scheduleLocalNotification(notification)
    }
    
    
    // MARK: Private
    private static func notification(date: NSDate) -> UILocalNotification {
        var notification = UILocalNotification()
        notification.fireDate = self.reminderDate(date)<commit_msg>Cancel existing notifications when setting new one.<commit_after>import UIKit

public struct ScheduleReminder {
    
    public static func perform(date: NSDate) {
        UIApplication.sharedApplication().cancelAllLocalNotifications()
        let notification = self.notification(date)
        UIApplication.sharedApplication().scheduleLocalNotification(notification)
    }
    
    
    // MARK: Private
    private static func notification(date: NSDate) -> UILocalNotification {
        var notification = UILocalNotification()
        notification.fireDate = self.reminderDate(date)
{'fraction_non_alphanumeric': 0.0743879472693032, 'fraction_numerical': 0.0, 'mean_word_length': 3.5622317596566524, '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': '1663596', 'n_tokens_mistral': 254, 'n_tokens_neox': 255, 'n_words': 60}