<commit_before>package io.spring.cloud.samples.brewery.common;

import java.util.Collection;

import com.google.common.collect.LinkedListMultimap;
import com.google.common.collect.Multimap;
import com.google.common.collect.Multimaps;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Span;
import org.springframework.cloud.sleuth.SpanReporter;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import lombok.extern.slf4j.Slf4j;

/**
 * @author <NAME>
 */
@Slf4j
public class StoringZipkinSpanReporter implements SpanReporter {

	final Multimap<Long, Span> sentSpans = Multimaps.synchronizedListMultimap(
			LinkedListMultimap.create());
	private final SpanReporter delegate;

	public StoringZipkinSpanReporter(SpanReporter spanReporter) {
		delegate = spanReporter;
	}



	@Override
	public void report(Span span) {
		sentSpans.put(span.getTraceId(), span);
		log.info("Sending span [" + span.toString() + "] to Zipkin");
		delegate.report(span);
	}
}

@RestController
class SpansController {

	private final StoringZipkinSpanReporter reporter;

	SpansController(StoringZipkinSpanReporter storingZipkinSpanReporter) {
		this.reporter = storingZipkinSpanReporter;
	}

	@RequestMapping("/spans/{traceId}")
	public ResponseEntity<Collection<Span>> spans(@PathVariable String traceId) {
		Collection<Span> spansForTrace = reporter.sentSpans
				.get(Span.hexToId(traceId));
		return ResponseEntity.ok(spansForTrace);
	}

	@RequestMapping("/spans")
	public ResponseEntity<Collection<Span>> spans() {
		Collection<Span> spansForTrace = reporter.sentSpans.values();
		return ResponseEntity.ok(spansForTrace);
	}
}<commit_msg>Please work<commit_after>package io.spring.cloud.samples.brewery.common;

import java.util.Collection;

import com.google.common.collect.LinkedListMultimap;
import com.google.common.collect.Multimap;
import com.google.common.collect.Multimaps;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Span;
import org.springframework.cloud.sleuth.SpanReporter;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import lombok.extern.slf4j.Slf4j;

/**
 * @author <NAME>
 */
@Slf4j
public class StoringZipkinSpanReporter implements SpanReporter {

	final Multimap<Long, Span> sentSpans = Multimaps.synchronizedListMultimap(
			LinkedListMultimap.create());
	private final SpanReporter delegate;

	public StoringZipkinSpanReporter(SpanReporter spanReporter) {
		delegate = spanReporter;
	}



	@Override
	public void report(Span span) {
		sentSpans.put(span.getTraceId(), span);
		log.info("Sending span [" + span.toString() + "] to Zipkin");
		delegate.report(span);
	}
}

//@RestController
class SpansController {

	private final StoringZipkinSpanReporter reporter;

	SpansController(StoringZipkinSpanReporter storingZipkinSpanReporter) {
		this.reporter = storingZipkinSpanReporter;
	}

	@RequestMapping("/spans/{traceId}")
	public ResponseEntity<Collection<Span>> spans(@PathVariable String traceId) {
		Collection<Span> spansForTrace = reporter.sentSpans
				.get(Span.hexToId(traceId));
		return ResponseEntity.ok(spansForTrace);
	}

	@RequestMapping("/spans")
	public ResponseEntity<Collection<Span>> spans() {
		Collection<Span> spansForTrace = reporter.sentSpans.values();
		return ResponseEntity.ok(spansForTrace);
	}
}
{'fraction_non_alphanumeric': 0.10871905274488698, 'fraction_numerical': 0.0016146393972012918, 'mean_word_length': 6.375, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '6894388', 'n_tokens_mistral': 1209, 'n_tokens_neox': 1145, 'n_words': 189}