language
stringclasses
1 value
repo
stringclasses
60 values
path
stringlengths
22
294
class_span
dict
source
stringlengths
13
1.16M
target
stringlengths
1
113
java
elastic__elasticsearch
x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/transport/filter/PatternRuleTests.java
{ "start": 567, "end": 3133 }
class ____ extends ESTestCase { public void testSingleIpRule() throws UnknownHostException { PatternRule rule = new PatternRule(IpFilterRuleType.REJECT, "i:127.0.0.1"); assertFalse(rule.isLocalhost()); assertTrue(rule.matches(new InetSocketAddress(InetAddress.getByName("127.0.0.1"), 0))); ...
PatternRuleTests
java
elastic__elasticsearch
x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/session/SqlConfiguration.java
{ "start": 789, "end": 3962 }
class ____ extends org.elasticsearch.xpack.ql.session.Configuration { @Nullable private final String catalog; private final int pageSize; private final TimeValue requestTimeout; private final TimeValue pageTimeout; private final Mode mode; private final String clientId; private final Sq...
SqlConfiguration
java
elastic__elasticsearch
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/RoleReferenceIntersection.java
{ "start": 729, "end": 2140 }
class ____ { private final List<RoleReference> roleReferences; public RoleReferenceIntersection(RoleReference... roleReferences) { this(List.of(roleReferences)); } public RoleReferenceIntersection(List<RoleReference> roleReferences) { assert roleReferences != null && false == roleRefe...
RoleReferenceIntersection
java
spring-projects__spring-data-jpa
spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/query/QueryTokenStream.java
{ "start": 1269, "end": 8087 }
interface ____ extends Streamable<QueryToken> { /** * Creates an empty stream. */ static QueryTokenStream empty() { return EmptyQueryTokenStream.INSTANCE; } /** * Compose a {@link QueryTokenStream} from a collection of inline elements. * * @param elements collection of elements. * @param visitor vis...
QueryTokenStream
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/cluster/node/DiscoveryNodes.java
{ "start": 1855, "end": 22755 }
class ____ implements Iterable<DiscoveryNode>, SimpleDiffable<DiscoveryNodes> { public static final DiscoveryNodes EMPTY_NODES = builder().build(); private final long nodeLeftGeneration; private final Map<String, DiscoveryNode> nodes; private final Map<String, DiscoveryNode> dataNodes; private fin...
DiscoveryNodes
java
grpc__grpc-java
alts/src/test/java/io/grpc/alts/internal/AltsHandshakerStubTest.java
{ "start": 1155, "end": 3945 }
enum ____ { OK, ERROR, COMPLETE } private AltsHandshakerStub stub; private MockWriter writer; @Before public void setUp() { writer = new MockWriter(); stub = new AltsHandshakerStub(writer); writer.setReader(stub.getReaderForTest()); } /** Send a message as in_bytes and expect sa...
Status
java
netty__netty
example/src/main/java/io/netty/example/worldclock/WorldClockProtocol.java
{ "start": 30653, "end": 40930 }
class ____ extends com.google.protobuf.GeneratedMessage implements LocationsOrBuilder { // Use Locations.newBuilder() to construct. private Locations(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } priv...
Locations
java
junit-team__junit5
junit-platform-commons/src/main/java/org/junit/platform/commons/util/ReflectionUtils.java
{ "start": 29443, "end": 30449 }
class ____ which the method should be referenced; * never {@code null} * @param methodName the name of the method; never {@code null} or blank * @param parameterTypeNames the parameter type names of the method; may be * empty but not {@code null} * @return fully qualified method name; never {@code null} * @...
from
java
apache__camel
components/camel-elasticsearch-rest-client/src/generated/java/org/apache/camel/component/elasticsearch/rest/client/ElasticsearchRestClientComponentConfigurer.java
{ "start": 752, "end": 5698 }
class ____ extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter { @Override public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { ElasticsearchRestClientComponent target = (ElasticsearchRestClientCo...
ElasticsearchRestClientComponentConfigurer
java
jhy__jsoup
src/test/java/org/jsoup/parser/StreamParserTest.java
{ "start": 2443, "end": 15103 }
interface ____ html = "<title>Test</title></head><div id=1>D1</div><div id=2>D2<p id=3><span>P One</p><p id=4>P Two</p></div><div id=5>D3<p id=6>P three</p>"; StreamParser parser = new StreamParser(Parser.htmlParser()).parse(html, ""); StringBuilder seen = new StringBuilder(); Iterator<...
String
java
apache__hadoop
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/SDKStreamDrainer.java
{ "start": 1591, "end": 8567 }
class ____<TStream extends InputStream & Abortable> implements CallableRaisingIOE<Boolean> { private static final Logger LOG = LoggerFactory.getLogger( SDKStreamDrainer.class); /** * URI for log messages. */ private final String uri; /** * Stream from the getObject response for draining an...
SDKStreamDrainer
java
hibernate__hibernate-orm
hibernate-envers/src/main/java/org/hibernate/envers/strategy/internal/ValidityAuditStrategy.java
{ "start": 26444, "end": 26987 }
class ____ extends Update { private final List<QueryParameterBinding> bindings = new ArrayList<>( 0 ); public UpdateContext(SessionFactoryImplementor sessionFactory) { super ( sessionFactory ); } public List<QueryParameterBinding> getBindings() { return bindings; } public void bind(Object value, Ty...
UpdateContext
java
apache__kafka
clients/src/main/java/org/apache/kafka/clients/consumer/StickyAssignor.java
{ "start": 8288, "end": 13028 }
class ____ extends AbstractStickyAssignor { public static final String STICKY_ASSIGNOR_NAME = "sticky"; // these schemas are used for preserving consumer's previously assigned partitions // list and sending it as user data to the leader during a rebalance static final String TOPIC_PARTITIONS_KEY_NAME =...
StickyAssignor
java
apache__flink
flink-tests/src/test/java/org/apache/flink/test/runtime/IPv6HostnamesITCase.java
{ "start": 6019, "end": 8226 }
interface ____<InetAddress> ee = netInterface.getInetAddresses(); while (ee.hasMoreElements()) { InetAddress addr = ee.nextElement(); if (addr instanceof Inet6Address && (!addr.isLoopbackAddress()) ...
Enumeration
java
quarkusio__quarkus
extensions/smallrye-graphql/deployment/src/test/java/io/quarkus/smallrye/graphql/deployment/ShowRuntimeExceptionMessageTest.java
{ "start": 566, "end": 2357 }
class ____ extends AbstractGraphQLTest { private static final String ILLEGAL_ARGUMENT_EXCEPTION_MESSAGE = "Something went wrong"; private static final String ILLEGAL_STATE_EXCEPTION_MESSAGE = "Something else went wrong"; @RegisterExtension static QuarkusUnitTest test = new QuarkusUnitTest() ...
ShowRuntimeExceptionMessageTest
java
quarkusio__quarkus
extensions/reactive-routes/runtime/src/main/java/io/quarkus/vertx/web/runtime/MultiNdjsonSupport.java
{ "start": 492, "end": 3326 }
class ____ { private MultiNdjsonSupport() { // Avoid direct instantiation. } private static void initialize(HttpServerResponse response, RoutingContext rc) { if (response.bytesWritten() == 0) { MultiMap headers = response.headers(); if (headers.get(HttpHeaders.CONTE...
MultiNdjsonSupport
java
apache__flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/TypeInferenceUtil.java
{ "start": 12570, "end": 14928 }
interface ____ { static SurroundingInfo of( String name, FunctionDefinition functionDefinition, TypeInference typeInference, int argumentCount, int innerCallPosition, boolean isGroupedAggregation) { retu...
SurroundingInfo
java
apache__flink
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/state/rocksdb/sstmerge/Compactor.java
{ "start": 2727, "end": 3118 }
interface ____ { void compactFiles( CompactionOptions var1, ColumnFamilyHandle var2, List<String> var3, int var4, int var5, CompactionJobInfo var6) throws RocksDBException; CompactionTarget N...
CompactionTarget
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestInjectionForSimulatedStorage.java
{ "start": 1673, "end": 1773 }
class ____ the replication and injection of blocks of a DFS file for simulated storage. */ public
tests
java
spring-projects__spring-security
config/src/main/java/org/springframework/security/config/annotation/authentication/configuration/AuthenticationConfiguration.java
{ "start": 3105, "end": 8406 }
class ____ { private AtomicBoolean buildingAuthenticationManager = new AtomicBoolean(); private ApplicationContext applicationContext; private AuthenticationManager authenticationManager; private boolean authenticationManagerInitialized; private List<GlobalAuthenticationConfigurerAdapter> globalAuthConfigurer...
AuthenticationConfiguration
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestGetScriptLanguageAction.java
{ "start": 1025, "end": 1620 }
class ____ extends BaseRestHandler { @Override public List<Route> routes() { return List.of(new Route(GET, "/_script_language")); } @Override public String getName() { return "script_language_action"; } @Override protected RestChannelConsumer prepareRequest(RestRequest...
RestGetScriptLanguageAction
java
apache__flink
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/abilities/sink/WritingMetadataSpec.java
{ "start": 1928, "end": 3708 }
class ____ implements SinkAbilitySpec { public static final String FIELD_NAME_METADATA_KEYS = "metadataKeys"; public static final String FIELD_NAME_CONSUMED_TYPE = "consumedType"; @JsonProperty(FIELD_NAME_METADATA_KEYS) private final List<String> metadataKeys; @JsonProperty(FIELD_NAME_CONSUMED_TYP...
WritingMetadataSpec
java
elastic__elasticsearch
server/src/test/java/org/elasticsearch/cluster/routing/allocation/AllocationCommandsTests.java
{ "start": 4516, "end": 55713 }
class ____ extends ESAllocationTestCase { private ProjectId projectId; @Override public void setUp() throws Exception { super.setUp(); projectId = randomProjectIdOrDefault(); } public void testMoveShardCommand() { AllocationService allocation = createAllocationService( ...
AllocationCommandsTests
java
alibaba__druid
core/src/test/java/com/alibaba/druid/bvt/sql/oracle/select/OracleSelectTest124.java
{ "start": 925, "end": 3711 }
class ____ extends TestCase { public void test_0() throws Exception { String sql = "SELECT\n" + "J01.COL_A,\n" + "J01.COL_B,\n" + "\"SUM\"(J01.COL_C) OVER (\n" + "PARTITION BY J01.COL_A ORDER BY J01.COL_B NULLS FIRST ROWS BETWEEN UNBOUNDED PREC...
OracleSelectTest124
java
quarkusio__quarkus
integration-tests/logging-min-level-set/src/test/java/io/quarkus/it/logging/minlevel/set/LoggingMinLevelByDefaultTest.java
{ "start": 577, "end": 1038 }
class ____ { @Test public void testDebug() { given() .when().get("/log/bydefault/debug") .then() .statusCode(200) .body(is("true")); } @Test public void testNotTrace() { given() .when().get("/log/bydefa...
LoggingMinLevelByDefaultTest
java
google__dagger
javatests/dagger/internal/codegen/DelegateRequestRepresentationTest.java
{ "start": 15016, "end": 15436 }
interface ____ {", " @Binds Supertype to(Subtype subtype);", "}"); Source component = CompilerTests.javaSource( "test.RequestsSubtypeAsProvider", "package test;", "", "import dagger.Component;", "import javax.inject.Provide...
TestModule
java
netty__netty
handler/src/main/java/io/netty/handler/ssl/OpenSslX509KeyManagerFactory.java
{ "start": 2490, "end": 4149 }
class ____ extends KeyManagerFactory { private final OpenSslKeyManagerFactorySpi spi; public OpenSslX509KeyManagerFactory() { this(newOpenSslKeyManagerFactorySpi(null)); } public OpenSslX509KeyManagerFactory(Provider provider) { this(newOpenSslKeyManagerFactorySpi(provider)); } ...
OpenSslX509KeyManagerFactory
java
google__guava
guava-tests/test/com/google/common/collect/ImmutableSortedMultisetTest.java
{ "start": 10696, "end": 20497 }
class ____ implements Iterable<String> { int count = 0; @Override public Iterator<String> iterator() { count++; return asList("a", "b", "a").iterator(); } } public void testCopyOf_plainIterable() { CountingIterable iterable = new CountingIterable(); Multiset<String> multiset = ...
CountingIterable
java
ReactiveX__RxJava
src/test/java/io/reactivex/rxjava3/internal/operators/observable/ObservableHideTest.java
{ "start": 1071, "end": 2529 }
class ____ extends RxJavaTest { @Test public void hiding() { PublishSubject<Integer> src = PublishSubject.create(); Observable<Integer> dst = src.hide(); assertFalse(dst instanceof PublishSubject); Observer<Object> o = TestHelper.mockObserver(); dst.subscribe(o); ...
ObservableHideTest
java
elastic__elasticsearch
modules/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageRetryingInputStreamTests.java
{ "start": 1827, "end": 8336 }
class ____ extends ESTestCase { private static final String BUCKET_NAME = "test-bucket"; private static final String BLOB_NAME = "test-blob"; private final BlobId blobId = BlobId.of(BUCKET_NAME, BLOB_NAME); private com.google.api.services.storage.Storage storageRpc; private com.google.cloud.stora...
GoogleCloudStorageRetryingInputStreamTests
java
apache__camel
dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JpaEndpointBuilderFactory.java
{ "start": 37201, "end": 50057 }
interface ____ extends EndpointConsumerBuilder { default JpaEndpointConsumerBuilder basic() { return (JpaEndpointConsumerBuilder) this; } /** * Allows for bridging the consumer to the Camel routing Error Handler, * which mean any exceptio...
AdvancedJpaEndpointConsumerBuilder
java
lettuce-io__lettuce-core
src/main/java/io/lettuce/core/ShutdownArgs.java
{ "start": 1488, "end": 4263 }
class ____ { /** * Utility constructor. */ private Builder() { } /** * Creates new {@link ShutdownArgs} and setting {@literal SAVE}. * * @return new {@link ShutdownArgs} with {@literal SAVE} set. * @see ShutdownArgs#save(boolean) ...
Builder
java
quarkusio__quarkus
extensions/jaxb/deployment/src/main/java/io/quarkus/jaxb/deployment/JaxbProcessor.java
{ "start": 4138, "end": 26905 }
class ____ { private static Logger LOG = Logger.getLogger(JaxbProcessor.class); private static final List<Class<? extends Annotation>> JAXB_ANNOTATIONS = List.of( XmlAccessorType.class, XmlAnyAttribute.class, XmlAnyElement.class, XmlAttachmentRef.class, ...
JaxbProcessor
java
apache__flink
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointSettingsSerializableTest.java
{ "start": 6750, "end": 7530 }
class ____ implements CheckpointStorage { private static final long serialVersionUID = -6107964383429395816L; /** Simulate a custom option that is not in the normal classpath. */ @SuppressWarnings("unused") private Serializable customOption; public CustomCheckpointStorage(Seri...
CustomCheckpointStorage
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/JoinWithSolutionSetSecondDriver.java
{ "start": 1726, "end": 3359 }
class ____<IT1, IT2, OT> implements ResettableDriver<FlatJoinFunction<IT1, IT2, OT>, OT> { private TaskContext<FlatJoinFunction<IT1, IT2, OT>, OT> taskContext; private CompactingHashTable<IT2> hashTable; private JoinHashMap<IT2> objectMap; private TypeComparator<IT1> probeSideComparator; ...
JoinWithSolutionSetSecondDriver
java
grpc__grpc-java
okhttp/third_party/okhttp/main/java/io/grpc/okhttp/internal/Headers.java
{ "start": 1325, "end": 3039 }
class ____ { private final String[] namesAndValues; private Headers(Builder builder) { this.namesAndValues = builder.namesAndValues.toArray(new String[builder.namesAndValues.size()]); } /** Returns the last value corresponding to the specified field, or null. */ public String get(String name) { retu...
Headers
java
grpc__grpc-java
contextstorage/src/main/java/io/grpc/override/ContextStorageOverride.java
{ "start": 675, "end": 1050 }
class ____ your dependencies will override the default gRPC context storage using * reflection. It is a bridge between {@link io.grpc.Context} and * {@link io.opentelemetry.context.Context}, i.e. propagating io.grpc.context.Context also * propagates io.opentelemetry.context, and propagating io.opentelemetry.context ...
in
java
spring-projects__spring-security
web/src/test/java/org/springframework/security/web/server/csrf/CsrfWebFilterTests.java
{ "start": 2371, "end": 16696 }
class ____ { @Mock private WebFilterChain chain; @Mock private ServerCsrfTokenRepository repository; private CsrfToken token = new DefaultCsrfToken("csrf", "CSRF", "a"); private CsrfWebFilter csrfFilter = new CsrfWebFilter(); private MockServerWebExchange get = MockServerWebExchange.from(MockServerHttpReque...
CsrfWebFilterTests
java
apache__rocketmq
common/src/main/java/org/apache/rocketmq/common/utils/IPAddressUtils.java
{ "start": 1023, "end": 3848 }
class ____ { private static final String SLASH = "/"; private static final InetAddressValidator VALIDATOR = InetAddressValidator.getInstance(); public static boolean isValidIPOrCidr(String ipOrCidr) { return isValidIp(ipOrCidr) || isValidCidr(ipOrCidr); } public static boolean isValidIp(...
IPAddressUtils
java
mapstruct__mapstruct
processor/src/main/java/org/mapstruct/ap/internal/util/NativeTypes.java
{ "start": 12520, "end": 18152 }
class ____ implements LiteralAnalyzer { @Override public void validate(String s) { NumberRepresentation br = new NumberRepresentation( s, true, false, false ) { @Override void parse(String val, int radix) { Short.parseShort( val, radix );...
ShortAnalyzer
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/IdentifierNameTest.java
{ "start": 7596, "end": 7709 }
class ____ { @IAmATest public void possibly_a_test_name() {} private @
Test
java
redisson__redisson
redisson/src/main/java/org/redisson/liveobject/core/RedissonObjectBuilder.java
{ "start": 5146, "end": 9636 }
class ____ @This object. */ private Codec getFieldCodec(Class<?> rEntity, Class<? extends RObject> rObjectClass, String fieldName) throws ReflectiveOperationException { Field field = ClassUtils.getDeclaredField(rEntity, fieldName); if (field.isAnnotationPresent(RObjectField.class)) { ...
of
java
quarkusio__quarkus
extensions/arc/deployment/src/test/java/io/quarkus/arc/test/synthetic/removeTypes/SyntheticBeanBuildItemRemoveTypesTest.java
{ "start": 3459, "end": 3514 }
class ____ implements CharlieInterface { }
Charlie
java
apache__hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/resource/TestResourceCalculator.java
{ "start": 1574, "end": 27050 }
class ____ { private static final String EXTRA_RESOURCE_NAME = "test"; private ResourceCalculator resourceCalculator; public static Collection<Object[]> getParameters() { return Arrays.asList(new Object[][]{ {"DefaultResourceCalculator", new DefaultResourceCalculator()}, {"DominantResourceCa...
TestResourceCalculator
java
apache__camel
components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowProducerEncodingTest.java
{ "start": 1066, "end": 3034 }
class ____ extends BaseUndertowTest { @Test public void testSelect() { template.sendBody("rest:get:bw-web-api/v1/objects/timesheets?companyId=RD&select=personId,personName", "Hello World"); } @Test public void testFilter() { template.sendBody("rest:get:bw-web-api/v1/objects/timeshe...
RestUndertowProducerEncodingTest
java
elastic__elasticsearch
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/BertJapaneseTokenizationTests.java
{ "start": 635, "end": 3565 }
class ____ extends AbstractBWCSerializationTestCase<BertJapaneseTokenization> { private boolean lenient; public static BertJapaneseTokenization mutateForVersion(BertJapaneseTokenization instance, TransportVersion version) { if (version.before(TransportVersions.V_8_2_0)) { return new BertJa...
BertJapaneseTokenizationTests
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockCountersInPendingIBR.java
{ "start": 2039, "end": 5801 }
class ____ { @Test public void testBlockCounters() throws Exception { final Configuration conf = new HdfsConfiguration(); /* * Set a really long value for dfs.blockreport.intervalMsec and * dfs.heartbeat.interval, so that incremental block reports and heartbeats * won't be sent during this ...
TestBlockCountersInPendingIBR
java
spring-projects__spring-boot
core/spring-boot-properties-migrator/src/main/java/org/springframework/boot/context/properties/migrator/PropertiesMigrationReport.java
{ "start": 4152, "end": 4630 }
class ____ { private final List<PropertyMigration> properties; LegacyProperties(List<PropertyMigration> properties) { this.properties = new ArrayList<>(properties); } List<PropertyMigration> getRenamed() { return this.properties.stream().filter(PropertyMigration::isCompatibleType).toList(); } List...
LegacyProperties
java
elastic__elasticsearch
x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/datafeed/DatafeedTimingStatsReporter.java
{ "start": 1050, "end": 1306 }
class ____ { private static final Logger logger = LogManager.getLogger(DatafeedTimingStatsReporter.class); /** Interface used for persisting current timing stats to the results index. */ @FunctionalInterface public
DatafeedTimingStatsReporter
java
ReactiveX__RxJava
src/main/java/io/reactivex/rxjava3/subjects/PublishSubject.java
{ "start": 5093, "end": 10484 }
class ____<T> extends Subject<T> { /** The terminated indicator for the subscribers array. */ @SuppressWarnings("rawtypes") static final PublishDisposable[] TERMINATED = new PublishDisposable[0]; /** An empty subscribers array to avoid allocating it all the time. */ @SuppressWarnings("rawtypes") ...
PublishSubject
java
spring-projects__spring-framework
spring-core/src/main/java/org/springframework/core/codec/ByteArrayEncoder.java
{ "start": 1153, "end": 2363 }
class ____ extends AbstractEncoder<byte[]> { public ByteArrayEncoder() { super(MimeTypeUtils.ALL); } @Override public boolean canEncode(ResolvableType elementType, @Nullable MimeType mimeType) { Class<?> clazz = elementType.toClass(); return super.canEncode(elementType, mimeType) && byte[].class.isAssignab...
ByteArrayEncoder
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/serialization/entity/WithEmbeddedId.java
{ "start": 272, "end": 458 }
class ____ be in a package that is different from the test * so that the test does not have access to the private embedded ID. * * @author Gail Badner */ @Entity @Cacheable public
should
java
spring-projects__spring-framework
spring-web/src/main/java/org/springframework/http/codec/xml/Jaxb2XmlEncoder.java
{ "start": 3738, "end": 5458 }
class ____ Mono.fromCallable(() -> encodeValue(value, bufferFactory, valueType, mimeType, hints)).flux(); } @Override public DataBuffer encodeValue(Object value, DataBufferFactory bufferFactory, ResolvableType valueType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints) { if (!Hints.isLoggin...
return
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/transport/RemoteConnectionManager.java
{ "start": 1479, "end": 11615 }
class ____ implements ConnectionManager { private static final Logger logger = LogManager.getLogger(RemoteConnectionManager.class); private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(RemoteConnectionManager.class); private final String clusterAlias; private final R...
RemoteConnectionManager
java
apache__hadoop
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/ClassLoaderCheck.java
{ "start": 896, "end": 1360 }
class ____ loaded by the right classloader. */ public static void checkClassLoader(Class cls, boolean shouldBeLoadedByAppClassLoader) { boolean loadedByAppClassLoader = cls.getClassLoader() instanceof ApplicationClassLoader; if ((shouldBeLoadedByAppClassLoader && !loadedByAppClassLoader) || ...
is
java
apache__kafka
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorRecordHelpers.java
{ "start": 4224, "end": 30837 }
class ____ { private static final short GROUP_METADATA_VALUE_VERSION = 3; private GroupCoordinatorRecordHelpers() {} /** * Creates a ConsumerGroupMemberMetadata record. * * @param groupId The consumer group id. * @param member The consumer group member. * @return The record....
GroupCoordinatorRecordHelpers
java
quarkusio__quarkus
integration-tests/micrometer-mp-metrics/src/main/java/io/quarkus/it/micrometer/mpmetrics/MessageResource.java
{ "start": 470, "end": 1730 }
class ____ { private final MeterRegistry registry; private final Counter first; private final Counter second; public MessageResource(MeterRegistry registry, @Metric(name = "first-counter") final Counter first, @Metric(name = "second-counter") final Counter second) { thi...
MessageResource
java
apache__hadoop
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/ConfigureShadedAWSSocketFactory.java
{ "start": 1280, "end": 1312 }
class ____ not link. */ public
will
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumJournalManager.java
{ "start": 3289, "end": 33395 }
class ____ implements JournalManager { static final Logger LOG = LoggerFactory.getLogger(QuorumJournalManager.class); // This config is not publicly exposed public static final String QJM_RPC_MAX_TXNS_KEY = "dfs.ha.tail-edits.qjm.rpc.max-txns"; public static final int QJM_RPC_MAX_TXNS_DEFAULT = 5000; ...
QuorumJournalManager
java
apache__flink
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskTest.java
{ "start": 115082, "end": 116350 }
class ____ implements KeyedStateHandle { private static final long serialVersionUID = -2473861305282291582L; private final transient CompletableFuture<Void> discardFuture = new CompletableFuture<>(); private final StateHandleID stateHandleId = StateHandleID.randomStateHandleId(); pub...
TestingKeyedStateHandle
java
apache__commons-lang
src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
{ "start": 7135, "end": 7677 }
class ____ the interfaces to be checked. * @param methodName Method name of the method we wish to call. * @param parameterTypes The parameter type signatures. * @return the accessible method or {@code null} if not found. */ private static Method getAccessibleMethodFromInterfaceNest(Class<?> cls,...
for
java
apache__flink
flink-libraries/flink-state-processing-api/src/main/java/org/apache/flink/state/api/input/splits/OperatorStateInputSplit.java
{ "start": 1324, "end": 2493 }
class ____ implements PrioritizedOperatorSubtaskStateInputSplit { private static final long serialVersionUID = -1892383531558135420L; private final StateObjectCollection<OperatorStateHandle> managedOperatorState; private final int splitNum; public OperatorStateInputSplit( StateObjectColl...
OperatorStateInputSplit
java
apache__flink
flink-metrics/flink-metrics-dropwizard/src/main/java/org/apache/flink/dropwizard/metrics/FlinkGaugeWrapper.java
{ "start": 977, "end": 1468 }
class ____<T> implements com.codahale.metrics.Gauge<T> { private final Gauge<T> gauge; public FlinkGaugeWrapper(Gauge<T> gauge) { this.gauge = gauge; } @Override public T getValue() { return this.gauge.getValue(); } public static <T> FlinkGaugeWrapper<T> fromGauge(Gauge<?...
FlinkGaugeWrapper
java
quarkusio__quarkus
independent-projects/resteasy-reactive/server/processor/src/main/java/org/jboss/resteasy/reactive/server/processor/generation/multipart/MultipartFeature.java
{ "start": 281, "end": 581 }
class ____ extends AbstractFeatureScanner { @Override public void integrateWithIndexer(ServerEndpointIndexer.Builder builder, IndexView index) { builder.setMultipartReturnTypeIndexerExtension(new GeneratedHandlerMultipartReturnTypeIndexerExtension(classOutput)); } }
MultipartFeature
java
redisson__redisson
redisson/src/main/java/org/redisson/api/RLocalCachedMapRx.java
{ "start": 1082, "end": 1765 }
interface ____<K, V> extends RMapRx<K, V> { /** * Clears local cache across all instances * * @return void */ Completable clearLocalCache(); /** * Returns all keys stored in local cache * * @return keys */ Set<K> cachedKeySet(); /** * Returns all value...
RLocalCachedMapRx
java
spring-projects__spring-framework
spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportedConfigurationClassEnhancementTests.java
{ "start": 1383, "end": 2063 }
class ____ { @Test void autowiredConfigClassIsEnhancedWhenImported() { autowiredConfigClassIsEnhanced(ConfigThatDoesImport.class); } @Test void autowiredConfigClassIsEnhancedWhenRegisteredViaConstructor() { autowiredConfigClassIsEnhanced(ConfigThatDoesNotImport.class, ConfigToBeAutowired.class); } @Suppre...
ImportedConfigurationClassEnhancementTests
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/PrimitiveArrayPassedToVarargsMethodTest.java
{ "start": 2666, "end": 3268 }
class ____ { public void intVarargsMethod(int... ints) {} public void intArrayVarargsMethod(int[]... intArrays) {} public void objectVarargsMethodWithMultipleParams(Object obj1, Object... objs) {} public void doIt() { int[] intArray = {1, 2, 3}...
PrimitiveArrayPassedToVarargsMethodNegativeCases
java
spring-projects__spring-framework
spring-webflux/src/main/java/org/springframework/web/reactive/result/method/AbstractHandlerMethodMapping.java
{ "start": 22423, "end": 22591 }
class ____ { @SuppressWarnings("unused") public void handle() { throw new UnsupportedOperationException("Not implemented"); } } }
PreFlightAmbiguousMatchHandler
java
apache__hadoop
hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/datatypes/FileName.java
{ "start": 2649, "end": 6822 }
class ____ a hardcoded name if (!getName().equals(name)) { throw new RuntimeException("State name mismatch! Expected '" + getName() + "' but found '" + name + "'."); } } } public FileName(String fileName) { this.fileName = fileName; } @Overri...
has
java
elastic__elasticsearch
x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/allocation/SearchableSnapshotDiskThresholdIntegTests.java
{ "start": 18847, "end": 19843 }
class ____ extends MockRepository.Plugin { public static final String TYPE = "custom-mock"; @Override public Map<String, Repository.Factory> getRepositories( Environment env, NamedXContentRegistry namedXContentRegistry, ClusterService clusterService, ...
CustomMockRepositoryPlugin
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/ExecutionSlotAllocationContext.java
{ "start": 1364, "end": 3137 }
interface ____ extends InputsLocationsRetriever, StateLocationRetriever { /** * Returns required resources for an execution vertex. * * @param executionVertexId id of the execution vertex * @return required resources for the given execution vertex */ ResourceProfile getResourceProfile(...
ExecutionSlotAllocationContext
java
apache__camel
components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fix/BindySimpleKeyValuePairWithoutSectionMarshallDslTest.java
{ "start": 1674, "end": 3516 }
class ____ { private static final String URI_MOCK_RESULT = "mock:result"; private static final String URI_MOCK_ERROR = "mock:error"; private static final String URI_DIRECT_START = "direct:start"; private List<Map<String, Object>> models = new ArrayList<>(); @Produce(URI_DIRECT_START) private ...
BindySimpleKeyValuePairWithoutSectionMarshallDslTest
java
apache__camel
core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleExpressionBuilder.java
{ "start": 42164, "end": 42739 }
class ____ String text = exp.evaluate(exchange, String.class); Class<?> type = classResolver.resolveClass(text); if (type != null) { return type; } int pos = text.lastIndexOf('.'); if (pos > 0) { ...
type
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/allocator/ReserveSlotFunction.java
{ "start": 1140, "end": 1538 }
interface ____ { /** * Reserves the slot identified by the given allocation ID for the given resource profile. * * @param allocationId identifies the slot * @param resourceProfile resource profile the slot must be able to fulfill * @return reserved slot */ PhysicalSlot reserveSlot(...
ReserveSlotFunction
java
elastic__elasticsearch
modules/ingest-attachment/src/test/java/org/elasticsearch/ingest/attachment/AttachmentProcessorTests.java
{ "start": 1565, "end": 26972 }
class ____ extends ESTestCase { private Processor processor; @Before public void createStandardProcessor() { processor = new AttachmentProcessor( randomAlphaOfLength(10), null, "source_field", "target_field", EnumSet.allOf(AttachmentProce...
AttachmentProcessorTests
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/PropertySetterAccessException.java
{ "start": 389, "end": 619 }
class ____ extends PropertyAccessException { /** * Constructs a {@code PropertyAccessException} using the specified information. * * @param cause The underlying cause * @param persistentClass The
PropertySetterAccessException
java
apache__rocketmq
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/body/ConsumeByWho.java
{ "start": 956, "end": 2047 }
class ____ extends RemotingSerializable { private HashSet<String> consumedGroup = new HashSet<>(); private HashSet<String> notConsumedGroup = new HashSet<>(); private String topic; private int queueId; private long offset; public HashSet<String> getConsumedGroup() { return consumedGroup...
ConsumeByWho
java
quarkusio__quarkus
integration-tests/redis-devservices/src/test/java/io/quarkus/redis/devservices/it/DevServicesRedisCustomPortReusableServiceTest.java
{ "start": 463, "end": 873 }
class ____ { @Test @DisplayName("should start redis container with the given custom port") public void shouldStartRedisContainer() { // We could strengthen this test to make sure the container is the same as seen by other tests, but it's hard since we won't know the order Assertions.assertT...
DevServicesRedisCustomPortReusableServiceTest
java
micronaut-projects__micronaut-core
http-server-netty/src/main/java/io/micronaut/http/server/netty/NettyServerCustomizer.java
{ "start": 5076, "end": 6353 }
enum ____ { /** * The channel is a "listener" channel, e.g. a * {@link io.netty.channel.socket.ServerSocketChannel} representing a TCP listener the * server is bound to. */ LISTENER, /** * The channel is a connection channel, e.g. a * {@link ...
ChannelRole
java
quarkusio__quarkus
extensions/smallrye-reactive-messaging/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/signatures/MetadataInjectionTest.java
{ "start": 1887, "end": 2143 }
class ____ { private final int count; public CounterMetadata(int count) { this.count = count; } int getCount() { return count; } } @ApplicationScoped public static
CounterMetadata
java
alibaba__nacos
api/src/main/java/com/alibaba/nacos/api/remote/request/InternalRequest.java
{ "start": 965, "end": 1096 }
class ____ extends Request { @Override public String getModule() { return INTERNAL_MODULE; } }
InternalRequest
java
elastic__elasticsearch
x-pack/plugin/deprecation/qa/early-deprecation-plugin/src/main/java/org/elasticsearch/xpack/deprecation/earlyplugin/EarlyDeprecationTestPlugin.java
{ "start": 629, "end": 1006 }
class ____ extends Plugin implements ClusterPlugin { private DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(EarlyDeprecationTestPlugin.class); @Override public void onNodeStarted() { deprecationLogger.warn(DeprecationCategory.API, "early_deprecation", "Early deprecation emitted a...
EarlyDeprecationTestPlugin
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/action/datastreams/GetDataStreamAction.java
{ "start": 8199, "end": 32745 }
class ____ implements SimpleDiffable<DataStreamInfo>, ToXContentObject { public static final ParseField STATUS_FIELD = new ParseField("status"); public static final ParseField INDEX_TEMPLATE_FIELD = new ParseField("template"); public static final ParseField SETTINGS_FIELD = new Pars...
DataStreamInfo
java
ReactiveX__RxJava
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableDebounce.java
{ "start": 5100, "end": 6461 }
class ____<T, U> extends DisposableSubscriber<U> { final DebounceSubscriber<T, U> parent; final long index; final T value; boolean done; final AtomicBoolean once = new AtomicBoolean(); DebounceInnerSubscriber(DebounceSubscriber<T, U> parent, lon...
DebounceInnerSubscriber
java
google__dagger
hilt-android/main/java/dagger/hilt/android/HiltAndroidApp.java
{ "start": 901, "end": 1476 }
class ____ the Dagger components * should be generated. Since all components will be built in the same compilation as the annotated * application, all modules and entry points that should be installed in the component need to be * transitive compilation dependencies of the annotated application. * * <p>Usage of th...
where
java
alibaba__fastjson
src/test/java/com/alibaba/json/bvt/issue_2600/Issue2678.java
{ "start": 1298, "end": 1783 }
class ____ { private String name; private int age; @JSONField(serialzeFeatures = SerializerFeature.UseSingleQuotes) public String getName() { return name; } public void setName( String name ) { this.name = name; } ...
Person2
java
dropwizard__dropwizard
dropwizard-client/src/main/java/io/dropwizard/client/JerseyClientConfiguration.java
{ "start": 299, "end": 553 }
class ____ by {@link JerseyClientBuilder}. Extends * {@link HttpClientConfiguration}. * * @see HttpClientConfiguration * @see <a href="http://dropwizard.io/1.0.2/docs/manual/configuration.html#jerseyclient">Jersey Client Configuration</a> */ public
used
java
junit-team__junit5
jupiter-tests/src/test/java/org/junit/jupiter/engine/NestedTestClassesTests.java
{ "start": 16479, "end": 16642 }
class ____ { @Test void successful() { } @Test void failing() { Assertions.fail("something went wrong"); } @Nested
NestedInAbstractClass
java
apache__camel
core/camel-api/src/main/java/org/apache/camel/MessageHistory.java
{ "start": 945, "end": 2878 }
interface ____ { /** * Gets the route id at the point of this history. */ String getRouteId(); /** * Gets the node at the point of this history. */ NamedNode getNode(); /** * Gets the point in time the message history was created */ long getTime(); /** ...
MessageHistory
java
apache__hadoop
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AStorageStatistics.java
{ "start": 1330, "end": 1659 }
class ____ extends StorageStatisticsFromIOStatistics { public static final String NAME = "S3AStorageStatistics"; public S3AStorageStatistics(final IOStatistics ioStatistics) { super(NAME, "s3a", ioStatistics); } public S3AStorageStatistics() { super(NAME, "s3a", emptyStatistics()); } }
S3AStorageStatistics
java
mockito__mockito
mockito-core/src/test/java/org/mockitousage/basicapi/MocksSerializationForAnnotationTest.java
{ "start": 5886, "end": 8691 }
class ____ implements Serializable { Bar bar; Foo() { bar = new Bar(); bar.foo = this; } } @Test public void should_serialization_work() throws Exception { // given Foo foo = new Foo(); // when foo = serializeAndBack(foo); ...
Foo
java
apache__flink
flink-runtime/src/test/java/org/apache/flink/streaming/runtime/operators/windowing/EvictingWindowOperatorContractTest.java
{ "start": 2223, "end": 4738 }
class ____ extends WindowOperatorContractTest { protected <W extends Window, OUT> KeyedOneInputStreamOperatorTestHarness<Integer, Integer, OUT> createWindowOperator( WindowAssigner<Integer, W> assigner, Trigger<Integer, W> trigger, long allowe...
EvictingWindowOperatorContractTest
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/lock/PessimisticWriteWithOptionalOuterJoinBreaksRefreshTest.java
{ "start": 2165, "end": 2291 }
class ____ { @Id @GeneratedValue(strategy = GenerationType.AUTO) Long id; } @Entity(name = "Child") public static
Parent
java
spring-projects__spring-boot
module/spring-boot-jetty/src/test/java/org/springframework/boot/jetty/autoconfigure/metrics/JettyMetricsAutoConfigurationTests.java
{ "start": 12118, "end": 12319 }
class ____ { @Bean JettyServletWebServerFactory jettyFactory() { return new JettyServletWebServerFactory(0); } } @Configuration(proxyBeanMethods = false) static
ServletWebServerConfiguration
java
google__guice
extensions/throwingproviders/test/com/google/inject/throwingproviders/CheckedProviderTest.java
{ "start": 52167, "end": 53074 }
class ____ implements Foo { public InvalidFoo(String dep) {} @Override public String s() { return null; } } public void testNoThrowingInject() { try { Guice.createInjector( new AbstractModule() { @Override protected void configure() { ...
InvalidFoo
java
google__dagger
javatests/dagger/internal/codegen/SubcomponentCreatorValidationTest.java
{ "start": 32168, "end": 32267 }
interface ____ extends Supertype {", " @Subcomponent.Builder", "
HasSupertype
java
quarkusio__quarkus
independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/util/DateUtil.java
{ "start": 6412, "end": 6488 }
class ____ not be instantiated. */ private DateUtil() { } }
should
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsVolumeImpl.java
{ "start": 23126, "end": 46665 }
class ____ implements FsVolumeSpi.BlockIterator { private final File bpidDir; private final String name; private final String bpid; private long maxStalenessMs = 0; private List<String> cache; private long cacheMs; private BlockIteratorState state; BlockIteratorImpl(String bpid, Strin...
BlockIteratorImpl
java
apache__flink
flink-formats/flink-compress/src/main/java/org/apache/flink/formats/compress/extractor/DefaultExtractor.java
{ "start": 1021, "end": 1208 }
class ____<T> implements Extractor<T> { @Override public byte[] extract(T element) { return (element.toString() + System.lineSeparator()).getBytes(); } }
DefaultExtractor
java
elastic__elasticsearch
x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/common/text/TextTemplate.java
{ "start": 1037, "end": 4605 }
class ____ implements ToXContent { private final Script script; private final String inlineTemplate; private final boolean mayRequireCompilation; public TextTemplate(String template) { this.script = null; this.inlineTemplate = template; this.mayRequireCompilation = template.con...
TextTemplate