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 | junit-team__junit5 | junit-platform-commons/src/main/java/org/junit/platform/commons/support/SearchOption.java | {
"start": 755,
"end": 1348
} | enum ____ {
/**
* Search the inheritance hierarchy (i.e., the current class, implemented
* interfaces, and superclasses), but do not search on enclosing classes.
*
* @see Class#getSuperclass()
* @see Class#getInterfaces()
*/
DEFAULT,
/**
* Search the inheritance hierarchy as with the {@link #DEFAULT}... | SearchOption |
java | grpc__grpc-java | benchmarks/src/generated/main/grpc/io/grpc/benchmarks/proto/ReportQpsScenarioServiceGrpc.java | {
"start": 12141,
"end": 12763
} | class ____
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
ReportQpsScenarioServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return io.grpc.benchmarks.pro... | ReportQpsScenarioServiceBaseDescriptorSupplier |
java | apache__dubbo | dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/RuleConverter.java | {
"start": 960,
"end": 1045
} | interface ____ {
List<URL> convert(URL subscribeUrl, Object source);
}
| RuleConverter |
java | spring-projects__spring-framework | spring-test/src/main/java/org/springframework/test/context/TestConstructor.java | {
"start": 3585,
"end": 3758
} | interface ____ {
/**
* JVM system property used to change the default <em>test constructor
* autowire mode</em>: {@value}.
* <p>Acceptable values include | TestConstructor |
java | alibaba__druid | core/src/test/java/com/alibaba/druid/bvt/sql/oracle/alter/OracleAlterTableTest4.java | {
"start": 977,
"end": 2437
} | class ____ extends OracleTest {
public void test_0() throws Exception {
String sql = //
"ALTER TABLE ws_pledge_contract modify ( reference VARCHAR2(4000) )";
OracleStatementParser parser = new OracleStatementParser(sql);
List<SQLStatement> statementList = parser.parseStateme... | OracleAlterTableTest4 |
java | apache__hadoop | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/reduce/WrappedReducer.java | {
"start": 1905,
"end": 2476
} | class ____<KEYIN, VALUEIN, KEYOUT, VALUEOUT>
extends Reducer<KEYIN, VALUEIN, KEYOUT, VALUEOUT> {
/**
* A a wrapped {@link Reducer.Context} for custom implementations.
* @param reduceContext <code>ReduceContext</code> to be wrapped
* @return a wrapped <code>Reducer.Context</code> for custom implementati... | WrappedReducer |
java | quarkusio__quarkus | extensions/smallrye-reactive-messaging/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/mutiny/UniBean.java | {
"start": 372,
"end": 984
} | class ____ {
private static final String OUT_STREAM = "exclamated-stream";
final List<String> strings = Collections.synchronizedList(new ArrayList<>());
@Incoming(StringProducer.ANOTHER_STRING_STREAM)
@Outgoing(OUT_STREAM)
public Uni<String> transform(String input) {
return Uni.createFrom(... | UniBean |
java | spring-projects__spring-framework | spring-web/src/main/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolver.java | {
"start": 2410,
"end": 10900
} | class ____ {
/**
* A filter for selecting {@code @ExceptionHandler} methods.
*/
private static final MethodFilter EXCEPTION_HANDLER_METHODS = method ->
AnnotatedElementUtils.hasAnnotation(method, ExceptionHandler.class);
private static final ExceptionHandlerMappingInfo NO_MATCHING_EXCEPTION_HANDLER;
stati... | ExceptionHandlerMethodResolver |
java | elastic__elasticsearch | x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/inference/trainedmodel/LearningToRankConfigTests.java | {
"start": 7819,
"end": 10534
} | class ____ implements LearningToRankFeatureExtractorBuilder {
public static final ParseField NAME = new ParseField("test");
private final String featureName;
private static final ConstructingObjectParser<TestValueExtractor, Void> PARSER = new ConstructingObjectParser<>(
NAME.getPref... | TestValueExtractor |
java | apache__camel | catalog/camel-report-maven-plugin/src/test/java/org/apache/camel/maven/htmlxlsx/process/TestResultParserTest.java | {
"start": 1251,
"end": 2235
} | class ____ {
@Test
public void testTestResultParser() {
// keep jacoco happy
TestResultParser result = new TestResultParser();
assertNotNull(result);
}
@Test
public void testParse() {
TestResultParser parser = new TestResultParser();
TestResult result = ... | TestResultParserTest |
java | mockito__mockito | mockito-core/src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java | {
"start": 3963,
"end": 4027
} | class ____ implements Serializable {}
private | SerializableClass |
java | spring-projects__spring-framework | spring-jms/src/main/java/org/springframework/jms/core/JmsMessageOperations.java | {
"start": 8794,
"end": 13172
} | class ____ convert the payload to
* @return the converted payload of the reply message, possibly {@code null} if
* the message could not be received, for example due to a timeout
* @since 7.0
*/
<T> @Nullable T receiveSelectedAndConvert(String destinationName, @Nullable String messageSelector,
Class<T> targ... | to |
java | apache__camel | components/camel-pqc/src/test/java/org/apache/camel/component/pqc/PQCMLKEMGenerateEncapsulationAESTest.java | {
"start": 1626,
"end": 4900
} | class ____ extends CamelTestSupport {
@EndpointInject("mock:encapsulate")
protected MockEndpoint resultEncapsulate;
@Produce("direct:encapsulate")
protected ProducerTemplate templateEncapsulate;
@EndpointInject("mock:extract")
protected MockEndpoint resultExtract;
public PQCMLKEMGenerate... | PQCMLKEMGenerateEncapsulationAESTest |
java | quarkusio__quarkus | extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/HibernateOrmConfigPersistenceUnit.java | {
"start": 19840,
"end": 21363
} | enum ____ {
/**
* Assumes the value retrieved from the table/sequence is the lower end of the pool.
*
* Upon retrieving value `N`, the new pool of identifiers will go from `N` to `N + <allocation size> - 1`, inclusive.
*
* @asciidoclet
*/
POOLED_LO(S... | IdOptimizerType |
java | elastic__elasticsearch | server/src/main/java/org/elasticsearch/common/xcontent/ChunkedToXContent.java | {
"start": 1199,
"end": 5640
} | interface ____ {
/**
* Create an iterator of {@link ToXContent} chunks for a REST response for the given {@link RestApiVersion}. Each chunk is serialized
* with the same {@link XContentBuilder} and {@link ToXContent.Params}, which is also the same as the {@link ToXContent.Params} passed
* as the {@c... | ChunkedToXContent |
java | google__dagger | dagger-compiler/main/java/dagger/internal/codegen/writing/FactoryGenerator.java | {
"start": 5755,
"end": 8514
} | class ____ extends SourceFileGenerator<ContributionBinding> {
private static final ImmutableSet<BindingKind> VALID_BINDING_KINDS =
ImmutableSet.of(BindingKind.INJECTION, BindingKind.ASSISTED_INJECTION, BindingKind.PROVISION);
private final CompilerOptions compilerOptions;
private final SourceFiles sourceFi... | FactoryGenerator |
java | spring-projects__spring-security | config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java | {
"start": 68139,
"end": 68636
} | class ____ implements WebFilter {
private final ReactiveSessionRegistry sessionRegistry;
private SessionRegistryWebFilter(ReactiveSessionRegistry sessionRegistry) {
Assert.notNull(sessionRegistry, "sessionRegistry cannot be null");
this.sessionRegistry = sessionRegistry;
}
@Override
public Mon... | SessionRegistryWebFilter |
java | apache__camel | core/camel-core/src/test/java/org/apache/camel/model/GlobalOptionsDefinitionTest.java | {
"start": 1079,
"end": 3446
} | class ____ {
private static final String LOG_DEBUG_BODY_MAX_CHARS_VALUE = "500";
private static final String LOG_DEBUG_BODY_MAX_CHARS_DUP_VALUE = "400";
private GlobalOptionsDefinition instance;
private List<GlobalOptionDefinition> globalOptions;
private GlobalOptionDefinition nominalOption;
p... | GlobalOptionsDefinitionTest |
java | apache__camel | components/camel-mock/src/main/java/org/apache/camel/component/mock/AssertionClause.java | {
"start": 1236,
"end": 4489
} | class ____ extends MockExpressionClauseSupport<MockValueBuilder> implements Runnable {
protected final MockEndpoint mock;
protected volatile int currentIndex;
private final Set<Predicate> predicates = new LinkedHashSet<>();
private final Expression previous = new PreviousTimestamp();
private final ... | AssertionClause |
java | apache__camel | dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitEndpointBuilderFactory.java | {
"start": 45308,
"end": 45610
} | class ____ extends AbstractEndpointBuilder implements GitEndpointBuilder, AdvancedGitEndpointBuilder {
public GitEndpointBuilderImpl(String path) {
super(componentName, path);
}
}
return new GitEndpointBuilderImpl(path);
}
} | GitEndpointBuilderImpl |
java | apache__avro | lang/java/avro/src/test/java/org/apache/avro/reflect/TestReflect.java | {
"start": 41562,
"end": 42822
} | class ____ {
@AvroAlias(alias = "aliasName", space = "forbidden.space.entry")
int primitiveField;
}
@Test
void avroAliasOnField() {
Schema expectedSchema = SchemaBuilder.record(ClassWithAliasOnField.class.getSimpleName())
.namespace("org.apache.avro.reflect.TestReflect").fields().name("primi... | ClassWithAliasAndNamespaceOnField |
java | apache__hadoop | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/OfflineAggregationWriter.java | {
"start": 1556,
"end": 2885
} | class ____ extends AbstractService {
/**
* Construct the offline writer.
*
* @param name service name
*/
public OfflineAggregationWriter(String name) {
super(name);
}
/**
* Persist aggregated timeline entities to the offline store based on which
* track this entity is to be rolled up to.... | OfflineAggregationWriter |
java | apache__kafka | streams/src/main/java/org/apache/kafka/streams/kstream/ValueJoinerWithKey.java | {
"start": 958,
"end": 2453
} | interface ____ access to a read-only key that the user should not modify as this would lead to
* undefined behavior
* This is a stateless operation, i.e, {@link #apply(Object, Object, Object)} is invoked individually for each joining
* record-pair of a {@link KStream}-{@link KStream}, {@link KStream}-{@link KTable},... | provides |
java | elastic__elasticsearch | server/src/main/java/org/elasticsearch/index/mapper/SortedNumericDocValuesSyntheticFieldLoader.java | {
"start": 6433,
"end": 8476
} | class ____ implements DocValuesLoader, Values {
private final int[] docIdsInLeaf;
private final long[] values;
private final boolean[] hasValue;
private int idx = -1;
private SingletonDocValuesLoader(int[] docIdsInLeaf, long[] values, boolean[] hasValue) {
this.docId... | SingletonDocValuesLoader |
java | apache__flink | flink-runtime/src/test/java/org/apache/flink/runtime/operators/testutils/TestData.java | {
"start": 11747,
"end": 12688
} | class ____<T extends Tuple>
implements TypeSerializerFactory<T> {
private final TupleTypeInfo<T> info;
public MockTupleSerializerFactory(TupleTypeInfo<T> info) {
this.info = info;
}
@Override
public void writeParametersToConfig(Configuration config) {
... | MockTupleSerializerFactory |
java | spring-projects__spring-boot | core/spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/core/DefaultConnectionPortsTests.java | {
"start": 2175,
"end": 2977
} | class ____ {
@Test
void parse() {
ContainerPort port = ContainerPort.parse("123/tcp");
assertThat(port).isEqualTo(new ContainerPort(123, "tcp"));
}
@Test
void parseWhenNoSlashThrowsException() {
assertThatIllegalStateException().isThrownBy(() -> ContainerPort.parse("123"))
.withMessage("Unable ... | ContainerPortTests |
java | spring-projects__spring-boot | core/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindHandlerAdvisorTests.java | {
"start": 6364,
"end": 6800
} | class ____ {
private @Nullable String destination;
private String contentType = "application/json";
@Nullable String getDestination() {
return this.destination;
}
void setDestination(@Nullable String destination) {
this.destination = destination;
}
String getContentType() {
return this.conte... | BindingProperties |
java | spring-projects__spring-framework | spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationPerformanceTests.java | {
"start": 22014,
"end": 22180
} | class ____ {
public Bar bar = new Bar();
Bar b = new Bar();
public Bar getBaz() {
return b;
}
public Bar bay() {
return b;
}
}
public static | Foo |
java | apache__logging-log4j2 | log4j-core/src/main/java/org/apache/logging/log4j/core/config/Node.java | {
"start": 1059,
"end": 3460
} | class ____ {
/**
* Main plugin category for plugins which are represented as a configuration node. Such plugins tend to be
* available as XML elements in a configuration file.
*
* @since 2.1
*/
public static final String CATEGORY = "Core";
private Node parent;
private final St... | Node |
java | quarkusio__quarkus | independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/bcextensions/MethodConfigImpl.java | {
"start": 332,
"end": 1278
} | class ____ extends DeclarationConfigImpl<org.jboss.jandex.MethodInfo, MethodConfigImpl> implements MethodConfig {
MethodConfigImpl(org.jboss.jandex.IndexView jandexIndex, org.jboss.jandex.MutableAnnotationOverlay annotationOverlay,
org.jboss.jandex.MethodInfo jandexDeclaration) {
super(jandexInd... | MethodConfigImpl |
java | quarkusio__quarkus | extensions/websockets-next/deployment/src/test/java/io/quarkus/websockets/next/test/codec/ArrayTextCodecTest.java | {
"start": 1359,
"end": 1626
} | class ____ {
// The default JsonTextMessageCodec is used
@OnOpen
Item[] open() {
Item item = new Item();
item.setName("Foo");
item.setCount(1);
return new Item[] { item };
}
}
}
| Endpont |
java | apache__maven | its/core-it-suite/src/test/java/org/apache/maven/it/HttpServer.java | {
"start": 5289,
"end": 6687
} | class ____ {
private int port;
private String username;
private String password;
private StreamSource source;
public HttpServerBuilder port(int port) {
this.port = port;
return this;
}
public HttpServerBuilder username(String username... | HttpServerBuilder |
java | apache__camel | dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/XmppEndpointBuilderFactory.java | {
"start": 35729,
"end": 44259
} | interface ____
extends
XmppEndpointConsumerBuilder,
XmppEndpointProducerBuilder {
default AdvancedXmppEndpointBuilder advanced() {
return (AdvancedXmppEndpointBuilder) this;
}
/**
* Whether to login the user.
*
... | XmppEndpointBuilder |
java | netty__netty | example/src/main/java/io/netty/example/dns/tcp/TcpDnsServer.java | {
"start": 2287,
"end": 8256
} | class ____ {
private static final String QUERY_DOMAIN = "www.example.com";
private static final int DNS_SERVER_PORT = 53;
private static final String DNS_SERVER_HOST = "127.0.0.1";
private static final byte[] QUERY_RESULT = new byte[]{(byte) 192, (byte) 168, 1, 1};
public static void main(String[] ... | TcpDnsServer |
java | apache__flink | flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/hybrid/tiered/file/ProducerMergedPartitionFileIndex.java | {
"start": 2665,
"end": 7960
} | class ____ {
private final Path indexFilePath;
/**
* The regions belonging to each subpartitions.
*
* <p>Note that the field can be accessed by the writing and reading IO thread, so the lock is
* to ensure the thread safety.
*/
@GuardedBy("lock")
private final FileDataIndexCac... | ProducerMergedPartitionFileIndex |
java | apache__camel | core/camel-core/src/test/java/org/apache/camel/issues/RouteScopedOnExceptionWithInterceptSendToEndpointIssueTest.java | {
"start": 1399,
"end": 3306
} | class ____ extends ContextTestSupport {
@Test
public void testIssue() throws Exception {
RouteDefinition route = context.getRouteDefinitions().get(0);
AdviceWith.adviceWith(route, context, new AdviceWithRouteBuilder() {
@Override
public void configure() {
... | RouteScopedOnExceptionWithInterceptSendToEndpointIssueTest |
java | mybatis__mybatis-3 | src/test/java/org/apache/ibatis/type/YearMonthTypeHandlerTest.java | {
"start": 1025,
"end": 2734
} | class ____ extends BaseTypeHandlerTest {
private static final TypeHandler<YearMonth> TYPE_HANDLER = new YearMonthTypeHandler();
private static final YearMonth INSTANT = YearMonth.now();
@Override
@Test
public void shouldSetParameter() throws Exception {
TYPE_HANDLER.setParameter(ps, 1, INSTANT, null);
... | YearMonthTypeHandlerTest |
java | apache__kafka | server-common/src/main/java/org/apache/kafka/server/share/persister/InitializeShareGroupStateParameters.java | {
"start": 2141,
"end": 2829
} | class ____ {
private GroupTopicPartitionData<PartitionStateData> groupTopicPartitionData;
public Builder setGroupTopicPartitionData(GroupTopicPartitionData<PartitionStateData> groupTopicPartitionData) {
this.groupTopicPartitionData = groupTopicPartitionData;
return this;
... | Builder |
java | FasterXML__jackson-databind | src/main/java/tools/jackson/databind/type/ClassKey.java | {
"start": 114,
"end": 234
} | class ____, such as
* {@link tools.jackson.databind.ValueSerializer}s.
*<p>
* The reason for having a separate key | values |
java | hibernate__hibernate-orm | hibernate-core/src/main/java/org/hibernate/metamodel/internal/AbstractPojoInstantiator.java | {
"start": 359,
"end": 997
} | class ____ implements Instantiator {
private final Class<?> mappedPojoClass;
private final boolean isAbstract;
public AbstractPojoInstantiator(Class<?> mappedPojoClass) {
this.mappedPojoClass = mappedPojoClass;
this.isAbstract = isAbstractClass( mappedPojoClass );
}
public Class<?> getMappedPojoClass() {
r... | AbstractPojoInstantiator |
java | google__guice | core/test/com/google/inject/multibindings/ProvidesIntoTest.java | {
"start": 7692,
"end": 8459
} | interface ____ {
int[] value();
}
public void testArrayKeys_unwrapValuesTrue() {
Module m =
new AbstractModule() {
@ProvidesIntoMap
@ArrayUnwrappedKey({1, 2})
String provideFoo() {
return "foo";
}
};
try {
Guice.createInjector(M... | ArrayUnwrappedKey |
java | playframework__playframework | transport/client/play-ws/src/main/java/play/libs/ws/WSBodyWritables.java | {
"start": 409,
"end": 904
} | interface ____ extends DefaultBodyWritables, XMLBodyWritables, JsonBodyWritables {
default SourceBodyWritable multipartBody(
Source<? super Http.MultipartFormData.Part<Source<ByteString, ?>>, ?> body) {
String boundary = MultipartFormatter.randomBoundary();
Source<ByteString, ?> source = MultipartForma... | WSBodyWritables |
java | quarkusio__quarkus | extensions/resteasy-classic/resteasy/deployment/src/test/java/io/quarkus/resteasy/test/asyncio/AsyncIOTest.java | {
"start": 261,
"end": 687
} | class ____ {
@RegisterExtension
static final QuarkusUnitTest config = new QuarkusUnitTest()
.withApplicationRoot((jar) -> jar
.addClasses(AsyncIOResource.class))
.withConfigurationResource("application-asyncio.properties");
@Test
public void testAsyncIODoesN... | AsyncIOTest |
java | apache__camel | dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/main/java/org/apache/camel/dsl/yaml/deserializers/DataFormatsDefinitionDeserializer.java | {
"start": 2133,
"end": 3499
} | class ____ extends YamlDeserializerSupport implements ConstructNode {
@Override
public Object construct(Node node) {
final DataFormatsCustomizer customizer = new DataFormatsCustomizer();
final YamlDeserializationContext dc = getDeserializationContext(node);
final YamlDeserializationCon... | DataFormatsDefinitionDeserializer |
java | apache__kafka | clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java | {
"start": 53009,
"end": 53773
} | class ____ implements Validator {
final List<String> validStrings;
private ValidString(List<String> validStrings) {
this.validStrings = validStrings;
}
public static ValidString in(String... validStrings) {
return new ValidString(Arrays.asList(validStrings));
... | ValidString |
java | elastic__elasticsearch | x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/ClusterComputeHandler.java | {
"start": 2215,
"end": 16147
} | class ____ implements TransportRequestHandler<ClusterComputeRequest> {
private final ComputeService computeService;
private final ExchangeService exchangeService;
private final TransportService transportService;
private final Executor esqlExecutor;
private final DataNodeComputeHandler dataNodeComput... | ClusterComputeHandler |
java | ReactiveX__RxJava | src/main/java/io/reactivex/rxjava3/internal/subscribers/QueueDrainSubscriber.java | {
"start": 5076,
"end": 5238
} | class ____ {
volatile long p1, p2, p3, p4, p5, p6, p7;
volatile long p8, p9, p10, p11, p12, p13, p14, p15;
}
/** The WIP counter. */
| QueueDrainSubscriberPad0 |
java | apache__commons-lang | src/main/java/org/apache/commons/lang3/function/ByteSupplier.java | {
"start": 1011,
"end": 1133
} | interface ____ {
/**
* Supplies a byte.
*
* @return a result.
*/
byte getAsByte();
}
| ByteSupplier |
java | hibernate__hibernate-orm | hibernate-core/src/main/java/org/hibernate/engine/jdbc/spi/TypeSearchability.java | {
"start": 291,
"end": 1342
} | enum ____ {
/**
* Type is not searchable.
* @see DatabaseMetaData#typePredNone
*/
NONE,
/**
* Type is fully searchable
* @see DatabaseMetaData#typeSearchable
*/
FULL,
/**
* Type is valid only in {@code WHERE ... LIKE}
* @see DatabaseMetaData#typePredChar
*/
CHAR,
/**
* Type is supported only ... | TypeSearchability |
java | micronaut-projects__micronaut-core | inject-groovy/src/main/groovy/io/micronaut/ast/groovy/visitor/AbstractGroovyElement.java | {
"start": 2209,
"end": 23513
} | class ____ extends AbstractAnnotationElement {
private static final Pattern JAVADOC_PATTERN = Pattern.compile("(/\\s*\\*\\*)|\\s*\\*|(\\s*[*/])");
protected final SourceUnit sourceUnit;
protected final CompilationUnit compilationUnit;
protected final GroovyVisitorContext visitorContext;
private fi... | AbstractGroovyElement |
java | netty__netty | codec-compression/src/test/java/io/netty/handler/codec/compression/JdkZlibTest.java | {
"start": 13088,
"end": 13887
} | class ____ extends AbstractByteBufAllocator {
private static final int MAX = 1024 * 1024;
private final ByteBufAllocator wrapped;
LimitedByteBufAllocator(ByteBufAllocator wrapped) {
this.wrapped = wrapped;
}
@Override
public boolean isDirectBufferPooled() {... | LimitedByteBufAllocator |
java | google__error-prone | core/src/test/java/com/google/errorprone/matchers/NonNullLiteralTest.java | {
"start": 1370,
"end": 2171
} | class ____ {
public int getInt() {
return 2;
}
public long getLong() {
return 3L;
}
public float getFloat() {
return 4.0f;
}
public double getDouble() {
return 5.0d;
}
public boo... | A |
java | apache__dubbo | dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/ServiceInfoV2OrBuilder.java | {
"start": 845,
"end": 4194
} | interface ____
extends
// @@protoc_insertion_point(interface_extends:org.apache.dubbo.metadata.ServiceInfoV2)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The service name.
* </pre>
*
* <code>string name = 1;</code>
* @return The name.
*/
Strin... | ServiceInfoV2OrBuilder |
java | hibernate__hibernate-orm | hibernate-core/src/main/java/org/hibernate/engine/jdbc/proxy/SerializableBlobProxy.java | {
"start": 590,
"end": 2163
} | class ____ implements InvocationHandler, Serializable {
private static final Class<?>[] PROXY_INTERFACES = new Class[] { Blob.class, WrappedBlob.class, Serializable.class };
private final transient Blob blob;
/**
* Builds a serializable {@link Blob} wrapper around the given {@link Blob}.
*
* @param blob The ... | SerializableBlobProxy |
java | google__guava | guava/src/com/google/common/collect/Streams.java | {
"start": 28254,
"end": 28441
} | interface ____ only intended for use by callers of {@link #mapWithIndex(Stream,
* FunctionWithIndex)}.
*
* @since 21.0 (but only since 33.4.0 in the Android flavor)
*/
public | is |
java | apache__flink | flink-runtime/src/test/java/org/apache/flink/runtime/testutils/statemigration/V1TestTypeSerializerSnapshot.java | {
"start": 2817,
"end": 3222
} | class ____ TestType.");
}
}
@Override
public TypeSerializer<TestType> restoreSerializer() {
return new TestType.V1TestTypeSerializer();
}
@Override
public void writeSnapshot(DataOutputView out) throws IOException {}
@Override
public void readSnapshot(int readVersion, D... | for |
java | google__error-prone | core/src/test/java/com/google/errorprone/refaster/TemplatingTest.java | {
"start": 22617,
"end": 23232
} | class ____ {",
" public boolean example(Object foo) {",
" return foo instanceof CharSequence;",
" }",
"}");
assertThat(UTemplater.createTemplate(context, getMethodDeclaration("example")))
.isEqualTo(
ExpressionTemplate.create(
ImmutableMap.of(... | InstanceOfExample |
java | elastic__elasticsearch | x-pack/plugin/mapper-constant-keyword/src/main/java/org/elasticsearch/xpack/constantkeyword/mapper/ConstantKeywordFieldMapper.java | {
"start": 3546,
"end": 5566
} | class ____ extends FieldMapper.Builder {
// This is defined as updateable because it can be updated once, from [null] to any value,
// by a dynamic mapping update. Once it has been set, however, the value cannot be changed.
private final Parameter<String> value = new Parameter<>("value", true, ... | Builder |
java | elastic__elasticsearch | libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/policy/ExternalEntitlement.java | {
"start": 1114,
"end": 1988
} | interface ____ {
/**
* This is the list of parameter names that are
* parseable in {@link PolicyParser#parseEntitlement(String, String)}.
* The number and order of parameter names much match the number and order
* of constructor parameters as this is how the parser will pass in the
* parse... | ExternalEntitlement |
java | alibaba__fastjson | src/test/java/com/alibaba/json/bvt/bug/Issue101_field.java | {
"start": 598,
"end": 1191
} | class ____ {
private Object a;
private Object b;
private Object c;
public Object getA() {
return a;
}
public void setA(Object a) {
this.a = a;
}
@JSONField(serialzeFeatures=SerializerFeature.DisableCircularReferenceDetect)
... | VO |
java | apache__flink | flink-tests/src/test/java/org/apache/flink/test/runtime/leaderelection/ZooKeeperLeaderElectionITCase.java | {
"start": 9440,
"end": 10116
} | class ____ extends AbstractInvokable {
private static final Object lock = new Object();
private static volatile boolean isBlocking = true;
public BlockingOperator(Environment environment) {
super(environment);
}
@Override
public void invoke() throws Exceptio... | BlockingOperator |
java | google__dagger | javatests/dagger/internal/codegen/MissingBindingValidationTest.java | {
"start": 28309,
"end": 28563
} | class ____ {",
" @Inject TestClass(List list) {}",
"}");
Source usesTest =
CompilerTests.javaSource("test.UsesTest",
"package test;",
"",
"import javax.inject.Inject;",
"",
"final | TestClass |
java | FasterXML__jackson-databind | src/test/java/tools/jackson/databind/deser/OverloadedMethodsDeserTest.java | {
"start": 2656,
"end": 3708
} | class ____.
*/
@Test
public void testOverride() throws Exception
{
WasNumberBean bean = MAPPER.readValue
("{\"value\" : \"abc\"}", WasNumberBean.class);
assertNotNull(bean);
assertEquals("abc", bean.value);
}
// for [JACKSON-739]
@Test
public void te... | conflicts |
java | google__guice | core/test/com/google/inject/BinderTestSuite.java | {
"start": 11531,
"end": 13810
} | class ____ {
private String name = "test";
private Key<?> key = Key.get(A.class);
private Class<? extends Injectable> injectsKey = InjectsA.class;
private List<Module> modules =
Lists.<Module>newArrayList(
new AbstractModule() {
@Override
protected void co... | Builder |
java | grpc__grpc-java | core/src/test/java/io/grpc/internal/DelayedClientTransportTest.java | {
"start": 2785,
"end": 35502
} | class ____ {
@Rule
public final MockitoRule mocks = MockitoJUnit.rule();
@Mock private ManagedClientTransport.Listener transportListener;
@Mock private SubchannelPicker mockPicker;
@Mock private AbstractSubchannel mockSubchannel;
@Mock private TransportProvider mockInternalSubchannel;
@Mock private Clien... | DelayedClientTransportTest |
java | apache__camel | components/camel-dataset/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java | {
"start": 2215,
"end": 11278
} | class ____ extends MockEndpoint implements Service {
private final transient Logger log;
private final AtomicInteger receivedCounter = new AtomicInteger();
@UriPath(name = "name", description = "Name of DataSet to lookup in the registry")
@Metadata(required = true)
private volatile DataSet dataSet;
... | DataSetEndpoint |
java | google__error-prone | core/src/test/java/com/google/errorprone/bugpatterns/nullness/DereferenceWithNullBranchTest.java | {
"start": 2674,
"end": 2947
} | class ____ {}
Foo.Bar bar;
}
""")
.doTest();
}
@Test
public void noCrashOnQualifiedInterface() {
helper
.addSourceLines(
"Foo.java",
"""
import java.util.Map;
| Bar |
java | spring-projects__spring-security | config/src/test/java/org/springframework/security/config/annotation/web/configurers/HttpBasicConfigurerTests.java | {
"start": 4699,
"end": 10860
} | class ____ {
public final SpringTestContext spring = new SpringTestContext(this);
@Autowired
MockMvc mvc;
@Test
public void configureWhenRegisteringObjectPostProcessorThenInvokedOnBasicAuthenticationFilter() {
this.spring.register(ObjectPostProcessorConfig.class).autowire();
verify(ObjectPostProcessorConfig... | HttpBasicConfigurerTests |
java | apache__camel | components/camel-vertx/camel-vertx/src/test/java/org/apache/camel/component/vertx/VertxJsonArrayConverterTest.java | {
"start": 1142,
"end": 3663
} | class ____ extends CamelTestSupport {
private static final String BODY = "[\"Hello\",\"World\"]";
@Test
public void testBufferToJsonArray() {
JsonArray jsonArray = context.getTypeConverter().convertTo(JsonArray.class, Buffer.buffer(BODY));
Assertions.assertEquals(BODY, jsonArray.toString()... | VertxJsonArrayConverterTest |
java | apache__hadoop | hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/server/Server.java | {
"start": 24541,
"end": 24740
} | interface ____, it will be destroyed and
* removed before the given one is initialized and added.
* <p>
* If an exception is thrown the server is destroyed.
*
* @param klass service | exists |
java | google__error-prone | core/src/test/java/com/google/errorprone/bugpatterns/threadsafety/ImmutableCheckerTest.java | {
"start": 97842,
"end": 98455
} | interface ____<A, B> extends Function<A, B> {
default <C> ImmutableFunction<A, C> andThen(ImmutableFunction<B, C> fn) {
return x -> fn.apply(apply(x));
}
}
}
""")
.doTest();
}
@Test
public void checksEffectiveTypeOfRe... | ImmutableFunction |
java | hibernate__hibernate-orm | hibernate-core/src/main/java/org/hibernate/annotations/View.java | {
"start": 2253,
"end": 2340
} | interface ____ {
/**
* The SQL query that defines the view.
*/
String query();
}
| View |
java | google__auto | value/src/test/java/com/google/auto/value/processor/AutoValueCompilationTest.java | {
"start": 12384,
"end": 14689
} | class ____ extends Nesty {",
" private final @Annot(1) OuterWithTypeParam<@Annot(2) Double>"
+ ".@Annot(3) InnerWithTypeParam<@Annot(4) String> inner;",
"",
" AutoValue_Nesty(",
" @Annot(1) OuterWithTypeParam<@Annot(2) Double>"
+ ".@... | AutoValue_Nesty |
java | elastic__elasticsearch | server/src/main/java/org/elasticsearch/action/admin/indices/alias/get/GetAliasesAction.java | {
"start": 580,
"end": 851
} | class ____ extends ActionType<GetAliasesResponse> {
public static final GetAliasesAction INSTANCE = new GetAliasesAction();
public static final String NAME = "indices:admin/aliases/get";
private GetAliasesAction() {
super(NAME);
}
}
| GetAliasesAction |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/type/EnumArrayTest.java | {
"start": 8091,
"end": 8635
} | class ____ {
@Id
private Long id;
@Enumerated(EnumType.ORDINAL)
@Column( name = "the_array" )
private MyEnum[] theArray;
public TableWithEnumArrays() {
}
public TableWithEnumArrays(Long id, MyEnum[] theArray) {
this.id = id;
this.theArray = theArray;
}
public Long getId() {
return id;
... | TableWithEnumArrays |
java | spring-projects__spring-framework | spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.java | {
"start": 25480,
"end": 26767
} | class ____<T> {
private final T mapping;
private final HandlerMethod handlerMethod;
private final Set<String> directPaths;
private final @Nullable String mappingName;
private final boolean corsConfig;
public MappingRegistration(T mapping, HandlerMethod handlerMethod,
@Nullable Set<String> directPa... | MappingRegistration |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/batch/BatchRowCountWarningTest.java | {
"start": 1712,
"end": 5565
} | class ____ {
private TriggerOnPrefixLogListener trigger;
@BeforeAll
public void setUp(SessionFactoryScope scope) {
trigger = new TriggerOnPrefixLogListener( "HHH100001" );
LogInspectionHelper.registerListener( trigger, JdbcLogging.JDBC_LOGGER );
scope.inTransaction( session -> {
session.persist( new MyEnti... | BatchRowCountWarningTest |
java | micronaut-projects__micronaut-core | core-processor/src/main/java/io/micronaut/expressions/parser/ast/operator/binary/NumericComparisonOperation.java | {
"start": 1509,
"end": 2710
} | class ____ extends ExpressionNode {
private final ExpressionNode leftOperand;
private final ExpressionNode rightOperand;
private final ExpressionDef.ComparisonOperation.OpType type;
public NumericComparisonOperation(ExpressionNode leftOperand,
ExpressionNode right... | NumericComparisonOperation |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/cdi/lifecycle/ExtendedBeanManagerNotAvailableDuringTypeResolutionTest.java | {
"start": 3363,
"end": 3416
} | enum ____ {
VALUE1,
VALUE2;
}
public static | MyEnum |
java | google__error-prone | core/src/test/java/com/google/errorprone/bugpatterns/ForEachIterableTest.java | {
"start": 4628,
"end": 5084
} | class ____ {
abstract void doSomething(Object element);
void iteratorWhile(Iterable<?> list) {
Iterator<?> iterator = list.iterator();
while (iterator.hasNext()) {
iterator.next();
}
}
}
... | Test |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/schemamanager/SchemaManagerExplicitSchemaTest.java | {
"start": 1687,
"end": 2943
} | class ____ {
@BeforeEach
public void clean(SessionFactoryScope scope) {
scope.getSessionFactory().getSchemaManager().dropMappedObjects(true);
}
private Long countBooks(SessionImplementor s) {
return s.createQuery("select count(*) from BookForTesting", Long.class).getSingleResult();
}
@Test public void test... | SchemaManagerExplicitSchemaTest |
java | spring-projects__spring-framework | spring-context/src/main/java/org/springframework/format/datetime/standard/DateTimeConverters.java | {
"start": 7423,
"end": 7608
} | class ____ implements Converter<Long, Instant> {
@Override
public Instant convert(Long source) {
return Instant.ofEpochMilli(source);
}
}
private static | LongToInstantConverter |
java | apache__dubbo | dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/h1/DefaultHttp1Request.java | {
"start": 1087,
"end": 2105
} | class ____ implements Http1Request {
private final RequestMetadata httpMetadata;
private final HttpInputMessage httpInputMessage;
public DefaultHttp1Request(RequestMetadata httpMetadata, HttpInputMessage httpInputMessage) {
this.httpMetadata = httpMetadata;
this.httpInputMessage = httpInp... | DefaultHttp1Request |
java | quarkusio__quarkus | independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/defaultbean/DefaultBeanPriorityTest.java | {
"start": 2536,
"end": 2696
} | class ____ implements BarInterface {
@Override
public String ping() {
return BarImpl2.class.getSimpleName();
}
}
}
| BarImpl2 |
java | apache__camel | components/camel-jpa/src/test/java/org/apache/camel/examples/MultiSteps.java | {
"start": 1554,
"end": 3436
} | class ____ {
private static final Logger LOG = LoggerFactory.getLogger(MultiSteps.class);
private Long id;
private String address;
private int step;
public MultiSteps() {
}
public MultiSteps(String address) {
setAddress(address);
setStep(1);
}
@Id
@GeneratedVal... | MultiSteps |
java | netty__netty | microbench/src/main/java/io/netty/microbench/concurrent/ScheduledFutureTaskBenchmark.java | {
"start": 1360,
"end": 1535
} | class ____ extends AbstractMicrobenchmark {
static final EventLoop executor = new DefaultEventLoop();
@State(Scope.Thread)
public static | ScheduledFutureTaskBenchmark |
java | apache__camel | components/camel-cxf/camel-cxf-soap/src/test/java/org/apache/camel/component/cxf/jaxws/CxfConsumerPayLoadMarshalFaultTest.java | {
"start": 1255,
"end": 2531
} | class ____ extends CxfConsumerPayloadFaultTest {
protected static final String DETAILS = "<detail></detail>";
@Override
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
from(fromURI).process(new Processor() {
... | CxfConsumerPayLoadMarshalFaultTest |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/legacy/Component.java | {
"start": 194,
"end": 643
} | class ____ {
private String _name;
private SubComponent _subComponent;
/**
* @return
*/
public String getName() {
return _name;
}
/**
* @param string
*/
public void setName(String string) {
_name = string;
}
/**
* @return
*/
public SubComponent getSubComponent() {
return _subComponent;
... | Component |
java | hibernate__hibernate-orm | hibernate-core/src/main/java/org/hibernate/sql/exec/internal/lock/FollowOnLockingAction.java | {
"start": 11592,
"end": 13215
} | class ____ implements LoadedValuesCollector {
private final Collection<NavigablePath> pathsToLock;
private List<LoadedEntityRegistration> entitiesToLock;
private List<LoadedCollectionRegistration> collectionsToLock;
public LoadedValuesCollectorImpl(LockingClauseStrategy lockingClauseStrategy) {
pathsToLock... | LoadedValuesCollectorImpl |
java | grpc__grpc-java | core/src/test/java/io/grpc/internal/DnsNameResolverTest.java | {
"start": 3665,
"end": 4865
} | class ____ {
@Rule public final TestRule globalTimeout = new DisableOnDebug(Timeout.seconds(10));
@Rule public final MockitoRule mocks = MockitoJUnit.rule();
private final Map<String, ?> serviceConfig = new LinkedHashMap<>();
private static final int DEFAULT_PORT = 887;
private final SynchronizationContext... | DnsNameResolverTest |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/embeddables/nested/MonetaryAmount.java | {
"start": 456,
"end": 874
} | enum ____ {
USD,
EUR
}
private BigDecimal amount;
private CurrencyCode currency;
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
@Column(length = 3)
@Enumerated(EnumType.STRING)
public CurrencyCode getCurrency() {
return currenc... | CurrencyCode |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/orphan/one2one/fk/reversed/bidirectional/multilevelcascade/Preisregelung.java | {
"start": 383,
"end": 828
} | class ____ {
private Long id;
private Tranchenmodell tranchenmodell;
@Id
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, orphanRemoval = true)
public Tranchenmodell getTranchenmodell() {
return tranchenmodel... | Preisregelung |
java | apache__camel | core/camel-core-processor/src/main/java/org/apache/camel/processor/loadbalancer/QueueLoadBalancer.java | {
"start": 981,
"end": 1128
} | class ____ {@link LoadBalancer} implementations which choose a single destination for each exchange (rather
* like JMS Queues)
*/
public abstract | for |
java | spring-projects__spring-boot | core/spring-boot-testcontainers/src/testFixtures/java/org/springframework/boot/testcontainers/service/connection/ContainerConnectionDetailsFactoryHints.java | {
"start": 908,
"end": 1242
} | class ____ {
private ContainerConnectionDetailsFactoryHints() {
}
public static RuntimeHints getRegisteredHints(ClassLoader classLoader) {
RuntimeHints hints = new RuntimeHints();
new ContainerConnectionDetailsFactoriesRuntimeHints().registerHints(hints, classLoader);
return hints;
}
}
| ContainerConnectionDetailsFactoryHints |
java | ReactiveX__RxJava | src/main/java/io/reactivex/rxjava3/processors/SerializedProcessor.java | {
"start": 1009,
"end": 5667
} | class ____<T> extends FlowableProcessor<T> {
/** The actual subscriber to serialize Subscriber calls to. */
final FlowableProcessor<T> actual;
/** Indicates an emission is going on, guarded by this. */
boolean emitting;
/** If not null, it holds the missed NotificationLite events. */
AppendOnlyL... | SerializedProcessor |
java | apache__spark | common/network-common/src/main/java/org/apache/spark/network/shuffledb/LevelDB.java | {
"start": 883,
"end": 1487
} | class ____ implements DB {
private final org.iq80.leveldb.DB db;
public LevelDB(org.iq80.leveldb.DB db) {
this.db = db;
}
@Override
public void put(byte[] key, byte[] value) {
db.put(key, value);
}
@Override
public byte[] get(byte[] key) {
return db.get(key);
... | LevelDB |
java | spring-projects__spring-boot | core/spring-boot/src/main/java/org/springframework/boot/support/EnvironmentPostProcessorApplicationListener.java | {
"start": 2706,
"end": 7968
} | class ____ implements SmartApplicationListener, Ordered {
private static final String AOT_FEATURE_NAME = "EnvironmentPostProcessor";
/**
* The default order for the processor.
*/
public static final int DEFAULT_ORDER = Ordered.HIGHEST_PRECEDENCE + 10;
private final DeferredLogs deferredLogs;
private int or... | EnvironmentPostProcessorApplicationListener |
java | bumptech__glide | annotation/src/main/java/com/bumptech/glide/annotation/GlideOption.java | {
"start": 3538,
"end": 5086
} | class ____, a compile time error will result.
*/
int override() default OVERRIDE_NONE;
/**
* Sets the name for the generated static version of this method.
*
* <p>If this value is not set, the static method name is just the original method name with "Of"
* appended.
*/
String staticMethodName()... | match |
java | hibernate__hibernate-orm | hibernate-core/src/main/java/org/hibernate/query/sqm/tuple/internal/AnonymousTupleSqmAssociationPathSourceNew.java | {
"start": 1000,
"end": 3077
} | class ____<O, J>
extends AnonymousTupleSqmPathSourceNew<J>
implements SqmSingularPersistentAttribute<O, J> {
private final SimpleDomainType<J> domainType;
public AnonymousTupleSqmAssociationPathSourceNew(
String localPathName,
SqmPathSource<J> pathSource,
SqmDomainType<J> sqmPathType,
SimpleDomainTy... | AnonymousTupleSqmAssociationPathSourceNew |
java | elastic__elasticsearch | x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/kerberos/KerberosAuthenticationToken.java | {
"start": 588,
"end": 1120
} | class ____ an AuthenticationToken for Kerberos authentication
* using SPNEGO. The token stores base 64 decoded token bytes, extracted from
* the Authorization header with auth scheme 'Negotiate'.
* <p>
* Example Authorization header "Authorization: Negotiate
* YIIChgYGKwYBBQUCoII..."
* <p>
* If there is any erro... | represents |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.