text:
CEF_EXPORT cef_command_line_t* cef_command_line_create() {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  CefRefPtr<CefCommandLine> _retval = CefCommandLine::CreateCommandLine();

  // Return type: refptr_same
  return CefCommandLineCppToC::Wrap(_retval);
}

CEF_EXPORT cef_command_line_t* cef_command_line_get_global() {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  CefRefPtr<CefCommandLine> _retval = CefCommandLine::GetGlobalCommandLine();

  // Return type: refptr_same
  return CefCommandLineCppToC::Wrap(_retval);
}

// MEMBER FUNCTIONS - Body may be edited by hand.

int CEF_CALLBACK command_line_is_valid(struct _cef_command_line_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  bool _retval = CefCommandLineCppToC::Get(self)->IsValid();

  // Return type: bool
  return _retval;
}

int CEF_CALLBACK command_line_is_read_only(struct _cef_command_line_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  bool _retval = CefCommandLineCppToC::Get(self)->IsReadOnly();

  // Return type: bool
  return _retval;
}

struct _cef_command_line_t* CEF_CALLBACK command_line_copy(
    struct _cef_command_line_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefRefPtr<CefCommandLine> _retval = CefCommandLineCppToC::Get(self)->Copy();

  // Return type: refptr_same
  return CefCommandLineCppToC::Wrap(_retval);
}

void CEF_CALLBACK command_line_init_from_argv(struct _cef_command_line_t* self,
    int argc, const char* const* argv) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;
  // Verify param: argv; type: simple_byaddr
  DCHECK(argv);
  if (!argv)
    return;

  // Execute
  CefCommandLineCppToC::Get(self)->InitFromArgv(
      argc,
      argv);
}

void CEF_CALLBACK command_line_init_from_string(
    struct _cef_command_line_t* self, const cef_string_t* command_line) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;
  // Verify param: command_line; type: string_byref_const
  DCHECK(command_line);
  if (!command_line)
    return;

  // Execute
  CefCommandLineCppToC::Get(self)->InitFromString(
      CefString(command_line));
}

void CEF_CALLBACK command_line_reset(struct _cef_command_line_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;

  // Execute
  CefCommandLineCppToC::Get(self)->Reset();
}

void CEF_CALLBACK command_line_get_argv(struct _cef_command_line_t* self,
    cef_string_list_t argv) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;
  // Verify param: argv; type: string_vec_byref
  DCHECK(argv);
  if (!argv)
    return;

  // Translate param: argv; type: string_vec_byref
  std::vector<CefString> argvList;
  transfer_string_list_contents(argv, argvList);

  // Execute
  CefCommandLineCppToC::Get(self)->GetArgv(
      argvList);

  // Restore param: argv; type: string_vec_byref
  cef_string_list_clear(argv);
  transfer_string_list_contents(argvList, argv);
}

cef_string_userfree_t CEF_CALLBACK command_line_get_command_line_string(
    struct _cef_command_line_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefString _retval = CefCommandLineCppToC::Get(self)->GetCommandLineString();

  // Return type: string
  return _retval.DetachToUserFree();
}

cef_string_userfree_t CEF_CALLBACK command_line_get_program(
    struct _cef_command_line_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;

  // Execute
  CefString _retval = CefCommandLineCppToC::Get(self)->GetProgram();

  // Return type: string
  return _retval.DetachToUserFree();
}

void CEF_CALLBACK command_line_set_program(struct _cef_command_line_t* self,
    const cef_string_t* program) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;
  // Verify param: program; type: string_byref_const
  DCHECK(program);
  if (!program)
    return;

  // Execute
  CefCommandLineCppToC::Get(self)->SetProgram(
      CefString(program));
}

int CEF_CALLBACK command_line_has_switches(struct _cef_command_line_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  bool _retval = CefCommandLineCppToC::Get(self)->HasSwitches();

  // Return type: bool
  return _retval;
}

