language
stringclasses
1 value
repo
stringclasses
60 values
path
stringlengths
22
294
class_span
dict
source
stringlengths
13
1.16M
target
stringlengths
1
113
java
elastic__elasticsearch
modules/data-streams/src/javaRestTest/java/org/elasticsearch/datastreams/MetricsDataStreamIT.java
{ "start": 690, "end": 3808 }
class ____ extends AbstractDataStreamIT { @SuppressWarnings("unchecked") public void testCustomMapping() throws Exception { { Request request = new Request("POST", "/_component_template/metrics@custom"); request.setJsonEntity(""" { "template": {...
MetricsDataStreamIT
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/streaming/runtime/io/RecordProcessorUtils.java
{ "start": 1625, "end": 8747 }
class ____ { private static final String METHOD_SET_KEY_CONTEXT_ELEMENT = "setKeyContextElement"; private static final String METHOD_SET_KEY_CONTEXT_ELEMENT1 = "setKeyContextElement1"; private static final String METHOD_SET_KEY_CONTEXT_ELEMENT2 = "setKeyContextElement2"; /** * Get record processo...
RecordProcessorUtils
java
apache__flink
flink-libraries/flink-state-processing-api/src/main/java/org/apache/flink/state/table/module/StateModuleFactory.java
{ "start": 1161, "end": 1647 }
class ____ implements ModuleFactory { @Override public String factoryIdentifier() { return StateModule.IDENTIFIER; } @Override public Set<ConfigOption<?>> requiredOptions() { return Collections.emptySet(); } @Override public Set<ConfigOption<?>> optionalOptions() { ...
StateModuleFactory
java
apache__dubbo
dubbo-serialization/dubbo-serialization-hessian2/src/main/java/org/apache/dubbo/common/serialize/hessian2/Hessian2ObjectOutput.java
{ "start": 1185, "end": 3528 }
class ____ implements ObjectOutput, Cleanable { private final Hessian2Output mH2o; @Deprecated public Hessian2ObjectOutput(OutputStream os) { mH2o = new Hessian2Output(os); Hessian2FactoryManager hessian2FactoryManager = FrameworkModel.defaultModel().getBeanFactory().getOrR...
Hessian2ObjectOutput
java
elastic__elasticsearch
modules/lang-mustache/src/test/java/org/elasticsearch/script/mustache/MultiSearchTemplateResponseTests.java
{ "start": 1278, "end": 8999 }
class ____ extends AbstractXContentTestCase<MultiSearchTemplateResponse> { @Override protected MultiSearchTemplateResponse createTestInstance() { int numItems = randomIntBetween(0, 128); long overallTookInMillis = randomNonNegativeLong(); MultiSearchTemplateResponse.Item[] items = new M...
MultiSearchTemplateResponseTests
java
apache__hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ContentSummary.java
{ "start": 1810, "end": 16608 }
class ____ extends QuotaUsage.Builder { public Builder() { } public Builder length(long length) { this.length = length; return this; } public Builder fileCount(long fileCount) { this.fileCount = fileCount; return this; } public Builder directoryCount(long directory...
Builder
java
apache__camel
core/camel-core/src/test/java/org/apache/camel/processor/dynamicrouter/DynamicRouterConcurrentPOJOManualTest.java
{ "start": 4451, "end": 4866 }
class ____ { private final String target; public MyDynamicRouterPojo(String target) { this.target = target; } @DynamicRouter public String route(@Header(Exchange.SLIP_ENDPOINT) String previous) { if (previous == null) { return target; ...
MyDynamicRouterPojo
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/ops/MergeMultipleEntityCopiesAllowedOrphanDeleteTest.java
{ "start": 1268, "end": 15024 }
class ____ { @Test @FailureExpected(jiraKey = "HHH-9240") public void testTopLevelUnidirOneToManyBackrefWithNewElement(SessionFactoryScope scope) { Item item1 = new Item(); item1.setName( "item1 name" ); SubItem subItem1 = new SubItem(); subItem1.setName( "subItem1 name" ); item1.getSubItemsBackref().add(...
MergeMultipleEntityCopiesAllowedOrphanDeleteTest
java
micronaut-projects__micronaut-core
http/src/main/java/io/micronaut/http/ssl/PemParser.java
{ "start": 7445, "end": 8947 }
class ____ implements Decoder { @Override public Collection<?> decode(byte[] der) throws GeneralSecurityException { EncryptedPrivateKeyInfo keyInfo; try { keyInfo = new EncryptedPrivateKeyInfo(der); } catch (IOException e) { throw new G...
Pkcs8EncryptedPrivateKey
java
reactor__reactor-core
reactor-core/src/main/java/reactor/core/publisher/MonoPublishOn.java
{ "start": 1138, "end": 1713 }
class ____<T> extends InternalMonoOperator<T, T> { final Scheduler scheduler; MonoPublishOn(Mono<? extends T> source, Scheduler scheduler) { super(source); this.scheduler = scheduler; } @Override public CoreSubscriber<? super T> subscribeOrReturn(CoreSubscriber<? super T> actual) { return new PublishOnSub...
MonoPublishOn
java
apache__maven
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnsh/CommonsCliShellOptions.java
{ "start": 1168, "end": 1917 }
class ____ extends CommonsCliOptions implements ShellOptions { public static CommonsCliShellOptions parse(String[] args) throws ParseException { CLIManager cliManager = new CLIManager(); return new CommonsCliShellOptions(Options.SOURCE_CLI, cliManager, cliManager.parse(args)); } protected C...
CommonsCliShellOptions
java
apache__camel
components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/util/ConverterUtils.java
{ "start": 1196, "end": 4110 }
class ____ { private static final byte[] WINDOWS_RETURN_BYTES = { 13, 10 }; private static final byte[] UNIX_RETURN_BYTES = { 10 }; private static final byte[] MAC_RETURN_BYTES = { 13 }; private static final String CRLF = "\r\n"; private static final String LINE_BREAK = "\n"; private static fin...
ConverterUtils
java
jhy__jsoup
src/main/java/org/jsoup/select/Elements.java
{ "start": 1058, "end": 4910 }
class ____ extends Nodes<Element> { public Elements() { } public Elements(int initialCapacity) { super(initialCapacity); } public Elements(Collection<Element> elements) { super(elements); } public Elements(List<Element> elements) { super(elements); } publi...
Elements
java
google__dagger
javatests/dagger/functional/producers/subcomponent/sub/ChildComponent.java
{ "start": 1013, "end": 1067 }
interface ____ { ChildComponent build(); } }
Builder
java
apache__camel
components/camel-wordpress/src/main/java/org/apache/camel/component/wordpress/api/service/WordpressServiceUsers.java
{ "start": 1004, "end": 1095 }
interface ____ extends WordpressCrudService<User, UserSearchCriteria> { }
WordpressServiceUsers
java
apache__commons-lang
src/test/java/org/apache/commons/lang3/text/StrMatcherTest.java
{ "start": 1200, "end": 8496 }
class ____ extends AbstractLangTest { private static final char[] BUFFER1 = "0,1\t2 3\n\r\f\u0000'\"".toCharArray(); private static final char[] BUFFER2 = "abcdef".toCharArray(); @Test void testCharMatcher_char() { final StrMatcher matcher = StrMatcher.charMatcher('c'); assertEquals(0...
StrMatcherTest
java
apache__flink
flink-core/src/test/java/org/apache/flink/api/common/typeutils/base/BasicTypeSerializerUpgradeTestSpecifications.java
{ "start": 31368, "end": 32416 }
class ____ implements TypeSerializerUpgradeTestBase.UpgradeVerifier<java.sql.Date> { @Override public TypeSerializer<java.sql.Date> createUpgradedSerializer() { return SqlDateSerializer.INSTANCE; } @Override public Condition<java.sql.Date> testDataConditi...
SqlDateSerializerVerifier
java
apache__maven
api/maven-api-core/src/main/java/org/apache/maven/api/services/SettingsBuilderRequest.java
{ "start": 6494, "end": 9627 }
class ____ extends BaseRequest<ProtoSession> implements SettingsBuilderRequest { private final Source installationSettingsSource; private final Source projectSettingsSource; private final Source userSettingsSource; private final UnaryOperator<String> inter...
DefaultSettingsBuilderRequest
java
micronaut-projects__micronaut-core
inject/src/main/java/io/micronaut/context/exceptions/BeanDestructionException.java
{ "start": 851, "end": 1218 }
class ____ extends BeanContextException { /** * @param beanType The bean type * @param cause The throwable */ public BeanDestructionException(@NonNull BeanType<?> beanType, @NonNull Throwable cause) { super("Error destroying bean of type [" + beanType.getBeanType() + "]: " + cause.getM...
BeanDestructionException
java
apache__flink
flink-architecture-tests/flink-architecture-tests-test/src/main/java/org/apache/flink/architecture/rules/ITCaseRules.java
{ "start": 2289, "end": 11398 }
class ____ { private static final String ABSTRACT_TEST_BASE_FQ = "org.apache.flink.test.util.AbstractTestBase"; private static final String INTERNAL_MINI_CLUSTER_EXTENSION_FQ_NAME = "org.apache.flink.runtime.testutils.InternalMiniClusterExtension"; private static final String MINI_C...
ITCaseRules
java
netty__netty
handler/src/main/java/io/netty/handler/ssl/OpenSslAsyncPrivateKeyMethod.java
{ "start": 803, "end": 3052 }
interface ____ { int SSL_SIGN_RSA_PKCS1_SHA1 = SSLPrivateKeyMethod.SSL_SIGN_RSA_PKCS1_SHA1; int SSL_SIGN_RSA_PKCS1_SHA256 = SSLPrivateKeyMethod.SSL_SIGN_RSA_PKCS1_SHA256; int SSL_SIGN_RSA_PKCS1_SHA384 = SSLPrivateKeyMethod.SSL_SIGN_RSA_PKCS1_SHA384; int SSL_SIGN_RSA_PKCS1_SHA512 = SSLPrivateKeyMethod.SS...
OpenSslAsyncPrivateKeyMethod
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/pi/math/Montgomery.java
{ "start": 1980, "end": 2496 }
class ____ { private final LongLong x = new LongLong(); private final LongLong xN_I = new LongLong(); private final LongLong aN = new LongLong(); long m(final long c, final long d) { LongLong.multiplication(x, c, d); // a = (x * N')&(R - 1) = ((x & R_1) * N') & R_1 final long a = Long...
Product
java
processing__processing4
java/src/processing/mode/java/ErrorChecker.java
{ "start": 1657, "end": 11560 }
class ____ { // Delay delivering error check result after last sketch change // https://github.com/processing/processing/issues/2677 private final static long DELAY_BEFORE_UPDATE = 650; final private ScheduledExecutorService scheduler; private volatile ScheduledFuture<?> scheduledUiUpdate = null; private v...
ErrorChecker
java
apache__flink
flink-tests/src/test/java/org/apache/flink/runtime/metrics/SystemResourcesMetricsITCase.java
{ "start": 2236, "end": 4968 }
class ____ { @RegisterExtension @Order(1) static final ContextClassLoaderExtension CONTEXT_CLASS_LOADER_EXTENSION = ContextClassLoaderExtension.builder() .withServiceEntry( MetricReporterFactory.class, SystemResourcesMe...
SystemResourcesMetricsITCase
java
junit-team__junit5
jupiter-tests/src/test/java/org/junit/jupiter/api/IndicativeSentencesOnSubClassTestCase.java
{ "start": 495, "end": 562 }
class ____ { @Test void this_is_a_test() { } } } }
Level_2
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/access/UnsupportedEnhancementStrategyTest.java
{ "start": 7113, "end": 7435 }
class ____ { @Id private Long id; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long get() { return id; } public String getSomething() { return "something"; } } @Entity(name = "ImplicitAccessTypeFieldEntity") static
ExplicitAccessTypeFieldEntity
java
apache__hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSPreemptionThread.java
{ "start": 1777, "end": 11142 }
class ____ extends SubjectInheritingThread { private static final Logger LOG = LoggerFactory. getLogger(FSPreemptionThread.class); protected final FSContext context; private final FairScheduler scheduler; private final long warnTimeBeforeKill; private final long delayBeforeNextStarvationCheck; private...
FSPreemptionThread
java
apache__flink
flink-core-api/src/main/java/org/apache/flink/api/connector/dsv2/Sink.java
{ "start": 915, "end": 972 }
interface ____ DataStream api v2. * * <p>Note that this
for
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/JobHistoryServer.java
{ "start": 3188, "end": 3330 }
class ____ start and stop secret manager as part of service // framework and implement state recovery for secret manager on startup private
to
java
apache__camel
test-infra/camel-test-infra-kafka/src/main/java/org/apache/camel/test/infra/kafka/services/ContainerLocalKafkaInfraService.java
{ "start": 1520, "end": 2579 }
class ____ implements KafkaInfraService, ContainerService<KafkaContainer> { public static final String KAFKA3_IMAGE_NAME = LocalPropertyResolver.getProperty( ContainerLocalKafkaInfraService.class, KafkaProperties.KAFKA3_CONTAINER); private static final Logger LOG = LoggerFactory.getLogg...
ContainerLocalKafkaInfraService
java
apache__hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/ProtocolMetaInterface.java
{ "start": 1250, "end": 1676 }
interface ____ { /** * Checks whether the given method name is supported by the server. * It is assumed that all method names are unique for a protocol. * @param methodName The name of the method * @return true if method is supported, otherwise false. * @throws IOException raised on errors performin...
ProtocolMetaInterface
java
quarkusio__quarkus
extensions/hibernate-search-orm-elasticsearch/runtime/src/main/java/io/quarkus/hibernate/search/orm/elasticsearch/runtime/HibernateSearchElasticsearchRecorder.java
{ "start": 14498, "end": 15504 }
class ____ implements HibernateOrmIntegrationRuntimeInitListener { private HibernateSearchIntegrationRuntimeInitInactiveListener() { } @Override public void contributeRuntimeProperties(BiConsumer<String, Object> propertyCollector) { // Not strictly necessary sin...
HibernateSearchIntegrationRuntimeInitInactiveListener
java
spring-projects__spring-boot
module/spring-boot-ldap/src/main/java/org/springframework/boot/ldap/testcontainers/LLdapContainerConnectionDetailsFactory.java
{ "start": 1293, "end": 1630 }
class ____ extends ContainerConnectionDetailsFactory<LLdapContainer, LdapConnectionDetails> { @Override protected LdapConnectionDetails getContainerConnectionDetails(ContainerConnectionSource<LLdapContainer> source) { return new LLdapContainerConnectionDetails(source); } private static final
LLdapContainerConnectionDetailsFactory
java
elastic__elasticsearch
modules/lang-painless/src/main/java/org/elasticsearch/painless/antlr/PainlessParser.java
{ "start": 129408, "end": 129985 }
class ____ extends PrimaryContext { public TerminalNode TRUE() { return getToken(PainlessParser.TRUE, 0); } public TrueContext(PrimaryContext ctx) { copyFrom(ctx); } @Override public <T> T accept(ParseTreeVisitor<? extends T> visitor) { ...
TrueContext
java
spring-projects__spring-boot
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/logging/LoggersEndpoint.java
{ "start": 6822, "end": 7244 }
class ____ extends LoggerLevelsDescriptor { private final List<String> members; public GroupLoggerLevelsDescriptor(@Nullable LogLevel configuredLevel, List<String> members) { super(configuredLevel); this.members = members; } public List<String> getMembers() { return this.members; } } /** * D...
GroupLoggerLevelsDescriptor
java
quarkusio__quarkus
extensions/spring-boot-properties/deployment/src/main/java/io/quarkus/spring/boot/properties/deployment/ConfigurationPropertiesUtil.java
{ "start": 3675, "end": 8450 }
class ____ the type was encountered * @param bytecodeCreator Where the bytecode will be generated * @param config Reference to the MP config object */ static ReadOptionalResponse createReadOptionalValueAndConvertIfNeeded(String propertyName, Type resultType, DotName declaringClass, ...
where
java
apache__camel
components/camel-pqc/src/test/java/org/apache/camel/component/pqc/PQCSignatureDILITHIUMTest.java
{ "start": 1512, "end": 3507 }
class ____ extends CamelTestSupport { @EndpointInject("mock:sign") protected MockEndpoint resultSign; @EndpointInject("mock:verify") protected MockEndpoint resultVerify; @Produce("direct:sign") protected ProducerTemplate templateSign; public PQCSignatureDILITHIUMTest() throws NoSuchAlgor...
PQCSignatureDILITHIUMTest
java
processing__processing4
core/src/processing/opengl/VertexBuffer.java
{ "start": 1388, "end": 2667 }
interface ____ Processing and OpenGL. protected int context; // The context that created this resource. private GLResourceVertexBuffer glres; VertexBuffer(PGraphicsOpenGL pg, int target, int ncoords, int esize, int usage) { this(pg, target, ncoords, esize, usage, false); } VertexBuffer(PGraph...
between
java
google__guice
extensions/throwingproviders/src/com/google/inject/throwingproviders/ProviderChecker.java
{ "start": 522, "end": 3253 }
class ____ { private ProviderChecker() {} static <P extends CheckedProvider<?>> void checkInterface( Class<P> interfaceType, Optional<? extends Type> valueType) { checkArgument(interfaceType.isInterface(), "%s must be an interface", interfaceType.getName()); checkArgument( interfaceType.getG...
ProviderChecker
java
apache__flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/strategies/AnyArgumentTypeStrategy.java
{ "start": 1312, "end": 1999 }
class ____ implements ArgumentTypeStrategy { @Override public Optional<DataType> inferArgumentType( CallContext callContext, int argumentPos, boolean throwOnFailure) { return Optional.of(callContext.getArgumentDataTypes().get(argumentPos)); } @Override public Argument getExpect...
AnyArgumentTypeStrategy
java
apache__dubbo
dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/integration/multiple/AbstractStorage.java
{ "start": 951, "end": 1064 }
class ____ implement the basic methods for {@link Storage}. * * @param <T> The type to store */ public abstract
to
java
eclipse-vertx__vert.x
vertx-core/src/test/java/io/vertx/tests/http/HttpClientTimeoutTest.java
{ "start": 1170, "end": 13067 }
class ____ extends HttpTestBase { @Test public void testConnectTimeoutDoesFire() throws Exception { int timeout = 3000; server.requestHandler(req -> { req.response().end(); }); startServer(testAddress); List<HttpClientRequest> requests = new ArrayList<>(); for (int i = 0;i < 5;i++) { ...
HttpClientTimeoutTest
java
apache__flink
flink-datastream/src/main/java/org/apache/flink/datastream/impl/extension/window/function/InternalTwoOutputWindowStreamProcessFunction.java
{ "start": 1657, "end": 2022 }
class ____ wrap a {@link TwoOutputWindowStreamProcessFunction} to process function. This will * be translated to a window operator instead of vanilla process operator. * * @param <IN> Type of the input elements. * @param <OUT1> Type of the first output elements. * @param <OUT2> Type of the second output elements. ...
that
java
apache__camel
core/camel-core-model/src/main/java/org/apache/camel/model/language/TokenizerExpression.java
{ "start": 6808, "end": 11285 }
class ____ extends AbstractBuilder<Builder, TokenizerExpression> { private String token; private String endToken; private String inheritNamespaceTagName; private String regex; private String xml; private String includeTokens; private String group; private...
Builder
java
apache__kafka
shell/src/main/java/org/apache/kafka/shell/state/MetadataShellPublisher.java
{ "start": 1215, "end": 1939 }
class ____ implements MetadataPublisher { private static final Logger log = LoggerFactory.getLogger(MetadataShellPublisher.class); private final MetadataShellState state; public MetadataShellPublisher(MetadataShellState state) { this.state = state; } @Override public String name() { ...
MetadataShellPublisher
java
apache__spark
sql/catalyst/src/main/java/org/apache/spark/sql/connector/write/WriterCommitMessage.java
{ "start": 1327, "end": 1471 }
class ____ use it when * generating messages at executor side and handling the messages at driver side. * * @since 3.0.0 */ @Evolving public
and
java
apache__hadoop
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/delegation/AbstractDTService.java
{ "start": 1230, "end": 1702 }
class ____ both the delegation binding * code and the back end service created; allows for * shared methods across both. * * The lifecycle sequence is as follows * <pre> * - create * - bindToFileSystem(uri, ownerFS) * - init * - start * ...api calls... * - stop * </pre> * * As the S3ADelegatio...
for
java
google__dagger
javatests/dagger/internal/codegen/ComponentCreatorTest.java
{ "start": 24605, "end": 25047 }
class ____ {", " @Provides String s() { return \"\"; }", "}"); Source componentFile = javaFileBuilder("test.SimpleComponent") .addLines( "package test;", "", "import dagger.Component;", "import javax.inject....
TestModule
java
grpc__grpc-java
services/src/test/java/io/grpc/protobuf/services/ProtoReflectionServiceV1Test.java
{ "start": 2671, "end": 26758 }
class ____ { @Rule public GrpcCleanupRule grpcCleanupRule = new GrpcCleanupRule(); private static final String TEST_HOST = "localhost"; private MutableHandlerRegistry handlerRegistry = new MutableHandlerRegistry(); private BindableService reflectionService; private ServerServiceDefinition dynamicService = ...
ProtoReflectionServiceV1Test
java
apache__hadoop
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/retry/UnreliableInterface.java
{ "start": 2050, "end": 3610 }
class ____ extends UnreliableException { private static final long serialVersionUID = 1L; // no body } void alwaysSucceeds() throws UnreliableException; void alwaysFailsWithFatalException() throws FatalException; void alwaysFailsWithRemoteFatalException() throws RemoteException; void failsOnceW...
FatalException
java
spring-projects__spring-framework
spring-expression/src/test/java/org/springframework/expression/spel/PublicSuperclass.java
{ "start": 738, "end": 1125 }
class ____ { public int process(int num) { return num + 1; } public int getNumber() { return 1; } public String getMessage() { return "goodbye"; } public String greet(String name) { return "Super, " + name; } public String getIndex(int index) { return "value-" + index; } public String getInde...
PublicSuperclass
java
mapstruct__mapstruct
processor/src/test/java/org/mapstruct/ap/test/bugs/_2674/ErroneousSourceTargetMapping.java
{ "start": 374, "end": 781 }
interface ____ { ErroneousSourceTargetMapping INSTANCE = Mappers.getMapper( ErroneousSourceTargetMapping.class ); @BeforeMapping void beforeMappingMethod(Target target, @MappingTarget Source source); @AfterMapping void afterMappingMethod(Source source, @MappingTarget Target target); Target t...
ErroneousSourceTargetMapping
java
alibaba__druid
core/src/test/java/com/alibaba/druid/bvt/sql/mysql/createTable/MySqlCreateTableTest91.java
{ "start": 245, "end": 1629 }
class ____ extends MysqlTest { public void test_0() throws Exception { String sql = "CREATE TABLE tbl_name(id int, sid int, name varchar(8)) " + "PARTITION BY LINEAR KEY ALGORITHM=2 (id, sid) PARTITIONS 4 (PARTITION p0, PARTITION p1, PARTITION p2, PARTITION p3)"; MySqlStatementParse...
MySqlCreateTableTest91
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/contract/hdfs/TestHDFSContractAppend.java
{ "start": 935, "end": 1345 }
class ____ extends AbstractContractAppendTest { @BeforeAll public static void createCluster() throws IOException { HDFSContract.createCluster(); } @AfterAll public static void teardownCluster() throws IOException { HDFSContract.destroyCluster(); } @Override protected AbstractFSContract create...
TestHDFSContractAppend
java
spring-projects__spring-boot
module/spring-boot-jackson/src/test/java/org/springframework/boot/jackson/autoconfigure/JacksonAutoConfigurationTests.java
{ "start": 34754, "end": 34962 }
class ____ { @Bean @Primary ObjectMapper objectMapper() { return mock(ObjectMapper.class); } } @Configuration(proxyBeanMethods = false) @Import(BazSerializer.class) static
MockObjectMapperConfig
java
apache__kafka
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/Scheduler.java
{ "start": 3521, "end": 4682 }
interface ____ { void run() throws InterruptedException, ExecutionException; } private void run(Task task, String description, boolean checkTimeout) { try { long start = System.currentTimeMillis(); task.run(); long elapsed = System.currentTimeMillis() - start...
Task
java
elastic__elasticsearch
x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/test/SearchHitBuilder.java
{ "start": 557, "end": 610 }
class ____ build {@link SearchHit} in tests */ public
to
java
apache__camel
components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyWorkerPoolBuilder.java
{ "start": 1399, "end": 3498 }
class ____ { private String name = "NettyWorker"; private String pattern; private int workerCount; private boolean nativeTransport; private volatile EventLoopGroup workerPool; public void setName(String name) { this.name = name; } public void setPattern(String pattern) { ...
NettyWorkerPoolBuilder
java
elastic__elasticsearch
x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStore.java
{ "start": 39449, "end": 39824 }
class ____ apply a project-id to another object. */ protected record ProjectScoped<T>(ProjectId projectId, T value) { protected ProjectScoped { Objects.requireNonNull(projectId); } @Override public String toString() { return getClass().getSimpleName() +...
to
java
mapstruct__mapstruct
processor/src/test/java/org/mapstruct/ap/test/bugs/_3905/OverrideDto.java
{ "start": 232, "end": 415 }
class ____ { private final String name; public OverrideDto(String name) { this.name = name; } public String getName() { return name; } }
OverrideDto
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/NonOverridingEqualsTest.java
{ "start": 6724, "end": 7057 }
class ____ { public boolean equals(Test other, String s) { return false; } } """) .doTest(); } @Test public void dontFlagIfWrongReturnType() { compilationHelper .addSourceLines( "Test.java", """ ...
Test
java
apache__camel
components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerPassingEntityManagerTest.java
{ "start": 1381, "end": 3666 }
class ____ extends AbstractJpaTest { protected static final String SELECT_ALL_STRING = "select x from " + SendEmail.class.getName() + " x"; @Test public void testRouteJpa() throws Exception { MockEndpoint mock = getMockEndpoint("mock:result"); context.getRouteController().startRoute("foo");...
JpaProducerPassingEntityManagerTest
java
spring-projects__spring-security
core/src/main/java/org/springframework/security/authentication/jaas/JaasAuthenticationProvider.java
{ "start": 5977, "end": 10319 }
class ____ extends AbstractJaasAuthenticationProvider { // exists for passivity protected static final Log log = LogFactory.getLog(JaasAuthenticationProvider.class); @SuppressWarnings("NullAway.Init") private Resource loginConfig; private boolean refreshConfigurationOnStartup = true; @Override public void af...
JaasAuthenticationProvider
java
alibaba__nacos
core/src/main/java/io/grpc/netty/shaded/io/grpc/netty/NettyChannelHelper.java
{ "start": 961, "end": 1598 }
class ____ { private static final ReferenceFieldUpdater<NettyServerStream, WriteQueue> WRITE_QUEUE_GETTER = Updaters.newReferenceFieldUpdater( NettyServerStream.class, "writeQueue"); private static final ReferenceFieldUpdater<WriteQueue, Channel> CHANNEL_GETTER = Updaters.newReferenceField...
NettyChannelHelper
java
apache__maven
impl/maven-impl/src/main/java/org/apache/maven/impl/resolver/MavenMetadata.java
{ "start": 1537, "end": 4414 }
class ____ extends AbstractMetadata implements MergeableMetadata { static final String MAVEN_METADATA_XML = "maven-metadata.xml"; static DateTimeFormatter fmt; static { fmt = DateTimeFormatter.ofPattern("yyyyMMddHHmmss").withZone(ZoneOffset.UTC); } protected Metadata metadata; priva...
MavenMetadata
java
spring-projects__spring-framework
spring-r2dbc/src/test/java/org/springframework/r2dbc/connection/init/AbstractDatabasePopulatorTests.java
{ "start": 1119, "end": 3788 }
class ____ { ClassRelativeResourceLoader resourceLoader = new ClassRelativeResourceLoader(getClass()); ResourceDatabasePopulator databasePopulator = new ResourceDatabasePopulator(); @Test void scriptWithSingleLineCommentsAndFailedDrop() { databasePopulator.addScript(resource("db-schema-failed-drop-comments.sq...
AbstractDatabasePopulatorTests
java
spring-projects__spring-boot
module/spring-boot-data-mongodb-test/src/dockerTest/java/org/springframework/boot/data/mongodb/test/autoconfigure/ExampleService.java
{ "start": 927, "end": 1215 }
class ____ { private final MongoTemplate mongoTemplate; public ExampleService(MongoTemplate mongoTemplate) { this.mongoTemplate = mongoTemplate; } public boolean hasCollection(String collectionName) { return this.mongoTemplate.collectionExists(collectionName); } }
ExampleService
java
elastic__elasticsearch
x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/openai/OpenAiUnifiedChatCompletionResponseHandlerTests.java
{ "start": 1256, "end": 5432 }
class ____ extends ESTestCase { private final OpenAiUnifiedChatCompletionResponseHandler responseHandler = new OpenAiUnifiedChatCompletionResponseHandler( "chat completions", (a, b) -> mock() ); public void testFailValidationWithAllFields() throws IOException { var responseJson = ""...
OpenAiUnifiedChatCompletionResponseHandlerTests
java
elastic__elasticsearch
x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/inference/nlp/tokenizers/NlpTokenizer.java
{ "start": 1614, "end": 24723 }
class ____ implements Releasable { public static final int CALC_DEFAULT_SPAN_VALUE = -2; abstract int clsTokenId(); abstract int sepTokenId(); abstract int maxSequenceLength(); abstract boolean isWithSpecialTokens(); abstract int numExtraTokensForSingleSequence(); abstract int getNumE...
NlpTokenizer
java
apache__flink
flink-datastream/src/main/java/org/apache/flink/datastream/impl/extension/window/function/InternalTwoInputWindowStreamProcessFunction.java
{ "start": 2086, "end": 4793 }
class ____<IN1, IN2, OUT, W extends Window> implements TwoInputNonBroadcastStreamProcessFunction<IN1, IN2, OUT> { /** User-defined {@link WindowProcessFunction}. */ private final TwoInputNonBroadcastWindowStreamProcessFunction<IN1, IN2, OUT> windowProcessFunction; private final WindowA...
InternalTwoInputWindowStreamProcessFunction
java
apache__hadoop
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/scale/ILoadTestS3ABulkDeleteThrottling.java
{ "start": 3432, "end": 10988 }
class ____ extends S3AScaleTestBase { private static final Logger LOG = LoggerFactory.getLogger(ILoadTestS3ABulkDeleteThrottling.class); protected static final int THREADS = 20; public static final int TOTAL_KEYS = 25000; public static final int SMALL = BULK_DELETE_PAGE_SIZE_DEFAULT; public static fi...
ILoadTestS3ABulkDeleteThrottling
java
FasterXML__jackson-databind
src/test/java/tools/jackson/databind/jsontype/deftyping/TestDefaultForEnums.java
{ "start": 941, "end": 994 }
class ____<T> { public T item; }
Foo3569
java
apache__camel
components/camel-tracing/src/main/java/org/apache/camel/tracing/decorators/AzureStorageDataLakeSpanDecorator.java
{ "start": 1099, "end": 5645 }
class ____ extends AbstractSpanDecorator { static final String STORAGE_DATALAKE_DIRECTORY_NAME = "directoryName"; static final String STORAGE_DATALAKE_FILE_NAME = "fileName"; static final String STORAGE_DATALAKE_PATH = "path"; static final String STORAGE_DATALAKE_TIMEOUT = "timeout"; static final S...
AzureStorageDataLakeSpanDecorator
java
apache__flink
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTestingUtils.java
{ "start": 40504, "end": 41209 }
class ____ implements SimpleVersionedSerializer<String> { static final int VERSION = 77; @Override public int getVersion() { return VERSION; } @Override public byte[] serialize(String checkpointData) throws IOException { return checkpointData.ge...
StringSerializer
java
dropwizard__dropwizard
dropwizard-health/src/main/java/io/dropwizard/health/DelayedShutdownHandler.java
{ "start": 388, "end": 1357 }
class ____ extends AbstractLifeCycle { private static final Logger LOGGER = LoggerFactory.getLogger(DelayedShutdownHandler.class); private final ShutdownNotifier shutdownNotifier; public DelayedShutdownHandler(final ShutdownNotifier shutdownNotifier) { this.shutdownNotifier = shutdownNotifier; ...
DelayedShutdownHandler
java
elastic__elasticsearch
client/benchmark/src/main/java/org/elasticsearch/client/benchmark/BenchmarkMain.java
{ "start": 664, "end": 1223 }
class ____ { @SuppressForbidden(reason = "system out is ok for a command line tool") public static void main(String[] args) throws Exception { String type = args[0]; AbstractBenchmark<?> benchmark = switch (type) { case "rest" -> new RestClientBenchmark(); default -> { ...
BenchmarkMain
java
mockito__mockito
mockito-core/src/test/java/org/mockito/internal/util/reflection/FieldInitializerTest.java
{ "start": 6049, "end": 6772 }
class ____ { @InjectMocks LocalType field; } TheTestWithLocalType testWithLocalType = new TheTestWithLocalType(); // when / then assertThatThrownBy( () -> { new FieldInitializer( testWit...
TheTestWithLocalType
java
apache__dubbo
dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/router/mesh/rule/virtualservice/match/ListBoolMatchTest.java
{ "start": 1087, "end": 1724 }
class ____ { @Test void isMatch() { ListBoolMatch listBoolMatch = new ListBoolMatch(); List<BoolMatch> oneof = new ArrayList<>(); BoolMatch boolMatch1 = new BoolMatch(); boolMatch1.setExact(true); oneof.add(boolMatch1); listBoolMatch.setOneof(oneof); as...
ListBoolMatchTest
java
redisson__redisson
redisson/src/test/java/org/redisson/RedissonRemoteServiceTest.java
{ "start": 1980, "end": 2405 }
interface ____ { RFuture<Void> cancelMethod(); RFuture<Void> voidMethod(String name, Long param); RFuture<Long> resultMethod(Long value); RFuture<Void> errorMethod(); RFuture<Void> errorMethodWithCause(); RFuture<Void>...
RemoteInterfaceAsync
java
mybatis__mybatis-3
src/test/java/org/apache/ibatis/datasource/pooled/PooledDataSourceTest.java
{ "start": 1210, "end": 5131 }
class ____ { PooledDataSource dataSource; @BeforeEach void beforeEach() { dataSource = new PooledDataSource("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:multipledrivers", "sa", ""); } @Test void shouldBlockUntilConnectionIsAvailableInPooledDataSource() throws Exception { dataSource.setPoolMaximumChe...
PooledDataSourceTest
java
apache__rocketmq
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/header/GetAllProducerInfoRequestHeader.java
{ "start": 1329, "end": 1584 }
class ____ implements CommandCustomHeader { @Override public void checkFields() throws RemotingCommandException { // To change body of implemented methods use File | Settings | File // Templates. } }
GetAllProducerInfoRequestHeader
java
quarkusio__quarkus
extensions/hibernate-search-orm-outbox-polling/deployment/src/test/java/io/quarkus/hibernate/search/orm/outboxpolling/test/configuration/devmode/HibernateSearchOutboxPollingTestResource.java
{ "start": 5064, "end": 5686 }
class ____ { @Id @GeneratedValue private Long id; @FullTextField @KeywordField(name = "name_sort", sortable = Sortable.YES) private String name; Person() { } public Person(String name) { this.name = name; } public L...
Person
java
apache__thrift
lib/java/src/main/java/org/apache/thrift/server/TThreadPoolServer.java
{ "start": 1949, "end": 6127 }
class ____ extends AbstractServerArgs<Args> { public int minWorkerThreads = 5; public int maxWorkerThreads = Integer.MAX_VALUE; public ExecutorService executorService; public int stopTimeoutVal = 60; public TimeUnit stopTimeoutUnit = TimeUnit.SECONDS; public Args(TServerTransport transport) { ...
Args
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/cluster/routing/allocation/ExistingShardsAllocator.java
{ "start": 1252, "end": 3736 }
interface ____ { /** * Allows plugins to override how we allocate shards that may already exist on disk in the cluster. */ Setting<String> EXISTING_SHARDS_ALLOCATOR_SETTING = Setting.simpleString( "index.allocation.existing_shards_allocator", GatewayAllocator.ALLOCATOR_NAME, S...
ExistingShardsAllocator
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/common/io/stream/GenericNamedWriteable.java
{ "start": 528, "end": 682 }
interface ____ allows specific NamedWritable objects to be serialized as part of the * generic serialization in StreamOutput and StreamInput. */ public
that
java
netty__netty
codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostRequestDecoder.java
{ "start": 12852, "end": 13482 }
class ____ extends DecoderException { private static final long serialVersionUID = -7846841864603865638L; public NotEnoughDataDecoderException() { } public NotEnoughDataDecoderException(String msg) { super(msg); } public NotEnoughDataDecoderException(Throwa...
NotEnoughDataDecoderException
java
junit-team__junit5
junit-platform-commons/src/main/java/org/junit/platform/commons/support/AnnotationSupport.java
{ "start": 16864, "end": 17810 }
interface ____ which to find the fields; never {@code null} * @param annotationType the annotation type to search for; never {@code null} * @param predicate the field filter; never {@code null} * @return the list of all such fields found; neither {@code null} nor mutable * @since 1.10 * @see Class#getDeclared...
in
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeHttpServer.java
{ "start": 1770, "end": 4751 }
class ____ { private static final String BASEDIR = GenericTestUtils .getTempPath(TestNameNodeHttpServer.class.getSimpleName()); private static String keystoresDir; private static String sslConfDir; private static Configuration conf; private static URLConnectionFactory connectionFactory; public static...
TestNameNodeHttpServer
java
spring-projects__spring-framework
spring-core/src/main/java/org/springframework/aot/hint/predicate/ReflectionHintsPredicates.java
{ "start": 19956, "end": 21066 }
class ____ implements Predicate<RuntimeHints> { private final Field field; FieldHintPredicate(Field field) { this.field = field; } @Override public boolean test(RuntimeHints runtimeHints) { TypeHint typeHint = runtimeHints.reflection().getTypeHint(this.field.getDeclaringClass()); if (typeHint == n...
FieldHintPredicate
java
eclipse-vertx__vert.x
vertx-core/src/main/java/io/vertx/core/http/impl/http1x/Http2UpgradeClientConnection.java
{ "start": 7977, "end": 26292 }
class ____ implements HttpClientStream { void handleUpgrade(io.vertx.core.http.impl.HttpClientConnection conn, HttpClientStream stream) { upgradedStream = stream; upgradedStream.headHandler(headHandler); upgradedStream.dataHandler(chunkHandler); upgradedStream.trailersHandler(trailersHandle...
UpgradingStream
java
apache__camel
dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
{ "start": 836719, "end": 838798 }
class ____ extends YamlDeserializerBase<RefErrorHandlerDefinition> { public RefErrorHandlerDefinitionDeserializer() { super(RefErrorHandlerDefinition.class); } @Override protected RefErrorHandlerDefinition newInstance() { return new RefErrorHandlerDefinition(); ...
RefErrorHandlerDefinitionDeserializer
java
quarkusio__quarkus
extensions/security/deployment/src/test/java/io/quarkus/security/test/permissionsallowed/checker/PermissionChecker1stMethodArg.java
{ "start": 243, "end": 477 }
class ____ extends AbstractNthMethodArgChecker { @PermissionChecker("1st-arg") boolean is1stMethodArgOk(Object one, SecurityIdentity identity) { return this.argsOk(1, one, identity); } }
PermissionChecker1stMethodArg
java
apache__kafka
streams/src/test/java/org/apache/kafka/streams/internals/metrics/StreamsClientMetricsDelegatingReporterTest.java
{ "start": 1427, "end": 5017 }
class ____ { private MockAdminClient mockAdminClient; private StreamsClientMetricsDelegatingReporter streamsClientMetricsDelegatingReporter; private KafkaMetric streamClientMetricOne; private KafkaMetric streamClientMetricTwo; private KafkaMetric streamClientMetricThree; private KafkaMetric ka...
StreamsClientMetricsDelegatingReporterTest
java
mockito__mockito
mockito-core/src/main/java/org/mockito/internal/junit/DefaultTestFinishedEvent.java
{ "start": 164, "end": 846 }
class ____ implements TestFinishedEvent { private final Object testClassInstance; private final String testMethodName; private final Throwable testFailure; public DefaultTestFinishedEvent( Object testClassInstance, String testMethodName, Throwable testFailure) { this.testClassInstan...
DefaultTestFinishedEvent
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/transport/Transport.java
{ "start": 3445, "end": 5604 }
interface ____ extends Closeable, RefCounted { /** * The node this connection is associated with */ DiscoveryNode getNode(); /** * Sends the request to the node this connection is associated with * @param requestId see {@link ResponseHandlers#add(TransportRes...
Connection
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/ECAdmin.java
{ "start": 10168, "end": 12990 }
class ____ implements AdminHelper.Command { @Override public String getName() { return "-setPolicy"; } @Override public String getShortUsage() { return "[" + getName() + " -path <path> [-policy <policy>] [-replicate]]\n"; } @Override public String getLongUsage() {...
SetECPolicyCommand
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/BadInstanceofTest.java
{ "start": 1563, "end": 1693 }
class ____ extends A {} } """) .addOutputLines( "Test.java", """
C
java
elastic__elasticsearch
server/src/test/java/org/elasticsearch/reservedstate/service/FileSettingsServiceTests.java
{ "start": 4006, "end": 23761 }
class ____ extends ESTestCase { private static final Logger logger = LogManager.getLogger(FileSettingsServiceTests.class); private Environment env; private ClusterService clusterService; private ReservedClusterStateService controller; private ThreadPool threadpool; private FileSettingsService fi...
FileSettingsServiceTests
java
apache__flink
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/source/reader/fetcher/SplitFetcherManager.java
{ "start": 2763, "end": 13650 }
class ____<E, SplitT extends SourceSplit> { private static final Logger LOG = LoggerFactory.getLogger(SplitFetcherManager.class); static final String THREAD_NAME_PREFIX = "Source Data Fetcher for "; private final Consumer<Throwable> errorHandler; /** An atomic integer to generate monotonically increas...
SplitFetcherManager
java
spring-projects__spring-framework
spring-webmvc/src/test/java/org/springframework/web/servlet/handler/HandlerMappingIntrospectorTests.java
{ "start": 15999, "end": 16336 }
class ____ implements CorsConfigurationSource { private final CorsConfiguration corsConfig; private TestHandler(CorsConfiguration corsConfig) { this.corsConfig = corsConfig; } @Override public CorsConfiguration getCorsConfiguration(HttpServletRequest request) { return this.corsConfig; } } priva...
TestHandler