<commit_before>package com.intellij.compiler.impl.javaCompiler;

import com.intellij.openapi.compiler.CompileContext;
import com.intellij.openapi.diagnostic.Logger;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.NonNls;

import java.io.*;

public abstract class ExternalCompiler implements BackendCompiler {
  private static final Logger LOG = Logger.getInstance("com.intellij.compiler.impl.javaCompiler.ExternalCompiler");

  @NotNull
  public abstract String[] createStartupCommand(ModuleChunk chunk, CompileContext context, String outputPath)
    throws IOException, IllegalArgumentException;

  @NotNull
  public Process launchProcess(final ModuleChunk chunk, final String outputDir, final CompileContext compileContext) throws IOException {
    final String[] commands = createStartupCommand(chunk, compileContext, outputDir);

    @NonNls final StringBuffer buf = new StringBuffer(16 * commands.length);
    buf.append("Running compiler: ");
    for (final String command : commands) {
      buf.append(" ").append(command);
    }

    LOG.info(buf.toString());

    return Runtime.getRuntime().exec(commands);
  }
}
<commit_msg>use StringBuilder from the pool, don't create it each time<commit_after>package com.intellij.compiler.impl.javaCompiler;

import com.intellij.openapi.compiler.CompileContext;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.util.StringBuilderSpinAllocator;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;

import java.io.IOException;

public abstract class ExternalCompiler implements BackendCompiler {
  private static final Logger LOG = Logger.getInstance("com.intellij.compiler.impl.javaCompiler.ExternalCompiler");

  @NotNull
  public abstract String[] createStartupCommand(ModuleChunk chunk, CompileContext context, String outputPath)
    throws IOException, IllegalArgumentException;

  @NotNull
  public Process launchProcess(final ModuleChunk chunk, final String outputDir, final CompileContext compileContext) throws IOException {
    final String[] commands = createStartupCommand(chunk, compileContext, outputDir);

    @NonNls final StringBuilder buf = StringBuilderSpinAllocator.alloc();
    try {
      buf.append("Running compiler: ");
      for (final String command : commands) {
        buf.append(" ").append(command);
      }

      LOG.info(buf.toString());
    }
    finally {
      StringBuilderSpinAllocator.dispose(buf);
    }

    return Runtime.getRuntime().exec(commands);
  }
}

{'fraction_non_alphanumeric': 0.0919175911251981, 'fraction_numerical': 0.000792393026941363, 'mean_word_length': 5.128640776699029, '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': '19137', 'n_tokens_mistral': 671, 'n_tokens_neox': 649, 'n_words': 164}