<commit_before>import { Injectable } from '@angular/core';
import { EditorChange } from '../models/editor-change';
import { TabService } from './tab.service';
import { CodeCheckResult } from '../models/code-check-result';
import { Tab } from '../models/tab';
import { Subject, Observable } from 'rxjs/Rx';

@Injectable()
export class EditorService {
    private buffers: any = {};
    public changes: Subject<EditorChange>;
    public rawErrors: Subject<CodeCheckResult>;
    
    constructor(
        private tabs: TabService
    ) {
        this.changes = new Subject<EditorChange>(); 
    }
    
    public get(tab: Tab): string {
        return this.buffers[tab.id] || '\n\n';
    }
    
    public set(tab: Tab, text: string, isDirective = true) {<commit_msg>fix imports<commit_after>import { Injectable } from '@angular/core';
import { Subject, Observable } from 'rxjs/Rx';
import { TabService } from './tab.service';
import { Tab, EditorChange, CodeCheckResult } from '../models/index';

@Injectable()
export class EditorService {
    private buffers: any = {};
    public changes: Subject<EditorChange>;
    public rawErrors: Subject<CodeCheckResult>;
    
    constructor(
        private tabs: TabService
    ) {
        this.changes = new Subject<EditorChange>(); 
    }
    
    public get(tab: Tab): string {
        return this.buffers[tab.id] || '\n\n';
    }
    
    public set(tab: Tab, text: string, isDirective = true) {
{'fraction_non_alphanumeric': 0.13819444444444445, 'fraction_numerical': 0.0, 'mean_word_length': 3.128939828080229, 'pattern_counts': {'":': 0, '<': 9, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3842075', 'n_tokens_mistral': 418, 'n_tokens_neox': 415, 'n_words': 113}