int CEF_CALLBACK command_line_has_switch(struct _cef_command_line_t* self,
    const cef_string_t* name) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;
  // Verify param: name; type: string_byref_const
  DCHECK(name);
  if (!name)
    return 0;

  // Execute
  bool _retval = CefCommandLineCppToC::Get(self)->HasSwitch(
      CefString(name));

  // Return type: bool
  return _retval;
}

cef_string_userfree_t CEF_CALLBACK command_line_get_switch_value(
    struct _cef_command_line_t* self, const cef_string_t* name) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return NULL;
  // Verify param: name; type: string_byref_const
  DCHECK(name);
  if (!name)
    return NULL;

  // Execute
  CefString _retval = CefCommandLineCppToC::Get(self)->GetSwitchValue(
      CefString(name));

  // Return type: string
  return _retval.DetachToUserFree();
}

void CEF_CALLBACK command_line_get_switches(struct _cef_command_line_t* self,
    cef_string_map_t switches) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;
  // Verify param: switches; type: string_map_single_byref
  DCHECK(switches);
  if (!switches)
    return;

  // Translate param: switches; type: string_map_single_byref
  std::map<CefString, CefString> switchesMap;
  transfer_string_map_contents(switches, switchesMap);

  // Execute
  CefCommandLineCppToC::Get(self)->GetSwitches(
      switchesMap);

  // Restore param: switches; type: string_map_single_byref
  cef_string_map_clear(switches);
  transfer_string_map_contents(switchesMap, switches);
}

void CEF_CALLBACK command_line_append_switch(struct _cef_command_line_t* self,
    const cef_string_t* name) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;
  // Verify param: name; type: string_byref_const
  DCHECK(name);
  if (!name)
    return;

  // Execute
  CefCommandLineCppToC::Get(self)->AppendSwitch(
      CefString(name));
}

void CEF_CALLBACK command_line_append_switch_with_value(
    struct _cef_command_line_t* self, const cef_string_t* name,
    const cef_string_t* value) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;
  // Verify param: name; type: string_byref_const
  DCHECK(name);
  if (!name)
    return;
  // Verify param: value; type: string_byref_const
  DCHECK(value);
  if (!value)
    return;

  // Execute
  CefCommandLineCppToC::Get(self)->AppendSwitchWithValue(
      CefString(name),
      CefString(value));
}

int CEF_CALLBACK command_line_has_arguments(struct _cef_command_line_t* self) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return 0;

  // Execute
  bool _retval = CefCommandLineCppToC::Get(self)->HasArguments();

  // Return type: bool
  return _retval;
}

void CEF_CALLBACK command_line_get_arguments(struct _cef_command_line_t* self,
    cef_string_list_t arguments) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;
  // Verify param: arguments; type: string_vec_byref
  DCHECK(arguments);
  if (!arguments)
    return;

  // Translate param: arguments; type: string_vec_byref
  std::vector<CefString> argumentsList;
  transfer_string_list_contents(arguments, argumentsList);

  // Execute
  CefCommandLineCppToC::Get(self)->GetArguments(
      argumentsList);

  // Restore param: arguments; type: string_vec_byref
  cef_string_list_clear(arguments);
  transfer_string_list_contents(argumentsList, arguments);
}

void CEF_CALLBACK command_line_append_argument(struct _cef_command_line_t* self,
    const cef_string_t* argument) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;
  // Verify param: argument; type: string_byref_const
  DCHECK(argument);
  if (!argument)
    return;

  // Execute
  CefCommandLineCppToC::Get(self)->AppendArgument(
      CefString(argument));
}

void CEF_CALLBACK command_line_prepend_wrapper(struct _cef_command_line_t* self,
    const cef_string_t* wrapper) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  DCHECK(self);
  if (!self)
    return;
  // Verify param: wrapper; type: string_byref_const
  DCHECK(wrapper);
  if (!wrapper)
    return;

  // Execute
  CefCommandLineCppToC::Get(self)->PrependWrapper(
      CefString(wrapper));
}

// CONSTRUCTOR - Do not edit by hand.

