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
spring-projects__spring-framework
spring-context/src/main/java/org/springframework/context/annotation/ConditionEvaluator.java
{ "start": 2470, "end": 5440 }
class ____ be {@link ConfigurationPhase#PARSE_CONFIGURATION}) * @param metadata the meta data * @return if the item should be skipped */ public boolean shouldSkip(AnnotatedTypeMetadata metadata) { return shouldSkip(metadata, null); } /** * Determine if an item should be skipped based on {@code @Conditiona...
will
java
apache__hadoop
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/constants/AbfsHttpConstants.java
{ "start": 7889, "end": 8078 }
enum ____ in ascending chronological order. * Latest one should be added last in the list. * When upgrading the version for whole driver, update the getCurrentVersion; */ public
list
java
ReactiveX__RxJava
src/main/java/io/reactivex/rxjava3/internal/jdk8/FlowableStageSubscriber.java
{ "start": 1029, "end": 1205 }
class ____ extends CompletableFuture and provides basic infrastructure * to notify watchers upon upstream signals. * @param <T> the element type * @since 3.0.0 */ abstract
that
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogOp.java
{ "start": 100637, "end": 102188 }
class ____ extends FSEditLogOp { DelegationTokenIdentifier token; CancelDelegationTokenOp() { super(OP_CANCEL_DELEGATION_TOKEN); } static CancelDelegationTokenOp getInstance(OpInstanceCache cache) { return cache.get(OP_CANCEL_DELEGATION_TOKEN); } @Override void resetSubFields(...
CancelDelegationTokenOp
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/async/TestRouterAsyncRPCMultipleDestinationMountTableResolver.java
{ "start": 2935, "end": 8808 }
class ____ extends TestRouterRPCMultipleDestinationMountTableResolver { public static final Logger LOG = LoggerFactory.getLogger(TestRouterAsyncRPCMultipleDestinationMountTableResolver.class); @BeforeAll public static void setUp() throws Exception { // Build and start a federated cluster. clu...
TestRouterAsyncRPCMultipleDestinationMountTableResolver
java
apache__logging-log4j2
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
{ "start": 13327, "end": 17145 }
class ____<B extends Builder<B>> extends AbstractFilterable.Builder<B> implements org.apache.logging.log4j.core.util.Builder<AsyncAppender> { @PluginElement("AppenderRef") @Required(message = "No appender references provided to AsyncAppender") private AppenderRef[] appenderRefs; ...
Builder
java
apache__kafka
server/src/main/java/org/apache/kafka/network/SocketServerConfigs.java
{ "start": 1883, "end": 5628 }
class ____ { public static final String LISTENER_SECURITY_PROTOCOL_MAP_CONFIG = "listener.security.protocol.map"; public static final String LISTENER_SECURITY_PROTOCOL_MAP_DEFAULT = Arrays.stream(SecurityProtocol.values()) .collect(Collectors.toMap(ListenerName::forSecurityProtocol, sp -> sp)) ...
SocketServerConfigs
java
alibaba__fastjson
src/test/java/com/alibaba/json/bvt/bug/Bug_for_maiksagill.java
{ "start": 224, "end": 609 }
class ____ extends TestCase { public void test_for_maiksagill() throws Exception { String resource = "json/maiksagill.json"; InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource); String text = IOUtils.toString(is); JSON.parseObject(t...
Bug_for_maiksagill
java
quarkusio__quarkus
integration-tests/micrometer-opentelemetry/src/main/java/io/quarkus/micrometer/opentelemetry/services/TraceData.java
{ "start": 62, "end": 109 }
class ____ { public String message; }
TraceData
java
apache__camel
components/camel-nitrite/src/main/java/org/apache/camel/component/nitrite/operation/common/ImportDatabaseOperation.java
{ "start": 1258, "end": 1697 }
class ____ extends AbstractNitriteOperation implements CommonOperation { public ImportDatabaseOperation() { } @Override protected void execute(Exchange exchange, NitriteEndpoint endpoint) throws Exception { InputStream stream = new ByteArrayInputStream(exchange.getMessage().getBody(byte[].class...
ImportDatabaseOperation
java
spring-projects__spring-framework
spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java
{ "start": 3641, "end": 4880 }
class ____ implements CachingConfigurer { @Autowired CachingProvider cachingProvider; @Override @Bean public org.springframework.cache.CacheManager cacheManager() { JCacheCacheManager cm = new JCacheCacheManager(jCacheManager()); cm.setTransactionAware(true); return cm; } @Bean public CacheM...
EnableCachingConfig
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/hash/InMemoryPartition.java
{ "start": 10888, "end": 12795 }
class ____ extends AbstractPagedOutputView { private final ArrayList<MemorySegment> pages; private final MemorySegmentSource memSource; private final int sizeBits; private final int sizeMask; private int currentPageNumber; private int segmentNumberOffset; p...
WriteView
java
apache__camel
components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowProducerThrowExceptionErrorTest.java
{ "start": 1222, "end": 3059 }
class ____ extends BaseUndertowTest { @Test public void testUndertowProducerOk() { String out = fluentTemplate.withHeader("id", "123").to("direct:start").request(String.class); assertEquals("123;Donald Duck", out); } @Test public void testUndertowProducerFail() { Exchange o...
RestUndertowProducerThrowExceptionErrorTest
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/boot/model/source/spi/PluralAttributeElementSourceManyToAny.java
{ "start": 332, "end": 441 }
interface ____ extends PluralAttributeElementSource, AnyMappingSource { }
PluralAttributeElementSourceManyToAny
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/ingest/AbstractProcessor.java
{ "start": 754, "end": 2883 }
class ____ implements Processor { protected final String tag; protected final String description; protected AbstractProcessor(String tag, String description) { this.tag = tag; this.description = description; } @Override public String getTag() { return tag; } @O...
AbstractProcessor
java
apache__camel
components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/integration/FtpRecursiveDepthIT.java
{ "start": 1040, "end": 2802 }
class ____ extends FtpServerTestSupport { protected String getFtpUrl() { return "ftp://admin@localhost:{{ftp.server.port}}/depth?password=admin&recursive=true"; } @Test public void testDepth() throws Exception { MockEndpoint mock = getMockEndpoint("mock:result"); mock.expectedB...
FtpRecursiveDepthIT
java
hibernate__hibernate-orm
hibernate-scan-jandex/src/main/java/org/hibernate/archive/scan/internal/StandardScannerFactory.java
{ "start": 323, "end": 601 }
class ____ implements ScannerFactory { @Override public Scanner getScanner(ArchiveDescriptorFactory archiveDescriptorFactory) { return archiveDescriptorFactory == null ? new StandardScanner() : new StandardScanner( archiveDescriptorFactory ); } }
StandardScannerFactory
java
alibaba__fastjson
src/test/java/com/alibaba/json/test/benchmark/encode/ListBoolean1000Encode.java
{ "start": 179, "end": 638 }
class ____ extends BenchmarkCase { private Object object; public ListBoolean1000Encode(){ super("BooleanArray1000Encode"); boolean[] array = new boolean[1000]; for (int i = 0; i < array.length; ++i) { array[i] = (i % 2 == 0); } this.object = Arrays.asList(a...
ListBoolean1000Encode
java
spring-projects__spring-security
web/src/test/java/org/springframework/security/web/authentication/SavedRequestAwareAuthenticationSuccessHandlerTests.java
{ "start": 1307, "end": 2796 }
class ____ { @Test public void defaultUrlMuststartWithSlashOrHttpScheme() { SavedRequestAwareAuthenticationSuccessHandler handler = new SavedRequestAwareAuthenticationSuccessHandler(); handler.setDefaultTargetUrl("/acceptableRelativeUrl"); handler.setDefaultTargetUrl("https://some.site.org/index.html"); hand...
SavedRequestAwareAuthenticationSuccessHandlerTests
java
elastic__elasticsearch
x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/CrossClusterApiKeySignatureManagerTests.java
{ "start": 969, "end": 14949 }
class ____ extends ESTestCase { private ThreadPool threadPool; private Settings.Builder settingsBuilder; @Override public void setUp() throws Exception { super.setUp(); threadPool = new TestThreadPool(getTestName()); settingsBuilder = Settings.builder() .put("path.ho...
CrossClusterApiKeySignatureManagerTests
java
apache__rocketmq
proxy/src/main/java/org/apache/rocketmq/proxy/grpc/pipeline/AuthorizationPipeline.java
{ "start": 1675, "end": 2999 }
class ____ implements RequestPipeline { private static final Logger LOGGER = LoggerFactory.getLogger(LoggerName.PROXY_LOGGER_NAME); private final AuthConfig authConfig; private final AuthorizationEvaluator authorizationEvaluator; public AuthorizationPipeline(AuthConfig authConfig, MessagingProcessor me...
AuthorizationPipeline
java
spring-cloud__spring-cloud-gateway
spring-cloud-gateway-server-webflux/src/main/java/org/springframework/cloud/gateway/filter/factory/cache/CachedResponse.java
{ "start": 3437, "end": 4544 }
class ____ { private final HttpStatusCode statusCode; private final HttpHeaders headers = new HttpHeaders(); private final List<ByteBuffer> body = new ArrayList<>(); private @Nullable Instant timestamp; public Builder(HttpStatusCode statusCode) { this.statusCode = statusCode; } public Builder hea...
Builder
java
spring-projects__spring-framework
spring-context/src/main/java/org/springframework/context/annotation/DeferredImportSelector.java
{ "start": 1955, "end": 2069 }
interface ____ { /** * Process the {@link AnnotationMetadata} of the importing @{@link Configuration} *
Group
java
elastic__elasticsearch
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/MachineLearningField.java
{ "start": 794, "end": 3241 }
class ____ { public static final Setting<Boolean> AUTODETECT_PROCESS = Setting.boolSetting( "xpack.ml.autodetect_process", true, Setting.Property.NodeScope ); public static final Setting<ByteSizeValue> MAX_MODEL_MEMORY_LIMIT = Setting.memorySizeSetting( "xpack.ml.max_model_m...
MachineLearningField
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/CriteriaBulkUpdateQuotedInheritanceTest.java
{ "start": 3609, "end": 3857 }
class ____ { @Id private Long id; @Column private String name; public UserEntity() { } public UserEntity(Long id, String name) { this.id = id; this.name = name; } } @Entity( name = "PatientEntity" ) public static
UserEntity
java
quarkusio__quarkus
extensions/opentelemetry/deployment/src/test/java/io/quarkus/opentelemetry/deployment/OpenTelemetrySuppressNonAppUriManagementInterfaceTest.java
{ "start": 680, "end": 2869 }
class ____ { @RegisterExtension final static QuarkusDevModeTest TEST = new QuarkusDevModeTest() .withApplicationRoot((jar) -> jar .addClasses(HelloResource.class, TestSpanExporter.class, TestSpanExporterProvider.class) .addAsResource(new StringAsset(TestSpanE...
OpenTelemetrySuppressNonAppUriManagementInterfaceTest
java
elastic__elasticsearch
x-pack/plugin/core/src/main/java/org/elasticsearch/license/ExpirationCallback.java
{ "start": 862, "end": 1559 }
class ____ extends ExpirationCallback { /** * Callback schedule prior to license expiry * * @param min latest relative time to execute before license expiry * @param max earliest relative time to execute before license expiry * @param frequency interval ...
Pre
java
apache__camel
core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorIncludeRelativeRouteTest.java
{ "start": 1037, "end": 2526 }
class ____ extends ValidatorIncludeRouteTest { @Override @Test public void testValidMessage() throws Exception { validEndpoint.expectedMessageCount(1); finallyEndpoint.expectedMessageCount(1); String body = "<p:person user=\"james\" xmlns:p=\"org.person\" xmlns:h=\"...
ValidatorIncludeRelativeRouteTest
java
apache__camel
dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CaffeineLoadCacheEndpointBuilderFactory.java
{ "start": 1469, "end": 1615 }
interface ____ { /** * Builder for endpoint for the Caffeine LoadCache component. */ public
CaffeineLoadCacheEndpointBuilderFactory
java
apache__flink
flink-tests/src/test/java/org/apache/flink/connector/upserttest/sink/ImmutableByteArrayWrapperTest.java
{ "start": 1178, "end": 1973 }
class ____ { @Test void testConstructorCopy() { byte[] array = "immutability of constructor".getBytes(); byte[] clonedArray = new ImmutableByteArrayWrapper(array).bytes; assertCopyIsReferenceFree(array, clonedArray); } @Test void testGetterCopy() { byte[] array = "i...
ImmutableByteArrayWrapperTest
java
google__dagger
javatests/dagger/internal/codegen/MissingBindingValidationTest.java
{ "start": 82608, "end": 82933 }
interface ____ {", " Child child();", "}"); Source child = CompilerTests.javaSource( "test.Child", "package test;", "", "import dagger.Subcomponent;", "", "@Subcomponent(modules = ChildModule.class)", ...
Parent
java
playframework__playframework
core/play-integration-test/src/test/java/play/routing/AbstractRoutingDslTest.java
{ "start": 1090, "end": 24983 }
class ____ { abstract Application application(); abstract RoutingDsl routingDsl(); private Router router(Function<RoutingDsl, Router> function) { return function.apply(routingDsl()); } @Test public void shouldProvideJavaRequestToActionWithoutParameters() { Router router = router( ...
AbstractRoutingDslTest
java
apache__flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/logical/utils/LogicalTypeParser.java
{ "start": 12410, "end": 13359 }
enum ____ { CHAR, VARCHAR, STRING, BOOLEAN, BINARY, VARBINARY, BYTES, DECIMAL, NUMERIC, DEC, TINYINT, SMALLINT, INT, INTEGER, BIGINT, FLOAT, DOUBLE, PRECISION, DATE, ...
Keyword
java
spring-projects__spring-security
web/src/main/java/org/springframework/security/web/header/writers/CrossOriginEmbedderPolicyHeaderWriter.java
{ "start": 1187, "end": 2014 }
class ____ implements HeaderWriter { private static final String EMBEDDER_POLICY = "Cross-Origin-Embedder-Policy"; private @Nullable CrossOriginEmbedderPolicy policy; /** * Sets the {@link CrossOriginEmbedderPolicy} value to be used in the * {@code Cross-Origin-Embedder-Policy} header * @param embedderPolic...
CrossOriginEmbedderPolicyHeaderWriter
java
apache__camel
components/camel-openapi-java/src/main/java/org/apache/camel/openapi/OpenApiRestProducerFactory.java
{ "start": 1560, "end": 8075 }
class ____ implements RestProducerFactory { private static final Logger LOG = LoggerFactory.getLogger(OpenApiRestProducerFactory.class); @Override public Producer createProducer( CamelContext camelContext, String host, String verb, String basePath, String uriTemplate, String queryP...
OpenApiRestProducerFactory
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/nullness/NullArgumentForNonNullParameterTest.java
{ "start": 5362, "end": 5934 }
class ____ { void consume(String s) {} void foo() { // BUG: Diagnostic contains: consume(null); } } """) .doTest(); } @Test public void positiveNullMarkedPackageInfo() { aggressiveHelper .addSou...
Foo
java
google__guava
android/guava/src/com/google/common/graph/Graphs.java
{ "start": 6258, "end": 9676 }
interface ____ not support parallel // edges, so this traversal would require reusing the undirected AB edge. return false; } /** * Returns the transitive closure of {@code graph}. The transitive closure of a graph {@code G} is * a graph {@code T} that is a supergraph of {@code G}, augmented by, for ...
does
java
apache__flink
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/FileBufferReaderITCase.java
{ "start": 6731, "end": 7691 }
class ____ extends AbstractInvokable { /** * Create an Invokable task and set its environment. * * @param environment The environment assigned to this invokable. */ public TestSourceInvokable(Environment environment) { super(environment); } ...
TestSourceInvokable
java
FasterXML__jackson-databind
src/test/java/tools/jackson/databind/jsontype/ext/TestSubtypesExternalPropertyMissingProperty.java
{ "start": 1035, "end": 1102 }
class ____ requires the property to be present. */ static
that
java
apache__spark
common/network-shuffle/src/test/java/org/apache/spark/network/shuffle/SslExternalShuffleSecuritySuite.java
{ "start": 982, "end": 1539 }
class ____ extends ExternalShuffleSecuritySuite { @Override protected TransportConf createTransportConf(boolean encrypt) { if (encrypt) { return new TransportConf( "shuffle", SslSampleConfigs.createDefaultConfigProviderForRpcNamespaceWithAdditionalEntries( Map.of("spark.authenti...
SslExternalShuffleSecuritySuite
java
playframework__playframework
core/play/src/main/java/play/Logger.java
{ "start": 1271, "end": 1826 }
class ____ { /** * @deprecated Deprecated as of 2.7.0. Create an instance of {@link ALogger} via {@link * #of(String)} / {@link #of(Class)} and use the same-named method. Or use SLF4J directly. */ @Deprecated private static final ALogger logger = of("application"); /** * Obtain a logger instance...
Logger
java
elastic__elasticsearch
x-pack/plugin/sql/sql-action/src/main/java/org/elasticsearch/xpack/sql/action/SqlTranslateRequestBuilder.java
{ "start": 940, "end": 2419 }
class ____ extends ActionRequestBuilder<SqlTranslateRequest, SqlTranslateResponse> { public SqlTranslateRequestBuilder(ElasticsearchClient client) { this( client, null, null, emptyMap(), emptyList(), Protocol.TIME_ZONE, Prot...
SqlTranslateRequestBuilder
java
apache__camel
dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SqlEndpointBuilderFactory.java
{ "start": 60762, "end": 62246 }
class ____ a * default constructor to create instance with. d) If the query resulted * in more than one rows, it throws an non-unique result exception. * StreamList streams the result of the query using an Iterator. This * can be used with the Splitter EIP in streaming mode to proces...
has
java
netty__netty
testsuite-native-image-client-runtime-init/src/main/java/io/netty/testsuite/svm/client/NativeClientWithNettyInitAtRuntime.java
{ "start": 821, "end": 1177 }
class ____ { /** * Main entry point (not instantiable) */ private NativeClientWithNettyInitAtRuntime() { } public static void main(String[] args) { System.out.println(NetUtil.LOCALHOST4); System.out.println(NetUtil.LOCALHOST6); System.out.println(NetUtil.LOCALHOST); ...
NativeClientWithNettyInitAtRuntime
java
ReactiveX__RxJava
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableTakeWhile.java
{ "start": 1397, "end": 3254 }
class ____<T> implements FlowableSubscriber<T>, Subscription { final Subscriber<? super T> downstream; final Predicate<? super T> predicate; Subscription upstream; boolean done; TakeWhileSubscriber(Subscriber<? super T> actual, Predicate<? super T> predicate) { thi...
TakeWhileSubscriber
java
alibaba__druid
core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLCaseExpr.java
{ "start": 906, "end": 3168 }
class ____ extends SQLExprImpl implements SQLReplaceable, Serializable { private static final long serialVersionUID = 1L; private final List<Item> items = new ArrayList<Item>(); private SQLExpr valueExpr; private SQLExpr elseExpr; public SQLCaseExpr() { } public SQLExpr getValueExpr() { ...
SQLCaseExpr
java
playframework__playframework
web/play-java-forms/src/test/java/play/data/Subtask.java
{ "start": 439, "end": 855 }
class ____ { @Constraints.Min(10) public Long id; @Constraints.Required public String name; public Boolean done = true; @Constraints.Required @DateTime(pattern = "dd/MM/yyyy") public Date dueDate; public Date endDate; @I18Constraint(value = "patterns.zip") public String zip; @AnotherI18NCon...
Subtask
java
elastic__elasticsearch
x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlObjectHandler.java
{ "start": 20693, "end": 21062 }
class ____ { final String samlMessage; final boolean hasSignature; final String relayState; ParsedQueryString(String samlMessage, boolean hasSignature, String relayState) { this.samlMessage = samlMessage; this.hasSignature = hasSignature; this.relaySt...
ParsedQueryString
java
elastic__elasticsearch
x-pack/plugin/core/src/internalClusterTest/java/org/elasticsearch/xpack/cluster/routing/allocation/DataTierTelemetryPlugin.java
{ "start": 2678, "end": 3764 }
class ____ extends TransportXPackInfoAction { @Inject public DataTiersTransportXPackInfoAction( TransportService transportService, ActionFilters actionFilters, LicenseService licenseService, NodeClient client ) { super(transportService,...
DataTiersTransportXPackInfoAction
java
junit-team__junit5
junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ClassTemplateInvocationContext.java
{ "start": 940, "end": 1129 }
interface ____ { /** * Get the display name for this invocation. * * <p>The supplied {@code invocationIndex} is incremented by the framework * with each
ClassTemplateInvocationContext
java
reactor__reactor-core
reactor-core/src/test/java/reactor/core/publisher/MonoDoFinallyTest.java
{ "start": 1459, "end": 5498 }
class ____ implements Consumer<SignalType> { volatile SignalType signalType; volatile int calls; @BeforeEach public void before() { signalType = null; calls = 0; } @Override public void accept(SignalType signalType) { this.signalType = signalType; this.calls++; } @Test public void normalJust() { ...
MonoDoFinallyTest
java
elastic__elasticsearch
x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/expression/predicate/regex/AbstractStringPattern.java
{ "start": 601, "end": 1761 }
class ____ implements StringPattern { private Automaton automaton; public final Automaton createAutomaton(boolean ignoreCase) { try { return doCreateAutomaton(ignoreCase); } catch (TooComplexToDeterminizeException e) { throw new IllegalArgumentException("Pattern was too...
AbstractStringPattern
java
lettuce-io__lettuce-core
src/test/java/io/lettuce/core/masterreplica/ConnectionsUnitTests.java
{ "start": 784, "end": 1397 }
class ____ { @Mock private StatefulRedisConnection<String, String> connection1; @BeforeEach void before() { when(connection1.closeAsync()).thenReturn(CompletableFuture.completedFuture(null)); } @Test void shouldCloseConnectionCompletingAfterCloseSignal() { Connections con...
ConnectionsUnitTests
java
elastic__elasticsearch
x-pack/plugin/analytics/src/main/java/org/elasticsearch/xpack/analytics/rate/HistogramRateAggregator.java
{ "start": 1086, "end": 3036 }
class ____ extends AbstractRateAggregator { public HistogramRateAggregator( String name, ValuesSourceConfig valuesSourceConfig, Rounding.DateTimeUnit rateUnit, RateMode rateMode, AggregationContext context, Aggregator parent, Map<String, Object> metadata )...
HistogramRateAggregator
java
junit-team__junit5
platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/TokenTests.java
{ "start": 475, "end": 1528 }
class ____ { @Test void startIndexOfTokenString() { assertThat(new Token(0, "!").strippedTokenStartIndex()).isEqualTo(0); assertThat(new Token(0, " !").strippedTokenStartIndex()).isEqualTo(2); assertThat(new Token(7, "!").strippedTokenStartIndex()).isEqualTo(7); } @Test void endIndexExclusive() { assert...
TokenTests
java
spring-projects__spring-data-jpa
spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/AbstractRepositoryConfigTests.java
{ "start": 1387, "end": 2370 }
class ____ { @Autowired(required = false) UserRepository userRepository; @Autowired(required = false) RoleRepository roleRepository; @Autowired(required = false) AuditableUserRepository auditableUserRepository; @Autowired JpaMetamodelMappingContext mappingContext; /** * Asserts that context creation detects 3...
AbstractRepositoryConfigTests
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/ParentCacheTest.java
{ "start": 2748, "end": 3140 }
class ____ { @Parent public ParentEntity parent; public String field; public ChildEmbeddable() { } public ChildEmbeddable(String field) { this.field = field; } public ParentEntity getParent() { return parent; } public void setParent(ParentEntity parent) { this.parent = parent; } } ...
ChildEmbeddable
java
junit-team__junit5
junit-platform-commons/src/main/java/org/junit/platform/commons/logging/LoggerFactory.java
{ "start": 842, "end": 1079 }
class ____ { private LoggerFactory() { /* no-op */ } private static final Set<LogRecordListener> listeners = ConcurrentHashMap.newKeySet(); /** * Get a {@link Logger} for the specified class. * * @param clazz the
LoggerFactory
java
spring-projects__spring-framework
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/SseEmitter.java
{ "start": 5327, "end": 7377 }
class ____ implements SseEventBuilder { private final Set<DataWithMediaType> dataToSend = new LinkedHashSet<>(4); private @Nullable StringBuilder sb; private boolean hasName; @Override public SseEventBuilder id(String id) { append("id:").append(id).append('\n'); return this; } @Override publi...
SseEventBuilderImpl
java
apache__hadoop
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCount.java
{ "start": 2011, "end": 2077 }
class ____ {@link org.apache.hadoop.fs.shell.Count} * */ public
for
java
bumptech__glide
library/src/main/java/com/bumptech/glide/request/target/SimpleTarget.java
{ "start": 3238, "end": 3953 }
class ____ possible. * * @see <a href="http://bumptech.github.io/glide/doc/targets.html">Glide's Target docs page</a> * @param <Z> The type of resource that this target will receive. * @deprecated Use {@link CustomViewTarget} if loading the content into a view, the download API if * in the background * (h...
whenver
java
apache__camel
test-infra/camel-test-infra-openai-mock/src/test/java/org/apache/camel/test/infra/openai/mock/OpenAIMockMultipleToolsTest.java
{ "start": 1219, "end": 5356 }
class ____ { @RegisterExtension OpenAIMock openAIMock = new OpenAIMock().builder() .when("What is the weather in london?") .invokeTool("FindsTheLatitudeAndLongitudeOfAGivenCity") .withParam("name", "London") .andThenInvokeTool("ForecastsTheWeatherForTheGivenLatit...
OpenAIMockMultipleToolsTest
java
apache__hadoop
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/impl/prefetch/TestBufferData.java
{ "start": 1514, "end": 6295 }
class ____ extends AbstractHadoopTestBase { @Test public void testArgChecks() throws Exception { // Should not throw. ByteBuffer buffer = ByteBuffer.allocate(1); BufferData data = new BufferData(1, buffer); // Verify it throws correctly. intercept(IllegalArgumentException.class, "'blo...
TestBufferData
java
google__guice
core/src/com/google/inject/internal/CycleDetectingLock.java
{ "start": 693, "end": 1265 }
class ____ to its size * and complexity. * * @param <ID> Lock identification provided by the client, is returned unmodified to the client when * lock cycle is detected to identify it. Only toString() needs to be implemented. Lock * references this object internally, for the purposes of Garbage Collection y...
due
java
apache__flink
flink-table/flink-table-code-splitter/src/main/java/org/apache/flink/table/codesplit/BlockStatementSplitter.java
{ "start": 1683, "end": 2922 }
class ____ * variable. Because of that, code must be preprocessed by {@link DeclarationRewriter} which * converts all local variables extracted as to member variables. * * <p><i>Before</i> * * <pre><code> * while (counter > 0) { * int localA = a + 1000; * System.out.println(localA); * if (a > 0) {...
member
java
apache__kafka
clients/src/test/java/org/apache/kafka/clients/admin/ScramMechanismTest.java
{ "start": 939, "end": 1517 }
class ____ { @Test public void testFromMechanismName() { assertEquals(ScramMechanism.UNKNOWN, ScramMechanism.fromMechanismName("UNKNOWN")); assertEquals(ScramMechanism.SCRAM_SHA_256, ScramMechanism.fromMechanismName("SCRAM-SHA-256")); assertEquals(ScramMechanism.SCRAM_SHA_512, ScramMech...
ScramMechanismTest
java
spring-projects__spring-boot
module/spring-boot-pulsar/src/test/java/org/springframework/boot/pulsar/autoconfigure/Customizers.java
{ "start": 2539, "end": 3625 }
class ____ implements AssertDelegateTarget { private final List<C> customizers; @SuppressWarnings("unchecked") private CustomizersAssert(Object customizers) { this.customizers = (customizers instanceof List) ? (List<C>) customizers : List.of((C) customizers); } /** * Assert that the customize method ...
CustomizersAssert
java
apache__kafka
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupCoordinatorShardTest.java
{ "start": 8470, "end": 108761 }
class ____ { @Test public void testConsumerGroupHeartbeat() { GroupMetadataManager groupMetadataManager = mock(GroupMetadataManager.class); OffsetMetadataManager offsetMetadataManager = mock(OffsetMetadataManager.class); CoordinatorMetrics coordinatorMetrics = mock(CoordinatorMetrics.cl...
GroupCoordinatorShardTest
java
quarkusio__quarkus
extensions/keycloak-admin-rest-client/deployment/src/test/java/io/quarkus/keycloak/admin/rest/client/deployment/test/KeycloakAdminClientInjectionDevServicesTest.java
{ "start": 2056, "end": 2293 }
class ____ { @Inject Keycloak keycloak; @GET @Path("/roles") public List<RoleRepresentation> getRoles() { return keycloak.realm("quarkus").roles().list(); } } }
AdminResource
java
assertj__assertj-core
assertj-core/src/main/java/org/assertj/core/api/UniversalComparableAssert.java
{ "start": 701, "end": 968 }
class ____ better compatibility than {@link ComparableAssert} and related implementations, currently limited * due to the upper bound of {@link ComparableAssert}'s type parameters. * * @see Assertions#assertThatComparable(Comparable) * @since 3.23.0 */ public
offers
java
apache__flink
flink-filesystems/flink-s3-fs-presto/src/main/java/org/apache/flink/fs/s3presto/S3PFileSystemFactory.java
{ "start": 942, "end": 1075 }
class ____ extends S3FileSystemFactory { @Override public String getScheme() { return "s3p"; } }
S3PFileSystemFactory
java
quarkusio__quarkus
extensions/security/deployment/src/main/java/io/quarkus/security/deployment/PermissionSecurityChecks.java
{ "start": 2707, "end": 3066 }
interface ____ { DotName PERMISSION_CHECKER_NAME = DotName.createSimple(PermissionChecker.class); DotName BLOCKING = DotName.createSimple(Blocking.class); Map<MethodInfo, SecurityCheck> getMethodSecurityChecks(); Map<DotName, SecurityCheck> getClassNameSecurityChecks(); Set<String> permissionCla...
PermissionSecurityChecks
java
spring-projects__spring-security
config/src/test/java/org/springframework/security/config/annotation/web/configurers/SessionManagementConfigurerTests.java
{ "start": 29697, "end": 30303 }
class ____ { private static SessionRegistry SESSION_REGISTRY_ONE; private static SessionRegistry SESSION_REGISTRY_TWO; @Bean SecurityFilterChain filterChain(HttpSecurity http) throws Exception { // @formatter:off http .sessionManagement((management) -> management .maximumSessions(1)); retur...
SessionRegistryTwoBeansConfig
java
elastic__elasticsearch
server/src/test/java/org/elasticsearch/inference/SettingsConfigurationTests.java
{ "start": 1136, "end": 5636 }
class ____ extends ESTestCase { public void testToXContent() throws IOException { String content = XContentHelper.stripWhitespace(""" { "description": "Wow, this tooltip is useful.", "label": "Very important field", "required": true, "...
SettingsConfigurationTests
java
spring-projects__spring-security
core/src/main/java/org/springframework/security/authorization/AuthenticatedReactiveAuthorizationManager.java
{ "start": 1247, "end": 2531 }
class ____<T> implements ReactiveAuthorizationManager<T> { private AuthenticationTrustResolver authTrustResolver = new AuthenticationTrustResolverImpl(); AuthenticatedReactiveAuthorizationManager() { } @Override public Mono<AuthorizationResult> authorize(Mono<Authentication> authentication, T object) { return...
AuthenticatedReactiveAuthorizationManager
java
reactor__reactor-core
reactor-core/src/main/java/reactor/core/publisher/ParallelSource.java
{ "start": 10285, "end": 11405 }
class ____<T> implements InnerProducer<T> { final ParallelSourceMain<T> parent; final int index; final int length; ParallelSourceInner(ParallelSourceMain<T> parent, int index, int length) { this.index = index; this.length = length; this.parent = parent; } @Override public CoreSubscr...
ParallelSourceInner
java
elastic__elasticsearch
modules/lang-painless/src/main/java/org/elasticsearch/painless/lookup/PainlessLookupUtility.java
{ "start": 3506, "end": 3701 }
class ____ def and excluding array * types </li> * * <li> - type (Class) - a painless type represented by a java
including
java
spring-projects__spring-security
core/src/test/java/org/springframework/security/authentication/ReactiveUserDetailsServiceAuthenticationManagerTests.java
{ "start": 1747, "end": 5556 }
class ____ { @Mock ReactiveUserDetailsService repository; @Mock PasswordEncoder passwordEncoder; UserDetailsRepositoryReactiveAuthenticationManager manager; String username; String password; @BeforeEach public void setup() { this.manager = new UserDetailsRepositoryReactiveAuthenticationManager(this.rep...
ReactiveUserDetailsServiceAuthenticationManagerTests
java
apache__flink
flink-tests/src/test/java/org/apache/flink/test/recovery/SimpleRecoveryExponentialDelayRestartStrategyITBase.java
{ "start": 1344, "end": 2775 }
class ____ extends SimpleRecoveryITCaseBase { @ClassRule public static final MiniClusterWithClientResource MINI_CLUSTER_RESOURCE = new MiniClusterWithClientResource( new MiniClusterResourceConfiguration.Builder() .setConfiguration(getConfiguration()) ...
SimpleRecoveryExponentialDelayRestartStrategyITBase
java
apache__hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/ReleaseSharedCacheResourceResponsePBImpl.java
{ "start": 1058, "end": 1988 }
class ____ extends ReleaseSharedCacheResourceResponse { ReleaseSharedCacheResourceResponseProto proto = ReleaseSharedCacheResourceResponseProto.getDefaultInstance(); ReleaseSharedCacheResourceResponseProto.Builder builder = null; boolean viaProto = false; public ReleaseSharedCacheResourceResponsePBIm...
ReleaseSharedCacheResourceResponsePBImpl
java
FasterXML__jackson-databind
src/main/java/tools/jackson/databind/annotation/JsonAppend.java
{ "start": 1795, "end": 3027 }
interface ____ { /** * Name of attribute of which value to serialize. Is also used as the * name of external property to write, unless overridden by * assigning a value for {@link #propName()}. */ public String value(); /** * Name to use for seri...
Attr
java
elastic__elasticsearch
x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/ilm/SetStepInfoUpdateTask.java
{ "start": 1000, "end": 3379 }
class ____ extends IndexLifecycleClusterStateUpdateTask { private static final Logger logger = LogManager.getLogger(SetStepInfoUpdateTask.class); private final String policy; private final ToXContentObject stepInfo; public SetStepInfoUpdateTask(ProjectId projectId, Index index, String policy, Step.St...
SetStepInfoUpdateTask
java
elastic__elasticsearch
modules/apm/src/test/java/org/elasticsearch/telemetry/apm/RecordingOtelMeter.java
{ "start": 14403, "end": 14458 }
interface ____ {} // Gauges private
OtelInstrument
java
spring-projects__spring-framework
spring-test/src/test/java/org/springframework/test/context/bean/override/convention/TestBeanForMultipleNestingLevelsIntegrationTests.java
{ "start": 1548, "end": 1771 }
class ____ { @TestBean(name = "field1", methodName = "testField1") String field1; @Test void test() { assertThat(field0).isEqualTo("zero"); assertThat(field1).isEqualTo("one"); } @Nested
NestedLevel1Tests
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/driver/StateStoreRecordOperations.java
{ "start": 4290, "end": 4883 }
class ____. * @param allowUpdate True if update of exiting record is allowed. * @param errorIfExists True if an error should be returned when inserting * an existing record. Only used if allowUpdate = false. * @return The result of the putAll operation. * @throws IOException Throws exception if ...
clazz
java
spring-projects__spring-boot
module/spring-boot-neo4j/src/test/java/org/springframework/boot/neo4j/docker/compose/Neo4jEnvironmentTests.java
{ "start": 1048, "end": 2264 }
class ____ { @Test void whenNeo4jAuthAndPasswordAreNullThenAuthTokenIsNull() { Neo4jEnvironment environment = new Neo4jEnvironment(Collections.emptyMap()); assertThat(environment.getAuthToken()).isNull(); } @Test void whenNeo4jAuthIsNoneThenAuthTokenIsNone() { Neo4jEnvironment environment = new Neo4jEnviro...
Neo4jEnvironmentTests
java
spring-projects__spring-framework
spring-context/src/main/java/org/springframework/instrument/classloading/WeavingTransformer.java
{ "start": 1645, "end": 1848 }
class ____. * @param classLoader the ClassLoader to build a transformer for */ public WeavingTransformer(@Nullable ClassLoader classLoader) { this.classLoader = classLoader; } /** * Add a
loader
java
apache__flink
flink-runtime/src/test/java/org/apache/flink/runtime/metrics/TraceSetupTest.java
{ "start": 15790, "end": 16128 }
class ____ implements TraceReporterFactory { static final TraceReporter REPORTER = new TestTraceReporter(); @Override public TraceReporter createTraceReporter(Properties config) { return REPORTER; } } /** Factory that always throws an error. */ public static
TestTraceReporterFactory
java
google__guava
android/guava/src/com/google/common/cache/LoadingCache.java
{ "start": 1776, "end": 8517 }
interface ____<K, V> extends Cache<K, V>, Function<K, V> { /** * Returns the value associated with {@code key} in this cache, first loading that value if * necessary. No observable state associated with this cache is modified until loading completes. * * <p>If another call to {@link #get} or {@link #getU...
LoadingCache
java
google__dagger
dagger-compiler/main/java/dagger/internal/codegen/validation/ProvidesMethodValidator.java
{ "start": 1512, "end": 2345 }
class ____ extends BindingMethodValidator { private final DependencyRequestValidator dependencyRequestValidator; @Inject ProvidesMethodValidator( XProcessingEnv processingEnv, DependencyRequestValidator dependencyRequestValidator, InjectionAnnotations injectionAnnotations) { super( ...
ProvidesMethodValidator
java
mapstruct__mapstruct
processor/src/test/java/org/mapstruct/ap/test/bugs/_2537/ImplicitSourceTest.java
{ "start": 544, "end": 650 }
class ____ { @ProcessorTest public void situationCompilesWithoutErrors() { } }
ImplicitSourceTest
java
spring-projects__spring-security
access/src/main/java/org/springframework/security/web/access/channel/InsecureChannelProcessor.java
{ "start": 1291, "end": 1930 }
class ____ to one case-sensitive keyword, {@link #getInsecureKeyword}. If this * keyword is detected, <code>HttpServletRequest.isSecure()</code> is used to determine * the channel security offered. If channel security is present, the configured * <code>ChannelEntryPoint</code> is called. By default the entry point i...
responds
java
alibaba__fastjson
src/test/java/com/alibaba/json/test/benchmark/encode/ArrayInt1000Encode.java
{ "start": 153, "end": 568 }
class ____ extends BenchmarkCase { private Object object; public ArrayInt1000Encode(){ super("ArrayInt1000Encode"); int[] array = new int[1000]; for (int i = 0; i < array.length; ++i) { array[i] = i; } this.object = array; } @Override public vo...
ArrayInt1000Encode
java
spring-projects__spring-data-jpa
spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/sample/UserRepository.java
{ "start": 29784, "end": 29870 }
interface ____ { String getFirstname(); Set<Role> getRoles(); }
RolesAndFirstname
java
spring-projects__spring-framework
spring-test/src/main/java/org/springframework/mock/http/MockHttpOutputMessage.java
{ "start": 1093, "end": 2018 }
class ____ implements HttpOutputMessage { private final HttpHeaders headers = new HttpHeaders(); private final ByteArrayOutputStream body = new ByteArrayOutputStream(1024); @Override public HttpHeaders getHeaders() { return this.headers; } @Override public OutputStream getBody() throws IOException { ret...
MockHttpOutputMessage
java
apache__flink
flink-core/src/main/java/org/apache/flink/api/common/operators/util/OperatorValidationUtils.java
{ "start": 1095, "end": 3779 }
class ____ { private OperatorValidationUtils() {} public static void validateParallelism(int parallelism) { validateParallelism(parallelism, true); } public static void validateParallelism(int parallelism, boolean canBeParallel) { Preconditions.checkArgument( canBePara...
OperatorValidationUtils
java
apache__flink
flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/api/java/typeutils/runtime/WritableSerializer.java
{ "start": 1633, "end": 5067 }
class ____<T extends Writable> extends TypeSerializer<T> { private static final long serialVersionUID = 1L; private final Class<T> typeClass; private transient Kryo kryo; private transient T copyInstance; public WritableSerializer(Class<T> typeClass) { this.typeClass = typeClass; } ...
WritableSerializer
java
apache__camel
components/camel-huawei/camel-huaweicloud-obs/src/test/java/org/apache/camel/component/huaweicloud/obs/CreateBucketFunctionalTest.java
{ "start": 1360, "end": 3617 }
class ____ extends CamelTestSupport { private static final String ACCESS_KEY = "replace_this_with_access_key"; private static final String SECRET_KEY = "replace_this_with_secret_key"; private static final String REGION = "replace_this_with_region"; private static final String BUCKET_NAME = "replace_thi...
CreateBucketFunctionalTest
java
apache__commons-lang
src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java
{ "start": 1236, "end": 1816 }
class ____ allows complex initialization operations in a background task. * * <p> * Applications often have to do some expensive initialization steps when they * are started, e.g. constructing a connection to a database, reading a * configuration file, etc. Doing these things in parallel can enhance * performance...
that
java
spring-projects__spring-framework
spring-test/src/main/java/org/springframework/test/web/client/response/DefaultResponseCreator.java
{ "start": 1557, "end": 4678 }
class ____ implements ResponseCreator { private final HttpStatusCode statusCode; private byte[] content = new byte[0]; private @Nullable Resource contentResource; private final HttpHeaders headers = new HttpHeaders(); /** * Protected constructor. * Use static factory methods in {@link MockRestResponseCre...
DefaultResponseCreator