language stringclasses 1
value | repo stringclasses 60
values | path stringlengths 22 294 | class_span dict | source stringlengths 13 1.16M | target stringlengths 1 113 |
|---|---|---|---|---|---|
java | spring-projects__spring-boot | core/spring-boot/src/test/java/org/springframework/boot/context/properties/source/MapConfigurationPropertySourceTests.java | {
"start": 1074,
"end": 3962
} | class ____ {
@Test
@SuppressWarnings("NullAway") // Test null check
void createWhenMapIsNullShouldThrowException() {
assertThatIllegalArgumentException().isThrownBy(() -> new MapConfigurationPropertySource(null))
.withMessageContaining("'map' must not be null");
}
@Test
void createWhenMapHasEntriesShouldAd... | MapConfigurationPropertySourceTests |
java | hibernate__hibernate-orm | hibernate-spatial/src/main/java/org/hibernate/spatial/criteria/internal/GeolatteSpatialCriteriaBuilderImpl.java | {
"start": 356,
"end": 612
} | class ____ extends SpatialCriteriaBuilderImpl<Geometry<?>>
implements GeolatteSpatialCriteriaBuilder {
public GeolatteSpatialCriteriaBuilderImpl(HibernateCriteriaBuilder criteriaBuilder) {
super( criteriaBuilder );
}
}
| GeolatteSpatialCriteriaBuilderImpl |
java | spring-projects__spring-boot | core/spring-boot/src/main/java/org/springframework/boot/ApplicationProperties.java | {
"start": 4624,
"end": 4914
} | class ____ implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
BindableRuntimeHintsRegistrar.forTypes(ApplicationProperties.class).registerHints(hints, classLoader);
}
}
}
| ApplicationPropertiesRuntimeHints |
java | mapstruct__mapstruct | processor/src/test/java/org/mapstruct/ap/test/erroneous/propertymapping/ErroneousMapper4.java | {
"start": 315,
"end": 476
} | interface ____ {
@BeanMapping( ignoreByDefault = true )
@Mapping( target = "property", source = "source" )
Target map(Source source);
}
| ErroneousMapper4 |
java | apache__hadoop | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/client/CsiAdaptorProtocolPBClientImpl.java | {
"start": 2813,
"end": 5360
} | class ____
implements CsiAdaptorProtocol, Closeable {
private final CsiAdaptorPB proxy;
public CsiAdaptorProtocolPBClientImpl(long clientVersion,
InetSocketAddress addr, Configuration conf) throws IOException {
RPC.setProtocolEngine(conf, CsiAdaptorPB.class, ProtobufRpcEngine2.class);
this.proxy... | CsiAdaptorProtocolPBClientImpl |
java | spring-projects__spring-security | saml2/saml2-service-provider/src/test/java/org/springframework/security/saml2/provider/service/web/authentication/logout/Saml2RelyingPartyInitiatedLogoutSuccessHandlerTests.java | {
"start": 2199,
"end": 5547
} | class ____ {
Saml2LogoutRequestResolver logoutRequestResolver = mock(Saml2LogoutRequestResolver.class);
Saml2LogoutRequestRepository logoutRequestRepository = mock(Saml2LogoutRequestRepository.class);
Saml2RelyingPartyInitiatedLogoutSuccessHandler logoutRequestSuccessHandler = new Saml2RelyingPartyInitiatedLogout... | Saml2RelyingPartyInitiatedLogoutSuccessHandlerTests |
java | apache__kafka | connect/runtime/src/test/java/org/apache/kafka/connect/runtime/AbstractHerderTest.java | {
"start": 37210,
"end": 42248
} | class
____ protocolConfigKey = producerOverrideKey(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG);
config.put(protocolConfigKey, "SASL_PLAINTEXT");
String maxRequestSizeConfigKey = producerOverrideKey(ProducerConfig.MAX_REQUEST_SIZE_CONFIG);
config.put(maxRequestSizeConfigKey, "420");
... | String |
java | FasterXML__jackson-databind | src/test/java/tools/jackson/databind/type/TypeFactoryTest.java | {
"start": 1964,
"end": 2183
} | class ____ {
// self-reference; should be resolved as "Comparable<Object>"
public <T extends Comparable<T>> T getFoobar() { return null; }
}
@SuppressWarnings("serial")
public static | SneakyBean2 |
java | apache__maven | compat/maven-builder-support/src/main/java/org/apache/maven/building/ProblemCollectorFactory.java | {
"start": 1009,
"end": 1399
} | class ____ {
/**
* The default implementation is not visible, create it with this factory
*
* @param problems starting set of problems, may be {@code null}
* @return a new instance of a ProblemCollector
*/
public static ProblemCollector newInstance(List<Problem> problems) {
ret... | ProblemCollectorFactory |
java | elastic__elasticsearch | modules/lang-painless/src/main/java/org/elasticsearch/painless/ir/BreakNode.java | {
"start": 616,
"end": 1097
} | class ____ extends StatementNode {
/* ---- begin visitor ---- */
@Override
public <Scope> void visit(IRTreeVisitor<Scope> irTreeVisitor, Scope scope) {
irTreeVisitor.visitBreak(this, scope);
}
@Override
public <Scope> void visitChildren(IRTreeVisitor<Scope> irTreeVisitor, Scope scope)... | BreakNode |
java | apache__hadoop | hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/S3AStoreImpl.java | {
"start": 36437,
"end": 36897
} | class ____ implements StreamFactoryCallbacks {
@Override
public S3Client getOrCreateSyncClient() throws IOException {
LOG.debug("Stream factory requested sync client");
return clientManager().getOrCreateS3Client();
}
@Override
public void incrementFactoryStatistic(Statistic statistic) ... | FactoryCallbacks |
java | apache__commons-lang | src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java | {
"start": 33578,
"end": 34861
} | class ____ being excluded, call normal object equals method on lhsClass.
if (bypassReflectionClasses != null
&& (bypassReflectionClasses.contains(lhsClass) || bypassReflectionClasses.contains(rhsClass))) {
isEquals = lhs.equals(rhs);
} else {
r... | is |
java | apache__hadoop | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/JHLogAnalyzer.java | {
"start": 21311,
"end": 22476
} | class ____ {
static final String KEY_FIELD_DELIMITER = "*";
String statName;
String dateTime;
String taskType;
IntervalKey(String stat, long timeMSec, String taskType) {
statName = stat;
SimpleDateFormat dateF = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
dateTime = dateF.format(... | IntervalKey |
java | quarkusio__quarkus | extensions/resteasy-reactive/rest-client/deployment/src/test/java/io/quarkus/rest/client/reactive/CustomHttpOptionsViaProgrammaticallyClientCreatedTest.java | {
"start": 627,
"end": 2477
} | class ____ {
private static final String EXPECTED_VALUE = "success";
@TestHTTPResource
URI baseUri;
@RegisterExtension
static final QuarkusUnitTest app = new QuarkusUnitTest()
.withApplicationRoot((jar) -> jar.addClasses(Client.class));
@Test
void shouldUseCustomHttpOptionsUs... | CustomHttpOptionsViaProgrammaticallyClientCreatedTest |
java | elastic__elasticsearch | modules/ingest-geoip/src/internalClusterTest/java/org/elasticsearch/ingest/geoip/AbstractGeoIpIT.java | {
"start": 1028,
"end": 2061
} | class ____ extends ESIntegTestCase {
private static final boolean useFixture = Booleans.parseBoolean(System.getProperty("geoip_use_service", "false")) == false;
@ClassRule
public static final GeoIpHttpFixture fixture = new GeoIpHttpFixture(useFixture);
protected String getEndpoint() {
return u... | AbstractGeoIpIT |
java | quarkusio__quarkus | extensions/resteasy-reactive/rest-client-jaxrs/deployment/src/main/java/io/quarkus/jaxrs/client/reactive/deployment/JaxrsClientReactiveProcessor.java | {
"start": 219594,
"end": 221124
} | class ____ {
final MethodParameter methodParameter;
final String typeName;
final Type type;
final FieldDescriptor field;
final Supplier<FieldDescriptor> paramAnnotationsField;
final Supplier<FieldDescriptor> genericsParametersField;
final int paramIndex;
... | SubResourceParameter |
java | apache__camel | components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsEndpointTest.java | {
"start": 1541,
"end": 6876
} | class ____ extends CamelTestSupport {
@Override
protected boolean useJmx() {
return true;
}
@Test
public void testDefaults() {
Endpoint endpoint = context.getEndpoint("sjms:test.SjmsEndpointTest");
assertNotNull(endpoint);
assertTrue(endpoint instanceof SjmsEndpoint... | SjmsEndpointTest |
java | google__error-prone | core/src/test/java/com/google/errorprone/bugpatterns/IncorrectMainMethodTest.java | {
"start": 4740,
"end": 5059
} | class ____ {
static void main(Object[] args) {}
}
""")
.doTest();
}
@Test
public void removePrivate() {
assume().that(Runtime.version().feature()).isLessThan(25);
refactoringHelper
.addInputLines(
"Test.java",
"""
| Test |
java | google__jimfs | jimfs/src/main/java/com/google/common/jimfs/Java8Compatibility.java | {
"start": 800,
"end": 915
} | class ____ {
static void clear(Buffer b) {
b.clear();
}
private Java8Compatibility() {}
}
| Java8Compatibility |
java | junit-team__junit5 | junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithRunnerWithDuplicateChangingChildDescriptions.java | {
"start": 665,
"end": 1704
} | class ____ extends org.junit.runner.Runner {
private final Class<?> testClass;
public Runner(Class<?> testClass) {
this.testClass = testClass;
}
@Override
public Description getDescription() {
var suiteDescription = Description.createSuiteDescription(testClass);
suiteDescription.addChild(getContai... | Runner |
java | bumptech__glide | library/src/main/java/com/bumptech/glide/load/data/FileDescriptorAssetPathFetcher.java | {
"start": 285,
"end": 890
} | class ____ extends AssetPathFetcher<AssetFileDescriptor> {
public FileDescriptorAssetPathFetcher(AssetManager assetManager, String assetPath) {
super(assetManager, assetPath);
}
@Override
protected AssetFileDescriptor loadResource(AssetManager assetManager, String path)
throws IOException {
retur... | FileDescriptorAssetPathFetcher |
java | spring-projects__spring-framework | spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/CustomRequestAttributesRequestContextHolderTests.java | {
"start": 4650,
"end": 5406
} | class ____ {
@RequestMapping("/singletonController")
public void handle() {
assertRequestAttributes();
}
}
private static void assertRequestAttributes() {
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
assertThat(requestAttributes).isInstanceOf(ServletRequestAttribut... | SingletonController |
java | apache__hadoop | hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/ProvidedReplica.java | {
"start": 2298,
"end": 11159
} | class ____ extends ReplicaInfo {
public static final Logger LOG =
LoggerFactory.getLogger(ProvidedReplica.class);
// Null checksum information for provided replicas.
// Shared across all replicas.
static final byte[] NULL_CHECKSUM_ARRAY =
FsDatasetUtil.createNullChecksumByteArray();
private URI ... | ProvidedReplica |
java | google__error-prone | core/src/test/java/com/google/errorprone/bugpatterns/StreamResourceLeakTest.java | {
"start": 7120,
"end": 7722
} | class ____ {
@MustBeClosed
Stream<String> f(Path p) throws IOException {
return Files.lines(p);
}
}
""")
.doTest();
}
@Test
public void returnFromMustBeClosedMethodWithChaining() {
testHelper
.addSourceLines(
... | Test |
java | micronaut-projects__micronaut-core | management/src/main/java/io/micronaut/management/endpoint/loggers/impl/DefaultLoggersManager.java | {
"start": 1507,
"end": 3471
} | class ____ implements LoggersManager<Map<String, Object>> {
private static final String LEVELS = "levels";
private static final String LOGGERS = "loggers";
@Override
public Publisher<Map<String, Object>> getLoggers(ManagedLoggingSystem loggingSystem) {
Map<String, Object> data = new LinkedHash... | DefaultLoggersManager |
java | spring-projects__spring-framework | spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java | {
"start": 17747,
"end": 19333
} | class ____ {
// NON-VOID-RETURNING, NON-INDEXED write method
public C setFoos(String[] foos) { return this; }
// indexed read method
public String getFoos(int i) { return null; }
}
BeanInfo bi = Introspector.getBeanInfo(C.class);
assertThat(hasReadMethodForProperty(bi, "foos")).isFalse();
a... | C |
java | quarkusio__quarkus | integration-tests/oidc-wiremock/src/main/java/io/quarkus/it/keycloak/SaluterServiceImpl.java | {
"start": 373,
"end": 802
} | class ____ extends MutinySaluterGrpc.SaluterImplBase {
@Inject
SecurityIdentity securityIdentity;
@Override
public Uni<SaluteReply> bearer(SaluteRequest request) {
var principalName = securityIdentity.getPrincipal().getName();
return Uni.createFrom().item(SaluteReply.newBuilder()
... | SaluterServiceImpl |
java | micronaut-projects__micronaut-core | http/src/test/java/io/micronaut/http/cookie/DefaultClientCookieEncoderTest.java | {
"start": 198,
"end": 705
} | class ____ {
@Test
void clientCookieEncoderIsDefaultClientCookieEncoder() {
assertInstanceOf(DefaultClientCookieEncoder.class, ClientCookieEncoder.INSTANCE);
}
@Test
void clientCookieEncoding() {
ClientCookieEncoder cookieEncoder = new DefaultClientCookieEncoder();
Cookie co... | DefaultClientCookieEncoderTest |
java | square__moshi | moshi/src/test/java/com/squareup/moshi/AdapterMethodsTest.java | {
"start": 27156,
"end": 27997
} | class ____<T> {
final T data;
public Box(T data) {
this.data = data;
}
@Override
public boolean equals(Object o) {
return o instanceof Box && ((Box) o).data.equals(data);
}
@Override
public int hashCode() {
return data.hashCode();
}
}
@Test
public void gen... | Box |
java | quarkusio__quarkus | integration-tests/smallrye-config/src/test/java/io/quarkus/it/smallrye/config/User.java | {
"start": 301,
"end": 1576
} | class ____ {
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid")
private String id;
private String firstName;
private String lastName;
private Integer age;
public String getId() {
return id;
}
public User setId(final... | User |
java | apache__hadoop | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/ReservationUpdateResponseInfo.java | {
"start": 1210,
"end": 1300
} | class ____ {
public ReservationUpdateResponseInfo() {
}
}
| ReservationUpdateResponseInfo |
java | google__guava | guava-testlib/test/com/google/common/testing/ClassSanityTesterTest.java | {
"start": 36826,
"end": 36979
} | class ____ {
@Keep
public AnAbstractClass(String s) {}
@Keep
public void failsToCheckNull(String s) {}
}
private static | AnAbstractClass |
java | apache__camel | core/camel-core/src/test/java/org/apache/camel/component/rest/FromRestPathPlaceholderTest.java | {
"start": 1191,
"end": 2497
} | class ____ extends ContextTestSupport {
@Override
protected Registry createCamelRegistry() throws Exception {
Registry jndi = super.createCamelRegistry();
jndi.bind("dummy-rest", new DummyRestConsumerFactory());
return jndi;
}
protected int getExpectedNumberOfRoutes() {
... | FromRestPathPlaceholderTest |
java | elastic__elasticsearch | server/src/main/java/org/elasticsearch/script/VectorScoreScriptUtils.java | {
"start": 5165,
"end": 6777
} | class ____ extends DenseVectorFunction {
protected final float[] queryVector;
/**
* Constructs a dense vector function used for float vectors.
*
* @param scoreScript The script in which this function was referenced.
* @param field The vector field.
* @param ... | FloatDenseVectorFunction |
java | elastic__elasticsearch | x-pack/plugin/sql/qa/jdbc/security/src/test/java/org/elasticsearch/xpack/sql/qa/jdbc/security/JdbcSimpleExampleIT.java | {
"start": 463,
"end": 988
} | class ____ extends SimpleExampleTestCase {
@Override
protected Settings restClientSettings() {
return JdbcConnectionIT.securitySettings();
}
@Override
protected String getProtocol() {
return JdbcConnectionIT.SSL_ENABLED ? "https" : "http";
}
@Override
protected Propert... | JdbcSimpleExampleIT |
java | spring-projects__spring-boot | module/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/Producible.java | {
"start": 1996,
"end": 2441
} | enum ____ should be used as the default value when an accept header
* of */* is provided, or if the {@code Accept} header is missing. Only
* one value can be marked as default. If no value is marked, then the value with the
* highest {@link Enum#ordinal() ordinal} is used as the default.
* @return i... | value |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/proxy/concrete/ConcreteProxyTest.java | {
"start": 13716,
"end": 14003
} | class ____ extends SingleBase {
private Integer child2Prop;
public SingleChild2() {
}
public SingleChild2(Long id, Integer child2Prop) {
super( id );
this.child2Prop = child2Prop;
}
}
// InheritanceType.JOINED
@Entity(name = "JoinedParent")
public static | SingleChild2 |
java | google__guice | extensions/persist/src/com/google/inject/persist/jpa/JpaFinderProxy.java | {
"start": 1494,
"end": 3429
} | class ____ implements MethodInterceptor {
private final Map<Method, FinderDescriptor> finderCache = new MapMaker().weakKeys().makeMap();
private final Provider<EntityManager> emProvider;
@Inject
public JpaFinderProxy(Provider<EntityManager> emProvider) {
this.emProvider = emProvider;
}
@Override
pub... | JpaFinderProxy |
java | elastic__elasticsearch | server/src/test/java/org/elasticsearch/search/runtime/GeoPointScriptFieldDistanceFeatureQueryTests.java | {
"start": 1921,
"end": 7381
} | class ____ extends AbstractScriptFieldQueryTestCase<
GeoPointScriptFieldDistanceFeatureQuery> {
private final Function<LeafReaderContext, AbstractLongFieldScript> leafFactory = ctx -> null;
@Override
protected GeoPointScriptFieldDistanceFeatureQuery createTestInstance() {
double lat = GeoTestUt... | GeoPointScriptFieldDistanceFeatureQueryTests |
java | apache__kafka | clients/src/main/java/org/apache/kafka/common/utils/Utils.java | {
"start": 61571,
"end": 62111
} | enum ____; never null, but may be empty
* if there are no values defined for the enum
*/
public static String[] enumOptions(Class<? extends Enum<?>> enumClass) {
Objects.requireNonNull(enumClass);
if (!enumClass.isEnum()) {
throw new IllegalArgumentException("Class " + enumClas... | class |
java | assertj__assertj-core | assertj-core/src/test/java/org/assertj/core/api/iterable/IterableAssert_anyMatch_Test.java | {
"start": 943,
"end": 1434
} | class ____ extends IterableAssertBaseTest {
private Predicate<Object> predicate;
@BeforeEach
void beforeEach() {
predicate = o -> o != null;
}
@Override
protected ConcreteIterableAssert<Object> invoke_api_method() {
return assertions.anyMatch(predicate);
}
@Override
protected void verify_i... | IterableAssert_anyMatch_Test |
java | apache__spark | common/network-common/src/main/java/org/apache/spark/network/util/TimerWithCustomTimeUnit.java | {
"start": 1748,
"end": 2565
} | class ____ extends Timer {
private final TimeUnit timeUnit;
private final double nanosPerUnit;
public TimerWithCustomTimeUnit(TimeUnit timeUnit) {
this(timeUnit, Clock.defaultClock());
}
TimerWithCustomTimeUnit(TimeUnit timeUnit, Clock clock) {
super(new ExponentiallyDecayingReservoir(), clock);
... | TimerWithCustomTimeUnit |
java | quarkusio__quarkus | extensions/funqy/funqy-knative-events/runtime/src/main/java/io/quarkus/funqy/runtime/bindings/knative/events/HeaderCloudEventImpl.java | {
"start": 598,
"end": 5083
} | class ____<T> extends AbstractCloudEvent<T> implements CloudEvent<T> {
String id;
String specVersion;
String source;
String type;
String subject;
OffsetDateTime time;
Map<String, String> extensions;
String dataSchema;
String dataContentType;
T data;
final MultiMap headers;... | HeaderCloudEventImpl |
java | elastic__elasticsearch | x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/alibabacloudsearch/AlibabaCloudSearchService.java | {
"start": 16714,
"end": 20175
} | class ____ {
public static InferenceServiceConfiguration get() {
return configuration.getOrCompute();
}
private static final LazyInitializable<InferenceServiceConfiguration, RuntimeException> configuration = new LazyInitializable<>(
() -> {
var configurat... | Configuration |
java | apache__kafka | clients/src/main/java/org/apache/kafka/clients/producer/internals/ProducerMetrics.java | {
"start": 1117,
"end": 1894
} | class ____ {
public final SenderMetricsRegistry senderMetrics;
public ProducerMetrics(Metrics metrics) {
this.senderMetrics = new SenderMetricsRegistry(metrics);
}
private List<MetricNameTemplate> getAllTemplates() {
return new ArrayList<>(this.senderMetrics.allTemplates());
}
... | ProducerMetrics |
java | elastic__elasticsearch | server/src/main/java/org/elasticsearch/snapshots/RepositoryIntegrityHealthIndicatorService.java | {
"start": 2346,
"end": 5814
} | class ____ implements HealthIndicatorService {
public static final String NAME = "repository_integrity";
private static final String HELP_URL = "https://ela.st/fix-repository-integrity";
public static final String NO_REPOS_CONFIGURED = "No snapshot repositories configured.";
public static final Strin... | RepositoryIntegrityHealthIndicatorService |
java | apache__camel | components/camel-dynamic-router/src/test/java/org/apache/camel/component/dynamicrouter/filter/DynamicRouterFilterServiceTest.java | {
"start": 1797,
"end": 13496
} | class ____ {
static final String DYNAMIC_ROUTER_CHANNEL = "test";
@Mock
PrioritizedFilter prioritizedFilter;
@Mock
PrioritizedFilterStatistics prioritizedFilterStatistics;
@Mock
Exchange exchange;
@Mock
Message message;
@Mock
Predicate predicate;
PrioritizedFilterF... | DynamicRouterFilterServiceTest |
java | mapstruct__mapstruct | processor/src/test/java/org/mapstruct/ap/test/factories/CustomListImpl.java | {
"start": 260,
"end": 537
} | class ____<T> extends LinkedList<T> implements CustomList<T> {
private final String typeProp;
public CustomListImpl(String typeProp) {
this.typeProp = typeProp;
}
@Override
public String getTypeProp() {
return typeProp;
}
}
| CustomListImpl |
java | apache__kafka | group-coordinator/src/test/java/org/apache/kafka/coordinator/group/modern/TopicIdsTest.java | {
"start": 1455,
"end": 7250
} | class ____ {
@Test
public void testTopicNamesCannotBeNull() {
assertThrows(NullPointerException.class, () -> new TopicIds(null, CoordinatorMetadataImage.EMPTY));
}
@Test
public void testTopicsImageCannotBeNull() {
assertThrows(NullPointerException.class, () -> new TopicIds(Set.of()... | TopicIdsTest |
java | netty__netty | transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringBufferRingConfig.java | {
"start": 968,
"end": 7122
} | class ____ {
private final short bgId;
private final short bufferRingSize;
private final int batchSize;
private final int maxUnreleasedBuffers;
private final boolean incremental;
private final IoUringBufferRingAllocator allocator;
private final boolean batchAllocation;
/**
* Create... | IoUringBufferRingConfig |
java | apache__flink | flink-runtime/src/main/java/org/apache/flink/runtime/state/StateBackend.java | {
"start": 9480,
"end": 10058
} | interface ____ {
/**
* @return The runtime environment of the executing task.
*/
Environment getEnv();
String getOperatorIdentifier();
@Nonnull
Collection<OperatorStateHandle> getStateHandles();
/**
* @return The registry to which created clo... | OperatorStateBackendParameters |
java | alibaba__druid | core/src/test/java/com/alibaba/druid/bvt/filter/wall/BitwiseXorTest.java | {
"start": 168,
"end": 639
} | class ____ extends TestCase {
public void test_true() throws Exception {
assertTrue(WallUtils.isValidateMySql(//
"SELECT * from t where (id = 1) ^ (1=1)"));
}
public void test_false() throws Exception {
WallConfig config = new WallConfig();
config.setConditionOpBitwi... | BitwiseXorTest |
java | quarkusio__quarkus | extensions/panache/hibernate-reactive-rest-data-panache/runtime/src/main/java/io/quarkus/hibernate/reactive/rest/data/panache/PanacheRepositoryResource.java | {
"start": 955,
"end": 1115
} | interface ____<Repository extends PanacheRepositoryBase<Entity, ID>, Entity, ID>
extends ReactiveRestDataResource<Entity, ID> {
}
| PanacheRepositoryResource |
java | quarkusio__quarkus | extensions/micrometer/deployment/src/test/java/io/quarkus/micrometer/deployment/binder/VertxHttpClientMetricsTest.java | {
"start": 1397,
"end": 5686
} | class ____ {
@RegisterExtension
static final QuarkusUnitTest config = new QuarkusUnitTest()
.withConfigurationResource("test-logging.properties")
.overrideConfigKey("quarkus.redis.devservices.enabled", "false")
.withApplicationRoot((jar) -> jar
.addClasse... | VertxHttpClientMetricsTest |
java | spring-projects__spring-framework | spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/JythonScriptTemplateTests.java | {
"start": 1408,
"end": 2733
} | class ____ {
@Test
void renderTemplate() throws Exception {
Map<String, Object> model = new HashMap<>();
model.put("title", "Layout example");
model.put("body", "This is the body");
String url = "org/springframework/web/reactive/result/view/script/jython/template.html";
MockServerHttpResponse response = re... | JythonScriptTemplateTests |
java | apache__camel | components/camel-http/src/test/java/org/apache/camel/component/http/HttpEndpointURLTest.java | {
"start": 1313,
"end": 4490
} | class ____ extends CamelTestSupport {
@Test
public void testHttpEndpointURLWithIPv6() {
HttpEndpoint endpoint = (HttpEndpoint) context.getEndpoint("http://[2a00:8a00:6000:40::1413]:30300/test?test=true");
assertEquals("http://[2a00:8a00:6000:40::1413]:30300/test?test=true", endpoint.getHttpUri(... | HttpEndpointURLTest |
java | apache__flink | flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/operators/aggregate/window/buffers/RecordsWindowBuffer.java | {
"start": 7462,
"end": 8877
} | class ____ implements WindowBuffer.LocalFactory {
private static final long serialVersionUID = 1L;
private final PagedTypeSerializer<RowData> keySer;
private final AbstractRowDataSerializer<RowData> inputSer;
private final RecordsCombiner.LocalFactory localFactory;
public Loca... | LocalFactory |
java | apache__camel | core/camel-core/src/test/java/org/apache/camel/processor/ClaimCheckEipPushPopExcludeBodyTest.java | {
"start": 1024,
"end": 2578
} | class ____ extends ContextTestSupport {
@Test
public void testPushPopBodyExclude() throws Exception {
getMockEndpoint("mock:a").expectedBodiesReceived("Hello World");
getMockEndpoint("mock:a").expectedHeaderReceived("foo", 123);
getMockEndpoint("mock:a").expectedHeaderReceived("bar", "M... | ClaimCheckEipPushPopExcludeBodyTest |
java | quarkusio__quarkus | integration-tests/grpc-mutual-auth/src/test/java/io/quarkus/grpc/examples/hello/HelloWorldMutualTlsEndpointIT.java | {
"start": 119,
"end": 200
} | class ____ extends HelloWorldMutualTlsEndpointTest {
}
| HelloWorldMutualTlsEndpointIT |
java | quarkusio__quarkus | extensions/jsonb/runtime/src/test/java/io/quarkus/jsonb/JsonbUnitTest.java | {
"start": 970,
"end": 1328
} | class ____ implements JsonbAdapter<Instant, Long> {
@Override
public Long adaptToJson(Instant obj) {
return obj.getEpochSecond();
}
@Override
public Instant adaptFromJson(Long obj) {
return Instant.ofEpochSecond(obj);
... | EpochSecondsAdapter |
java | elastic__elasticsearch | x-pack/plugin/security/qa/security-trial/src/javaRestTest/java/org/elasticsearch/xpack/security/apikey/ApiKeyRestIT.java | {
"start": 3678,
"end": 56906
} | class ____ extends SecurityOnTrialLicenseRestTestCase {
private static final String SYSTEM_USER = "system_user";
private static final SecureString SYSTEM_USER_PASSWORD = new SecureString("system-user-password".toCharArray());
private static final String END_USER = "end_user";
private static final Secur... | ApiKeyRestIT |
java | apache__dubbo | dubbo-demo/dubbo-demo-mcp-server/src/main/java/org/apache/dubbo/mcp/server/demo/demo/NestedDetail.java | {
"start": 857,
"end": 1471
} | class ____ {
private String detailInfo;
private Double value;
// Default constructor
public NestedDetail() {}
// Getters and Setters
public String getDetailInfo() {
return detailInfo;
}
public void setDetailInfo(String detailInfo) {
this.detailInfo = detailInfo;
}
... | NestedDetail |
java | elastic__elasticsearch | modules/aggregations/src/test/java/org/elasticsearch/aggregations/bucket/histogram/InternalAutoDateHistogramTests.java | {
"start": 2405,
"end": 17257
} | class ____ extends AggregationMultiBucketAggregationTestCase<InternalAutoDateHistogram> {
protected InternalAutoDateHistogram createTestInstance(
String name,
Map<String, Object> metadata,
InternalAggregations aggregations,
long startingDate,
RoundingInfo[] roundingInfos,
... | InternalAutoDateHistogramTests |
java | elastic__elasticsearch | server/src/test/java/org/elasticsearch/http/TestHttpResponse.java | {
"start": 699,
"end": 1683
} | class ____ implements HttpResponse {
private final RestStatus status;
private final BytesReference content;
private final Map<String, List<String>> headers = new HashMap<>();
TestHttpResponse(RestStatus status, BytesReference content) {
this.status = status;
this.content = content;
... | TestHttpResponse |
java | apache__flink | flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/network/AbstractServerHandler.java | {
"start": 8840,
"end": 14917
} | class ____<REQ extends MessageBody, RESP extends MessageBody>
implements Runnable {
private final AbstractServerHandler<REQ, RESP> handler;
private final ChannelHandlerContext ctx;
private final long requestId;
private final REQ request;
private final KvStateRequ... | AsyncRequestTask |
java | apache__hadoop | hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/sps/ExternalStoragePolicySatisfier.java | {
"start": 1898,
"end": 1986
} | class ____ and runs external SPS service.
*/
@InterfaceAudience.Private
public final | starts |
java | elastic__elasticsearch | x-pack/plugin/identity-provider/src/internalClusterTest/java/org/elasticsearch/xpack/idp/saml/sp/SamlServiceProviderIndexTests.java | {
"start": 2073,
"end": 10266
} | class ____ extends ESSingleNodeTestCase {
private ClusterService clusterService;
private SamlServiceProviderIndex serviceProviderIndex;
@Override
protected Collection<Class<? extends Plugin>> getPlugins() {
return List.of(LocalStateCompositeXPackPlugin.class, IdentityProviderPlugin.class, Inde... | SamlServiceProviderIndexTests |
java | apache__maven | its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2591MergeInheritedPluginConfigTest.java | {
"start": 1134,
"end": 3703
} | class ____ extends AbstractMavenIntegrationTestCase {
/**
* Test aggregation of list configuration items for build plugins when using 'combine.children=append' attribute.
* This variation of the test does not employ profiles.
*
* @throws Exception in case of failure
*/
@Test
public... | MavenITmng2591MergeInheritedPluginConfigTest |
java | elastic__elasticsearch | server/src/main/java/org/elasticsearch/common/util/CancellableSingleObjectCache.java | {
"start": 15936,
"end": 16985
} | class ____ {
@Nullable // if cleared
private ArrayList<Runnable> checks = new ArrayList<>();
synchronized void clear() {
checks = null;
}
synchronized void add(Runnable check) {
if (checks != null) {
checks.add(check);
}
... | CancellationChecks |
java | google__gson | gson/src/test/java/com/google/gson/common/TestTypes.java | {
"start": 2230,
"end": 2475
} | class ____ {
public static final String FIELD_KEY = "base";
public final Collection<Base> base;
public ClassWithBaseCollectionField(Collection<Base> base) {
this.base = base;
}
}
public static | ClassWithBaseCollectionField |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/valuehandlingmode/inline/SubQueryTest.java | {
"start": 5538,
"end": 6283
} | class ____ {
@Id
@GeneratedValue
Long id;
@ManyToOne(fetch = FetchType.LAZY)
Patient patient;
String description;
public Task() {
}
public Task(Patient patient) {
this.patient = patient;
}
@Override
public boolean equals(Object o) {
if ( this == o ) {
return true;
}
if ( o ... | Task |
java | elastic__elasticsearch | server/src/test/java/org/elasticsearch/index/codec/vectors/diskbbq/next/ESNextDiskBBQVectorsFormatTests.java | {
"start": 2855,
"end": 18101
} | class ____ extends BaseKnnVectorsFormatTestCase {
static {
LogConfigurator.loadLog4jPlugins();
LogConfigurator.configureESLogging(); // native access requires logging to be initialized
}
KnnVectorsFormat format;
@Before
@Override
public void setUp() throws Exception {
E... | ESNextDiskBBQVectorsFormatTests |
java | spring-projects__spring-framework | spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java | {
"start": 146596,
"end": 147055
} | class ____ {
private TestBean testBean;
private Map<String, TestBean> testBeanMap;
@Autowired(required = false)
public void setTestBeanMap(TestBean testBean, Map<String, TestBean> testBeanMap) {
this.testBean = testBean;
this.testBeanMap = testBeanMap;
}
public TestBean getTestBean() {
return t... | MapMethodInjectionBean |
java | elastic__elasticsearch | x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/dataframe/evaluation/classification/Recall.java | {
"start": 2441,
"end": 7192
} | class ____ implements EvaluationMetric {
public static final ParseField NAME = new ParseField("recall");
private static final String AGG_NAME_PREFIX = "classification_recall_";
static final String BY_ACTUAL_CLASS_AGG_NAME = AGG_NAME_PREFIX + "by_actual_class";
static final String PER_ACTUAL_CLASS_RECA... | Recall |
java | apache__logging-log4j2 | log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/MDCTestHelper.java | {
"start": 926,
"end": 1297
} | class ____ {
static MDCAdapter replaceMDCAdapter(final MDCAdapter adapter) throws Exception {
Field mdcAdapterField = MDC.class.getDeclaredField("MDC_ADAPTER");
mdcAdapterField.setAccessible(true);
final MDCAdapter old = (MDCAdapter) mdcAdapterField.get(null);
mdcAdapterField.set(nu... | MDCTestHelper |
java | netty__netty | transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollDatagramChannel.java | {
"start": 2316,
"end": 19852
} | class ____ extends AbstractEpollChannel implements DatagramChannel {
private static final InternalLogger logger = InternalLoggerFactory.getInstance(EpollDatagramChannel.class);
private static final boolean IP_MULTICAST_ALL =
SystemPropertyUtil.getBoolean("io.netty.channel.epoll.ipMulticastAll", fals... | EpollDatagramChannel |
java | spring-projects__spring-framework | spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java | {
"start": 2832,
"end": 4004
} | class ____ JMS 2.0 {@code JMSContext}
* calls and therefore requires the JMS 2.0 API to be present at runtime.
* It may nevertheless run against a JMS 1.1 driver (bound to the JMS 2.0 API)
* as long as no actual JMS 2.0 calls are triggered by the application's setup.
*
* <p>Useful for testing and standalone enviro... | supports |
java | apache__camel | components/camel-aws/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ComponentConfigurationTest.java | {
"start": 1158,
"end": 4655
} | class ____ extends CamelTestSupport {
@Test
public void createEndpointWithComponentElements() throws Exception {
EKS2Component component = context.getComponent("aws2-eks", EKS2Component.class);
component.getConfiguration().setAccessKey("XXX");
component.getConfiguration().setSecretKey("... | EKS2ComponentConfigurationTest |
java | mapstruct__mapstruct | processor/src/main/java/org/mapstruct/ap/internal/model/MappingBuilderContext.java | {
"start": 2923,
"end": 10289
} | interface ____ {
/**
* returns a parameter assignment
*
* @param mappingMethod target mapping method
* @param description the description source
* @param targetType return type to match
* @param formattingParameters used for formatting dates and numbers
... | MappingResolver |
java | quarkusio__quarkus | integration-tests/oidc/src/test/java/io/quarkus/it/keycloak/BearerTokenAuthorizationInGraalITCase.java | {
"start": 265,
"end": 510
} | class ____ extends BearerTokenAuthorizationTest {
DevServicesContext context;
@Test
public void testDevServicesProperties() {
assertFalse(context.devServicesProperties().isEmpty());
}
}
| BearerTokenAuthorizationInGraalITCase |
java | apache__camel | dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java | {
"start": 401013,
"end": 406976
} | class ____ extends YamlDeserializerBase<GetDefinition> {
public GetDefinitionDeserializer() {
super(GetDefinition.class);
}
@Override
protected GetDefinition newInstance() {
return new GetDefinition();
}
@Override
protected boolean setPro... | GetDefinitionDeserializer |
java | google__guava | android/guava/src/com/google/common/collect/TreeMultiset.java | {
"start": 18111,
"end": 18478
} | class ____<T> {
private @Nullable T value;
@Nullable T get() {
return value;
}
void checkAndSet(@Nullable T expected, @Nullable T newValue) {
if (value != expected) {
throw new ConcurrentModificationException();
}
value = newValue;
}
void clear() {
value ... | Reference |
java | alibaba__fastjson | src/test/java/com/alibaba/json/bvt/OverriadeTest.java | {
"start": 274,
"end": 505
} | class ____ {
protected long id;
public long getId() {
return id;
}
public void setId(long id) {
throw new UnsupportedOperationException();
}
}
public static | A |
java | quarkusio__quarkus | independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/invoker/basic/PrimitiveReturnValueInvokerTest.java | {
"start": 2527,
"end": 2715
} | class ____ {
public int hello(int i) {
return 1 + i;
}
public static double helloStatic(double d) {
return 1.0 + d;
}
}
}
| MyService |
java | elastic__elasticsearch | x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/TranslateTimeSeriesAggregate.java | {
"start": 20525,
"end": 22731
} | class ____ {
final Map<String, Integer> next = new HashMap<>();
String next(String prefix) {
int id = next.merge(prefix, 1, Integer::sum);
return prefix + "_$" + id;
}
}
void checkWindow(TimeSeriesAggregate agg) {
boolean hasWindow = false;
for (... | InternalNames |
java | apache__dubbo | dubbo-common/src/test/java/org/apache/dubbo/common/extension/ExtensionLoader_Adaptive_Test.java | {
"start": 8021,
"end": 8472
} | interface ____.apache.dubbo.common.extension.ext1.SimpleExt is not adaptive method!"));
}
}
@Test
void test_getAdaptiveExtension_ExceptionWhenNoUrlAttribute() throws Exception {
try {
ExtensionLoader.getExtensionLoader(NoUrlParamExt.class).getAdaptiveExtension();
fai... | org |
java | apache__hadoop | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestClientRedirect.java | {
"start": 22855,
"end": 23386
} | class ____ extends AMService implements HSClientProtocol {
public HistoryService() {
super(HSHOSTADDRESS);
this.protocol = HSClientProtocol.class;
}
@Override
public GetCountersResponse getCounters(GetCountersRequest request)
throws IOException {
hsContact = true;
Counte... | HistoryService |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/ondeletecascade/OnDeleteJoinedInheritanceTest.java | {
"start": 1992,
"end": 2109
} | class ____ {
@Id
long id;
boolean a;
}
@Entity(name = "B")
@OnDelete(action = OnDeleteAction.CASCADE)
static | A |
java | apache__kafka | raft/src/test/java/org/apache/kafka/raft/LeaderStateTest.java | {
"start": 2116,
"end": 38470
} | class ____ {
private final VoterSet.VoterNode localVoterNode = VoterSetTest.voterNode(ReplicaKey.of(0, Uuid.randomUuid()));
private final int epoch = 5;
private final LogContext logContext = new LogContext();
private final MockTime time = new MockTime();
private final int fetchTimeoutMs = 2000;
... | LeaderStateTest |
java | spring-projects__spring-framework | spring-beans/src/main/java/org/springframework/beans/BeanUtilsRuntimeHints.java | {
"start": 1158,
"end": 1625
} | class ____ implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
ReflectionHints reflectionHints = hints.reflection();
reflectionHints.registerType(ResourceEditor.class, MemberCategory.INVOKE_DECLARED_CONSTRUCTORS);
reflectionHints.regis... | BeanUtilsRuntimeHints |
java | playframework__playframework | core/play-streams/src/main/java/play/libs/streams/Accumulator.java | {
"start": 1784,
"end": 8609
} | class ____<E, A> {
private Accumulator() {}
/**
* Map the accumulated value.
*
* @param <B> the mapped value type
* @param f The function to perform the map with.
* @param executor The executor to run the function in.
* @return A new accumulator with the mapped value.
*/
public abstract <B>... | Accumulator |
java | apache__flink | flink-core-api/src/main/java/org/apache/flink/api/java/tuple/builder/Tuple2Builder.java | {
"start": 1267,
"end": 1385
} | class ____ {@link Tuple2}.
*
* @param <T0> The type of field 0
* @param <T1> The type of field 1
*/
@Public
public | for |
java | apache__camel | components/camel-test/camel-test-spring-junit5/src/main/java/org/apache/camel/test/spring/junit5/CamelSpringTestContextLoader.java | {
"start": 11368,
"end": 11495
} | class ____ test to enable inspection of annotations while the Spring context is being created.
*
* @return the test | under |
java | spring-projects__spring-framework | spring-beans/src/main/java/org/springframework/beans/factory/config/TypedStringValue.java | {
"start": 4292,
"end": 6414
} | class ____
* @return the resolved type to convert to
* @throws ClassNotFoundException if the type cannot be resolved
*/
public @Nullable Class<?> resolveTargetType(@Nullable ClassLoader classLoader) throws ClassNotFoundException {
String typeName = getTargetTypeName();
if (typeName == null) {
return null;... | name |
java | spring-projects__spring-framework | spring-core/src/main/java/org/springframework/core/style/SimpleValueStyler.java | {
"start": 1554,
"end": 2837
} | class ____ extends DefaultValueStyler {
/**
* Default {@link Class} styling function: {@link Class#getCanonicalName()}.
*/
public static final Function<Class<?>, String> DEFAULT_CLASS_STYLER = Class::getCanonicalName;
/**
* Default {@link Method} styling function: converts the supplied {@link Method}
* to ... | SimpleValueStyler |
java | apache__camel | components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/language/spel/SpringSimpleMultiLineExpressionTest.java | {
"start": 1148,
"end": 1654
} | class ____ extends SpringTestSupport {
@Override
protected AbstractXmlApplicationContext createApplicationContext() {
return new ClassPathXmlApplicationContext("org/apache/camel/language/SpringSimpleMultiLineExpressionTest.xml");
}
@Test
public void testSimpleMultiLineExpression() {
... | SpringSimpleMultiLineExpressionTest |
java | apache__flink | flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/connector/datagen/table/RandomGeneratorVisitor.java | {
"start": 3394,
"end": 21837
} | class ____ extends DataGenVisitorBase {
public static final int RANDOM_STRING_LENGTH_DEFAULT = 100;
public static final int RANDOM_BYTES_LENGTH_DEFAULT = 100;
public static final int RANDOM_COLLECTION_LENGTH_DEFAULT = 3;
private static final float NULL_RATE_DEFAULT = 0f;
private final ConfigOpt... | RandomGeneratorVisitor |
java | mapstruct__mapstruct | processor/src/main/java/org/mapstruct/ap/internal/model/common/FieldReference.java | {
"start": 328,
"end": 677
} | interface ____ {
/**
*
* @return variable name of the field
*/
String getVariableName();
/**
*
* @return type of the field
*/
Type getType();
/**
* @return additional template parameters
*/
default Map<String, Object> getTemplateParameter() {
re... | FieldReference |
java | quarkusio__quarkus | extensions/micrometer/deployment/src/main/java/io/quarkus/micrometer/deployment/binder/NettyBinderProcessor.java | {
"start": 4105,
"end": 5969
} | class ____ extends AbstractSupportEnabled {
MicrometerConfig mConfig;
@Override
MicrometerConfig getMicrometerConfig() {
return mConfig;
}
@Override
Class<?> getCheckClass() {
return REACTIVE_USAGE_CLASS;
}
}
@BuildStep(onlyIf = ... | ReactiveSupportEnabled |
java | google__dagger | dagger-compiler/main/java/dagger/internal/codegen/model/Scope.java | {
"start": 944,
"end": 3380
} | class ____ {
/**
* Creates a {@link Scope} object from the {@link javax.inject.Scope}-annotated annotation type.
*/
public static Scope scope(DaggerAnnotation scopeAnnotation) {
checkArgument(isScope(scopeAnnotation));
return new AutoValue_Scope(scopeAnnotation);
}
/**
* Returns {@code true} i... | Scope |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.