<commit_before>import {Component, OnInit} from '@angular/core';
import {Router} from '@angular/router';
import {AuthService} from '@shared/services/auth.service';
import {ProfileService} from '@shared/services/profile.service';
import {Profile} from 'model/Profile';

@Component({
    selector: '[AppLoginLauncher]',
    templateUrl: './login-launcher.component.html',
    styleUrls: ['./login-launcher.component.css']
})

export class LoginLauncherComponent implements OnInit {

    public profile: Profile;
    public name: string;
    public userId: string;
    public isPublic: boolean;
    public mergeControl: boolean;
    public adminUser= ['BH3FoEuT', 'xQuOBTAW' , '8AufFkjS' , '94GSchtF' , 'rag0xYiJ' , 'aEheGiTs' , 'rhT13Rdn', 'VsDx8WqS'];

    constructor(public profileService: ProfileService, private router: Router, public auth: AuthService) {
        this.name = null;
    }

    ngOnInit() {
        this.getProfile();
    }

    getProfile() {
        this.profileService.getAdminUsers().subscribe( x => {
            this.profileService.getProfile()
                .subscribe(
                    profile => {
                        this.profile = profile;
                        this.name = profile.userName;
                        this.userId = profile.userId;
                        this.isPublic = profile.isPublic;
                        if (this.userId !== null) {
                            for (const user of x.json().users) {
                                if (user === this.userId) {
                                    this.mergeControl = true;
                                }
                            }
                        }
                    }
                );
        });
    }

    private deleteCookie(name) {
        this.setCookie(name, '', -1);
    }

    private setCookie(name: string, value: string, expireDays: number, path = '') {
        const d: Date = new Date();
        d.setTime(d.getTime() + expireDays * 24 * 60 * 60 * 1000);
        const expires: string = 'expires=' + d.toUTCString();
        document.cookie = name + '=' + value + '; ' + expires + (path.length > 0 ? '; path=' + path : '');
    }

    LogOut() {
        // this.deleteCookie('AUTH-TOKEN');
        this.mergeControl = false;
        localStorage.removeItem('id_token');
        this.profileService.profile = null;
        this.profileService.userId = null;
        this.router.navigate(['home']);
    }
}
<commit_msg>OF-75 remove hard code<commit_after>import {Component, OnInit} from '@angular/core';
import {Router} from '@angular/router';
import {AuthService} from '@shared/services/auth.service';
import {ProfileService} from '@shared/services/profile.service';
import {Profile} from 'model/Profile';

@Component({
    selector: '[AppLoginLauncher]',
    templateUrl: './login-launcher.component.html',
    styleUrls: ['./login-launcher.component.css']
})

export class LoginLauncherComponent implements OnInit {

    public profile: Profile;
    public name: string;
    public userId: string;
    public isPublic: boolean;
    public mergeControl: boolean;

    constructor(public profileService: ProfileService, private router: Router, public auth: AuthService) {
        this.name = null;
    }

    ngOnInit() {
        this.getProfile();
    }

    getProfile() {
        this.profileService.getAdminUsers().subscribe( x => {
            this.profileService.getProfile()
                .subscribe(
                    profile => {
                        this.profile = profile;
                        this.name = profile.userName;
                        this.userId = profile.userId;
                        this.isPublic = profile.isPublic;
                        if (this.userId !== null) {
                            for (const user of x.json().users) {
                                if (user === this.userId) {
                                    this.mergeControl = true;
                                }
                            }
                        }
                    }
                );
        });
    }

    private deleteCookie(name) {
        this.setCookie(name, '', -1);
    }

    private setCookie(name: string, value: string, expireDays: number, path = '') {
        const d: Date = new Date();
        d.setTime(d.getTime() + expireDays * 24 * 60 * 60 * 1000);
        const expires: string = 'expires=' + d.toUTCString();
        document.cookie = name + '=' + value + '; ' + expires + (path.length > 0 ? '; path=' + path : '');
    }

    LogOut() {
        // this.deleteCookie('AUTH-TOKEN');
        this.mergeControl = false;
        localStorage.removeItem('id_token');
        this.profileService.profile = null;
        this.profileService.userId = null;
        this.router.navigate(['home']);
    }
}

{'fraction_non_alphanumeric': 0.12786339025406082, 'fraction_numerical': 0.007080383173677634, 'mean_word_length': 1.7827346465816918, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1375454', 'n_tokens_mistral': 1356, 'n_tokens_neox': 1283, 'n_words': 281}