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
apache__camel
components/camel-ibm/camel-ibm-cos/src/main/java/org/apache/camel/component/ibm/cos/IBMCOSComponent.java
{ "start": 1162, "end": 2543 }
class ____ extends HealthCheckComponent { @Metadata private IBMCOSConfiguration configuration = new IBMCOSConfiguration(); public IBMCOSComponent() { this(null); } public IBMCOSComponent(CamelContext context) { super(context); } @Override protected Endpoint createEndp...
IBMCOSComponent
java
google__auto
service/processor/src/main/java/com/google/auto/service/processor/ServicesFiles.java
{ "start": 1052, "end": 1235 }
class ____ { public static final String SERVICES_PATH = "META-INF/services"; private ServicesFiles() {} /** * Returns an absolute path to a service file given the
ServicesFiles
java
apache__flink
flink-python/src/test/java/org/apache/flink/python/PythonOptionsTest.java
{ "start": 1077, "end": 8800 }
class ____ { @Test void testBundleSize() { final Configuration configuration = new Configuration(); final int defaultBundleSize = configuration.get(PythonOptions.MAX_BUNDLE_SIZE); assertThat(defaultBundleSize).isEqualTo(PythonOptions.MAX_BUNDLE_SIZE.defaultValue()); final int e...
PythonOptionsTest
java
spring-projects__spring-boot
module/spring-boot-security-oauth2-client/src/main/java/org/springframework/boot/security/oauth2/client/autoconfigure/OAuth2ClientProperties.java
{ "start": 1249, "end": 2144 }
class ____ implements InitializingBean { /** * OAuth provider details. */ private final Map<String, Provider> provider = new HashMap<>(); /** * OAuth client registrations. */ private final Map<String, Registration> registration = new HashMap<>(); public Map<String, Provider> getProvider() { return thi...
OAuth2ClientProperties
java
elastic__elasticsearch
test/framework/src/main/java/org/elasticsearch/cluster/ESAllocationTestCase.java
{ "start": 19745, "end": 21114 }
class ____ extends AllocationService { private volatile long nanoTimeOverride = -1L; public final GatewayAllocator gatewayAllocator; public final ShardsAllocator shardsAllocator; public MockAllocationService( AllocationDeciders allocationDeciders, GatewayAlloca...
MockAllocationService
java
elastic__elasticsearch
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/TextSimilarityConfigUpdateTests.java
{ "start": 1048, "end": 6889 }
class ____ extends AbstractNlpConfigUpdateTestCase<TextSimilarityConfigUpdate> { public static TextSimilarityConfigUpdate randomUpdate() { return new TextSimilarityConfigUpdate( randomAlphaOfLength(10), randomBoolean() ? null : randomAlphaOfLength(5), randomBoolean() ? n...
TextSimilarityConfigUpdateTests
java
apache__maven
its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4633DualCompilerExecutionsWeaveModeTest.java
{ "start": 1902, "end": 2678 }
class ____ extends AbstractMavenIntegrationTestCase { /** * Submodule2 depends on compiler output from submodule1, but dependency is in generate-resources phase in * submodule2. This effectively tests the module-locking of the project artifact. * * @throws Exception in case of failure */ ...
MavenITmng4633DualCompilerExecutionsWeaveModeTest
java
mapstruct__mapstruct
processor/src/test/java/org/mapstruct/ap/test/bugs/_2245/TestMapper.java
{ "start": 593, "end": 788 }
class ____ { private final String id; public Inner(String id) { this.id = id; } public String getId() { return id; } }
Inner
java
spring-projects__spring-boot
buildpack/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/ssl/PemFileWriter.java
{ "start": 1031, "end": 10662 }
class ____ { private static final String EXAMPLE_SECRET_QUALIFIER = "example"; public static final String CA_CERTIFICATE = """ -----BEGIN TRUSTED CERTIFICATE----- MIIClzCCAgACCQCPbjkRoMVEQDANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMC VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28x DTALBgNVBAo...
PemFileWriter
java
quarkusio__quarkus
extensions/grpc/codegen/src/main/java/io/quarkus/grpc/codegen/GrpcCodeGen.java
{ "start": 1620, "end": 25955 }
class ____ implements CodeGenProvider { private static final Logger log = Logger.getLogger(GrpcCodeGen.class); private static final String quarkusProtocPluginMain = "io.quarkus.grpc.protoc.plugin.MutinyGrpcGenerator"; private static final String EXE = "exe"; private static final String PROTO = ".proto"...
GrpcCodeGen
java
redisson__redisson
redisson/src/main/java/org/redisson/api/RBloomFilter.java
{ "start": 823, "end": 3271 }
interface ____<T> extends RExpirable, RBloomFilterAsync<T> { /** * Adds element * * @param object - element to add * @return <code>true</code> if element has been added successfully * <code>false</code> if element is already present */ boolean add(T object); /** ...
RBloomFilter
java
apache__camel
components/camel-jms/src/test/java/org/apache/camel/component/jms/integration/activemq/ActiveMQOriginalDestinationIT.java
{ "start": 2188, "end": 5051 }
class ____ extends AbstractJMSTest { @Order(2) @RegisterExtension public static CamelContextExtension camelContextExtension = new DefaultCamelContextExtension(); protected String componentName = "activemq"; protected CamelContext context; protected ProducerTemplate template; protected Consu...
ActiveMQOriginalDestinationIT
java
spring-projects__spring-security
config/src/test/java/org/springframework/security/config/annotation/web/configurers/FormLoginConfigurerTests.java
{ "start": 30778, "end": 31574 }
class ____<T> { private final AuthorizationManager<T> authorities; AuthorizationManagerFactory(String... authorities) { this.authorities = AllAuthoritiesAuthorizationManager.hasAllAuthorities(authorities); } public AuthorizationManager<T> authenticated() { AuthenticatedAuthorizationManager<T> authentic...
AuthorizationManagerFactory
java
apache__camel
components/camel-caffeine/src/generated/java/org/apache/camel/component/caffeine/load/CaffeineLoadCacheEndpointUriFactory.java
{ "start": 523, "end": 2621 }
class ____ extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory { private static final String BASE = ":cacheName"; private static final Set<String> PROPERTY_NAMES; private static final Set<String> SECRET_PROPERTY_NAMES; private static final Map<String, Str...
CaffeineLoadCacheEndpointUriFactory
java
assertj__assertj-core
assertj-core/src/test/java/org/assertj/core/api/EntryPointAssertions_anyOf_Test.java
{ "start": 1262, "end": 3025 }
class ____ extends EntryPointAssertionsBaseTest { @ParameterizedTest @MethodSource("anyOfWithArrayFactories") <T> void should_create_anyOf_condition_from_condition_array(Function<Condition<T>[], Condition<T>> anyOfFactory) { // GIVEN Condition<T> condition1 = new TestCondition<>("condition 1"); Condi...
EntryPointAssertions_anyOf_Test
java
micronaut-projects__micronaut-core
benchmarks/src/jmh/java/io/micronaut/http/server/stack/NettyUtil.java
{ "start": 218, "end": 1014 }
class ____ { static ByteBuf readAllOutboundContiguous(EmbeddedChannel clientChannel) { ByteBuf requestBytes = PooledByteBufAllocator.DEFAULT.buffer(); while (true) { ByteBuf part = clientChannel.readOutbound(); if (part == null) { break; } ...
NettyUtil
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/flogger/FloggerFormatStringTest.java
{ "start": 4336, "end": 4596 }
class ____ { private static final FluentLogger logger = FluentLogger.forEnclosingClass(); public void f() { logger.atSevere().log("hello %s"); } } """) .doTest(); } }
Test
java
bumptech__glide
instrumentation/src/androidTest/java/com/bumptech/glide/load/resource/bitmap/DownsamplerEmulatorTest.java
{ "start": 28402, "end": 28920 }
class ____ when // running on SDK levels < 34. Also, do not extract methods with Gainmap in the method // signature for the same reason. bitmap.setGainmap( new android.graphics.Gainmap(Bitmap.createBitmap(width / 2, height / 2, Config.ALPHA_8))); } ByteArrayOutputStream os = new Byte...
resolution
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/type/descriptor/java/JdbcTimestampJavaType.java
{ "start": 1410, "end": 8247 }
class ____ extends AbstractTemporalJavaType<Date> implements VersionJavaType<Date> { public static final JdbcTimestampJavaType INSTANCE = new JdbcTimestampJavaType(); public static final String TIMESTAMP_FORMAT = "yyyy-MM-dd HH:mm:ss.SSSSSSSSS"; /** * Intended for use in reading HQL literals and writing SQL lite...
JdbcTimestampJavaType
java
hibernate__hibernate-orm
hibernate-testing/src/main/java/org/hibernate/testing/bytecode/enhancement/extension/engine/BytecodeEnhancedTestEngine.java
{ "start": 4444, "end": 4816 }
class ____ annotated with @BytecodeEnhanced // we replace the descriptor with the new one that will point to an enhanced test class, // this also means that we need to add all the child descriptors back as well... // Then on the extension side we set the classloader that contains the enhanced test class ...
is
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/query/specification/SimpleProjectionSpecification.java
{ "start": 2172, "end": 3397 }
interface ____<T,X> extends QuerySpecification<T> { /** * Create a new {@code ProjectionSpecification} which augments the given * {@link SelectionSpecification}. */ static <T,X> SimpleProjectionSpecification<T,X> create( SelectionSpecification<T> selectionSpecification, Path<T,X> projectedPath) { return...
SimpleProjectionSpecification
java
elastic__elasticsearch
x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/io/stream/PlanStreamInputTests.java
{ "start": 1402, "end": 5718 }
class ____ extends ESTestCase { public void testMapperSimple() { var mapper = new PlanStreamInput.NameIdMapper(); NameId first = mapper.apply(1L); NameId second = mapper.apply(1L); assertThat(second, equalTo(first)); NameId third = mapper.apply(2L); NameId fourth =...
PlanStreamInputTests
java
junit-team__junit5
junit-jupiter-migrationsupport/src/main/java/org/junit/jupiter/migrationsupport/rules/adapter/GenericBeforeAndAfterAdvice.java
{ "start": 531, "end": 714 }
interface ____ { default void before() { } default void handleTestExecutionException(Throwable cause) throws Throwable { } default void after() { } }
GenericBeforeAndAfterAdvice
java
apache__spark
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/expressions/HiveHasher.java
{ "start": 1046, "end": 1634 }
class ____ { @Override public String toString() { return HiveHasher.class.getSimpleName(); } public static int hashInt(int input) { return input; } public static int hashLong(long input) { return (int) ((input >>> 32) ^ input); } public static int hashUnsafeBytes(Object base, long offset...
HiveHasher
java
junit-team__junit5
jupiter-tests/src/test/java/org/junit/jupiter/engine/discovery/DiscoverySelectorResolverTests.java
{ "start": 13255, "end": 37270 }
class ____ name: " + className); } @Test void methodResolutionForNonexistentMethod() { MethodSelector selector = selectMethod(MyTestClass.class, "bogus", ""); resolve(request().selectors(selector)); assertTrue(requireNonNull(engineDescriptor).getDescendants().isEmpty()); var result = verifySelectorProcess...
with
java
apache__camel
core/camel-util/src/main/java/org/apache/camel/util/OrderedProperties.java
{ "start": 1283, "end": 1342 }
class ____ extends BaseOrderedProperties { }
OrderedProperties
java
spring-projects__spring-framework
spring-webflux/src/test/java/org/springframework/web/reactive/config/WebFluxViewResolutionIntegrationTests.java
{ "start": 5131, "end": 5633 }
class ____ extends AbstractWebFluxConfig { @Override public void configureViewResolvers(ViewResolverRegistry registry) { registry.freeMarker(); } @Bean public FreeMarkerConfigurer freeMarkerConfigurer() { FreeMarkerConfigurer configurer = new FreeMarkerConfigurer(); configurer.setPreTemplat...
ExplicitDefaultEncodingConfig
java
apache__flink
flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/extraction/TypeInferenceExtractorTest.java
{ "start": 111403, "end": 111630 }
class ____ extends AsyncScalarFunction { public void eval(CompletableFuture<Integer> f, int i, Double d) {} public void eval(CompletableFuture<Long> f, String s) {} } private static
OverloadedFunctionAsync
java
mybatis__mybatis-3
src/main/java/org/apache/ibatis/scripting/xmltags/DynamicSqlSource.java
{ "start": 978, "end": 2051 }
class ____ implements SqlSource { private final Configuration configuration; private final SqlNode rootSqlNode; private final ParamNameResolver paramNameResolver; public DynamicSqlSource(Configuration configuration, SqlNode rootSqlNode) { this(configuration, rootSqlNode, null); } public DynamicSqlSou...
DynamicSqlSource
java
apache__camel
dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ThriftEndpointBuilderFactory.java
{ "start": 9428, "end": 16255 }
interface ____ extends EndpointConsumerBuilder { default ThriftEndpointConsumerBuilder basic() { return (ThriftEndpointConsumerBuilder) this; } /** * Allows for bridging the consumer to the Camel routing Error Handler, * which mean any ex...
AdvancedThriftEndpointConsumerBuilder
java
spring-projects__spring-framework
integration-tests/src/test/java/org/springframework/core/env/EnvironmentSystemIntegrationTests.java
{ "start": 4928, "end": 25437 }
class ____ { private final ConfigurableEnvironment prodEnv = new StandardEnvironment(); private final ConfigurableEnvironment devEnv = new StandardEnvironment(); private final ConfigurableEnvironment prodWebEnv = new StandardServletEnvironment(); @BeforeEach void setUp() { prodEnv.setActiveProfiles(PROD_ENV_...
EnvironmentSystemIntegrationTests
java
apache__dubbo
dubbo-plugin/dubbo-native/src/main/java/org/apache/dubbo/aot/api/JdkProxyDescriber.java
{ "start": 1000, "end": 2041 }
class ____ implements ConditionalDescriber { private final List<String> proxiedInterfaces; private final String reachableType; public JdkProxyDescriber(List<String> proxiedInterfaces, String reachableType) { this.proxiedInterfaces = proxiedInterfaces; this.reachableType = reachableType; ...
JdkProxyDescriber
java
quarkusio__quarkus
extensions/smallrye-graphql-client/deployment/src/main/java/io/quarkus/smallrye/graphql/client/deployment/SmallRyeGraphQLClientProcessor.java
{ "start": 10865, "end": 15283 }
class ____ in GraphQL client configuration rather than * fully qualified names. This method computes a mapping between short names and qualified names, * and the configuration merger bean will take it into account when merging Quarkus configuration * with SmallRye-side configuration. */ @BuildSt...
names
java
elastic__elasticsearch
x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/CrossClusterAccessTransportInterceptorTests.java
{ "start": 5018, "end": 43905 }
class ____ extends AbstractServerTransportInterceptorTests { private Settings settings; private ThreadPool threadPool; private ThreadContext threadContext; private SecurityContext securityContext; private ClusterService clusterService; private MockLicenseState mockLicenseState; private Dest...
CrossClusterAccessTransportInterceptorTests
java
elastic__elasticsearch
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/job/config/AnalysisLimitsTests.java
{ "start": 1094, "end": 9720 }
class ____ extends AbstractXContentSerializingTestCase<AnalysisLimits> { @Override protected AnalysisLimits createTestInstance() { return createRandomized(); } public static AnalysisLimits createRandomized() { return new AnalysisLimits( randomBoolean() ? (long) randomIntBet...
AnalysisLimitsTests
java
apache__flink
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/TaskEventDispatcherTest.java
{ "start": 7935, "end": 8133 }
class ____ implements EventListener<TaskEvent> { public void onEvent(TaskEvent actual) { throw new IllegalStateException("Should never fire"); } } }
ZeroShotEventListener
java
apache__kafka
raft/src/main/java/org/apache/kafka/raft/FollowerState.java
{ "start": 1224, "end": 9798 }
class ____ implements EpochState { private final Logger log; private final int fetchTimeoutMs; private final int epoch; private final int leaderId; private final Endpoints leaderEndpoints; private final Optional<ReplicaKey> votedKey; private final Set<Integer> voters; // Used for tracki...
FollowerState
java
alibaba__druid
core/src/test/java/com/alibaba/druid/bvt/sql/mysql/createTable/MySqlCreateTableTest48.java
{ "start": 992, "end": 3266 }
class ____ extends MysqlTest { public void test_0() throws Exception { String sql = "CREATE TABLE AO_E8B6CC_REPO_TO_CHANGESET (" + " CHANGESET_ID INTEGER,"// + " ID INTEGER AUTO_INCREMENT NOT NULL,"// + " REPOSITORY_ID INTEGER,"// + " ...
MySqlCreateTableTest48
java
google__guava
android/guava/src/com/google/common/base/FinalizableReferenceQueue.java
{ "start": 13185, "end": 13495 }
class ____. String finalizerPath = FINALIZER_CLASS_NAME.replace('.', '/') + ".class"; URL finalizerUrl = getClass().getClassLoader().getResource(finalizerPath); if (finalizerUrl == null) { throw new FileNotFoundException(finalizerPath); } // Find URL pointing to base of
file
java
apache__camel
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/interceptor/TransactionalClientDataSourceWithOnExceptionTest.java
{ "start": 1393, "end": 3744 }
class ____ extends TransactionalClientDataSourceTest { @Override @Test public void testTransactionRollback() throws Exception { MockEndpoint mock = getMockEndpoint("mock:error"); mock.expectedMessageCount(1); try { template.sendBody("direct:fail", "Hello World"); ...
TransactionalClientDataSourceWithOnExceptionTest
java
google__gson
gson/src/main/java/com/google/gson/InstanceCreator.java
{ "start": 1430, "end": 2231 }
class ____&lt;T&gt; { * private final Class&lt;T&gt; clazz; * private final long value; * public Id(Class&lt;T&gt; clazz, long value) { * this.clazz = clazz; * this.value = value; * } * } * </pre> * * <p>If Gson encounters an object of type {@code Id} during deserialization, it will throw an ...
Id
java
quarkusio__quarkus
independent-projects/arc/runtime/src/main/java/io/quarkus/arc/WithCaching.java
{ "start": 2482, "end": 2691 }
class ____ extends AnnotationLiteral<WithCaching> implements WithCaching { private static final long serialVersionUID = 1L; public static final Literal INSTANCE = new Literal(); } }
Literal
java
spring-projects__spring-framework
spring-test/src/test/java/org/springframework/test/web/client/samples/MockMvcClientHttpRequestFactoryTests.java
{ "start": 2151, "end": 3164 }
class ____ { private final RestTemplate template; MockMvcClientHttpRequestFactoryTests(WebApplicationContext wac) { MockMvc mockMvc = MockMvcBuilders.webAppContextSetup(wac).build(); this.template = new RestTemplate(new MockMvcClientHttpRequestFactory(mockMvc)); } @Test void withResult() { assertThat(tem...
MockMvcClientHttpRequestFactoryTests
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhance/internal/bytebuddy/MyNonVisibleGenericMappedSuperclass.java
{ "start": 428, "end": 630 }
class ____<C> { @Embedded private C embedded; public C getEmbedded() { return embedded; } public void setEmbedded(C embedded) { this.embedded = embedded; } }
MyNonVisibleGenericMappedSuperclass
java
spring-projects__spring-framework
spring-context/src/test/java/org/springframework/context/support/GenericApplicationContextTests.java
{ "start": 31112, "end": 31486 }
class ____<T> extends AbstractFactoryBean<T> { TestAotFactoryBean() { throw new IllegalStateException("FactoryBean should not be instantied early"); } @Override public Class<?> getObjectType() { return Object.class; } @SuppressWarnings("unchecked") @Override protected T createInstance() { re...
TestAotFactoryBean
java
spring-projects__spring-framework
spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java
{ "start": 57073, "end": 57249 }
class ____ extends MyControllerImplementingInterface { @Override public String handle(String arg) { return arg; } } abstract static
SubControllerImplementingInterface
java
hibernate__hibernate-orm
hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/components/collections/mappedsuperclasselement/AbstractCode.java
{ "start": 412, "end": 1227 }
class ____ { /** * Initial Value */ protected static final int UNDEFINED = -1; private int code = UNDEFINED; protected AbstractCode() { this( UNDEFINED ); } /** * Constructor with code */ public AbstractCode(int code) { this.code = code; } public int getCode() { return code; } public void ...
AbstractCode
java
apache__avro
lang/java/avro/src/main/java/org/apache/avro/ValidateMutualRead.java
{ "start": 1179, "end": 2648 }
class ____ implements SchemaValidationStrategy { /** * Validate that the schemas provided can mutually read data written by each * other according to the default Avro schema resolution rules. * * @throws SchemaValidationException if the schemas are not mutually compatible. */ @Override public void...
ValidateMutualRead
java
hibernate__hibernate-orm
hibernate-testing/src/main/java/org/hibernate/testing/orm/junit/DialectFeatureChecks.java
{ "start": 34628, "end": 34810 }
class ____ implements DialectFeatureCheck { public boolean apply(Dialect dialect) { return definesFunction( dialect, "array_includes" ); } } public static
SupportsArrayIncludes
java
spring-projects__spring-framework
spring-webmvc/src/main/java/org/springframework/web/servlet/handler/PathPatternMatchableHandlerMapping.java
{ "start": 1582, "end": 3024 }
class ____ implements MatchableHandlerMapping { private final MatchableHandlerMapping delegate; private final PathPatternParser parser; private final Map<String, PathPattern> pathPatternCache = new ConcurrentHashMap<>(); private final int cacheLimit; public PathPatternMatchableHandlerMapping(MatchableHandler...
PathPatternMatchableHandlerMapping
java
assertj__assertj-core
assertj-tests/assertj-integration-tests/assertj-core-tests/src/test/java/org/assertj/tests/core/internal/shorts/Shorts_assertIsCloseTo_Test.java
{ "start": 1495, "end": 4077 }
class ____ extends ShortsBaseTest { private static final Short ZERO = 0; private static final Short ONE = 1; @ParameterizedTest @CsvSource({ "1, 1, 1", "1, 2, 10", "-2, 0, 3", "-1, 1, 3", "0, 2, 5" }) void should_pass_if_difference_is_less_than_given_offset(short actual, shor...
Shorts_assertIsCloseTo_Test
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/state/changelog/ChangelogStateBackendLocalHandle.java
{ "start": 1422, "end": 3968 }
class ____ implements ChangelogStateBackendHandle { private static final long serialVersionUID = 1L; private final List<KeyedStateHandle> localMaterialized; private final List<ChangelogStateHandle> localNonMaterialized; private final ChangelogStateBackendHandleImpl remoteHandle; public ChangelogSta...
ChangelogStateBackendLocalHandle
java
netty__netty
example/src/main/java/io/netty/example/http2/file/Http2StaticFileServerHandler.java
{ "start": 4254, "end": 14839 }
class ____ extends ChannelDuplexHandler { public static final String HTTP_DATE_FORMAT = "EEE, dd MMM yyyy HH:mm:ss zzz"; public static final String HTTP_DATE_GMT_TIMEZONE = "GMT"; public static final int HTTP_CACHE_SECONDS = 60; private Http2FrameStream stream; @Override public void channelRe...
Http2StaticFileServerHandler
java
spring-projects__spring-security
config/src/main/java/org/springframework/security/config/method/GlobalMethodSecurityBeanDefinitionParser.java
{ "start": 22127, "end": 23479 }
class ____ implements AuthenticationManager, BeanFactoryAware { private AuthenticationManager delegate; private final Object delegateMonitor = new Object(); private BeanFactory beanFactory; private final String authMgrBean; AuthenticationManagerDelegator(String authMgrBean) { this.authMgrBean = String...
AuthenticationManagerDelegator
java
apache__maven
its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8561SourceRootTest.java
{ "start": 1040, "end": 1482 }
class ____ extends AbstractMavenIntegrationTestCase { /** * Verify project is buildable. */ @Test void testIt() throws Exception { Path basedir = extractResources("/mng-8561").getAbsoluteFile().toPath(); Verifier verifier = newVerifier(basedir.toString()); verifier.addCl...
MavenITmng8561SourceRootTest
java
spring-projects__spring-framework
spring-context/src/test/java/org/springframework/context/annotation/LazyAutowiredAnnotationBeanPostProcessorTests.java
{ "start": 7993, "end": 8322 }
class ____ implements TestBeanHolder { @Autowired @Lazy private TestBean testBean; @Autowired @Lazy private List<TestBean> testBeans; @Override public TestBean getTestBean() { return this.testBean; } public List<TestBean> getTestBeans() { return testBeans; } } public static
FieldResourceInjectionBean
java
apache__rocketmq
remoting/src/main/java/org/apache/rocketmq/remoting/rpc/RpcClientUtils.java
{ "start": 1010, "end": 2408 }
class ____ { public static RemotingCommand createCommandForRpcRequest(RpcRequest rpcRequest) { RemotingCommand cmd = RemotingCommand.createRequestCommand(rpcRequest.getCode(), rpcRequest.getHeader()); cmd.setBody(encodeBody(rpcRequest.getBody())); return cmd; } public static Remoti...
RpcClientUtils
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/loading/multiLoad/FindMultipleEntityGraphTest.java
{ "start": 2265, "end": 2369 }
class ____ { @Id String name; Owner(String name) { this.name = name; } Owner() { } } }
Owner
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/inheritance/embeddable/EmbeddableInheritanceRecursiveTest.java
{ "start": 5065, "end": 5154 }
class ____ extends Root3 { String child3Prop; } @Entity(name = "Entity3") static
Child3
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancerLongRunningTasks.java
{ "start": 4083, "end": 38204 }
class ____ { private static final Logger LOG = LoggerFactory.getLogger(TestBalancerLongRunningTasks.class); static { GenericTestUtils.setLogLevel(Balancer.LOG, Level.TRACE); GenericTestUtils.setLogLevel(Dispatcher.LOG, Level.DEBUG); } private final static long CAPACITY = 5000L; private final ...
TestBalancerLongRunningTasks
java
elastic__elasticsearch
server/src/test/java/org/elasticsearch/search/aggregations/metrics/PercentilesTests.java
{ "start": 846, "end": 5807 }
class ____ extends BaseAggregationTestCase<PercentilesAggregationBuilder> { @Override protected PercentilesAggregationBuilder createTestAggregatorBuilder() { PercentilesAggregationBuilder factory = new PercentilesAggregationBuilder(randomAlphaOfLengthBetween(1, 20)); if (randomBoolean()) { ...
PercentilesTests
java
apache__camel
core/camel-core/src/test/java/org/apache/camel/processor/RecipientListParallelStopOnExceptionWithOnExceptionTest.java
{ "start": 1035, "end": 2451 }
class ____ extends ContextTestSupport { @Test public void testRecipientListStopOnException() throws Exception { getMockEndpoint("mock:result").expectedMessageCount(0); getMockEndpoint("mock:b").expectedMessageCount(1); // we run parallel so the tasks could haven been processed so we get...
RecipientListParallelStopOnExceptionWithOnExceptionTest
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/binding/annotations/embedded/LegalStructure.java
{ "start": 423, "end": 1450 }
class ____ { private String name; private String country; private CorpType corporationType; private Nationality origin; private Set<Manager> topManagement = new HashSet<Manager>(); @ManyToOne @JoinColumn(name = "CORP_ID") public CorpType getCorporationType() { return corporationType; } public void setCorp...
LegalStructure
java
apache__dubbo
dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/registry/nacos/nacos/NacosServiceNameTest.java
{ "start": 1397, "end": 3867 }
class ____ { private static final String category = DEFAULT_CATEGORY; private static final String serviceInterface = "org.apache.dubbo.registry.nacos.NacosServiceName"; private static final String version = "1.0.0"; private static final String group = "default"; private final NacosServiceName n...
NacosServiceNameTest
java
dropwizard__dropwizard
dropwizard-example/src/main/java/com/example/helloworld/core/User.java
{ "start": 125, "end": 673 }
class ____ implements Principal { private static final Random rng = new Random(); private final String name; private final Set<String> roles; public User(String name) { this.name = name; this.roles = null; } public User(String name, Set<String> roles) { this.name = na...
User
java
apache__flink
flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/utils/TestSharedBuffer.java
{ "start": 3626, "end": 10370 }
class ____ implements KeyedStateStore { private long stateWrites = 0; private long stateReads = 0; @Override public <T> ValueState<T> getState(ValueStateDescriptor<T> stateProperties) { return new ValueState<T>() { private T value; @Overrid...
MockKeyedStateStore
java
alibaba__nacos
auth/src/main/java/com/alibaba/nacos/auth/serveridentity/ServerIdentityResult.java
{ "start": 743, "end": 1614 }
class ____ { private final ResultStatus status; private final String message; private ServerIdentityResult(ResultStatus status, String message) { this.status = status; this.message = message; } public ResultStatus getStatus() { return status; } ...
ServerIdentityResult
java
elastic__elasticsearch
x-pack/plugin/ql/src/main/java/org/elasticsearch/xpack/ql/expression/predicate/operator/arithmetic/BinaryArithmeticPipe.java
{ "start": 723, "end": 1935 }
class ____ extends BinaryPipe { private final BinaryArithmeticOperation operation; public BinaryArithmeticPipe(Source source, Expression expression, Pipe left, Pipe right, BinaryArithmeticOperation operation) { super(source, expression, left, right); this.operation = operation; } @Ove...
BinaryArithmeticPipe
java
lettuce-io__lettuce-core
src/main/java/io/lettuce/core/LPosArgs.java
{ "start": 712, "end": 2586 }
class ____ { /** * Utility constructor. */ private Builder() { } /** * Creates new empty {@link LPosArgs}. * * @return new {@link LPosArgs}. * @see LPosArgs#maxlen(long) */ public static LPosArgs empty() { ...
Builder
java
quarkusio__quarkus
extensions/arc/deployment/src/test/java/io/quarkus/arc/test/log/InjectedLoggerTest.java
{ "start": 1164, "end": 1501 }
class ____ { @Inject Logger log; @LoggerName("shared") Logger sharedLog; public Logger getLog() { log.info("Someone is here!"); return log; } public Logger getSharedLog() { return sharedLog; } } @Dependent ...
SimpleBean
java
elastic__elasticsearch
plugins/discovery-gce/src/main/java/org/elasticsearch/cloud/gce/network/GceNameResolver.java
{ "start": 3266, "end": 4799 }
interface ____ gceMetadataPath = Strings.replace(GceAddressResolverType.PRIVATE_IP.gceName, "{{network}}", network); } else { throw new IllegalArgumentException( "[" + value + "] is not one of the supported GCE network.host setting....
value
java
spring-projects__spring-framework
spring-test/src/test/java/org/springframework/test/context/support/ActiveProfilesUtilsTests.java
{ "start": 6884, "end": 6986 }
class ____ { } @ActiveProfiles({ "foo", "bar", " foo", "bar ", "baz" }) private static
EmptyProfiles
java
apache__camel
components/camel-file-watch/src/main/java/org/apache/camel/component/file/watch/FileWatchConstants.java
{ "start": 937, "end": 3492 }
class ____ { @Metadata(description = "Type of event. Possible values: CREATE, DELETE, MODIFY.", javaType = "String") public static final String EVENT_TYPE_HEADER = "CamelFileEventType"; @Metadata(description = "Only the file name (the name with no leading paths).", javaType = "String") public static fi...
FileWatchConstants
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/BasicJpaAnnotation.java
{ "start": 524, "end": 1858 }
class ____ implements Basic, AttributeMarker, AttributeMarker.Fetchable, AttributeMarker.Optionalable { private jakarta.persistence.FetchType fetch; private boolean optional; /** * Used in creating dynamic annotation instances (e.g. from XML) */ public BasicJpaAnnotation(ModelsContext modelContext) { this...
BasicJpaAnnotation
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/common/util/concurrent/KeyedLock.java
{ "start": 4587, "end": 5801 }
class ____ extends ReentrantLock { private static final VarHandle VH_COUNT_FIELD; static { try { VH_COUNT_FIELD = MethodHandles.lookup().in(KeyLock.class).findVarHandle(KeyLock.class, "count", int.class); } catch (NoSuchFieldException | IllegalAccessException e) ...
KeyLock
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/Queue.java
{ "start": 1508, "end": 4597 }
interface ____ { /** * Get the queue name * @return queue name */ String getQueueName(); /** * Get the queue metrics * @return the queue metrics */ QueueMetrics getMetrics(); /** * Get queue information * @param includeChildQueues include child queues? * @param recursive recursive...
Queue
java
apache__hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TestAHSWebServices.java
{ "start": 9019, "end": 46406 }
class ____ extends AuthenticationFilter { @Override protected Properties getConfiguration(String configPrefix, FilterConfig filterConfig) throws ServletException { Properties properties = super.getConfiguration(configPrefix, filterConfig); properties.put(AuthenticationFilter.AUTH_T...
TestSimpleAuthFilter
java
apache__camel
core/camel-console/src/main/java/org/apache/camel/impl/console/ServiceDevConsole.java
{ "start": 1303, "end": 3856 }
class ____ extends AbstractDevConsole { public ServiceDevConsole() { super("camel", "service", "Services", "Services used for network communication with clients"); } @Override protected String doCallText(Map<String, Object> options) { StringBuilder sb = new StringBuilder(); En...
ServiceDevConsole
java
apache__flink
flink-core/src/main/java/org/apache/flink/core/security/UserSystemExitException.java
{ "start": 901, "end": 1319 }
class ____ extends SecurityException { private static final long serialVersionUID = -5732392967744534811L; public UserSystemExitException() { this("Flink user code attempted to exit JVM."); } public UserSystemExitException(String msg) { super(msg); } public UserSystemExitExcep...
UserSystemExitException
java
ReactiveX__RxJava
src/main/java/io/reactivex/rxjava3/internal/util/LinkedArrayList.java
{ "start": 828, "end": 927 }
class ____ non final to allow embedding it directly and thus saving on object allocation. */ public
is
java
apache__flink
flink-table/flink-table-code-splitter/src/main/java/org/apache/flink/table/codesplit/AddBoolBeforeReturnRewriter.java
{ "start": 5011, "end": 5410 }
class ____ extends JavaParserBaseVisitor<Void> { private final String key; private final String boolVarName; private InnerVisitor(String key, String boolVarName) { this.key = key; this.boolVarName = boolVarName; } @Override public Void visitClas...
InnerVisitor
java
apache__camel
core/camel-core/src/test/java/org/apache/camel/impl/engine/CamelPostProcessorHelperTest.java
{ "start": 27636, "end": 27929 }
class ____ extends SynchronizationAdapter { private boolean onDone; @Override public void onDone(Exchange exchange) { onDone = true; } public boolean isOnDone() { return onDone; } } public static
MySynchronization
java
quarkusio__quarkus
extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/session/TransactionScopedSession.java
{ "start": 44097, "end": 45727 }
class ____ implements AutoCloseable { final Session session; final boolean closeOnEnd; final boolean allowModification; SessionResult(Session session, boolean closeOnEnd, boolean allowModification) { this.session = session; this.closeOnEnd = closeOnEnd; ...
SessionResult
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/collectionincompatibletype/TruthIncompatibleTypeTest.java
{ "start": 15177, "end": 15763 }
class ____ { public void f(Multimap<String, Long> xs) { // BUG: Diagnostic contains: assertThat(xs).containsExactly("", 1L, "foo", 2L, "bar", 3); } } """) .doTest(); } @Test public void streamContainsExactly() { compi...
Test
java
apache__flink
flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/iomanager/BufferFileWriterReaderTest.java
{ "start": 1667, "end": 7295 }
class ____ { private static final int BUFFER_SIZE = 32 * 1024; private static final BufferRecycler BUFFER_RECYCLER = FreeingBufferRecycler.INSTANCE; private static final Random random = new Random(); private static final IOManager ioManager = new IOManagerAsync(); private BufferFileWriter write...
BufferFileWriterReaderTest
java
netty__netty
codec-native-quic/src/test/java/io/netty/handler/codec/quic/InsecureQuicTokenHandlerTest.java
{ "start": 1117, "end": 3305 }
class ____ extends AbstractQuicTest { @Test public void testMaxTokenLength() { assertEquals(InsecureQuicTokenHandler.MAX_TOKEN_LEN, InsecureQuicTokenHandler.INSTANCE.maxTokenLength()); } @Test public void testTokenProcessingIpv4() throws UnknownHostException { testTokenProcessing(t...
InsecureQuicTokenHandlerTest
java
apache__flink
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/legacy/operations/ddl/AlterTableOptionsOperation.java
{ "start": 1541, "end": 2899 }
class ____ extends AlterTableOperation { private final CatalogTable catalogTable; public AlterTableOptionsOperation( ObjectIdentifier tableIdentifier, CatalogTable catalogTable, boolean ignoreIfNotExists) { super(tableIdentifier, ignoreIfNotExists); this.cata...
AlterTableOptionsOperation
java
hibernate__hibernate-orm
hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/entityNames/singleAssociatedAudited/SingleDomainObjectToMultipleTablesTest.java
{ "start": 921, "end": 2288 }
class ____ { private long carId; private long ownerId; private long driverId; @Test public void testSingleDomainObjectToMultipleTablesMapping(SessionFactoryScope scope) { scope.inSession( session -> { //REV 1 session.getTransaction().begin(); Person owner = new Person( "Lukasz", 25 ); Person driver ...
SingleDomainObjectToMultipleTablesTest
java
spring-projects__spring-boot
module/spring-boot-integration/src/test/java/org/springframework/boot/integration/endpoint/IntegrationGraphEndpointTests.java
{ "start": 1554, "end": 2633 }
class ____ { private final IntegrationGraphServer server = mock(IntegrationGraphServer.class); private final IntegrationGraphEndpoint endpoint = new IntegrationGraphEndpoint(this.server); @Test void readOperationShouldReturnGraph() { Graph graph = mock(Graph.class); Map<String, Object> contentDescriptor = ne...
IntegrationGraphEndpointTests
java
alibaba__fastjson
src/test/java/com/alibaba/json/bvt/AnnotationTest3.java
{ "start": 182, "end": 487 }
class ____ extends TestCase { public void test_supperField() throws Exception { C c = new C(); c.setId(123); c.setName("jobs"); String str = JSON.toJSONString(c); Assert.assertEquals("{\"ID\":123,\"name\":\"jobs\"}", str); } public static
AnnotationTest3
java
elastic__elasticsearch
x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/ibmwatsonx/response/IbmWatsonxEmbeddingsResponseEntity.java
{ "start": 1440, "end": 3203 }
class ____ { private static final String FAILED_TO_FIND_FIELD_TEMPLATE = "Failed to find required field [%s] in IBM watsonx embeddings response"; public static DenseEmbeddingFloatResults fromResponse(Request request, HttpResult response) throws IOException { var parserConfig = XContentParserConfigurat...
IbmWatsonxEmbeddingsResponseEntity
java
spring-projects__spring-data-jpa
spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/DummyRepository.java
{ "start": 971, "end": 2230 }
interface ____ extends CrudRepository<Dummy, Integer> { @Procedure("procedure_in1_out1") Integer adHocProcedureWith1InputAnd1OutputParameter(Integer in); @Procedure("procedure_in1_out0") void adHocProcedureWith1InputAndNoOutputParameter(Integer in); @Procedure("procedure_in0_out1") Integer adHocProcedureWithNo...
DummyRepository
java
elastic__elasticsearch
x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/action/user/TransportChangePasswordAction.java
{ "start": 2040, "end": 7960 }
class ____ extends HandledTransportAction<ChangePasswordRequest, ActionResponse.Empty> { public static final ActionType<ActionResponse.Empty> TYPE = new ActionType<>("cluster:admin/xpack/security/user/change_password"); private final Settings settings; private final NativeUsersStore nativeUsersStore; p...
TransportChangePasswordAction
java
apache__dubbo
dubbo-plugin/dubbo-triple-servlet/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/servlet/DummyServletContext.java
{ "start": 1768, "end": 9702 }
class ____ implements ServletContext { private final FrameworkModel frameworkModel; private final Map<String, Object> attributes = new HashMap<>(); private final Map<String, String> initParameters = new HashMap<>(); public DummyServletContext(FrameworkModel frameworkModel) { this.frameworkMode...
DummyServletContext
java
elastic__elasticsearch
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/TransformConfigUpdate.java
{ "start": 1248, "end": 1336 }
class ____ the mutable configuration items for a data frame transform */ public final
holds
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/inject/dagger/PrivateConstructorForNoninstantiableModuleTest.java
{ "start": 2132, "end": 2744 }
class ____ { @Provides static String provideString() { return ""; } @Provides static Integer provideInteger() { return 1; } private TestModule() {} } """) ....
TestModule
java
apache__dubbo
dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/HeaderFilter.java
{ "start": 983, "end": 1103 }
interface ____ { RpcInvocation invoke(Invoker<?> invoker, RpcInvocation invocation) throws RpcException; }
HeaderFilter
java
apache__hadoop
hadoop-tools/hadoop-resourceestimator/src/test/java/org/apache/hadoop/resourceestimator/solver/impl/TestSolver.java
{ "start": 1845, "end": 2826 }
class ____ { private Solver solver; protected abstract Solver createSolver() throws ResourceEstimatorException; @BeforeEach public void setup() throws SolverException, IOException, SkylineStoreException, ResourceEstimatorException { solver = createSolver(); } @Test public void testNullJ...
TestSolver
java
apache__logging-log4j2
log4j-1.2-api/src/test/java/org/apache/log4j/builders/filter/LevelRangeFilterBuilderTest.java
{ "start": 7492, "end": 7663 }
interface ____ { LevelRangeFilter build(Level levelMin, Level levelMax, Boolean acceptOnMatch) throws Exception; } private static
TestLevelRangeFilterBuilder
java
elastic__elasticsearch
x-pack/plugin/sql/qa/server/src/main/java/org/elasticsearch/xpack/sql/qa/cli/SelectTestCase.java
{ "start": 446, "end": 1792 }
class ____ extends CliIntegrationTestCase { public void testSelect() throws IOException { index("test", body -> body.field("test_field", "test_value")); assertThat(command("SELECT * FROM test"), containsString("test_field")); assertThat(readLine(), containsString("----------")); asse...
SelectTestCase