<commit_before>import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-add-id-error',
  templateUrl: './add-id-error.component.html',
  styleUrls: ['./add-id-error.component.scss']
})
export class AddIdErrorComponent implements OnInit {
    publicKey: string;

    collections: Collection[];

    constructor(
        private collectionService: CollectionService
    ) {
        this.publicKey = this.getParameterByName('state'); //name orcid
    }

    private getParameterByName(name:string): string {
        var url = window.location.href;
        name = name.replace(/[\[\]]/g, "\\$&");
        var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
            results = regex.exec(url);
        if (!results) {
            return null;
        }
        if (!results[2]) {
            return '';
        } 
        return decodeURIComponent(results[2].replace(/\+/g, " "));
    }

    getCollections(): void {
        this.collectionService.getCollection(this.publicKey).subscribe( 
            collections => {
                this.collections = collections;
            }
        );
    }    

    ngOnInit() {
        this.getCollections();
    }

}<commit_msg>Cleaning error page<commit_after>import { ActivatedRoute } from '@angular/router';

import { Component, OnInit } from '@angular/core';

import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/switchMap';

@Component({
  selector: 'app-add-id-error',
  templateUrl: './add-id-error.component.html',
  styleUrls: ['./add-id-error.component.scss']
})
export class AddIdErrorComponent implements OnInit {
    publicKey: string;

    constructor() {
        this.publicKey = this.getParameterByName('state'); //name orcid
    }

    private getParameterByName(name:string): string {
        var url = window.location.href;
        name = name.replace(/[\[\]]/g, "\\$&");
        var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
            results = regex.exec(url);
        if (!results) {
            return null;
        }
        if (!results[2]) {
            return '';
        } 
        return decodeURIComponent(results[2].replace(/\+/g, " "));
    }

    ngOnInit() {
    }

}
{'fraction_non_alphanumeric': 0.16952983725135623, 'fraction_numerical': 0.0018083182640144665, 'mean_word_length': 2.3581183611532626, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1682860', 'n_tokens_mistral': 673, 'n_tokens_neox': 668, 'n_words': 122}