CefCommandLineCppToC::CefCommandLineCppToC(CefCommandLine* cls)
    : CefCppToC<CefCommandLineCppToC, CefCommandLine, cef_command_line_t>(cls) {
  struct_.struct_.is_valid = command_line_is_valid;
  struct_.struct_.is_read_only = command_line_is_read_only;
  struct_.struct_.copy = command_line_copy;
  struct_.struct_.init_from_argv = command_line_init_from_argv;
  struct_.struct_.init_from_string = command_line_init_from_string;
  struct_.struct_.reset = command_line_reset;
  struct_.struct_.get_argv = command_line_get_argv;
  struct_.struct_.get_command_line_string =
      command_line_get_command_line_string;
  struct_.struct_.get_program = command_line_get_program;
  struct_.struct_.set_program = command_line_set_program;
  struct_.struct_.has_switches = command_line_has_switches;
  struct_.struct_.has_switch = command_line_has_switch;
  struct_.struct_.get_switch_value = command_line_get_switch_value;
  struct_.struct_.get_switches = command_line_get_switches;
  struct_.struct_.append_switch = command_line_append_switch;
  struct_.struct_.append_switch_with_value =
      command_line_append_switch_with_value;
  struct_.struct_.has_arguments = command_line_has_arguments;
  struct_.struct_.get_arguments = command_line_get_arguments;
  struct_.struct_.append_argument = command_line_append_argument;
  struct_.struct_.prepend_wrapper = command_line_prepend_wrapper;
}

#ifndef NDEBUG
template<> base::AtomicRefCount CefCppToC<CefCommandLineCppToC, CefCommandLine,
    cef_command_line_t>::DebugObjCt = 0;
#endif


text:
	<title>Login Page</title>
	<link rel="stylesheet" type="text/css" href="library.css" />

Library Reservation Login Page

Please enter your login details here

	<form name="login" method="post" action = "login.php">
		Username:

		<input name="loginUsername" size="20" maxlength="20" autofocus required />

		Password:

		<input type = "password" name="loginPassword" size="20" maxlength="6" required />

		<input type = "submit" name = "login" value = "Login">
	</form>

	If you don't have an account already, you can create one here: REGISTER HERE

Created by: Keith Mc Loughlin    Student No: C14337491

redpajama_set_name: RedPajamaGithub


text:
import os
import pytest
import subprocess
import shutil
import difflib
from sys import stderr

from plugin.utils import casing_utils

TEST_DIR = os.path.join('test', 'testdata')
TEST_DIR_GAPIC_V1 = os.path.join(TEST_DIR, 'gapic')
TEST_DIR_GAPIC_V2 = os.path.join(TEST_DIR, 'protoannotation')
TEST_OUTPUT_DIR = os.path.join(TEST_DIR, 'test_output')
TEST_OUTPUT_DIR_V1 = os.path.join(TEST_DIR, 'test_output', 'gapic')
TEST_OUTPUT_DIR_V2 = os.path.join(TEST_DIR, 'test_output', 'protoannotation')

def check_output(output_class, test_output_root_dir,
                 output_path, baseline_root_dir, baseline):
    baseline_file = os.path.join(baseline_root_dir, baseline + '.baseline')
    with open(baseline_file) as f:
        expected_output = f.readlines()

    actual_output_file = os.path.join(test_output_root_dir,
                                      output_path,
                                      output_class + '.java')
    with open(actual_output_file) as f:
        actual_output = f.readlines()

    assert expected_output == actual_output, 'Baseline error. File "' \
        + baseline_file + '" did not match "' \
        + actual_output_file + '"\nDiff:\n' \
        + diff(expected_output,
               actual_output,
               baseline_file,
               actual_output_file)

def diff(expected_output, actual_output, fromfile, tofile):
    difflines = list(difflib.context_diff(expected_output,
                                          actual_output,
                                          fromfile=fromfile,
                                          tofile=tofile))
    if len(difflines) > 50:
        difflines = difflines[:50]
        difflines.append('*** diff too long, truncating ***\n')
    return "".join(difflines)

