<commit_before>import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.util.concurrent.Executors;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpServer;

/**
 * Pong Service of the Ping Pong System.
 * Implemented in Java 8 with Streams.
 * @author <NAME>
 * 
 */
public class Pong {

	private static void registerPongHandlerWith(HttpServer server) {
		server.createContext("/pong", (HttpExchange httpExchange) -> {
			 
			final String[] request = httpExchange.getRequestURI().getPath().split("/");			
			final int length = Integer.parseInt(request[2]);
			final String ooo = Stream.generate(() -> "o")
					                 .limit(length < 4 ? 1 : length - 3)
					                 .collect(Collectors.joining(""));
			final byte[] out = ("p" + ooo + "ng").getBytes("UTF-8");
			<commit_msg>Pong now uses StringBuffer (to improve performance in answer generation)<commit_after>import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.util.concurrent.Executors;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpServer;

/**
 * Pong Service of the Ping Pong System.
 * Implemented in Java 8 with Streams.
 * @author <NAME>
 * 
 */
public class Pong {

	private static void registerPongHandlerWith(HttpServer server) {
		server.createContext("/pong", (HttpExchange httpExchange) -> {
			 
			final String[] request = httpExchange.getRequestURI().getPath().split("/");			
			final int length = Integer.parseInt(request[2]);
			
			StringBuffer buffer = new StringBuffer();
			buffer.append("p");
			final String ooo = Stream.generate(() -> "o")
					                 .limit(length < 4 ? 1 : length - 3)
					                 .collect(Collectors.joining(""));
			buffer.append(ooo);
			buffer.append("ng");
			final byte[] out = buffer.toString()
			                         .getBytes("UTF-8");
			
{'fraction_non_alphanumeric': 0.13336614173228348, 'fraction_numerical': 0.005905511811023622, 'mean_word_length': 3.28, 'pattern_counts': {'":': 0, '<': 7, '<?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': '636094', 'n_tokens_mistral': 674, 'n_tokens_neox': 585, 'n_words': 145}