<commit_before>package main

import (
	"bytes"
	"fmt"
	"go/format"
	"io"
	"path"
	"strings"

	"github.com/golang/protobuf/proto"
	"github.com/golang/protobuf/protoc-gen-go/descriptor"
	plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
)

type Generator struct{}

func New() *Generator {
	return &Generator{}
}

type targetFile struct {
	file     *descriptor.FileDescriptorProto
	services []*targetService
}

type targetService struct {
	service *descriptor.ServiceDescriptorProto
	methods []*descriptor.MethodDescriptorProto
}

func p(w io.Writer, format string, args ...interface{}) {
	if w == nil {
		return
	}
	if _, err := fmt.Fprintf(w, format, args...); err != nil {
		panic(err)
	}
	if _, err := fmt.Fprintln(w); err != nil {
		panic(err)
	}
}

func (g *Generator) Generate(req *plugin.CodeGeneratorRequest) (*plugin.CodeGeneratorResponse, error) {
	// Filter files with Service.
	targetFiles := make([]*targetFile, 0)
	for _, f := range req.GetProtoFile() {
		target := g.genTarget(f)
		if target != nil {
			targetFiles = append(targetFiles, target)
		}
	}<commit_msg>Fix comment<commit_after>package main

import (
	"bytes"
	"fmt"
	"go/format"
	"io"
	"path"
	"strings"

	"github.com/golang/protobuf/proto"
	"github.com/golang/protobuf/protoc-gen-go/descriptor"
	plugin "github.com/golang/protobuf/protoc-gen-go/plugin"
)

type Generator struct{}

func New() *Generator {
	return &Generator{}
}

type targetFile struct {
	file     *descriptor.FileDescriptorProto
	services []*targetService
}

type targetService struct {
	service *descriptor.ServiceDescriptorProto
	methods []*descriptor.MethodDescriptorProto
}

func p(w io.Writer, format string, args ...interface{}) {
	if w == nil {
		return
	}
	if _, err := fmt.Fprintf(w, format, args...); err != nil {
		panic(err)
	}
	if _, err := fmt.Fprintln(w); err != nil {
		panic(err)
	}
}

func (g *Generator) Generate(req *plugin.CodeGeneratorRequest) (*plugin.CodeGeneratorResponse, error) {
	// Filter files to target files.
	targetFiles := make([]*targetFile, 0)
	for _, f := range req.GetProtoFile() {
		target := g.genTarget(f)
		if target != nil {
			targetFiles = append(targetFiles, target)
		}
	}
{'fraction_non_alphanumeric': 0.14661134163208853, 'fraction_numerical': 0.0009220839096357768, 'mean_word_length': 4.154394299287411, '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': '6382914', 'n_tokens_mistral': 771, 'n_tokens_neox': 737, 'n_words': 174}