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
quarkusio__quarkus
integration-tests/main/src/test/java/io/quarkus/it/main/ReflectiveBeanITCase.java
{ "start": 107, "end": 166 }
class ____ extends ReflectiveBeanTest { }
ReflectiveBeanITCase
java
apache__camel
components/camel-whatsapp/src/main/java/org/apache/camel/component/whatsapp/model/MessageResponse.java
{ "start": 1047, "end": 1955 }
class ____ { @JsonProperty("messaging_product") private String messagingProduct = "whatsapp"; private List<Contact> contacts; private List<Message> messages; private String id; public MessageResponse() { } public String getMessagingProduct() { return messagingProduct; }...
MessageResponse
java
eclipse-vertx__vert.x
vertx-core/src/main/java/io/vertx/core/AsyncResult.java
{ "start": 959, "end": 5967 }
interface ____<T> { /** * The result of the operation. This will be null if the operation failed. * * @return the result or null if the operation failed. */ T result(); /** * A Throwable describing failure. This will be null if the operation succeeded. * * @return the cause or null if the o...
AsyncResult
java
apache__kafka
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/ConnectorConfigTest.java
{ "start": 2669, "end": 9182 }
class ____<R extends ConnectRecord<R>> implements Transformation<R>, Versioned { int magicNumber = 0; @Override public String version() { return "1.0"; } @Override public void configure(Map<String, ?> props) { magicNumber = Integer.parseInt((St...
SimpleTransformation
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/hybrid/tiered/tier/remote/RemoteTierFactory.java
{ "start": 2986, "end": 6579 }
class ____ implements TierFactory { private static final String DEFAULT_REMOTE_STORAGE_BASE_PATH = null; private static final int DEFAULT_REMOTE_TIER_EXCLUSIVE_BUFFERS = 1; private static final int DEFAULT_REMOTE_TIER_NUM_BYTES_PER_SEGMENT = 16 * 32 * 1024; private int bufferSizeBytes = -1; pri...
RemoteTierFactory
java
apache__flink
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/operator/StreamRecordComparator.java
{ "start": 1117, "end": 1574 }
class ____<IN> implements Comparator<StreamRecord<IN>>, Serializable { private static final long serialVersionUID = 1581054988433915305L; @Override public int compare(StreamRecord<IN> o1, StreamRecord<IN> o2) { if (o1.getTimestamp() < o2.getTimestamp()) { return -1; } else if (o...
StreamRecordComparator
java
spring-projects__spring-framework
spring-web/src/test/java/org/springframework/http/codec/ResourceHttpMessageWriterTests.java
{ "start": 1899, "end": 6351 }
class ____ { private static final Map<String, Object> HINTS = Collections.emptyMap(); private final ResourceHttpMessageWriter writer = new ResourceHttpMessageWriter(); private final MockServerHttpResponse response = new MockServerHttpResponse(); private final Mono<Resource> input = Mono.just(new ByteArrayResou...
ResourceHttpMessageWriterTests
java
apache__hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/oncrpc/RpcUtil.java
{ "start": 3657, "end": 5125 }
class ____ extends ChannelInboundHandlerAdapter { private static final Logger LOG = LoggerFactory .getLogger(RpcMessageParserStage.class); @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { ByteBuf buf; SocketAddress remoteAddress; ...
RpcMessageParserStage
java
spring-projects__spring-framework
spring-test/src/main/java/org/springframework/test/context/ActiveProfiles.java
{ "start": 2887, "end": 3055 }
class ____ * <em>inherit</em> bean definition profiles defined by a test superclass or * enclosing class. Specifically, the bean definition profiles for a test *
will
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/type/descriptor/jdbc/StructAttributeValues.java
{ "start": 231, "end": 930 }
class ____ implements ValueAccess { private final Object[] attributeValues; private final int size; private Object discriminator; public StructAttributeValues(int size, Object[] rawJdbcValues) { this.size = size; if ( rawJdbcValues == null || size != rawJdbcValues.length) { attributeValues = new Object[size...
StructAttributeValues
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/JaxbStandardAttribute.java
{ "start": 347, "end": 532 }
interface ____ extends JaxbPersistentAttribute { FetchType getFetch(); void setFetch(FetchType value); Boolean isOptional(); void setOptional(Boolean optional); }
JaxbStandardAttribute
java
spring-projects__spring-framework
spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTestTypes.java
{ "start": 7373, "end": 7564 }
interface ____ { TestBean getPrototypeDependency(); TestBean getPrototypeDependency(Object someParam); } /** * @author Rod Johnson * @author Juergen Hoeller */ abstract
OverrideInterface
java
apache__logging-log4j2
log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/util/InstantFormatter.java
{ "start": 6419, "end": 8057 }
class ____ implements Formatter { private final DateTimeFormatter formatter; private final MutableInstant mutableInstant; private JavaDateTimeFormatter(final String pattern, final Locale locale, final TimeZone timeZone) { this.formatter = DateTimeFormatter.ofPa...
JavaDateTimeFormatter
java
spring-projects__spring-framework
spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResultProcessingInterceptor.java
{ "start": 1824, "end": 6046 }
interface ____ { /** * Invoked immediately before the start of concurrent handling, in the same * thread that started it. This method may be used to capture state just prior * to the start of concurrent processing with the given {@code DeferredResult}. * @param request the current request * @param deferredR...
DeferredResultProcessingInterceptor
java
grpc__grpc-java
api/src/main/java/io/grpc/NameResolver.java
{ "start": 15832, "end": 20075 }
class ____ for the argument's scope. * * <p>{@link Args} are normally reserved for information in *support* of name resolution, not * the name to be resolved itself. However, there are rare cases where all or part of the target * name can't be represented by any standard URI scheme or can't be encod...
appropriate
java
apache__commons-lang
src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
{ "start": 3696, "end": 4281 }
class ____ from caching, but some comes // from the special int to StringBuffer conversion. // // The following produces a padded 2-digit number: // buffer.append((char)(value / 10 + '0')); // buffer.append((char)(value % 10 + '0')); // // Note that the fastest append to StringBuffer is ...
comes
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/StoragePolicyAdmin.java
{ "start": 8474, "end": 9963 }
class ____ implements AdminHelper.Command { @Override public String getName() { return "-satisfyStoragePolicy"; } @Override public String getShortUsage() { return "[" + getName() + " -path <path>]\n"; } @Override public String getLongUsage() { TableListing listi...
SatisfyStoragePolicyCommand
java
apache__maven
compat/maven-compat/src/test/java/org/apache/maven/project/inheritance/t07/ProjectInheritanceTest.java
{ "start": 1433, "end": 3078 }
class ____ extends AbstractProjectInheritanceTestCase { // ---------------------------------------------------------------------- // // p1 inherits from p0 // p0 inherits from super model // // or we can show it graphically as: // // p1 ---> p0 --> super model // // -------------...
ProjectInheritanceTest
java
apache__kafka
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginUtils.java
{ "start": 16525, "end": 18228 }
class ____ of the plugin. */ public static String prunedName(PluginDesc<?> plugin) { // It's currently simpler to switch on type than do pattern matching. return switch (plugin.type()) { case SOURCE, SINK -> prunePluginName(plugin, "Connector"); default -> prunePluginNam...
name
java
elastic__elasticsearch
server/src/test/java/org/elasticsearch/index/query/RankDocsQueryBuilderTests.java
{ "start": 1481, "end": 12429 }
class ____ extends AbstractQueryTestCase<RankDocsQueryBuilder> { private RankDoc[] generateRandomRankDocs() { int totalDocs = randomIntBetween(0, 10); RankDoc[] rankDocs = new RankDoc[totalDocs]; int currentDoc = 0; for (int i = 0; i < totalDocs; i++) { RankDoc rankDoc =...
RankDocsQueryBuilderTests
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/tableperclass/Product.java
{ "start": 456, "end": 492 }
class ____ extends Component { }
Product
java
apache__flink
flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/network/AbstractServerTest.java
{ "start": 8833, "end": 9578 }
class ____ extends MessageBody { private final String message; TestMessage(String message) { this.message = Preconditions.checkNotNull(message); } public String getMessage() { return message; } @Override public byte[] serialize() { ...
TestMessage
java
resilience4j__resilience4j
resilience4j-circuitbreaker/src/test/java/io/github/resilience4j/circuitbreaker/CircuitBreakerRegistryTest.java
{ "start": 21445, "end": 21918 }
class ____ implements RegistryEventConsumer<CircuitBreaker> { @Override public void onEntryAddedEvent(EntryAddedEvent<CircuitBreaker> entryAddedEvent) { } @Override public void onEntryRemovedEvent(EntryRemovedEvent<CircuitBreaker> entryRemoveEvent) { } ...
NoOpCircuitBreakerEventConsumer
java
google__auto
value/src/it/functional/src/test/java/com/google/auto/value/AutoOneOfTest.java
{ "start": 17898, "end": 17954 }
enum ____ { FUNKY_STRING } public static
Kind
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStatsSummary.java
{ "start": 1077, "end": 4172 }
class ____ implements Serializable { private static final long serialVersionUID = 5784360461635814038L; private static final int HISTOGRAM_WINDOW_SIZE = 10_000; // ~300Kb per job with four histograms /** State size statistics for all completed checkpoints. */ private final StatsSummary stateSize; ...
CompletedCheckpointStatsSummary
java
google__auto
value/src/it/functional/src/test/java/com/google/auto/value/AutoValueJava8Test.java
{ "start": 6411, "end": 10095 }
class ____ { abstract @Nullable String nullableString(); abstract int randomInt(); static NullableProperties create(@Nullable String nullableString, int randomInt) { return new AutoValue_AutoValueJava8Test_NullableProperties(nullableString, randomInt); } } @Test public void testNullablePr...
NullableProperties
java
playframework__playframework
web/play-java-forms/src/main/java/play/data/validation/Constraints.java
{ "start": 19864, "end": 19991 }
interface ____ { ValidateWith[] value(); } } /** Validator for {@code @ValidateWith} fields. */ public static
List
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/MissingCasesInEnumSwitchTest.java
{ "start": 5405, "end": 6090 }
enum ____ { ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT } void m(Case c) { // BUG: Diagnostic contains: TWO, THREE, FOUR, and 4 others ...
Case
java
apache__kafka
streams/src/main/java/org/apache/kafka/streams/StreamsConfig.java
{ "start": 29218, "end": 36970 }
class ____ implements the <code>org.apache.kafka.streams.processor.TimestampExtractor</code> interface."; /** {@code enable.metrics.push} */ @SuppressWarnings("WeakerAccess") public static final String ENABLE_METRICS_PUSH_CONFIG = CommonClientConfigs.ENABLE_METRICS_PUSH_CONFIG; @Deprecated public ...
that
java
spring-projects__spring-boot
module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpointWebExtension.java
{ "start": 1516, "end": 2947 }
class ____ { private final ConfigurationPropertiesReportEndpoint delegate; private final Show showValues; private final Set<String> roles; public ConfigurationPropertiesReportEndpointWebExtension(ConfigurationPropertiesReportEndpoint delegate, Show showValues, Set<String> roles) { this.delegate = delegate;...
ConfigurationPropertiesReportEndpointWebExtension
java
ReactiveX__RxJava
src/main/java/io/reactivex/rxjava3/internal/operators/single/SingleFlatMapBiSelector.java
{ "start": 3732, "end": 5163 }
class ____<T, U, R> extends AtomicReference<Disposable> implements SingleObserver<U> { private static final long serialVersionUID = -2897979525538174559L; final SingleObserver<? super R> downstream; final BiFunction<? super T, ? super U, ? extends R> resultSelector...
InnerObserver
java
spring-projects__spring-boot
core/spring-boot/src/main/java/org/springframework/boot/context/properties/source/SpringIterableConfigurationPropertySource.java
{ "start": 2131, "end": 8147 }
class ____ extends SpringConfigurationPropertySource implements IterableConfigurationPropertySource, CachingConfigurationPropertySource { private final BiPredicate<ConfigurationPropertyName, ConfigurationPropertyName> ancestorOfCheck; private final SoftReferenceConfigurationPropertyCache<Cache> cache; private v...
SpringIterableConfigurationPropertySource
java
apache__flink
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/data/util/DataFormatConverters.java
{ "start": 61362, "end": 62165 }
class ____ extends DataFormatConverter<TimestampData, Long> { private static final long serialVersionUID = 1L; private final int precision; public LongTimestampDataConverter(int precision) { this.precision = precision; } @Override TimestampData...
LongTimestampDataConverter
java
eclipse-vertx__vert.x
vertx-core/src/test/java/io/vertx/tests/future/FutureTest.java
{ "start": 71879, "end": 72235 }
interface ____<A, B, C, D, E, F, G, H, R> { R apply(A a, B b, C c, D d, E e, F f, G g, H h); default <V> EightFunction<A, B, C, D, E, F, G, H, V> andThen( Function<? super R, ? extends V> after) { Objects.requireNonNull(after); return (a, b, c, d, e, f, g, h) -> after.apply(apply(a, b, c, d,...
EightFunction
java
apache__flink
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/sequencedmultisetstate/linked/NodeSerializerTest.java
{ "start": 1240, "end": 1922 }
class ____ extends SerializerTestBase<Node> { @Override protected TypeSerializer<Node> createSerializer() { return new NodeSerializer(new RowDataSerializer(new IntType())); } @Override protected int getLength() { return -1; } @Override protected Class<Node> getTypeClas...
NodeSerializerTest
java
apache__camel
components/camel-pqc/src/generated/java/org/apache/camel/component/pqc/PQCEndpointUriFactory.java
{ "start": 513, "end": 2677 }
class ____ extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory { private static final String BASE = ":label"; private static final Set<String> PROPERTY_NAMES; private static final Set<String> SECRET_PROPERTY_NAMES; private static final Map<String, String>...
PQCEndpointUriFactory
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeRecovery.java
{ "start": 8042, "end": 9325 }
class ____ extends EditLogTestSetup { private final int paddingLength; public EltsTestEmptyLog(int paddingLength) { this.paddingLength = paddingLength; } @Override public void addTransactionsToLog(EditLogOutputStream elos, OpInstanceCache cache) throws IOException { padEditLog(...
EltsTestEmptyLog
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/hybrid/tiered/file/PartitionFileWriter.java
{ "start": 1198, "end": 1284 }
interface ____ the write logic for different types of shuffle * files. */ public
defines
java
apache__flink
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/types/DataTypePrecisionFixerTest.java
{ "start": 6703, "end": 7277 }
class ____ { private TypeInformation<?> typeInfo; private LogicalType logicalType; static TestSpecs fix(TypeInformation<?> typeInfo) { TestSpecs testSpecs = new TestSpecs(); testSpecs.typeInfo = typeInfo; return testSpecs; } TestSpecs logical...
TestSpecs
java
quarkusio__quarkus
extensions/hibernate-reactive/runtime/src/main/java/io/quarkus/hibernate/reactive/runtime/boot/registry/PreconfiguredReactiveServiceRegistryBuilder.java
{ "start": 4435, "end": 13142 }
class ____ { private final Map configurationValues = new HashMap(); private final List<StandardServiceInitiator<?>> initiators; private final List<ProvidedService<?>> providedServices = new ArrayList<>(); private final Collection<Integrator> integrators; private final StandardServiceRegistryImpl de...
PreconfiguredReactiveServiceRegistryBuilder
java
spring-projects__spring-framework
spring-context/src/test/java/org/springframework/scheduling/annotation/AnnotationAsyncExecutionInterceptorTests.java
{ "start": 2027, "end": 2206 }
class ____ { void m() { } } assertThat(i.getExecutorQualifier(C.class.getDeclaredMethod("m"))).isEqualTo("qMeta"); } } @Async("qMeta") @Retention(RetentionPolicy.RUNTIME) @
C
java
apache__dubbo
dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/HttpStatus.java
{ "start": 852, "end": 1544 }
enum ____ { OK(200), CREATED(201), ACCEPTED(202), NO_CONTENT(204), MOVED_PERMANENTLY(301), FOUND(302), BAD_REQUEST(400), UNAUTHORIZED(401), FORBIDDEN(403), NOT_FOUND(404), METHOD_NOT_ALLOWED(405), NOT_ACCEPTABLE(406), REQUEST_TIMEOUT(408), CONFLICT(409), UNSUP...
HttpStatus
java
elastic__elasticsearch
server/src/test/java/org/elasticsearch/search/aggregations/bucket/sampler/DiversifiedSamplerTests.java
{ "start": 2543, "end": 11590 }
class ____ extends AggregatorTestCase { private void writeBooks(RandomIndexWriter iw) throws IOException { String data[] = { // "id,cat,name,price,inStock,author_t,series_t,sequence_i,genre_s,genre_id", "0553573403,book,A Game of Thrones,7.99,true,George R.R. Martin,A Song of Ice an...
DiversifiedSamplerTests
java
apache__camel
components/camel-dynamic-router/src/main/java/org/apache/camel/component/dynamicrouter/routing/DynamicRouterConfiguration.java
{ "start": 1463, "end": 20297 }
class ____ { /** * Channel for the Dynamic Router. For example, if the Dynamic Router URI is "dynamic-router://test", then the * channel is "test". Channels are a way of keeping routing participants, their rules, and exchanges logically * separate from the participants, rules, and exchanges on other...
DynamicRouterConfiguration
java
google__auto
value/src/test/java/com/google/auto/value/processor/AutoValueCompilationTest.java
{ "start": 146640, "end": 146828 }
class ____ {}"); JavaFileObject string = JavaFileObjects.forSourceLines( "foo.bar.String", // "package foo.bar;", "", "public
Object
java
apache__camel
core/camel-api/src/main/java/org/apache/camel/FailedToCreateConsumerException.java
{ "start": 975, "end": 2141 }
class ____ extends RuntimeCamelException { private final String uri; public FailedToCreateConsumerException(String endpointURI, Throwable cause) { super("Failed to create Consumer for endpoint for: " + sanitizeUri(endpointURI) + ". Reason: " + cause, cause); this.uri = sanitizeUri(endpointURI)...
FailedToCreateConsumerException
java
elastic__elasticsearch
plugins/examples/custom-suggester/src/main/java/org/elasticsearch/example/customsuggester/CustomSuggestion.java
{ "start": 3632, "end": 5123 }
class ____ extends Suggest.Suggestion.Entry.Option { private String dummy; public Option(Text text, float score, String dummy) { super(text, score); this.dummy = dummy; } public Option(StreamInput in) throws IOException { ...
Option
java
eclipse-vertx__vert.x
vertx-core/src/main/java/io/vertx/core/net/impl/quic/KeyLogFile.java
{ "start": 732, "end": 1111 }
class ____ implements BoringSSLKeylog { private final File file; KeyLogFile(File file) { this.file = file; } @Override public void logKey(SSLEngine engine, String key) { try (PrintWriter out = new PrintWriter(new FileWriter(file, StandardCharsets.UTF_8, true))) { out.println(key); out.f...
KeyLogFile
java
netty__netty
codec-http3/src/main/java/io/netty/handler/codec/http3/DefaultHttp3UnknownFrame.java
{ "start": 835, "end": 2840 }
class ____ extends DefaultByteBufHolder implements Http3UnknownFrame { private final long type; public DefaultHttp3UnknownFrame(long type, ByteBuf payload) { super(payload); this.type = Http3CodecUtils.checkIsReservedFrameType(type); } @Override public long type() { return ...
DefaultHttp3UnknownFrame
java
playframework__playframework
documentation/manual/working/javaGuide/main/dependencyinjection/code/javaguide/di/guice/CircularDependencies.java
{ "start": 624, "end": 682 }
class ____ { // #circular-provider public
WithProvider
java
alibaba__druid
core/src/test/java/com/alibaba/druid/bvt/sql/oracle/alter/OracleAlterTableTest18.java
{ "start": 977, "end": 2487 }
class ____ extends OracleTest { public void test_0() throws Exception { String sql = // "ALTER TABLE project_measures DROP (diff_value_1, diff_value_2, diff_value_3)"; OracleStatementParser parser = new OracleStatementParser(sql); List<SQLStatement> statementList = parser.pa...
OracleAlterTableTest18
java
apache__avro
lang/java/avro/src/main/java/org/apache/avro/io/BinaryDecoder.java
{ "start": 20803, "end": 25497 }
class ____ extends InputStream { // maintain a reference to the buffer, so that if this // source is detached from the Decoder, and a client still // has a reference to it via inputStream(), bytes are not // lost protected BufferAccessor ba; protected ByteSource() { } abstract boolean ...
ByteSource
java
lettuce-io__lettuce-core
src/main/java/io/lettuce/core/AclSetuserArgs.java
{ "start": 21317, "end": 21450 }
class ____ extends KeywordArgument { public AllKeys() { super(ALLKEYS); } } private static
AllKeys
java
mybatis__mybatis-3
src/test/java/org/apache/ibatis/submitted/xml_external_ref/MultipleReverseIncludeTest.java
{ "start": 1344, "end": 3372 }
class ____ { @Test void multipleReverseIncludeXmlConfig() throws Exception { testMultipleReverseIncludes(getSqlSessionFactoryXmlConfig()); } @Test void multipleReverseIncludeJavaConfig() throws Exception { testMultipleReverseIncludes(getSqlSessionFactoryJavaConfig()); } private void testMultipl...
MultipleReverseIncludeTest
java
playframework__playframework
documentation/manual/working/javaGuide/main/pekko/code/javaguide/pekko/HelloActorProtocol.java
{ "start": 277, "end": 409 }
class ____ { public final String name; public SayHello(String name) { this.name = name; } } } // #protocol
SayHello
java
apache__rocketmq
common/src/main/java/org/apache/rocketmq/common/message/MessageId.java
{ "start": 886, "end": 1394 }
class ____ { private SocketAddress address; private long offset; public MessageId(SocketAddress address, long offset) { this.address = address; this.offset = offset; } public SocketAddress getAddress() { return address; } public void setAddress(SocketAddress addres...
MessageId
java
apache__camel
components/camel-grpc/src/main/java/org/apache/camel/component/grpc/client/GrpcExchangeForwarderFactory.java
{ "start": 1058, "end": 1749 }
class ____ { private GrpcExchangeForwarderFactory() { } public static GrpcExchangeForwarder createExchangeForwarder(GrpcConfiguration configuration, Object grpcStub) { if (configuration.getProducerStrategy() == GrpcProducerStrategy.SIMPLE) { return new GrpcSimpleExchangeForwarder(confi...
GrpcExchangeForwarderFactory
java
apache__kafka
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/AbstractWorkerSourceTaskTest.java
{ "start": 6096, "end": 47350 }
class ____ { private static final String TOPIC = "topic"; private static final String OTHER_TOPIC = "other-topic"; private static final Map<String, byte[]> PARTITION = Map.of("key", "partition".getBytes()); private static final Map<String, Integer> OFFSET = Map.of("key", 12); // Connect-format dat...
AbstractWorkerSourceTaskTest
java
apache__hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/NodeManagerHardwareUtils.java
{ "start": 1662, "end": 15340 }
class ____ { private static final Logger LOG = LoggerFactory.getLogger(NodeManagerHardwareUtils.class); private static boolean isHardwareDetectionEnabled(Configuration conf) { return conf.getBoolean( YarnConfiguration.NM_ENABLE_HARDWARE_CAPABILITY_DETECTION, YarnConfiguration.DEFAULT_NM...
NodeManagerHardwareUtils
java
alibaba__nacos
api/src/main/java/com/alibaba/nacos/api/naming/CommonParams.java
{ "start": 754, "end": 1250 }
class ____ { public static final String CODE = "code"; public static final String SERVICE_NAME = "serviceName"; public static final String CLUSTER_NAME = "clusterName"; public static final String NAMESPACE_ID = "namespaceId"; public static final String GROUP_NAME = "groupNam...
CommonParams
java
apache__camel
components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpServerConsumerValidationRunnable.java
{ "start": 3965, "end": 4076 }
class ____, the component URI and the connection information * <p/> * The String will in the format <
name
java
apache__hadoop
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/commit/impl/CommitOperations.java
{ "start": 27336, "end": 28681 }
class ____ { private final IOException exception; public static final MaybeIOE NONE = new MaybeIOE(null); /** * Construct with an exception. * @param exception exception */ public MaybeIOE(IOException exception) { this.exception = exception; } /** * Get any exception...
MaybeIOE
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/sort/DefaultInMemorySorterFactory.java
{ "start": 1147, "end": 2565 }
class ____<T> implements InMemorySorterFactory<T> { @Nonnull private final TypeSerializer<T> typeSerializer; @Nonnull private final TypeComparator<T> typeComparator; private final boolean useFixedLengthRecordSorter; public DefaultInMemorySorterFactory( @Nonnull TypeSerializer<T> typeSeri...
DefaultInMemorySorterFactory
java
elastic__elasticsearch
x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/azureaistudio/action/AzureAiStudioActionCreator.java
{ "start": 1414, "end": 3455 }
class ____ implements AzureAiStudioActionVisitor { private final Sender sender; private final ServiceComponents serviceComponents; public AzureAiStudioActionCreator(Sender sender, ServiceComponents serviceComponents) { this.sender = Objects.requireNonNull(sender); this.serviceComponents = O...
AzureAiStudioActionCreator
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/TypeParameterNamingTest.java
{ "start": 6290, "end": 6553 }
class ____ { public <B, B2, B3, B4, Bad> void method(Bad f) { Bad d = f; B2 wow = null; } } """) .addOutputLines( "out/Test.java", """
Test
java
apache__camel
components/camel-cxf/camel-cxf-soap/src/test/java/org/apache/camel/component/cxf/converter/ConverterTest.java
{ "start": 1550, "end": 3786 }
class ____ { @Test public void testToArray() throws Exception { List<String> testList = new ArrayList<>(); testList.add("string 1"); testList.add("string 2"); Object[] array = CxfConverter.toArray(testList); assertNotNull(array, "The array should not be null"); ...
ConverterTest
java
spring-projects__spring-framework
spring-beans/src/test/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBeanTests.java
{ "start": 1649, "end": 10619 }
class ____ { private DefaultListableBeanFactory bf; @BeforeEach void setUp() { bf = new DefaultListableBeanFactory(); } @Test void testNoArgGetter() { bf.registerBeanDefinition("testService", genericBeanDefinition(TestService.class).getBeanDefinition()); bf.registerBeanDefinition("factory", genericBe...
ServiceLocatorFactoryBeanTests
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/UnnecessaryAssignmentTest.java
{ "start": 5428, "end": 5833 }
class ____ { // BUG: Diagnostic contains: with @Inject should not @Inject boolean myFoo = false; } """) .doTest(); } @Test public void positiveOnTestParameter() { testHelper .addSourceLines( "Test.java", """ ...
Test
java
apache__kafka
streams/src/main/java/org/apache/kafka/streams/errors/ProductionExceptionHandler.java
{ "start": 6941, "end": 8766 }
enum ____ { /** Continue processing. * * <p> For this case, output records which could not be written successfully are lost. * Use this option only if you can tolerate data loss. */ CONTINUE(0, "CONTINUE"), /** Fail processing. * * <p> Kafka ...
ProductionExceptionHandlerResponse
java
ReactiveX__RxJava
src/main/java/io/reactivex/rxjava3/internal/schedulers/ExecutorScheduler.java
{ "start": 14741, "end": 16334 }
class ____ extends AtomicReference<Runnable> implements Runnable, Disposable, SchedulerRunnableIntrospection { private static final long serialVersionUID = -4101336210206799084L; final SequentialDisposable timed; final SequentialDisposable direct; DelayedRunnable(Runnable...
DelayedRunnable
java
apache__rocketmq
auth/src/main/java/org/apache/rocketmq/auth/authorization/builder/AuthorizationContextBuilder.java
{ "start": 1154, "end": 1391 }
interface ____ { List<DefaultAuthorizationContext> build(Metadata metadata, GeneratedMessageV3 message); List<DefaultAuthorizationContext> build(ChannelHandlerContext context, RemotingCommand command); }
AuthorizationContextBuilder
java
elastic__elasticsearch
x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/condition/CompareCondition.java
{ "start": 6226, "end": 8274 }
enum ____ { EQ() { @Override public boolean eval(Object v1, Object v2) { Integer compVal = LenientCompare.compare(v1, v2); return compVal != null && compVal == 0; } @Override public boolean supportsStructures() { ...
Op
java
apache__flink
flink-table/flink-sql-gateway/src/test/java/org/apache/flink/table/gateway/rest/OperationRelatedITCase.java
{ "start": 2594, "end": 8384 }
class ____ extends RestAPIITCaseBase { private static final String sessionName = "test"; private static final Map<String, String> properties = new HashMap<>(); static { properties.put("k1", "v1"); properties.put("k2", "v2"); } private static final OpenSessionHeaders openSessionHea...
OperationRelatedITCase
java
apache__maven
its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8385PropertyContributoSPITest.java
{ "start": 1027, "end": 1820 }
class ____ extends AbstractMavenIntegrationTestCase { /** * Verify that PropertyContributorSPI is used and does it's job */ @Test void testIt() throws Exception { File testDir = extractResources("/mng-8385"); Verifier verifier; verifier = newVerifier(new File(testDir, "s...
MavenITmng8385PropertyContributoSPITest
java
quarkusio__quarkus
extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java
{ "start": 56335, "end": 64319 }
enum ____ // These methods are used to handle the {msg:myEnum$CONSTANT_1} and {msg:myEnum$CONSTANT_2} if (messageTemplate == null && method.parametersCount() == 1) { Type paramType = method.parameterType(0); if (paramType.kind() == ...
constant
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/search/aggregations/AggregationInitializationException.java
{ "start": 714, "end": 1010 }
class ____ extends ElasticsearchException { public AggregationInitializationException(String msg, Throwable cause) { super(msg, cause); } public AggregationInitializationException(StreamInput in) throws IOException { super(in); } }
AggregationInitializationException
java
elastic__elasticsearch
x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/EsqlSpecTestCase.java
{ "start": 4591, "end": 5957 }
class ____ extends ESRestTestCase { @Rule(order = Integer.MIN_VALUE) public ProfileLogger profileLogger = new ProfileLogger(); private static final Logger LOGGER = LogManager.getLogger(EsqlSpecTestCase.class); private final String fileName; private final String groupName; private final String ...
EsqlSpecTestCase
java
apache__flink
flink-python/src/main/java/org/apache/flink/python/metric/embedded/MetricDistribution.java
{ "start": 1011, "end": 1232 }
class ____ implements Gauge<Long> { private long value; public void update(long value) { this.value = value; } @Override public Long getValue() { return value; } }
MetricDistribution
java
spring-projects__spring-boot
module/spring-boot-zipkin/src/test/java/org/springframework/boot/zipkin/autoconfigure/ZipkinAutoConfigurationTests.java
{ "start": 4880, "end": 5068 }
class ____ { @Bean HttpEndpointSupplier.Factory httpEndpointSupplier() { return new CustomHttpEndpointSupplierFactory(); } } static
CustomHttpEndpointSupplierFactoryConfiguration
java
apache__camel
components/camel-csimple-joor/src/test/java/org/apache/camel/language/csimple/joor/OriginalSimpleTest.java
{ "start": 93460, "end": 93593 }
class ____ { public Object[] getMyArray() { return new Object[] { "Hallo", "World", "!" }; } } }
MyClass
java
spring-projects__spring-framework
spring-core/src/test/java/org/springframework/core/type/AbstractMethodMetadataTests.java
{ "start": 7614, "end": 7717 }
class ____ { @Tag public static String test() { return ""; } } public static
WithStaticMethod
java
apache__flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/AsyncScalarFunction.java
{ "start": 3069, "end": 3332 }
class ____ extends AsyncScalarFunction { * public void eval(CompletableFuture<String> future, Object o) { * return future.complete(o.toString()); * } * } * * // a function that accepts any data type as argument and computes a STRING *
StringifyFunction
java
elastic__elasticsearch
libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/policy/entitlements/Entitlement.java
{ "start": 612, "end": 756 }
interface ____ ensure that only {@link Entitlement} are * part of a {@link Policy}. All entitlement classes should implement * this. */ public
to
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/ModifiedButNotUsedTest.java
{ "start": 6113, "end": 6745 }
class ____ { void test() { List<Integer> foo = new ArrayList<>(); foo.add(1); foo.get(0); foo = new ArrayList<>(); foo.add(1); foo.get(0); } } """) .doTest(); } ...
Test
java
elastic__elasticsearch
x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStore.java
{ "start": 2458, "end": 9534 }
class ____ { private static final Logger logger = LogManager.getLogger(TriggeredWatchStore.class); private final int scrollSize; private final Client client; private final TimeValue scrollTimeout; private final TriggeredWatch.Parser triggeredWatchParser; private final TimeValue defaultBulkTim...
TriggeredWatchStore
java
mapstruct__mapstruct
processor/src/test/java/org/mapstruct/ap/test/bugs/_1799/Issue1799Mapper.java
{ "start": 308, "end": 446 }
interface ____ { Issue1799Mapper INSTANCE = Mappers.getMapper( Issue1799Mapper.class ); Target map(Source source); }
Issue1799Mapper
java
google__auto
common/src/test/java/com/google/auto/common/OverridesTest.java
{ "start": 15693, "end": 18960 }
class ____<T extends Comparable<T>> extends Converter<String, Range<T>> { @Override protected String doBackward(Range<T> b) { return ""; } } @Test public void methodParams_RecursiveBound() { TypeElement stringToRangeConverter = getTypeElement(StringToRangeConverter.class); TypeEle...
StringToRangeConverter
java
elastic__elasticsearch
x-pack/plugin/esql/src/main/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/UrlDecodeEvaluator.java
{ "start": 4539, "end": 5111 }
class ____ implements EvalOperator.ExpressionEvaluator.Factory { private final Source source; private final EvalOperator.ExpressionEvaluator.Factory val; public Factory(Source source, EvalOperator.ExpressionEvaluator.Factory val) { this.source = source; this.val = val; } @Override ...
Factory
java
spring-projects__spring-security
config/src/test/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/authorization/OAuth2TokenExchangeGrantTests.java
{ "start": 5712, "end": 21351 }
class ____ { private static final String DEFAULT_TOKEN_ENDPOINT_URI = "/oauth2/token"; private static final String RESOURCE = "https://mydomain.com/resource"; private static final String AUDIENCE = "audience"; private static final String SUBJECT_TOKEN = "EfYu_0jEL"; private static final String ACTOR_TOKEN = "...
OAuth2TokenExchangeGrantTests
java
google__guava
android/guava-tests/test/com/google/common/reflect/TypeTokenTest.java
{ "start": 24250, "end": 31180 }
class ____ extends Fourth<String, Integer> {} public void testAssignableClassToClass() { @SuppressWarnings("rawtypes") // To test TypeToken<List> TypeToken<List> tokL = new TypeToken<List>() {}; assertTrue(tokL.isSupertypeOf(List.class)); assertTrue(tokL.isSupertypeOf(ArrayList.class)); assertFal...
ConcreteStringInteger
java
elastic__elasticsearch
x-pack/plugin/ql/src/main/java/org/elasticsearch/xpack/ql/async/QlStatusResponse.java
{ "start": 1291, "end": 7139 }
interface ____ { String id(); boolean isRunning(); boolean isPartial(); } public QlStatusResponse( String id, boolean isRunning, boolean isPartial, Long startTimeMillis, long expirationTimeMillis, RestStatus completionStatus ) { ...
AsyncStatus
java
quarkusio__quarkus
integration-tests/hibernate-orm-graphql-panache/src/main/java/io/quarkus/it/hibertnate/orm/graphql/panache/BookRepository.java
{ "start": 195, "end": 255 }
class ____ implements PanacheRepository<Book> { }
BookRepository
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/search/aggregations/AggregationBuilders.java
{ "start": 5484, "end": 13971 }
class ____ { private AggregationBuilders() {} /** * Create a new {@link ValueCount} aggregation with the given name. */ public static ValueCountAggregationBuilder count(String name) { return new ValueCountAggregationBuilder(name); } /** * Create a new {@link Avg} aggregatio...
AggregationBuilders
java
elastic__elasticsearch
x-pack/plugin/esql/arrow/src/test/java/org/elasticsearch/xpack/esql/arrow/ArrowResponseTests.java
{ "start": 20817, "end": 22000 }
class ____ implements Iterator<Object> { private final int fieldPos; private final ValueType type; private final Iterator<TestPage> pages; private TestPage page; private int position; EsqlValuesIterator(TestCase testCase, int column) { this.fieldPos = column...
EsqlValuesIterator
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryServerStateStoreServiceFactory.java
{ "start": 1015, "end": 1936 }
class ____ { /** * Constructs an instance of the configured storage class * * @param conf the configuration * @return the state storage instance */ public static HistoryServerStateStoreService getStore(Configuration conf) { Class<? extends HistoryServerStateStoreService> storeClass = Hi...
HistoryServerStateStoreServiceFactory
java
bumptech__glide
integration/cronet/src/main/java/com/bumptech/glide/integration/cronet/ChromiumUrlLoader.java
{ "start": 2245, "end": 3656 }
class ____ implements ModelLoaderFactory<GlideUrl, InputStream>, ByteBufferParser<InputStream> { private CronetRequestFactory requestFactory; @Nullable private final DataLogger dataLogger; @Nullable private final GlideExecutor executor; public StreamFactory(CronetRequestFactory requestFactory, @...
StreamFactory
java
alibaba__fastjson
src/test/java/com/alibaba/json/bvt/parser/JSONLexerTest_13.java
{ "start": 1683, "end": 1920 }
class ____ { public VO(){ } private double type; public double getType() { return type; } public void setType(double type) { this.type = type; } } }
VO
java
elastic__elasticsearch
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/action/FlushJobActionRequestTests.java
{ "start": 597, "end": 2130 }
class ____ extends AbstractBWCWireSerializationTestCase<Request> { @Override protected Request createTestInstance() { Request request = new Request(randomAlphaOfLengthBetween(1, 20)); if (randomBoolean()) { request.setWaitForNormalization(randomBoolean()); } if (rand...
FlushJobActionRequestTests
java
mapstruct__mapstruct
core/src/main/java/org/mapstruct/MapperConfig.java
{ "start": 2046, "end": 2346 }
interface ____ { * // ... * } * </code></pre> * <pre><code class='java'> * // result after applying CentralConfig * &#64;Mapper( * uses = { CustomMapperViaMapper.class, CustomMapperViaMapperConfig.class }, * unmappedTargetPolicy = ReportingPolicy.ERROR * ) * public
SourceTargetMapper
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/inlineme/InlinerTest.java
{ "start": 22107, "end": 22389 }
class ____ { public void doTest() { Client client = new Client(); client = client.noOp(); } } """) .addOutputLines( "out/Caller.java", """ public final
Caller