<commit_before>function chatBot() {
    
    this.input;
    
    this.match = function(regex) {
        return new RegExp(regex).test(this.input);
    }

    this.ping = function(ifttt_event){

        var payload = {
            "value1": "demo",
            "value2": "demo2"
        };

        var data = new FormData();
        data.append( "json", JSON.stringify( payload ) );

        var corsProvider = "https://crossorigin.me/";
        var iftttRecipe = "https://maker.ifttt.com/trigger/" + ifttt_event + "/with/key/dvHJXlCso1laUplLipy7LT";
        fetch(corsProvider + iftttRecipe,
        {
            method: "POST",
            mode: 'cors', 
            headers: new Headers({
                "Content-Type": "application/json"
            }),
            body : data
        })
        .then(function(res){ console.log(res); })
    }

    this.respondTo = function(input) {
    
        this.input = input.toLowerCase();
        
        if(this.match('(hi|hello|hey|hola|howdy)(\\s|!|\\.|$)')){
            return [
                "um... hi?"];
        }
        
        if(this.match('(robin)(\\s|!|\\.|$)')){
            return [
                "This is my name. Do you need some info about something?"];
        }
        
        if(this.match('l(ol)+') || this.match('(ha)+(h|$)') || this.match('lmao')){
            return [
                "what's so funny?"];
        }
        
        if(this.match('^no+(\\s|!|\\.|$)')){
            return [
                "don't be such a negative nancy :("];
        }
        
        if(this.match('(cya|bye|see ya|ttyl|talk to you later)')){
            return [
                "alright, see you around", 
                "Good luck with the challenge!"];
        }
        
        if(this.match('(dumb|stupid|is that all)')){
            return [
                "hey i'm just a proof of concept", 
                "you can make me smarter if you'd like"];
        }
        
        if(this.match('(game|game2|challenge|winter game|game)')){
            return [
                "Nice, we are going to play...",
                "Do you like middleware?"];
        }
        
        if(this.match('(1|backend|middleware|spring)')){
            this.ping("winter-games-game1-java");
            return [
                "Oki,",
                "In the second game, you have to learn the difference between a Future object and the usage of CompletableFuture.",
                "Create in your API:",
                "a new method calling 2 Services in a sequence.",
                "a new method calling 2 Services in parallel using Future objects.",
                "a new method using @Async.",
                "a new method calling 2 Services with Future objects and simulate and exception in one of them.",
                "a new method calling 2 Services in parallel using CompletableFuture objects.",
                "a new method calling 2 Services with CompletableFuture objects and simulate a timeout in one of them.",
                "Get extra points if you use in some tests the library from Spotify about for your CompletableFuture.",
                "You have 2 weeks to get your best in this game"];
        }

        if(this.match('(results)')){
            return [<commit_msg>Minor change<commit_after>function chatBot() {
    
    this.input;
    
    this.match = function(regex) {
        return new RegExp(regex).test(this.input);
    }

    this.ping = function(ifttt_event){

        var payload = {
            "value1": "demo",
            "value2": "demo2"
        };

        var data = new FormData();
        data.append( "json", JSON.stringify( payload ) );

        var corsProvider = "https://crossorigin.me/";
        var iftttRecipe = "https://maker.ifttt.com/trigger/" + ifttt_event + "/with/key/dvHJXlCso1laUplLipy7LT";
        fetch(corsProvider + iftttRecipe,
        {
            method: "POST",
            mode: 'cors', 
            headers: new Headers({
                "Content-Type": "application/json"
            }),
            body : data
        })
        .then(function(res){ console.log(res); })
    }

    this.respondTo = function(input) {
    
        this.input = input.toLowerCase();
        
        if(this.match('(hi|hello|hey|hola|howdy)(\\s|!|\\.|$)')){
            return [
                "um... hi?"];
        }
        
        if(this.match('(robin)(\\s|!|\\.|$)')){
            return [
                "This is my name. Do you need some info about something?"];
        }
        
        if(this.match('l(ol)+') || this.match('(ha)+(h|$)') || this.match('lmao')){
            return [
                "what's so funny?"];
        }
        
        if(this.match('^no+(\\s|!|\\.|$)')){
            return [
                "don't be such a negative nancy :("];
        }
        
        if(this.match('(cya|bye|see ya|ttyl|talk to you later)')){
            return [
                "alright, see you around", 
                "Good luck with the challenge!"];
        }
        
        if(this.match('(dumb|stupid|is that all)')){
            return [
                "hey i'm just a proof of concept", 
                "you can make me smarter if you'd like"];
        }
        
        if(this.match('(game|game2|challenge|winter game|game)')){
            return [
                "Nice, we are going to play...",
                "Do you like middleware?"];
        }
        
        if(this.match('(1|backend|middleware|spring)')){
            this.ping("winter-games-game1-java");
            return [
                "Oki,",
                "In the second game, you have to learn the difference between a Future object and the usage of CompletableFuture.",
                "Create in your API:",
                "a new method calling 2 Services in a sequence.",
                "a new method calling 2 Services in parallel using Future objects.",
                "a new method using @Async.",
                "a new method calling 2 Services with Future objects and simulate and exception in one of them.",
                "a new method calling 2 Services in parallel using CompletableFuture objects.",
                "a new method calling 2 Services with CompletableFuture objects and simulate a timeout in one of them.",
                "Get extra points if you use in some tests the library from Spotify about CompletableFuture.",
                "You have 2 weeks to get your best in this game"];
        }

        if(this.match('(results)')){
            return [
{'fraction_non_alphanumeric': 0.13078101071975498, 'fraction_numerical': 0.004287901990811639, 'mean_word_length': 1.5491803278688525, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '3719653', 'n_tokens_mistral': 1905, 'n_tokens_neox': 1795, 'n_words': 513}