<commit_before>package com.karateca.ddescriber;

import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.editor.impl.DocumentImpl;
import com.intellij.psi.PsiFile;
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
import junit.framework.Assert;

import java.io.File;

/**
 * @author <NAME>.
 */
public class BaseTestCase extends LightCodeInsightFixtureTestCase {

  DocumentImpl document;
  JasmineFinder jasmineFinder;

  @Override
  protected String getTestDataPath() {
    String testPath = PathManager.getJarPathForClass(BaseTestCase.class);
    File sourceRoot = new File(testPath, "../../..");
    return new File(sourceRoot, "testData").getPath();
  }

  public void testDummyTest() {
    // Created this test to get rid of the warning.
    Assert.assertEquals(1, 1);
  }

  void prepareScenarioWithTestFile(String fileName) {
    PsiFile psiFile = myFixture.configureByFile(fileName);
    document = new DocumentImpl(psiFile.getText());
    jasmineFinder = new JasmineFinder(getProject(), document);
  }
}
<commit_msg>use action util to get doc<commit_after>package com.karateca.ddescriber;

import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.editor.Document;
import com.intellij.psi.PsiFile;
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
import junit.framework.Assert;

import java.io.File;

/**
 * @author <NAME>.
 */
public class BaseTestCase extends LightCodeInsightFixtureTestCase {

  Document document;
  JasmineFinder jasmineFinder;

  @Override
  protected String getTestDataPath() {
    String testPath = PathManager.getJarPathForClass(BaseTestCase.class);
    File sourceRoot = new File(testPath, "../../..");
    return new File(sourceRoot, "testData").getPath();
  }

  public void testDummyTest() {
    // Created this test to get rid of the warning.
    Assert.assertEquals(1, 1);
  }

  void prepareScenarioWithTestFile(String fileName) {
    PsiFile psiFile = myFixture.configureByFile(fileName);
    document = ActionUtil.getDocument(psiFile.getVirtualFile());
    jasmineFinder = new JasmineFinder(getProject(), document);
  }
}

{'fraction_non_alphanumeric': 0.1070604522381172, 'fraction_numerical': 0.0018458698661744347, 'mean_word_length': 4.750663129973475, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5822946', 'n_tokens_mistral': 668, 'n_tokens_neox': 659, 'n_words': 138}