<commit_before>package org.jetbrains.plugins.scala.lang.parser;

import com.intellij.psi.*;
import com.intellij.psi.impl.DebugUtil;
import junit.framework.Assert;
import junit.framework.Test;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.plugins.scala.testcases.BaseScalaFileSetTestCase;

public class ParserTest extends BaseScalaFileSetTestCase {
  @NonNls
  private static final String DATA_PATH = "test/org/jetbrains/plugins/scala/lang/parser/data";

  public ParserTest() {
    super(DATA_PATH);
  }


  public String transform(String testName, String[] data) throws Exception {
    String fileText = data[0];
    PsiManager psiManager = PsiManager.getInstance(project);
    PsiElementFactory psiElementFactory = psiManager.getElementFactory();
    Assert.assertNotNull(psiElementFactory);
    Assert.assertNotNull(TEMP_FILE);
    Assert.assertNotNull(fileText);
    PsiFile psiFile = psiElementFactory.createFileFromText(TEMP_FILE, fileText);

    String psiTree = DebugUtil.psiToString(psiFile, false);
    System.out.println("------------------------ "+testName+" ------------------------");
    System.out.println(psiTree);
    System.out.println("");<commit_msg>Fixed bugs with result expression.<commit_after>package org.jetbrains.plugins.scala.lang.parser;

import com.intellij.psi.*;
import com.intellij.psi.impl.DebugUtil;
import junit.framework.Assert;
import junit.framework.Test;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.plugins.scala.testcases.BaseScalaFileSetTestCase;

public class ParserTest extends BaseScalaFileSetTestCase {
  @NonNls
  private static final String DATA_PATH = "test/org/jetbrains/plugins/scala/lang/parser/data/";

  public ParserTest() {
    super(DATA_PATH);
  }


  public String transform(String testName, String[] data) throws Exception {
    String fileText = data[0];
    PsiManager psiManager = PsiManager.getInstance(project);
    PsiElementFactory psiElementFactory = psiManager.getElementFactory();
    Assert.assertNotNull(psiElementFactory);
    Assert.assertNotNull(TEMP_FILE);
    Assert.assertNotNull(fileText);
    PsiFile psiFile = psiElementFactory.createFileFromText(TEMP_FILE, fileText);

    String psiTree = DebugUtil.psiToString(psiFile, false);
    System.out.println("------------------------ "+testName+" ------------------------");
    System.out.println(psiTree);
    System.out.println("");
{'fraction_non_alphanumeric': 0.14273789649415694, 'fraction_numerical': 0.0008347245409015025, 'mean_word_length': 4.199566160520607, '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': '7057876', 'n_tokens_mistral': 706, 'n_tokens_neox': 685, 'n_words': 125}