def run_protoc_gapic_plugin(output_dir, gapic_yaml, include_dirs, proto_files,
                            lang_out=None):
    args = ['protoc']
    args.append('--experimental_allow_proto3_optional')

    # If there is a language being called first (e.g. --java_out), add that.
    if lang_out is not None:
        args.append('--{0}_out={1}'.format(lang_out, output_dir))

    # Add the flag and GAPIC YAML argument for this plugin.
    args.append('--java_resource_names_out={0}'.format(output_dir))

    if gapic_yaml:
        args.append('--java_resource_names_opt={0}'.format(gapic_yaml))
    args += ['--proto_path={0}'.format(path) for path in include_dirs]
    args += proto_files
    try:
        subprocess.check_call(args)
    except subprocess.CalledProcessError as exc:
        stderr.write("Status : FAIL, message %s" % exc.output)

def clean_test_output():
    shutil.rmtree(TEST_OUTPUT_DIR, True)
    os.mkdir(TEST_OUTPUT_DIR)
    os.mkdir(TEST_OUTPUT_DIR_V1)
    os.mkdir(TEST_OUTPUT_DIR_V2)

@pytest.fixture(scope='class')
def run_protoc():
    clean_test_output()
    gapic_yaml = os.path.join(TEST_DIR, 'library_gapic.yaml')
    # TODO: make this path configurable
    include_dirs = ['.', './googleapis']
    proto_files = ['library_simple.proto', 'archive.proto']
    run_protoc_gapic_plugin(TEST_OUTPUT_DIR_V1,
                            gapic_yaml,
                            include_dirs,
                            [os.path.join(TEST_DIR, x) for x in proto_files])

@pytest.fixture(scope='class')
def run_protoc_V2():
    clean_test_output()
    gapic_yaml = os.path.join(TEST_DIR, 'library_gapic_v2.yaml')
    # TODO: make this path configurable
    include_dirs = ['.', './googleapis']
    proto_files = [
        'common_resources.proto',
        'library_simple.proto',
        'archive.proto'
    ]
    run_protoc_gapic_plugin(TEST_OUTPUT_DIR_V2,
                            gapic_yaml,
                            include_dirs,
                            [os.path.join(TEST_DIR, x) for x in proto_files])

RESOURCE_NAMES_TO_GENERATE = ['shelf_book_name', 'shelf_name',
                              'archived_book_name', 'deleted_book',
                              'folder_name', 'location_name',
                              'publisher_name', "archive_name"]
RESOURCE_NAMES_TO_GENERATE_V2 = ['shelf_name',
                                 'folder_name', 'location_name',
                                 'publisher_name', "archive_name"]
ONEOFS_TO_GENERATE = ['book_oneof']
ONEOFS_TO_GENERATE_V2 = ['book_oneof', 'archive_oneof']

PROTOC_OUTPUT_DIR = os.path.join('com', 'google', 'example', 'library', 'v1')

