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
micronaut-projects__micronaut-core
test-suite/src/test/java/io/micronaut/docs/http/client/bind/type/MetadataClient.java
{ "start": 178, "end": 283 }
interface ____ { @Get("/client/bind") String get(Metadata metadata); } //end::clazz[]
MetadataClient
java
quarkusio__quarkus
test-framework/junit5-internal/src/main/java/io/quarkus/test/QuarkusProdModeTest.java
{ "start": 34077, "end": 34219 }
class ____ that we need to be able to copy the BuildStep into a new deployment archive that // is then added to the build public static
is
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentilesAggregator.java
{ "start": 893, "end": 2276 }
class ____ extends AbstractTDigestPercentilesAggregator { TDigestPercentilesAggregator( String name, ValuesSourceConfig config, AggregationContext context, Aggregator parent, double[] percents, double compression, TDigestExecutionHint executionHint, b...
TDigestPercentilesAggregator
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/txn/JtaObtainConnectionExceptionTest.java
{ "start": 1544, "end": 1947 }
class ____ implements JdbcConnectionAccess { @Override public Connection obtainConnection() throws SQLException { throw new SQLException( "No connection" ); } @Override public void releaseConnection(Connection connection) throws SQLException { } @Override public boolean supportsAggressiveRelease()...
ObtainConnectionSqlExceptionConnectionAccess
java
spring-projects__spring-boot
module/spring-boot-webmvc/src/test/java/org/springframework/boot/webmvc/actuate/endpoint/web/ControllerEndpointHandlerMappingTests.java
{ "start": 2133, "end": 6506 }
class ____ { private final StaticApplicationContext context = new StaticApplicationContext(); @Test void mappingWithNoPrefix() throws Exception { ExposableControllerEndpoint firstEndpoint = firstEndpoint(); ExposableControllerEndpoint secondEndpoint = secondEndpoint(); ControllerEndpointHandlerMapping mappin...
ControllerEndpointHandlerMappingTests
java
spring-projects__spring-framework
spring-test/src/test/java/org/springframework/test/context/junit/jupiter/comics/Character.java
{ "start": 779, "end": 929 }
class ____ { private final String name; Character(String name) { this.name = name; } public String getName() { return this.name; } }
Character
java
quarkusio__quarkus
extensions/reactive-routes/deployment/src/main/java/io/quarkus/vertx/web/deployment/ReactiveRoutesProcessor.java
{ "start": 5412, "end": 76658 }
class ____ { private static final Logger LOGGER = Logger.getLogger(ReactiveRoutesProcessor.class.getName()); private static final String HANDLER_SUFFIX = "_RouteHandler"; private static final String VALUE_PATH = "path"; private static final String VALUE_REGEX = "regex"; private static final String...
ReactiveRoutesProcessor
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/generics/GenericToOneAssociationTest.java
{ "start": 4451, "end": 4690 }
class ____ extends AbstractParent<Child> { @Id private Long id; public Parent() { } public Parent(Long id) { this.id = id; } public Long getId() { return this.id; } } @MappedSuperclass public abstract static
Parent
java
apache__maven
compat/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/reflection/MethodMap.java
{ "start": 12448, "end": 14510 }
class ____ using a * method invocation conversion, without matching object and primitive * types. This method is used to determine the more specific type when * comparing signatures of methods. * * @param formal the formal parameter type to which the actual * parameter type s...
object
java
spring-projects__spring-security
web/src/main/java/org/springframework/security/web/authentication/ott/RedirectOneTimeTokenGenerationSuccessHandler.java
{ "start": 1216, "end": 1477 }
class ____ implements OneTimeTokenGenerationSuccessHandler { private final RedirectStrategy redirectStrategy = new DefaultRedirectStrategy(); private final String redirectUrl; /** * Constructs an instance of this
RedirectOneTimeTokenGenerationSuccessHandler
java
apache__kafka
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/OffsetSyncWriter.java
{ "start": 6468, "end": 8784 }
class ____ { long previousUpstreamOffset = -1L; long previousDownstreamOffset = -1L; long lastSyncDownstreamOffset = -1L; long maxOffsetLag; boolean shouldSyncOffsets; PartitionState(long maxOffsetLag) { this.maxOffsetLag = maxOffsetLag; } //...
PartitionState
java
grpc__grpc-java
services/src/main/java/io/grpc/protobuf/services/BinlogHelper.java
{ "start": 20981, "end": 21083 }
interface ____ { @Nullable BinlogHelper getLog(String fullMethodName); } static final
Factory
java
junit-team__junit5
jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/TestInstanceFactoryTests.java
{ "start": 26090, "end": 26317 }
class ____ extends AbstractTestInstanceFactory { @Override public ExtensionContextScope getTestInstantiationExtensionContextScope(ExtensionContext rootContext) { return TEST_METHOD; } } private static
FooInstanceFactory
java
lettuce-io__lettuce-core
src/main/java/io/lettuce/core/cluster/ClusterScanSupport.java
{ "start": 9697, "end": 10812 }
class ____ extends StreamScanCursor implements ClusterScanCursor { final List<String> nodeIds; final String currentNodeId; final StreamScanCursor cursor; public ClusterStreamScanCursor(List<String> nodeIds, String currentNodeId, StreamScanCursor cursor) { super(); ...
ClusterStreamScanCursor
java
micronaut-projects__micronaut-core
context/src/main/java/io/micronaut/runtime/graceful/GracefulShutdownCapable.java
{ "start": 1094, "end": 3906 }
interface ____ { /** * Trigger a graceful shutdown. The returned {@link CompletionStage} will complete when the * shutdown is complete. * <p> * Note that the completion of the returned future may be user-dependent. If a user does not * close their connection, the future may never terminate...
GracefulShutdownCapable
java
quarkusio__quarkus
extensions/scheduler/deployment/src/test/java/io/quarkus/scheduler/test/staticmethod/ScheduledStaticMethodTest.java
{ "start": 1372, "end": 1584 }
class ____ { static final CountDownLatch LATCH = new CountDownLatch(1); @Scheduled(every = "1s") static void everySecond() { LATCH.countDown(); } }
AbstractJobs
java
junit-team__junit5
junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/Constants.java
{ "start": 4261, "end": 4980 }
class ____ matches both an inclusion and exclusion pattern will be excluded. * * @see JupiterConfiguration#EXTENSIONS_AUTODETECTION_INCLUDE_PROPERTY_NAME */ public static final String EXTENSIONS_AUTODETECTION_INCLUDE_PROPERTY_NAME = JupiterConfiguration.EXTENSIONS_AUTODETECTION_INCLUDE_PROPERTY_NAME; /** * P...
that
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/impl/pb/client/MRClientProtocolPBClientImpl.java
{ "start": 7663, "end": 14543 }
class ____ implements MRClientProtocol, Closeable { protected MRClientProtocolPB proxy; public MRClientProtocolPBClientImpl() {}; public MRClientProtocolPBClientImpl(long clientVersion, InetSocketAddress addr, Configuration conf) throws IOException { RPC.setProtocolEngine(conf, MRClientProtoc...
MRClientProtocolPBClientImpl
java
alibaba__fastjson
src/test/java/com/alibaba/json/bvt/bug/Bug_for_xujin_int.java
{ "start": 582, "end": 2195 }
class ____<T extends Serializable> implements Serializable { private static final long serialVersionUID = 3682481175041925854L; private static final String DEFAULT_ERR_CODE = "xin.unknown.error"; private String errorMsg; private String errorCode; private int success; priv...
ResultDTO
java
resilience4j__resilience4j
resilience4j-spring-boot2/src/main/java/io/github/resilience4j/circuitbreaker/autoconfigure/CircuitBreakerProperties.java
{ "start": 906, "end": 988 }
class ____ extends CircuitBreakerConfigurationProperties { }
CircuitBreakerProperties
java
spring-projects__spring-framework
spring-context/src/test/java/org/springframework/jmx/export/NotificationListenerTests.java
{ "start": 1541, "end": 16828 }
class ____ extends AbstractMBeanServerTests { @SuppressWarnings({"rawtypes", "unchecked"}) @Test void testRegisterNotificationListenerForMBean() throws Exception { ObjectName objectName = ObjectName.getInstance("spring:name=Test"); JmxTestBean bean = new JmxTestBean(); Map<String, Object> beans = new HashMap...
NotificationListenerTests
java
apache__logging-log4j2
log4j-core/src/main/java/org/apache/logging/log4j/core/util/Closer.java
{ "start": 944, "end": 2143 }
class ____ { private Closer() { // empty } /** * Closes an AutoCloseable or ignores if {@code null}. * * @param closeable the resource to close; may be null * @return Whether the resource was closed. * @throws Exception if the resource cannot be closed * @since 2.8 ...
Closer
java
netty__netty
common/src/main/java/io/netty/util/ResourceLeakHint.java
{ "start": 765, "end": 935 }
interface ____ { /** * Returns a human-readable message that potentially enables easier resource leak tracking. */ String toHintString(); }
ResourceLeakHint
java
apache__flink
flink-core/src/test/java/org/apache/flink/api/common/typeutils/base/array/BytePrimitiveArrayComparatorTest.java
{ "start": 993, "end": 1658 }
class ____ extends PrimitiveArrayComparatorTestBase<byte[]> { public BytePrimitiveArrayComparatorTest() { super(PrimitiveArrayTypeInfo.BYTE_PRIMITIVE_ARRAY_TYPE_INFO); } @Override protected void deepEquals(String message, byte[] should, byte[] is) { assertThat(is).as(message).containsEx...
BytePrimitiveArrayComparatorTest
java
apache__kafka
server-common/src/main/java/org/apache/kafka/server/share/persister/DefaultStatePersister.java
{ "start": 1561, "end": 1851 }
interface ____ is used by the * group coordinator and share-partition leaders to manage the durable share-partition state. * This implementation uses inter-broker RPCs to make requests to the share coordinator * which is responsible for persisting the share-partition state. */ public
which
java
apache__camel
core/camel-core/src/test/java/org/apache/camel/processor/DefaultScheduledPollConsumerBridgeErrorHandlerTest.java
{ "start": 2813, "end": 3064 }
class ____ extends DefaultComponent { @Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) { return new MyEndpoint(uri, this); } } public static
MyComponent
java
spring-projects__spring-boot
module/spring-boot-http-converter/src/main/java/org/springframework/boot/http/converter/autoconfigure/DefaultClientHttpMessageConvertersCustomizer.java
{ "start": 1145, "end": 2719 }
class ____ implements ClientHttpMessageConvertersCustomizer { private final @Nullable HttpMessageConverters legacyConverters; private final Collection<HttpMessageConverter<?>> converters; DefaultClientHttpMessageConvertersCustomizer(@Nullable HttpMessageConverters legacyConverters, Collection<HttpMessageConver...
DefaultClientHttpMessageConvertersCustomizer
java
quarkusio__quarkus
integration-tests/vertx-http/src/main/java/io/quarkus/it/vertx/SimpleResource.java
{ "start": 185, "end": 486 }
class ____ { @GET @Path("/access-log-test-endpoint") public String accessLogTest() { return "passed"; } @OPTIONS @Path("/options") public Response optionsHandler() { return Response.ok("options").header("X-Custom-Header", "abc").build(); } }
SimpleResource
java
assertj__assertj-core
assertj-core/src/test/java/org/assertj/core/util/URLs_contentOf_Test.java
{ "start": 1242, "end": 2145 }
class ____ { private final URL sampleResourceURL = resourceURL("utf8.txt"); private final String expectedContent = "A text file encoded in UTF-8, with diacritics:\né à"; @Test void should_throw_exception_if_url_not_found() { File missingFile = new File("missing.txt"); assertThat(missingFile.exists())....
URLs_contentOf_Test
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/cache/CollectionCacheEvictionWithoutMappedByTest.java
{ "start": 4807, "end": 4901 }
class ____ { @Id @GeneratedValue private Integer id; protected Person() { } } }
Person
java
apache__dubbo
dubbo-plugin/dubbo-filter-validation/src/test/java/org/apache/dubbo/validation/filter/ValidationFilterTest.java
{ "start": 1471, "end": 2100 }
class ____ { private Invoker<?> invoker = mock(Invoker.class); private Validation validation = mock(Validation.class); private Validator validator = mock(Validator.class); private RpcInvocation invocation = mock(RpcInvocation.class); private ValidationFilter validationFilter; @BeforeEach p...
ValidationFilterTest
java
FasterXML__jackson-databind
src/main/java/tools/jackson/databind/ser/PropertyWriter.java
{ "start": 1556, "end": 5546 }
class ____ making that apply to all properties * unless overridden by per-property annotations. *<p> * This method is functionally equivalent to: *<pre> * MyAnnotation ann = propWriter.getAnnotation(MyAnnotation.class); * if (ann == null) { * ann = propWriter.getContextAnnotation...
and
java
google__guava
android/guava-tests/test/com/google/common/reflect/ClassPathTest.java
{ "start": 18279, "end": 23595 }
class ____ {} public void testNulls() throws IOException { new NullPointerTester().testAllPublicStaticMethods(ClassPath.class); new NullPointerTester() .testAllPublicInstanceMethods(ClassPath.from(getClass().getClassLoader())); } @AndroidIncompatible // ClassPath is documented as not supporting...
Nested
java
google__guava
android/guava-testlib/test/com/google/common/collect/testing/features/FeatureUtilTest.java
{ "start": 5369, "end": 5720 }
class ____ {} TesterRequirements requirements = buildTesterRequirements(Tester.class); assertThat(requirements.getPresentFeatures()).isEmpty(); assertThat(requirements.getAbsentFeatures()).isEmpty(); } public void testBuildTesterRequirements_class_present() throws Exception { @Require({IMPLIES_IM...
Tester
java
hibernate__hibernate-orm
local-build-plugins/src/main/java/org/hibernate/orm/properties/SettingDescriptorComparator.java
{ "start": 518, "end": 1622 }
class ____ implements Comparator<SettingDescriptor> { public static final SettingDescriptorComparator INSTANCE = new SettingDescriptorComparator(); public static final String JPA_PREFIX = "jakarta.persistence."; public static final String HIBERNATE_PREFIX = "hibernate."; public static final String LEGACY_JPA_PREFI...
SettingDescriptorComparator
java
apache__camel
core/camel-support/src/main/java/org/apache/camel/support/language/LanguageAnnotation.java
{ "start": 1188, "end": 1290 }
interface ____ { String language(); Class<?> factory() default Object.class; }
LanguageAnnotation
java
elastic__elasticsearch
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/metadata/TotalFeatureImportance.java
{ "start": 8301, "end": 11746 }
class ____ implements ToXContentObject, Writeable { private static final String NAME = "total_class_importance"; public static final ParseField CLASS_NAME = new ParseField("class_name"); public static final ParseField IMPORTANCE = new ParseField("importance"); // These parsers follow t...
ClassImportance
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/nestedfetch/NestedFetchTest.java
{ "start": 1521, "end": 3515 }
class ____ { @BeforeAll public void createTestData(SessionFactoryScope scope) { scope.inTransaction( (session) -> { final Product sprocket = new Product( 1, "Sprocket" ); final Product thingamajig = new Product( 2, "Thingamajig" ); session.persist( sprocket ); session.persist( thingamajig ); final C...
NestedFetchTest
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/StandardFunctionReturnTypeResolvers.java
{ "start": 1001, "end": 9507 }
class ____ { /** * Disallow instantiation */ private StandardFunctionReturnTypeResolvers() { } /** * A resolver that defines an invariant result type. E.g. `substring` always * returns a String. Note however that to account for attribute converters and * such, this resolver allows the context-implied e...
StandardFunctionReturnTypeResolvers
java
netty__netty
common/src/main/java/io/netty/util/DomainWildcardMappingBuilder.java
{ "start": 997, "end": 3937 }
class ____<V> { private final V defaultValue; private final Map<String, V> map; /** * Constructor with default initial capacity of the map holding the mappings * * @param defaultValue the default value for {@link Mapping#map(Object)} )} to return * when nothing matc...
DomainWildcardMappingBuilder
java
spring-projects__spring-framework
spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceBindingTests.java
{ "start": 2869, "end": 3759 }
class ____ { private AroundAdviceBindingCollaborator collaborator = null; public void setCollaborator(AroundAdviceBindingCollaborator aCollaborator) { this.collaborator = aCollaborator; } // "advice" methods public void oneIntArg(ProceedingJoinPoint pjp, int age) throws Throwable { this.collaborator.oneIntA...
AroundAdviceBindingTestAspect
java
netty__netty
example/src/main/java/io/netty/example/discard/DiscardServerHandler.java
{ "start": 821, "end": 1237 }
class ____ extends SimpleChannelInboundHandler<Object> { @Override public void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception { // discard } @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { // Close the connection when an exc...
DiscardServerHandler
java
apache__flink
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/typeutils/SortedMapSerializer.java
{ "start": 1649, "end": 4240 }
class ____<K, V> extends AbstractMapSerializer<K, V, SortedMap<K, V>> { private static final long serialVersionUID = 1L; /** The comparator for the keys in the map. */ private final Comparator<K> comparator; /** * Constructor with given comparator, and the serializers for the keys and values in ...
SortedMapSerializer
java
quarkusio__quarkus
extensions/infinispan-cache/runtime/src/main/java/io/quarkus/cache/infinispan/runtime/InfinispanCacheBuildRecorder.java
{ "start": 484, "end": 3057 }
class ____ { private static final Logger LOGGER = Logger.getLogger(InfinispanCacheBuildRecorder.class); private final InfinispanCachesBuildTimeConfig buildConfig; private final RuntimeValue<InfinispanCachesConfig> infinispanCacheConfigRV; public InfinispanCacheBuildRecorder(InfinispanCachesBuildTimeC...
InfinispanCacheBuildRecorder
java
apache__flink
flink-connectors/flink-hadoop-compatibility/src/test/java/org/apache/flink/test/hadoopcompatibility/mapred/HadoopIOFormatsITCase.java
{ "start": 3057, "end": 7120 }
class ____ extends JavaProgramTestBase { private static final int NUM_PROGRAMS = 2; @Parameter private int curProgId; private String[] resultPath; private String[] expectedResult; private String sequenceFileInPath; private String sequenceFileInPathNull; @BeforeEach void checkOperating...
HadoopIOFormatsITCase
java
quarkusio__quarkus
extensions/oidc-db-token-state-manager/deployment/src/test/java/io/quarkus/oidc/db/token/state/manager/OidcDbTokenStateManagerEntity.java
{ "start": 245, "end": 745 }
class ____ { @Id String id; @Column(name = "id_token", length = 4000) String idToken; @Column(name = "refresh_token", length = 4000) String refreshToken; @Column(name = "access_token", length = 4000) String accessToken; @Column(name = "access_token_expires_in") Long accessTo...
OidcDbTokenStateManagerEntity
java
apache__camel
core/camel-management/src/test/java/org/apache/camel/management/BigRouteTest.java
{ "start": 1139, "end": 1921 }
class ____ extends ContextTestSupport { @Override protected boolean useJmx() { return true; } @Test public void testBigRoute() throws Exception { for (int i = 0; i < 1000; i++) { getMockEndpoint("mock:" + i).expectedMessageCount(1); } template.sendBody(...
BigRouteTest
java
spring-projects__spring-boot
core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnExpressionCondition.java
{ "start": 1488, "end": 3340 }
class ____ extends SpringBootCondition { @Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { Map<String, @Nullable Object> attributes = metadata .getAnnotationAttributes(ConditionalOnExpression.class.getName()); Assert.state(attributes != null, "'attri...
OnExpressionCondition
java
elastic__elasticsearch
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/InferenceConfigItemTestCase.java
{ "start": 2716, "end": 5852 }
class ____<T extends VersionedNamedWriteable & ToXContent> extends AbstractBWCSerializationTestCase< T> { static InferenceConfig mutateForVersion(NlpConfig inferenceConfig, TransportVersion version) { if (inferenceConfig instanceof TextClassificationConfig textClassificationConfig) { return...
InferenceConfigItemTestCase
java
apache__maven
impl/maven-testing/src/test/java/org/apache/maven/api/plugin/testing/ExpressionEvaluatorTest.java
{ "start": 9055, "end": 10118 }
class ____ implements org.apache.maven.api.plugin.Mojo { private Path basedir; private Path workdir; private String param; private String param2; private List<String> strings; private String[] stringArray; private Map<String, String> mapParam; priva...
ExpressionEvaluatorMojo
java
google__error-prone
core/src/main/java/com/google/errorprone/bugpatterns/DoNotCallChecker.java
{ "start": 12613, "end": 13011 }
class ____ by this TypeToken using getRawType") .put( /* * A call to super.run() from a direct subclass of Thread is a no-op. That could be * worth telling the user about, but it's not as big a deal as "You meant to call * start()," so we ignore it he...
described
java
apache__camel
components/camel-master/src/test/java/org/apache/camel/component/file/cluster/FileLockClusterServiceBasicFailoverTest.java
{ "start": 1655, "end": 10561 }
class ____ extends FileLockClusterServiceTestBase { @Test void singleClusterMemberLeaderElection() throws Exception { try (CamelContext clusterLeader = createCamelContext()) { MockEndpoint mockEndpoint = clusterLeader.getEndpoint("mock:result", MockEndpoint.class); mockEndpoint.e...
FileLockClusterServiceBasicFailoverTest
java
junit-team__junit5
documentation/src/test/java/example/TestTemplateDemo.java
{ "start": 939, "end": 1291 }
class ____ { // tag::user_guide[] final List<String> fruits = Arrays.asList("apple", "banana", "lemon"); @TestTemplate @ExtendWith(MyTestTemplateInvocationContextProvider.class) void testTemplate(String fruit) { assertTrue(fruits.contains(fruit)); } // end::user_guide[] static // @formatter:off // tag::u...
TestTemplateDemo
java
apache__hadoop
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/impl/ITestS3APutIfMatchAndIfNoneMatch.java
{ "start": 3720, "end": 27931 }
class ____ extends AbstractS3ATestBase { private static final int UPDATED_MULTIPART_THRESHOLD = 100 * _1KB; private static final byte[] SMALL_FILE_BYTES = dataset(TEST_FILE_LEN, 0, 255); private static final byte[] MULTIPART_FILE_BYTES = dataset(UPDATED_MULTIPART_THRESHOLD * 5, 'a', 'z' - 'a'); public static...
ITestS3APutIfMatchAndIfNoneMatch
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/engine/creation/internal/SessionBuilderImpl.java
{ "start": 901, "end": 6278 }
class ____ extends AbstractCommonBuilder<SessionBuilderImplementor> implements SessionBuilderImplementor, SessionCreationOptions { private boolean autoJoinTransactions = true; private boolean autoClose; private boolean autoClear; private boolean identifierRollback; private FlushMode flushMode; private int de...
SessionBuilderImpl
java
apache__camel
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/config/FluentProducerTemplateAutoRegisterTest.java
{ "start": 1240, "end": 1797 }
class ____ extends SpringRunWithTestSupport { @Autowired private FluentProducerTemplate template; @Autowired private CamelContext context; @Test public void testHasFluentTemplate() { assertNotNull(template, "Should have injected a fluent producer template"); FluentProducerTem...
FluentProducerTemplateAutoRegisterTest
java
elastic__elasticsearch
x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/accesscontrol/wrapper/DlsFlsFeatureTrackingIndicesAccessControlWrapper.java
{ "start": 909, "end": 2021 }
class ____ { private final XPackLicenseState licenseState; private final boolean isDlsFlsEnabled; public DlsFlsFeatureTrackingIndicesAccessControlWrapper(Settings settings, XPackLicenseState licenseState) { this.licenseState = licenseState; this.isDlsFlsEnabled = XPackSettings.DLS_FLS_ENAB...
DlsFlsFeatureTrackingIndicesAccessControlWrapper
java
quarkusio__quarkus
extensions/resteasy-reactive/rest-client/deployment/src/test/java/io/quarkus/rest/client/reactive/headers/OptionalHeaderTest.java
{ "start": 2027, "end": 2213 }
interface ____ { @GET String send(@RestHeader Optional<String> header2, @RestHeader Optional<Integer> header3); } @Path("resource") public static
OtherSubClient
java
alibaba__fastjson
src/test/java/com/alibaba/json/bvt/annotation/JsonSeeAlsoTest.java
{ "start": 2009, "end": 2136 }
class ____ extends Dog { public String tidySpecific; } @JSONType(typeName = "labrador") public static
Tidy
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/dialect/function/CaseLeastGreatestEmulation.java
{ "start": 1054, "end": 2637 }
class ____ extends AbstractSqmSelfRenderingFunctionDescriptor { private final String operator; public CaseLeastGreatestEmulation(boolean least) { super( least ? "least" : "greatest", new ArgumentTypesValidator( StandardArgumentsValidators.min( 2 ), COMPARABLE, COMPARABLE ), StandardFunctionReturnTyp...
CaseLeastGreatestEmulation
java
apache__hadoop
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestLocalFsFCStatistics.java
{ "start": 1154, "end": 2066 }
class ____ extends FCStatisticsBaseTest { static final String LOCAL_FS_ROOT_URI = "file:///tmp/test"; @BeforeEach public void setUp() throws Exception { fc = FileContext.getLocalFSFileContext(); fc.mkdir(fileContextTestHelper.getTestRootPath(fc, "test"), FileContext.DEFAULT_PERM, true); } @After...
TestLocalFsFCStatistics
java
spring-projects__spring-framework
spring-test/src/main/java/org/springframework/test/context/event/EventPublishingTestExecutionListener.java
{ "start": 5654, "end": 8166 }
class ____ extends AbstractTestExecutionListener { /** * The {@link #getOrder() order} value for this listener: {@value}. * @since 6.2.3 */ public static final int ORDER = 10_000; /** * Returns {@value #ORDER}, which ensures that the {@code EventPublishingTestExecutionListener} * is ordered after the *...
EventPublishingTestExecutionListener
java
apache__flink
flink-core/src/test/java/org/apache/flink/configuration/FilesystemSchemeConfigTest.java
{ "start": 1373, "end": 3601 }
class ____ { @TempDir private File tempFolder; @AfterEach void clearFsSettings() { FileSystem.initialize(new Configuration()); } // ------------------------------------------------------------------------ @Test void testDefaultsToLocal() throws Exception { URI justPath = ...
FilesystemSchemeConfigTest
java
apache__hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryPolicies.java
{ "start": 22298, "end": 28110 }
class ____ implements RetryPolicy { private RetryPolicy fallbackPolicy; private int maxFailovers; private int maxRetries; private long delayMillis; private long maxDelayBase; public FailoverOnNetworkExceptionRetry(RetryPolicy fallbackPolicy, int maxFailovers) { this(fallb...
FailoverOnNetworkExceptionRetry
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/action/support/replication/TransportReplicationAction.java
{ "start": 4228, "end": 4717 }
class ____ requests that should be executed on a primary copy followed by replica copies. * Subclasses can resolve the target shard and provide implementation for primary and replica operations. * <p> * The action samples cluster state on the receiving node to reroute to node with primary copy and on the * primary ...
for
java
apache__camel
components/camel-ai/camel-weaviate/src/main/java/org/apache/camel/component/weaviate/WeaviateVectorDbProducer.java
{ "start": 1758, "end": 11656 }
class ____ extends DefaultProducer { private WeaviateClient client; private ExecutorService executor; public WeaviateVectorDbProducer(WeaviateVectorDbEndpoint endpoint) { super(endpoint); } @Override public WeaviateVectorDbEndpoint getEndpoint() { return (WeaviateVectorDbEndpoi...
WeaviateVectorDbProducer
java
apache__rocketmq
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/QueryConsumeTimeSpanBody.java
{ "start": 982, "end": 1350 }
class ____ extends RemotingSerializable { List<QueueTimeSpan> consumeTimeSpanSet = new ArrayList<>(); public List<QueueTimeSpan> getConsumeTimeSpanSet() { return consumeTimeSpanSet; } public void setConsumeTimeSpanSet(List<QueueTimeSpan> consumeTimeSpanSet) { this.consumeTimeSpanSet = ...
QueryConsumeTimeSpanBody
java
elastic__elasticsearch
x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/connector/secrets/action/RestDeleteConnectorSecretAction.java
{ "start": 711, "end": 1404 }
class ____ extends BaseRestHandler { @Override public String getName() { return "connector_delete_secret"; } @Override public List<Route> routes() { return List.of(new Route(RestRequest.Method.DELETE, "/_connector/_secret/{id}")); } @Override protected RestChannelConsu...
RestDeleteConnectorSecretAction
java
spring-projects__spring-framework
spring-test/src/test/java/org/springframework/test/web/servlet/result/PrintingResultHandlerTests.java
{ "start": 12212, "end": 12844 }
class ____ implements ResultValuePrinter { private String printedHeading; private final Map<String, Map<String, Object>> printedValues = new HashMap<>(); @Override public void printHeading(String heading) { this.printedHeading = heading; this.printedValues.put(heading, new HashMap<>()); } ...
TestResultValuePrinter
java
spring-projects__spring-framework
spring-core-test/src/test/java/org/springframework/core/test/tools/SourceFileAssertTests.java
{ "start": 1053, "end": 2021 }
class ____ implements Runnable { void run() { run("Hello World!"); } void run(String message) { System.out.println(message); } public static void main(String[] args) { new Sample().run(); } } """; private final SourceFile sourceFile = SourceFile.of(SAMPLE); @Test voi...
Sample
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ql/TreatKeywordTest.java
{ "start": 14749, "end": 14961 }
class ____ extends Animal { private boolean fast; protected Dog(boolean fast) { this.fast = fast; } public final boolean isFast() { return fast; } } @Entity(name = "Dachshund") public static
Dog
java
elastic__elasticsearch
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/type/EsqlDataTypeRegistry.java
{ "start": 418, "end": 1121 }
class ____ { public static final EsqlDataTypeRegistry INSTANCE = new EsqlDataTypeRegistry(); private EsqlDataTypeRegistry() {} public DataType fromEs(String typeName, TimeSeriesParams.MetricType metricType) { DataType type = DataType.fromEs(typeName); /* * If we're handling a tim...
EsqlDataTypeRegistry
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/inotify/Event.java
{ "start": 15220, "end": 15326 }
class ____ extends Event { private String path; private long timestamp; public static
UnlinkEvent
java
spring-projects__spring-framework
spring-core/src/test/java/org/springframework/util/ResourceUtilsTests.java
{ "start": 4459, "end": 4514 }
class ____ parsing "rmi:..." URLs. */ private static
for
java
apache__avro
lang/java/mapred/src/main/java/org/apache/avro/hadoop/file/SortedKeyValueFile.java
{ "start": 10568, "end": 11489 }
class ____ does // not // mandate the implementation of Comparable, we need to specify a special // CharSequence comparator if the key type is a string. This hack only fixes the // problem for primitive string types. If, for example, you tried to use a // record ...
that
java
google__guice
core/test/com/google/inject/ProvisionListenerTest.java
{ "start": 28475, "end": 28553 }
class ____ implements B { @Inject void inject(C c) {} } private
BImpl
java
apache__flink
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/sql/SqlJsonQueryFunctionWrapper.java
{ "start": 1851, "end": 5590 }
class ____ extends SqlJsonQueryFunction { private final SqlReturnTypeInference returnTypeInference; SqlJsonQueryFunctionWrapper() { this.returnTypeInference = ReturnTypes.cascade( SqlJsonQueryFunctionWrapper::explicitTypeSpec, ...
SqlJsonQueryFunctionWrapper
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/OpenFilesIterator.java
{ "start": 1444, "end": 1692 }
class ____ extends BatchedRemoteIterator<Long, OpenFileEntry> { /** No path to be filtered by default. */ public static final String FILTER_PATH_DEFAULT = "/"; /** * Open file types to filter the results. */ public
OpenFilesIterator
java
google__guava
android/guava-tests/test/com/google/common/primitives/FloatArrayAsListTest.java
{ "start": 5595, "end": 5729 }
class ____ extends SampleElements<Float> { public SampleFloats() { super(0.0f, 1.0f, 2.0f, 3.0f, 4.0f); } } }
SampleFloats
java
apache__maven
its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0496IgnoreUnknownPluginParametersTest.java
{ "start": 1034, "end": 1859 }
class ____ extends AbstractMavenIntegrationTestCase { /** * Test that unused configuration parameters from the POM don't cause the * mojo to fail...they will show up as warnings in the -X output instead. * * @throws Exception in case of failure */ @Test public void testitMNG496() t...
MavenITmng0496IgnoreUnknownPluginParametersTest
java
spring-projects__spring-framework
spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractJCacheOperation.java
{ "start": 6377, "end": 7040 }
class ____ implements CacheInvocationParameter { private final CacheParameterDetail detail; private final @Nullable Object value; public CacheInvocationParameterImpl(CacheParameterDetail detail, @Nullable Object value) { this.detail = detail; this.value = value; } @Override public Class<?> getRawT...
CacheInvocationParameterImpl
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/cache/LazyInCacheTest.java
{ "start": 2792, "end": 2953 }
class ____ { @Id @GeneratedValue( strategy = GenerationType.AUTO ) Long id; String name; } @Entity(name = "Tag") @Table( name = "TAG" ) static
Product
java
redisson__redisson
redisson/src/main/java/org/redisson/client/protocol/decoder/TimeLongObjectDecoder.java
{ "start": 812, "end": 1367 }
class ____ implements MultiDecoder<Long> { private final TimeUnit timeUnit; public TimeLongObjectDecoder() { this(null); } public TimeLongObjectDecoder(TimeUnit timeUnit) { this.timeUnit = timeUnit; } @Override public Long decode(List<Object> parts, State state) { ...
TimeLongObjectDecoder
java
google__error-prone
core/src/main/java/com/google/errorprone/bugpatterns/IdentityHashMapUsage.java
{ "start": 2031, "end": 4723 }
class ____ extends BugChecker implements MethodInvocationTreeMatcher, AssignmentTreeMatcher, VariableTreeMatcher, NewClassTreeMatcher { private static final String IDENTITY_HASH_MAP = "java.util.IdentityHashMap"; private static final Matcher<ExpressionTree> IHM_ONE_ARG_METHODS = i...
IdentityHashMapUsage
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/DuplicateDateFormatFieldTest.java
{ "start": 4936, "end": 5366 }
class ____ { // BUG: Diagnostic contains: uses the field 'm' more than once SimpleDateFormat format = new SimpleDateFormat("hh:mm[:ss[.SSS]] yyyy/mm/dd"); } """) .doTest(); } @Test public void noDupliatedFields() { compilationHelper .addSour...
Test
java
apache__camel
components/camel-asterisk/src/generated/java/org/apache/camel/component/asterisk/AsteriskEndpointConfigurer.java
{ "start": 735, "end": 4062 }
class ____ extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter { @Override public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { AsteriskEndpoint target = (AsteriskEndpoint) obj; switch (ig...
AsteriskEndpointConfigurer
java
mockito__mockito
mockito-core/src/test/java/org/mockitousage/bugs/CompareMatcherTest.java
{ "start": 3171, "end": 3556 }
class ____ extends GenericMatcher<Integer> { @Override public boolean matches(Integer argument) { return false; } } when(mock.forObject(argThat(new TestMatcher()))).thenReturn("x"); assertThat(mock.forObject(123)).isNull(); } @Test ...
TestMatcher
java
apache__camel
components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/config/ConsumerTemplateAutoRegisterTest.java
{ "start": 1295, "end": 1916 }
class ____ extends SpringRunWithTestSupport { @Autowired private ConsumerTemplate template; @Autowired private CamelContext context; @Test public void testHasTemplate() { assertNotNull(template, "Should have injected a consumer template"); assertNotNull(((DefaultConsumerTempla...
ConsumerTemplateAutoRegisterTest
java
google__guava
android/guava/src/com/google/common/collect/ConsumingQueueIterator.java
{ "start": 939, "end": 990 }
class ____ not thread safe. */ @GwtCompatible final
is
java
apache__flink
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/physical/stream/DuplicateChangesInferRule.java
{ "start": 10342, "end": 10870 }
interface ____ extends RelRule.Config { Config DEFAULT = ImmutableDuplicateChangesInferRule.Config.builder() .build() .withOperandSupplier(b0 -> b0.operand(StreamPhysicalRel.class).anyInputs()) .withDescription("DuplicateCh...
Config
java
apache__hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/placement/PlacementRule.java
{ "start": 1760, "end": 4176 }
class ____. */ public String getName() { return this.getClass().getName(); } /** * Initialize the rule with the scheduler. * @param scheduler the scheduler using the rule * @return <code>true</code> or <code>false</code> The outcome of the * initialisation, rule dependent response which might ...
name
java
alibaba__druid
core/src/main/java/com/alibaba/druid/sql/dialect/mysql/parser/MySqlSelectParser.java
{ "start": 4043, "end": 31920 }
class ____ implements Lexer.CommentHandler { private MySqlSelectQueryBlock queryBlock; private Lexer lexer; QueryHintHandler(MySqlSelectQueryBlock queryBlock, Lexer lexer) { this.queryBlock = queryBlock; this.lexer = lexer; } ...
QueryHintHandler
java
google__guice
core/test/com/google/inject/example/ClientServiceWithDependencyInjection.java
{ "start": 860, "end": 1013 }
class ____ implements ClientServiceWithDependencyInjection.Service { @Override public void go() { // ... } } public static
ServiceImpl
java
spring-projects__spring-boot
core/spring-boot/src/test/java/org/springframework/boot/context/properties/scan/valid/b/BScanConfiguration.java
{ "start": 873, "end": 954 }
interface ____ { } @ConfigurationProperties("b.first") public static
BProperties
java
quarkusio__quarkus
independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/defaultbean/DefaultProducerMethodTest.java
{ "start": 1794, "end": 2022 }
class ____ { private final String message; GreetingBean(String message) { this.message = message; } String greet() { return message; } } static
GreetingBean
java
grpc__grpc-java
api/src/test/java/io/grpc/ClientStreamTracerTest.java
{ "start": 987, "end": 2076 }
class ____ { private final CallOptions callOptions = CallOptions.DEFAULT.withDeadlineAfter(1, MINUTES); @Test public void streamInfo_empty() { StreamInfo info = StreamInfo.newBuilder().build(); assertThat(info.getCallOptions()).isSameInstanceAs(CallOptions.DEFAULT); } @Test public void streamInfo_...
ClientStreamTracerTest
java
redisson__redisson
redisson/src/main/java/org/redisson/connection/NodeSource.java
{ "start": 827, "end": 3089 }
enum ____ {MOVED, ASK} private Integer slot; private RedisURI addr; private RedisClient redisClient; private Redirect redirect; private MasterSlaveEntry entry; public NodeSource(NodeSource nodeSource, RedisClient redisClient) { this.slot = nodeSource.slot; this.addr = nodeSourc...
Redirect
java
quarkusio__quarkus
integration-tests/smallrye-jwt-oidc-webapp/src/test/java/io/quarkus/it/keycloak/SmallRyeJwtOidcWebAppTest.java
{ "start": 615, "end": 3254 }
class ____ { final KeycloakTestClient client = new KeycloakTestClient(); @Test public void testGetUserNameWithBearerToken() { RestAssured.given().auth().oauth2(client.getAccessToken("alice")) .when().get("/protected") .then() .statusCode(200) ...
SmallRyeJwtOidcWebAppTest
java
quarkusio__quarkus
extensions/smallrye-metrics/runtime/src/main/java/io/quarkus/smallrye/metrics/runtime/SmallRyeMetricsFactory.java
{ "start": 679, "end": 1015 }
class ____ implements MetricsFactory { public boolean metricsSystemSupported(String name) { return MetricsFactory.MP_METRICS.equals(name); } @Override public MetricBuilder builder(String name, MetricsFactory.Type type) { return new SmallRyeMetricBuilder(name, type); } static
SmallRyeMetricsFactory
java
spring-projects__spring-framework
spring-core/src/main/java/org/springframework/core/codec/AbstractSingleValueEncoder.java
{ "start": 1093, "end": 1294 }
class ____ {@link org.springframework.core.codec.Encoder} * classes that can only deal with a single value. * * @author Arjen Poutsma * @since 5.0 * @param <T> the element type */ public abstract
for