<commit_before>'use babel'

import {CompositeDisposable} from 'atom'
import _ from 'lodash'
import fs from 'fs'
import os from 'os'
import parser from './gocover-parser'
import path from 'path'
import rimraf from 'rimraf'
import temp from 'temp'

class Tester {
  constructor (goconfigFunc, gogetFunc, testPanelManagerFunc) {
    this.goget = gogetFunc
    this.goconfig = goconfigFunc
    this.testPanelManager = testPanelManagerFunc
    this.subscriptions = new CompositeDisposable()
    this.saveSubscriptions = new CompositeDisposable()
    this.observeConfig()
    this.observeTextEditors()
    this.handleCommands()
    this.subscribeToSaveEvents()
    this.markedEditors = new Map()
    this.running = false
    temp.track()
  }

  dispose () {
    this.running = true
    this.removeTempDir()
    this.clearMarkersFromEditors()
    if (this.markedEditors) {
      this.markedEditors.clear()
    }
    this.markedEditors = null
    if (this.subscriptions) {
      this.subscriptions.dispose()
    }
    this.subscriptions = null
    if (this.saveSubscriptions) {<commit_msg>Avoid duplicate save event subscription<commit_after>'use babel'

import {CompositeDisposable} from 'atom'
import _ from 'lodash'
import fs from 'fs'
import os from 'os'
import parser from './gocover-parser'
import path from 'path'
import rimraf from 'rimraf'
import temp from 'temp'

class Tester {
  constructor (goconfigFunc, gogetFunc, testPanelManagerFunc) {
    this.goget = gogetFunc
    this.goconfig = goconfigFunc
    this.testPanelManager = testPanelManagerFunc
    this.subscriptions = new CompositeDisposable()
    this.saveSubscriptions = new CompositeDisposable()
    this.observeConfig()
    this.observeTextEditors()
    this.handleCommands()
    this.markedEditors = new Map()
    this.running = false
    temp.track()
  }

  dispose () {
    this.running = true
    this.removeTempDir()
    this.clearMarkersFromEditors()
    if (this.markedEditors) {
      this.markedEditors.clear()
    }
    this.markedEditors = null
    if (this.subscriptions) {
      this.subscriptions.dispose()
    }
    this.subscriptions = null
    if (this.saveSubscriptions) {
{'fraction_non_alphanumeric': 0.09605568445475637, 'fraction_numerical': 0.0, 'mean_word_length': 3.6167023554603857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5344010', 'n_tokens_mistral': 691, 'n_tokens_neox': 674, 'n_words': 159}