class TestProtocGapicPlugin(object):
    # Common resource names shouldn't be generated.
    DONT_GENERATE = ['project_name']

    @pytest.mark.parametrize('resource', RESOURCE_NAMES_TO_GENERATE)
    def test_resource_name_generation(self, run_protoc, resource):
        generated_class = casing_utils.lower_underscore_to_upper_camel(
            resource)
        check_output(generated_class, TEST_OUTPUT_DIR_V1, PROTOC_OUTPUT_DIR,
                     TEST_DIR_GAPIC_V1, 'java_' + resource)

    @pytest.mark.parametrize('resource', DONT_GENERATE)
    def test_dont_generate(self, run_protoc, resource):
        generated_class = casing_utils.lower_underscore_to_upper_camel(
            resource)
        file_name = os.path.join(TEST_OUTPUT_DIR,
                                 PROTOC_OUTPUT_DIR,
                                 generated_class + '.java')
        assert not os.path.exists(file_name)

    @pytest.mark.parametrize('oneof', ONEOFS_TO_GENERATE)
    def test_parent_resource_name_generation(self, run_protoc, oneof):
        generated_parent = \
            casing_utils.get_parent_resource_name_class_name(oneof)
        parent_filename_fragment = \
            casing_utils.get_parent_resource_name_lower_underscore(oneof)
        check_output(generated_parent,
                     TEST_OUTPUT_DIR_V1,
                     PROTOC_OUTPUT_DIR,
                     TEST_DIR_GAPIC_V1,
                     'java_' + parent_filename_fragment)

    @pytest.mark.parametrize('oneof', ONEOFS_TO_GENERATE)
    def test_untyped_resource_name_generation(self, run_protoc, oneof):
        generated_untyped = \
            casing_utils.get_untyped_resource_name_class_name(oneof)
        untyped_filename_fragment = \
            casing_utils.get_untyped_resource_name_lower_underscore(oneof)
        check_output(generated_untyped,
                     TEST_OUTPUT_DIR_V1,
                     PROTOC_OUTPUT_DIR,
                     TEST_DIR_GAPIC_V1,
                     'java_' + untyped_filename_fragment)

    @pytest.mark.parametrize('oneof', ONEOFS_TO_GENERATE)
    def test_resource_name_factory_generation(self, run_protoc, oneof):
        generated_parent = \
            casing_utils.get_resource_name_factory_class_name(oneof)
        parent_filename_fragment = \
            casing_utils.get_resource_name_factory_lower_underscore(oneof)
        check_output(generated_parent,
                     TEST_OUTPUT_DIR_V1,
                     PROTOC_OUTPUT_DIR,
                     TEST_DIR_GAPIC_V1,
                     'java_' + parent_filename_fragment)

class TestProtocGapicPluginV2(object):

    @pytest.mark.parametrize('resource',
                             RESOURCE_NAMES_TO_GENERATE_V2)
    def test_resource_name_generation(self, run_protoc_V2, resource):
        generated_class = casing_utils.lower_underscore_to_upper_camel(
            resource)
        check_output(generated_class, TEST_OUTPUT_DIR_V2, PROTOC_OUTPUT_DIR,
                     TEST_DIR_GAPIC_V2, 'java_' + resource)

    @pytest.mark.parametrize('oneof', ONEOFS_TO_GENERATE_V2)
    def test_parent_resource_name_generation(self, run_protoc_V2, oneof):
        generated_parent = \
            casing_utils.get_parent_resource_name_class_name(oneof)
        parent_filename_fragment = \
            casing_utils.get_parent_resource_name_lower_underscore(oneof)
        check_output(generated_parent,
                     TEST_OUTPUT_DIR_V2,
                     PROTOC_OUTPUT_DIR,
                     TEST_DIR_GAPIC_V2,
                     'java_' + parent_filename_fragment)


text:
package com.siyeh.ipp.parentheses;

class ArrayAccessExpression2 {
  private static void x() {
    Object info  = new Object[]{"abc"};
    String s = (String)(((Object[])info)[0]<caret>);
  }
}


text:
package org.spongepowered.tools.obfuscation;

import java.lang.reflect.Constructor;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import org.spongepowered.tools.obfuscation.interfaces.IMixinAnnotationProcessor;
import org.spongepowered.tools.obfuscation.interfaces.IOptionProvider;
import org.spongepowered.tools.obfuscation.mcp.ObfuscationServiceMCP;
import org.spongepowered.tools.obfuscation.service.ObfuscationTypeDescriptor;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableList.Builder;

/**
 * Obfuscation types supported by the annotation processor
 */
public final class ObfuscationType {

    private static final Map<String, ObfuscationType> types = new LinkedHashMap<String, ObfuscationType>();

    private final String key;

    private final ObfuscationTypeDescriptor descriptor;

    private final IMixinAnnotationProcessor ap;

    private final IOptionProvider options;

    private ObfuscationType(ObfuscationTypeDescriptor descriptor, IMixinAnnotationProcessor ap) {
        this.key = descriptor.getKey();
        this.descriptor = descriptor;
        this.ap = ap;
        this.options = ap;
    }

    public final ObfuscationEnvironment createEnvironment() {
        try {
            Class<? extends ObfuscationEnvironment> cls = this.descriptor.getEnvironmentType();
            Constructor<? extends ObfuscationEnvironment> ctor = cls.getDeclaredConstructor(ObfuscationType.class);
            ctor.setAccessible(true);
            return ctor.newInstance(this);
        } catch (Exception ex) {
            throw new RuntimeException(ex);
        }
    }

    @Override
    public String toString() {
        return this.key;
    }

    public String getKey() {
        return this.key;
    }

    public ObfuscationTypeDescriptor getConfig() {
        return this.descriptor;
    }

    public IMixinAnnotationProcessor getAnnotationProcessor() {
        return this.ap;
    }

    public boolean isDefault() {
        String defaultEnv = this.options.getOption(SupportedOptions.DEFAULT_OBFUSCATION_ENV);
        return (defaultEnv == null && this.key.equals(ObfuscationServiceMCP.SEARGE))
                || (defaultEnv != null && this.key.equals(defaultEnv.toLowerCase()));
    }

    public boolean isSupported() {
        return this.getInputFileNames().size() > 0;
    }

    public List<String> getInputFileNames() {
        Builder<String> builder = ImmutableList.<String>builder();

        String inputFile = this.options.getOption(this.descriptor.getInputFileOption());
        if (inputFile != null) {
            builder.add(inputFile);
        }

        String extraInputFiles = this.options.getOption(this.descriptor.getExtraInputFilesOption());
        if (extraInputFiles != null) {
            for (String extraInputFile : extraInputFiles.split(";")) {
                builder.add(extraInputFile.trim());
            }
        }

        return builder.build();
    }

    public String getOutputFileName() {
        return this.options.getOption(this.descriptor.getOutputFileOption());
    }

    public static Iterable<ObfuscationType> types() {
        return ObfuscationType.types.values();
    }

    public static ObfuscationType create(ObfuscationTypeDescriptor config, IMixinAnnotationProcessor ap) {
        String key = config.getKey();
        if (ObfuscationType.types.containsKey(key)) {
            throw new IllegalArgumentException("Obfuscation type with key " + key + " was already registered");
        }
        ObfuscationType type = new ObfuscationType(config, ap);
        ObfuscationType.types.put(key, type);
        return type;
    }

    public static ObfuscationType get(String key) {
        ObfuscationType type = ObfuscationType.types.get(key);
        if (type == null) {
            throw new IllegalArgumentException("Obfuscation type with key " + key + " was not registered");
        }
        return type;
    }
}


text:
package example.repo;

import example.model.Customer181;

import java.util.List;

import org.springframework.data.repository.CrudRepository;

public interface Customer181Repository extends CrudRepository<Customer181, Long> {

	List<Customer181> findByLastName(String lastName);
}


text:
package com.goodgame.profiling.rewrite_framework.output.hostname;

import java.util.Collections;
import java.util.List;

import org.json.JSONObject;
import org.kohsuke.MetaInfServices;

import com.goodgame.profiling.commons.boot.interfaces.Environment;
import com.goodgame.profiling.rewrite_framework.core.output.generator.MetricNameGenerator;
import com.goodgame.profiling.rewrite_framework.core.output.generator.WrappingNameGeneratorFactory;

@MetaInfServices
public class HostNamePrependerFactory<E extends Environment>
implements WrappingNameGeneratorFactory<E> {
    @Override
    public String handledType() {
        return "hostname";
    }

    @Override
    public MetricNameGenerator wrap( E environment, MetricNameGenerator inner, JSONObject configuration ) {
        return new HostNamePrepender( inner );
    }

    @Override
    public List<Class<? super E>> getRequiredEnvironments() {
        return Collections.emptyList();
    }
}