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
netty__netty
handler/src/test/java/io/netty/handler/ssl/SslHandlerCoalescingBufferQueueTest.java
{ "start": 2507, "end": 4921 }
enum ____ { BASIC_NIO_BUFFER(new Supplier() { @Override public ByteBuf get() { return Unpooled.wrappedBuffer(createNioBuffer()); } }, NO_WRAPPER), READ_ONLY_AND_DUPLICATE_NIO_BUFFER(new Supplier() { @Override public Byte...
CumulationTestScenario
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/criteria/paths/LineItem.java
{ "start": 406, "end": 1079 }
class ____ { private String id; private int quantity; private Order order; public LineItem() { } public LineItem(String v1, int v2, Order v3) { id = v1; quantity = v2; order = v3; } public LineItem(String v1, int v2) { id = v1; quantity = v2; } @Id @Column(name = "ID") public String getId() {...
LineItem
java
apache__hadoop
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFsShellList.java
{ "start": 1163, "end": 3234 }
class ____ { private static Configuration conf; private static FsShell shell; private static LocalFileSystem lfs; private static Path testRootDir; @BeforeAll public static void setup() throws Exception { conf = new Configuration(); shell = new FsShell(conf); lfs = FileSystem.getLocal(conf); ...
TestFsShellList
java
quarkusio__quarkus
integration-tests/openapi/src/test/java/io/quarkus/it/openapi/AbstractInputStreamTest.java
{ "start": 307, "end": 1992 }
class ____ extends AbstractTest { protected static final String APPLICATION_OCTET_STREAM = "application/octet-stream"; protected void testServiceInputStreamRequest(String path, String expectedContentType) throws IOException { File f = tempFile(); byte[] responseFile = RestAssured ...
AbstractInputStreamTest
java
apache__maven
api/maven-api-core/src/main/java/org/apache/maven/api/Toolchain.java
{ "start": 1112, "end": 2623 }
interface ____ users to define and configure various toolchains * that can be utilized by Maven during the build process. Toolchains can * include compilers, interpreters, and other tools that are necessary * for building a project in a specific environment.</p> * * <p>Toolchains are defined in the Maven toolchain...
allows
java
google__error-prone
core/src/test/java/com/google/errorprone/fixes/SuggestedFixesTest.java
{ "start": 47719, "end": 48029 }
class ____ { @SuppressWarnings(value = "KeepMe") int BEST = 42; } """) .doTest(TestMode.AST_MATCH); } /** A {@link BugChecker} for testing. */ @BugPattern(name = "UpdateDoNotCallArgument", summary = "", severity = ERROR) public static final
Test
java
google__guava
guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/ListenableFuture.java
{ "start": 2806, "end": 2944 }
interface ____<T extends @Nullable Object, V extends @Nullable Object> { V onInvoke(T p0); } @JsFunction
IThenOnFulfilledCallbackFn
java
micronaut-projects__micronaut-core
router/src/main/java/io/micronaut/web/router/version/RoutesVersioningConfiguration.java
{ "start": 1193, "end": 2327 }
class ____ implements Toggleable { /** * The configuration property. */ public static final String PREFIX = "micronaut.router.versioning"; private static final boolean DEFAULT_ENABLED = false; private boolean enabled = DEFAULT_ENABLED; private String defaultVersion; /** * @param...
RoutesVersioningConfiguration
java
apache__maven
its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6090CIFriendlyTest.java
{ "start": 1273, "end": 3719 }
class ____ extends AbstractMavenIntegrationTestCase { public MavenITmng6090CIFriendlyTest() { // The first version which contains the fix for the MNG-issue. // TODO: Think about it! super(); } /** * Check that the resulting run will not fail in case * of defining the prop...
MavenITmng6090CIFriendlyTest
java
apache__rocketmq
proxy/src/main/java/org/apache/rocketmq/proxy/processor/channel/ChannelProtocolType.java
{ "start": 864, "end": 1153 }
enum ____ { UNKNOWN("unknown"), GRPC_V2("grpc_v2"), GRPC_V1("grpc_v1"), REMOTING("remoting"); private final String name; ChannelProtocolType(String name) { this.name = name; } public String getName() { return name; } }
ChannelProtocolType
java
grpc__grpc-java
examples/example-jwt-auth/src/main/java/io/grpc/examples/jwtauth/JwtCredential.java
{ "start": 1024, "end": 2070 }
class ____ extends CallCredentials { private final String subject; JwtCredential(String subject) { this.subject = subject; } @Override public void applyRequestMetadata(final RequestInfo requestInfo, final Executor executor, final MetadataApplier metadataApplier) { // Make a JWT compact serial...
JwtCredential
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/onetoone/polymorphism/BidirectionalOneToOnePolymorphismTest.java
{ "start": 3491, "end": 3866 }
class ____ { @Id private Integer id; @OneToOne(mappedBy = "level2") private Level3 level3; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Level3 getLevel3() { return level3; } public void setLevel3(Level3 level3) { this.level3 = level...
Level2
java
apache__flink
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/runtime/stream/sql/FunctionITCase.java
{ "start": 79729, "end": 80175 }
class ____ extends TableFunction<Object> { @FunctionHint( input = {@DataTypeHint("STRING"), @DataTypeHint("STRING")}, output = @DataTypeHint("STRING"), argumentNames = {"in1", "in2"}) public void eval(String arg1, String arg2) { collect(arg1 + ...
NamedArgumentsTableFunction
java
quarkusio__quarkus
devtools/maven/src/main/java/io/quarkus/maven/TrackConfigChangesMojo.java
{ "start": 1742, "end": 9556 }
class ____ extends QuarkusBootstrapMojo { /** * Skip the execution of this mojo */ @Parameter(defaultValue = "false", property = "quarkus.track-config-changes.skip") boolean skip = false; @Parameter(property = "launchMode") String mode; @Parameter(property = "quarkus.track-config-ch...
TrackConfigChangesMojo
java
apache__maven
compat/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/reflection/ReflectionValueExtractorTest.java
{ "start": 16395, "end": 16657 }
class ____ { private String connection; public void setConnection(String connection) { this.connection = connection; } public String getConnection() { return connection; } } public static
Scm
java
spring-projects__spring-security
oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/NimbusJwtEncoder.java
{ "start": 6268, "end": 15619 }
class ____ throw an exception. * @since 6.5 */ public void setJwkSelector(Converter<List<JWK>, JWK> jwkSelector) { Assert.notNull(jwkSelector, "jwkSelector cannot be null"); this.jwkSelector = jwkSelector; } @Override public Jwt encode(JwtEncoderParameters parameters) throws JwtEncodingException { Assert...
with
java
quarkusio__quarkus
extensions/cache/runtime/src/main/java/io/quarkus/cache/runtime/caffeine/CaffeineComputationThrowable.java
{ "start": 56, "end": 133 }
class ____ used to prevent Caffeine from logging unwanted warnings. */ public
is
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/ECAdmin.java
{ "start": 2156, "end": 3558 }
class ____ extends Configured implements Tool { public static final String NAME = "ec"; public static void main(String[] args) throws Exception { final ECAdmin admin = new ECAdmin(new Configuration()); int res = ToolRunner.run(admin, args); System.exit(res); } public ECAdmin(Configuration conf) {...
ECAdmin
java
apache__flink
flink-runtime/src/test/java/org/apache/flink/runtime/asyncprocessing/operators/AbstractAsyncRunnableStreamOperatorTest.java
{ "start": 3287, "end": 22180 }
class ____ { protected AsyncOneInputStreamOperatorTestHarness<Tuple2<Integer, String>, String> createTestHarness( int maxParalelism, int numSubtasks, int subtaskIndex, TestOperator testOperator) throws Exception { AsyncOneInputStreamOperatorTestHarness<Tu...
AbstractAsyncRunnableStreamOperatorTest
java
assertj__assertj-core
assertj-core/src/main/java/org/assertj/core/error/ShouldNotBeSame.java
{ "start": 836, "end": 1287 }
class ____ extends BasicErrorMessageFactory { /** * Creates a new <code>{@link ShouldNotBeSame}</code>. * @param actual the actual value in the failed assertion. * @return the created {@code ErrorMessageFactory}. */ public static ErrorMessageFactory shouldNotBeSame(Object actual) { return new Shoul...
ShouldNotBeSame
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/state/TaskStateManager.java
{ "start": 2438, "end": 2602 }
interface ____ offers the complementary method that provides access to previously saved * state of operator instances in the task for restore purposes. */ public
also
java
elastic__elasticsearch
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/service/ServiceAccountToken.java
{ "start": 6113, "end": 7603 }
class ____ { private final ServiceAccountId accountId; private final String tokenName; public ServiceAccountTokenId(ServiceAccountId accountId, String tokenName) { this.accountId = Objects.requireNonNull(accountId, "service account ID cannot be null"); if (false == Valid...
ServiceAccountTokenId
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/taskmanager/TaskManagerStdoutFileHeaders.java
{ "start": 1228, "end": 2214 }
class ____ implements RuntimeUntypedResponseMessageHeaders< EmptyRequestBody, TaskManagerMessageParameters> { private static final TaskManagerStdoutFileHeaders INSTANCE = new TaskManagerStdoutFileHeaders(); private static final String URL = String.format("/taskmanagers/:%s/...
TaskManagerStdoutFileHeaders
java
apache__dubbo
dubbo-registry/dubbo-registry-multiple/src/test/java/org/apache/dubbo/registry/multiple/MultipleServiceDiscoveryTest.java
{ "start": 2051, "end": 7364 }
class ____ { private static String zookeeperConnectionAddress1, zookeeperConnectionAddress2; @Test public void testOnEvent() { try { String metadata_111 = "{\"app\":\"app1\",\"revision\":\"111\",\"services\":{" + "\"org.apache.dubbo.demo.DemoService:dubbo\":{\"name\...
MultipleServiceDiscoveryTest
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/JHLogAnalyzer.java
{ "start": 18471, "end": 21311 }
class ____ { String TASK_ATTEMPT_ID; String TASK_STATUS; // this task attempt status long START_TIME; long FINISH_TIME; long HDFS_BYTES_READ; long HDFS_BYTES_WRITTEN; long FILE_BYTES_READ; long FILE_BYTES_WRITTEN; /** * Task attempt is considered successful iff all three status...
TaskAttemptHistoryLog
java
mapstruct__mapstruct
processor/src/main/java/org/mapstruct/ap/internal/model/common/Type.java
{ "start": 57379, "end": 63668 }
class ____ extends SimpleTypeVisitor8<ResolvedPair, Type> { private final TypeFactory typeFactory; private final Type typeToMatch; private final TypeUtils types; /** * @param typeFactory factory * @param types type utils * @param typeToMatch the typeVar or wi...
TypeVarMatcher
java
spring-projects__spring-boot
module/spring-boot-amqp/src/test/java/org/springframework/boot/amqp/autoconfigure/PropertiesRabbitConnectionDetailsTests.java
{ "start": 1165, "end": 3194 }
class ____ { private static final int DEFAULT_PORT = 5672; private DefaultSslBundleRegistry sslBundleRegistry; private RabbitProperties properties; private PropertiesRabbitConnectionDetails propertiesRabbitConnectionDetails; @BeforeEach void setUp() { this.properties = new RabbitProperties(); this.sslBun...
PropertiesRabbitConnectionDetailsTests
java
assertj__assertj-core
assertj-core/src/test/java/org/assertj/core/api/hashset/HashSetAssert_endsWith_Test.java
{ "start": 1255, "end": 3015 }
class ____ extends HashSetAssertBaseTest { @Override protected HashSetAssert<Object> invoke_api_method() { return assertions.endsWith(someValues).endsWith(someValues[0], someValues[1]); } @Override protected void verify_internal_effects() { verify(iterables).assertEndsWith(getInfo(assertions), getAct...
HashSetAssert_endsWith_Test
java
elastic__elasticsearch
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/inference/results/DenseEmbeddingByteResultsTests.java
{ "start": 746, "end": 6221 }
class ____ extends AbstractWireSerializingTestCase<DenseEmbeddingByteResults> { public static DenseEmbeddingByteResults createRandomResults() { int embeddings = randomIntBetween(1, 10); List<DenseEmbeddingByteResults.Embedding> embeddingResults = new ArrayList<>(embeddings); for (int i = 0;...
DenseEmbeddingByteResultsTests
java
spring-projects__spring-boot
smoke-test/spring-boot-smoke-test-test/src/main/java/smoketest/test/domain/VehicleIdentificationNumber.java
{ "start": 826, "end": 1466 }
class ____ { private final String vin; public VehicleIdentificationNumber(String vin) { Assert.notNull(vin, "'vin' must not be null"); Assert.isTrue(vin.length() == 17, "'vin' must be exactly 17 characters"); this.vin = vin; } @Override public boolean equals(@Nullable Object obj) { if (obj == this) { ...
VehicleIdentificationNumber
java
apache__logging-log4j2
log4j-core-its/src/test/java/org/apache/logging/log4j/core/async/perftest/IdleStrategy.java
{ "start": 1692, "end": 1815 }
interface ____ { /** * Perform current idle action (e.g. nothing/yield/sleep). */ void idle(); }
IdleStrategy
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/NoOpSlotAllocationSnapshotPersistenceService.java
{ "start": 1029, "end": 1504 }
enum ____ implements SlotAllocationSnapshotPersistenceService { INSTANCE; @Override public void persistAllocationSnapshot(SlotAllocationSnapshot slotAllocationSnapshot) throws IOException {} @Override public void deleteAllocationSnapshot(int slotIndex) {} @Override pub...
NoOpSlotAllocationSnapshotPersistenceService
java
elastic__elasticsearch
x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/blockhash/TimeSeriesBlockHash.java
{ "start": 1651, "end": 8948 }
class ____ extends BlockHash { private final int tsHashChannel; private final int timestampIntervalChannel; private int lastTsidPosition = 0; private final BytesRefArrayWithSize tsidArray; private long lastTimestamp; private final LongArrayWithSize timestampArray; private int currentTime...
TimeSeriesBlockHash
java
reactor__reactor-core
reactor-core/src/test/java/reactor/core/publisher/MonoFilterTest.java
{ "start": 999, "end": 4773 }
class ____ { @Test public void sourceNull() { assertThatExceptionOfType(NullPointerException.class).isThrownBy(() -> { new MonoFilter<Integer>(null, e -> true); }); } @Test public void predicateNull() { assertThatExceptionOfType(NullPointerException.class).isThrownBy(() -> { Mono.never().filter(null)...
MonoFilterTest
java
reactor__reactor-core
reactor-core/src/main/java/reactor/core/publisher/FluxMergeComparing.java
{ "start": 1824, "end": 4818 }
class ____<T> extends Flux<T> implements SourceProducer<T> { final int prefetch; final Comparator<? super T> valueComparator; final Publisher<? extends T>[] sources; final boolean delayError; final boolean waitForAllSources; @SafeVarargs FluxMergeComparing(int prefetch, Comparator<? sup...
FluxMergeComparing
java
elastic__elasticsearch
x-pack/plugin/ql/src/main/java/org/elasticsearch/xpack/ql/index/IndexResolver.java
{ "start": 3721, "end": 32056 }
enum ____ { STANDARD_INDEX(SQL_TABLE, "INDEX"), ALIAS(SQL_VIEW, "ALIAS"), FROZEN_INDEX(SQL_TABLE, "FROZEN INDEX"), // value for user types unrecognized UNKNOWN("UNKNOWN", "UNKNOWN"); public static final EnumSet<IndexType> VALID_INCLUDE_FROZEN = EnumSet.of(STANDARD_INDEX,...
IndexType
java
spring-projects__spring-framework
spring-jdbc/src/main/java/org/springframework/jdbc/object/MappingSqlQueryWithParameters.java
{ "start": 1987, "end": 3711 }
class ____<T extends @Nullable Object> extends SqlQuery<T> { /** * Constructor to allow use as a JavaBean. */ public MappingSqlQueryWithParameters() { } /** * Convenient constructor with DataSource and SQL string. * @param ds the DataSource to use to get connections * @param sql the SQL to run */ pub...
MappingSqlQueryWithParameters
java
apache__flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/TypeInferenceUtil.java
{ "start": 3298, "end": 12570 }
class ____ { /** * Runs the entire type inference process. * * @param typeInference type inference of the current call * @param callContext call context of the current call * @param surroundingInfo information about the outer wrapping call of a current function call * for performi...
TypeInferenceUtil
java
assertj__assertj-core
assertj-core/src/test/java/org/assertj/core/api/Condition_constructor_with_text_description_Test.java
{ "start": 862, "end": 1562 }
class ____ { @Test void should_set_description() { String text = "your eyes can deceive you; don't trust them"; Condition<Object> condition = new Condition<Object>(text) { @Override public boolean matches(Object value) { return false; } }; assertThat(condition.description....
Condition_constructor_with_text_description_Test
java
elastic__elasticsearch
x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlPrivateAttributePredicate.java
{ "start": 1199, "end": 3705 }
class ____ implements Predicate<Attribute> { private static final Logger logger = LogManager.getLogger(SamlPrivateAttributePredicate.class); private static final Predicate<Attribute> MATCH_NONE = new Predicate<Attribute>() { @Override public boolean test(Attribute attribute) { retu...
SamlPrivateAttributePredicate
java
square__retrofit
retrofit/src/main/java/retrofit2/http/Query.java
{ "start": 2558, "end": 2778 }
interface ____ { /** The query parameter name. */ String value(); /** * Specifies whether the parameter {@linkplain #value() name} and value are already URL encoded. */ boolean encoded() default false; }
Query
java
apache__camel
core/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentResolvedValueTest.java
{ "start": 1063, "end": 4179 }
class ____ extends ContextTestSupport { @Test public void testResolved() { org.apache.camel.spi.PropertiesComponent pc = context.getPropertiesComponent(); Assertions.assertTrue(pc.getResolvedValue("unknown").isEmpty()); Assertions.assertTrue(pc.getResolvedValue("greeting").isPresent())...
PropertiesComponentResolvedValueTest
java
google__guice
core/test/com/google/inject/ProvisionListenerTest.java
{ "start": 27741, "end": 28335 }
class ____ implements ProvisionListener { private final Class<?> notifyType; private final String firstSource; private final AtomicBoolean notified; public SpecialChecker(Class<?> notifyType, String firstSource, AtomicBoolean notified) { this.notifyType = notifyType; this.firstSource = fi...
SpecialChecker
java
apache__camel
components/camel-mvel/src/main/java/org/apache/camel/component/mvel/MvelComponent.java
{ "start": 1230, "end": 3798 }
class ____ extends DefaultComponent { @Metadata(defaultValue = "true", description = "Sets whether to use resource content cache or not") private boolean contentCache = true; @Metadata private boolean allowTemplateFromHeader; @Metadata private boolean allowContextMapAll; public MvelCompone...
MvelComponent
java
elastic__elasticsearch
x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/PluggableAuthenticatorChainTests.java
{ "start": 1641, "end": 1763 }
class ____ extends ESTestCase { private ThreadContext threadContext; private static
PluggableAuthenticatorChainTests
java
hibernate__hibernate-orm
hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/inheritance/tableperclass/abstractparent/AbstractEntity.java
{ "start": 575, "end": 802 }
class ____ { @Id public Long id; @Column public String commonField; public AbstractEntity() { } protected AbstractEntity(Long id, String commonField) { this.commonField = commonField; this.id = id; } }
AbstractEntity
java
apache__hadoop
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/impl/TestErrorTranslation.java
{ "start": 5680, "end": 6346 }
class ____ extends IOException { public static final String MESSAGE = "no-arg constructor"; public NoConstructorIOE() { super(MESSAGE); } } @Test public void testMultiObjectExceptionFilledIn() throws Throwable { MultiObjectDeleteException ase = new MultiObjectDeleteException(Col...
NoConstructorIOE
java
elastic__elasticsearch
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/common/validation/SourceDestValidator.java
{ "start": 4432, "end": 10215 }
class ____ { private final ClusterState state; private final IndexNameExpressionResolver indexNameExpressionResolver; private final RemoteClusterService remoteClusterService; private final RemoteClusterLicenseChecker remoteClusterLicenseChecker; private final IngestService ingest...
Context
java
quarkusio__quarkus
independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/StreamingOutputStream.java
{ "start": 238, "end": 300 }
class ____ extends ByteArrayOutputStream { }
StreamingOutputStream
java
apache__spark
resource-managers/yarn/src/main/java/org/apache/spark/deploy/yarn/ProxyUtils.java
{ "start": 1801, "end": 1867 }
class ____ implements Hamlet.__ { // Empty } public static
__
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/query/internal/QueryParameterBindingsImpl.java
{ "start": 12684, "end": 13281 }
class ____ implements MutableCacheKeyBuilder { final List<Object> values; int hashCode; public MutableCacheKeyImpl(int parameterBindingMapSize) { values = new ArrayList<>( parameterBindingMapSize ); } @Override public void addValue(Object value) { values.add( value ); } @Override public void...
MutableCacheKeyImpl
java
alibaba__druid
core/src/test/java/com/alibaba/druid/bvt/sql/mysql/alterTable/MySqlAlterTableAddIndex_5.java
{ "start": 1053, "end": 2369 }
class ____ extends TestCase { public void test_alter_first() throws Exception { String sql = "ALTER TABLE t_order ADD UNIQUE GLOBAL INDEX `g_i_buyer` (`buyer_id`) COVERING (order_snapshot) dbpartition by hash(`buyer_id`) tbpartition by hash(`buyer_id`);"; MySqlStatementParser parser = new MySqlState...
MySqlAlterTableAddIndex_5
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/impl/pb/KillTaskAttemptResponsePBImpl.java
{ "start": 1126, "end": 1986 }
class ____ extends ProtoBase<KillTaskAttemptResponseProto> implements KillTaskAttemptResponse { KillTaskAttemptResponseProto proto = KillTaskAttemptResponseProto.getDefaultInstance(); KillTaskAttemptResponseProto.Builder builder = null; boolean viaProto = false; public KillTaskAttemptResponsePBImpl() { b...
KillTaskAttemptResponsePBImpl
java
assertj__assertj-core
assertj-core/src/test/java/org/assertj/core/api/localdate/LocalDateAssert_isToday_Test.java
{ "start": 1145, "end": 2044 }
class ____ extends LocalDateAssertBaseTest { @Test void should_pass_if_actual_is_today() { assertThat(REFERENCE).isToday(); } @Test void should_fail_if_actual_is_before_today() { // WHEN ThrowingCallable code = () -> assertThat(BEFORE).isToday(); // THEN assertThatAssertionErrorIsThrownB...
LocalDateAssert_isToday_Test
java
elastic__elasticsearch
libs/tdigest/src/main/java/org/elasticsearch/tdigest/IntAVLTree.java
{ "start": 15644, "end": 16778 }
class ____ implements Releasable, Accountable { private static final long SHALLOW_SIZE = RamUsageEstimator.shallowSizeOfInstance(IntStack.class); private final TDigestArrays arrays; private boolean closed = false; private final TDigestIntArray stack; private int size; ...
IntStack
java
spring-projects__spring-security
oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/InMemoryReactiveOAuth2AuthorizedClientService.java
{ "start": 1392, "end": 4161 }
class ____ implements ReactiveOAuth2AuthorizedClientService { private final Map<OAuth2AuthorizedClientId, OAuth2AuthorizedClient> authorizedClients = new ConcurrentHashMap<>(); private final ReactiveClientRegistrationRepository clientRegistrationRepository; /** * Constructs an {@code InMemoryReactiveOAuth2Autho...
InMemoryReactiveOAuth2AuthorizedClientService
java
spring-projects__spring-framework
spring-test/src/test/java/org/springframework/test/context/config/meta/ConfigClassesAndProfileResolverWithCustomDefaultsMetaConfig.java
{ "start": 2264, "end": 2355 }
class ____ { @Bean public String foo() { return "Resolver Foo"; } }
ResolverConfig
java
apache__camel
components/camel-aws/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2MessageHelper.java
{ "start": 1032, "end": 4737 }
class ____ { public static final String TYPE_STRING = "String"; public static final String TYPE_BINARY = "Binary"; private Sqs2MessageHelper() { } public static MessageAttributeValue toMessageAttributeValue(Object value) { if (value instanceof String && !((String) value).isEmpty()) { ...
Sqs2MessageHelper
java
google__dagger
javatests/artifacts/dagger-ksp/java-app/src/main/java/app/SimpleComponentClasses.java
{ "start": 1186, "end": 1484 }
class ____ { @Provides static ProvidedFoo provideFoo() { return new ProvidedFoo(); } @Provides @Singleton static ScopedProvidedFoo provideScopedFoo() { return new ScopedProvidedFoo(); } } @Singleton @Component(modules = SimpleModule.class)
SimpleModule
java
quarkusio__quarkus
extensions/reactive-mssql-client/deployment/src/test/java/io/quarkus/reactive/mssql/client/ConfigUrlMissingDefaultDatasourceStaticInjectionTest.java
{ "start": 1789, "end": 1987 }
class ____ { @Inject Pool pool; public CompletionStage<?> usePool() { return pool.getConnection().toCompletionStage().toCompletableFuture(); } } }
MyBean
java
apache__flink
flink-formats/flink-orc/src/main/java/org/apache/flink/orc/util/OrcFormatStatisticsReportUtil.java
{ "start": 2172, "end": 9944 }
class ____ { private static final Logger LOG = LoggerFactory.getLogger(OrcFormatStatisticsReportUtil.class); public static TableStats getTableStatistics( List<Path> files, DataType producedDataType, Configuration hadoopConfig) { return getTableStatistics( files, producedDat...
OrcFormatStatisticsReportUtil
java
apache__camel
dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KubernetesReplicationControllersEndpointBuilderFactory.java
{ "start": 53862, "end": 57648 }
class ____ { /** * The internal instance of the builder used to access to all the * methods representing the name of headers. */ private static final KubernetesReplicationControllersHeaderNameBuilder INSTANCE = new KubernetesReplicationControllersHeaderNameBuilder(); ...
KubernetesReplicationControllersHeaderNameBuilder
java
apache__commons-lang
src/main/java/org/apache/commons/lang3/concurrent/BasicThreadFactory.java
{ "start": 11990, "end": 14576 }
class ____ an internal counter that is incremented each time the * {@link #newThread(Runnable)} method is invoked. * * @return the number of threads created by this factory */ public long getThreadCount() { return threadCounter.get(); } /** * Gets the {@link UncaughtExcepti...
maintains
java
quarkusio__quarkus
extensions/hibernate-orm/deployment-spi/src/main/java/io/quarkus/hibernate/orm/deployment/spi/AdditionalJpaModelBuildItem.java
{ "start": 252, "end": 964 }
class ____ extends MultiBuildItem { private final String className; private final Set<String> persistenceUnits; /** * @deprecated Use {@link AdditionalJpaModelBuildItem#AdditionalJpaModelBuildItem(String, Set)} instead, * which should fit the use case of JBeret better. */ @D...
AdditionalJpaModelBuildItem
java
junit-team__junit5
junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/ClassSource.java
{ "start": 1837, "end": 2037 }
class ____: {@value} * * @since 1.8 */ @API(status = STABLE, since = "1.8") public static final String CLASS_SCHEME = "class"; /** * Create a new {@code ClassSource} using the supplied
sources
java
apache__camel
components/camel-google/camel-google-functions/src/test/java/org/apache/camel/component/google/functions/mock/MockCloudFunctionsService.java
{ "start": 2299, "end": 12395 }
class ____ extends CloudFunctionsServiceImplBase implements MockGrpcService { private List<AbstractMessage> requests; private Queue<Object> responses; public MockCloudFunctionsService() { requests = new ArrayList<>(); responses = new LinkedList<>(); } public List<AbstractMessage> g...
MockCloudFunctionsService
java
apache__flink
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/logical/SmallIntType.java
{ "start": 1165, "end": 2799 }
class ____ extends LogicalType { private static final long serialVersionUID = 1L; public static final int PRECISION = 5; private static final String FORMAT = "SMALLINT"; private static final Set<String> NULL_OUTPUT_CONVERSION = conversionSet(Short.class.getName()); private static final Set<Strin...
SmallIntType
java
apache__flink
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/lineage/TableLineageDatasetImpl.java
{ "start": 1433, "end": 3522 }
class ____ implements TableLineageDataset { @JsonProperty private String name; @JsonProperty private String namespace; private CatalogContext catalogContext; private CatalogBaseTable catalogBaseTable; @JsonProperty private ObjectPath objectPath; @JsonProperty private Map<String, LineageDatasetFa...
TableLineageDatasetImpl
java
assertj__assertj-core
assertj-core/src/test/java/org/assertj/core/api/InstanceOfAssertFactoriesTest.java
{ "start": 31638, "end": 32433 }
class ____ { private final Object actual = 0.0; @Test void createAssert() { // WHEN AbstractDoubleAssert<?> result = DOUBLE.createAssert(actual); // THEN result.isZero(); } @ParameterizedTest @MethodSource("valueProviders") void createAssert_with_ValueProvider(Valu...
Double_Factory
java
apache__flink
flink-connectors/flink-hadoop-compatibility/src/test/java/org/apache/flink/api/java/hadoop/mapred/HadoopInputFormatTest.java
{ "start": 11455, "end": 11636 }
class ____ extends DummyInputFormat implements JobConfigurable { @Override public void configure(JobConf jobConf) {} } }
JobConfigurableDummyInputFormat
java
apache__flink
flink-runtime/src/test/java/org/apache/flink/streaming/runtime/streamrecord/StreamElementSerializerUpgradeTest.java
{ "start": 2477, "end": 2922 }
class ____ implements TypeSerializerUpgradeTestBase.PreUpgradeSetup<StreamElement> { @Override public TypeSerializer<StreamElement> createPriorSerializer() { return new StreamElementSerializer<>(StringSerializer.INSTANCE); } @Override public StreamElement...
StreamElementSetup
java
quarkusio__quarkus
integration-tests/resteasy-jackson/src/test/java/io/quarkus/it/resteasy/jackson/BigKeysResourceTest.java
{ "start": 260, "end": 769 }
class ____ { @Test public void test() throws IOException { given() .contentType("application/json") .accept("application/json") .body("{\"bdMap\":{\"1\":\"One\", \"2\":\"Two\"}, \"biMap\":{\"1\":\"One\", \"2\":\"Two\"}}") .when().post("/b...
BigKeysResourceTest
java
assertj__assertj-core
assertj-core/src/test/java/org/assertj/core/internal/longs/Longs_assertIsNotNegative_Test.java
{ "start": 911, "end": 1908 }
class ____ extends LongsBaseTest { @Test void should_succeed_since_actual_is_not_negative() { longs.assertIsNotNegative(someInfo(), 6L); } @Test void should_succeed_since_actual_is_zero() { longs.assertIsNotNegative(someInfo(), 0L); } @Test void should_fail_since_actual_is_negative() { as...
Longs_assertIsNotNegative_Test
java
apache__hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/NodesToAttributesMappingRequest.java
{ "start": 1222, "end": 3209 }
class ____ { public static NodesToAttributesMappingRequest newInstance( AttributeMappingOperationType operation, List<NodeToAttributes> nodesToAttributes, boolean failOnUnknownNodes) { NodesToAttributesMappingRequest request = Records.newRecord(NodesToAttributesMappingRequest.class); requ...
NodesToAttributesMappingRequest
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/common/LocalTimeOffset.java
{ "start": 11829, "end": 13817 }
class ____ extends Transition { private final long firstOverlappingLocalTime; private final long firstNonOverlappingLocalTime; private final boolean movesBackToPreviousDay; private Overlap( long millis, LocalTimeOffset previous, long startUtcMillis, ...
Overlap
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/checkpoint/EnumCounter.java
{ "start": 863, "end": 963 }
enum ____ { INPUTKEY, INPUTVALUE, OUTPUTRECORDS, CHECKPOINT_BYTES, CHECKPOINT_MS }
EnumCounter
java
spring-projects__spring-framework
spring-context/src/test/java/org/springframework/context/annotation/InvalidConfigurationClassDefinitionTests.java
{ "start": 1458, "end": 2019 }
class ____ { @Bean String dummy() { return "dummy"; } } BeanDefinition configBeanDef = rootBeanDefinition(Config.class).getBeanDefinition(); DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory(); beanFactory.registerBeanDefinition("config", configBeanDef); ConfigurationClassPostProces...
Config
java
spring-projects__spring-framework
spring-context/src/main/java/org/springframework/context/annotation/Conditional.java
{ "start": 1315, "end": 1658 }
class ____ or indirectly annotated with * {@code @Component}, including {@link Configuration @Configuration} classes</li> * <li>as a meta-annotation, for the purpose of composing custom stereotype * annotations</li> * <li>as a method-level annotation on any {@link Bean @Bean} method</li> * </ul> * * <p>If a {@co...
directly
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/FileIoProvider.java
{ "start": 29921, "end": 31993 }
class ____ extends FileOutputStream { private @Nullable final FsVolumeSpi volume; /** * {@inheritDoc}. */ private WrappedFileOutputStream( @Nullable FsVolumeSpi volume, File f, boolean append) throws FileNotFoundException { super(f, append); this.volume = volume; }...
WrappedFileOutputStream
java
junit-team__junit5
jupiter-tests/src/test/java/org/junit/jupiter/api/parallel/ResourceLockAnnotationTests.java
{ "start": 20654, "end": 20830 }
class ____ { @Test @ResourceLock("c1") void test() { } } @Nested @ClassTemplate @ResourceLock(value = "d1", target = ResourceLockTarget.CHILDREN)
NestedClass
java
quarkusio__quarkus
extensions/resteasy-reactive/rest/deployment/src/test/java/io/quarkus/resteasy/reactive/server/test/security/inheritance/AbstractImplMethodSecuredTest.java
{ "start": 3677, "end": 9984 }
class ____ { protected static QuarkusUnitTest getRunner() { return getRunner(""); } protected static QuarkusUnitTest getRunner(String applicationProperties) { return new QuarkusUnitTest() .withApplicationRoot((jar) -> jar .addPackage("io.quarkus.rest...
AbstractImplMethodSecuredTest
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/metrics/DataNodePeerMetrics.java
{ "start": 2073, "end": 2239 }
class ____ DataNode peer metrics (e.g. numOps, AvgTime, etc.) for * various peer operations. */ @InterfaceAudience.Private @InterfaceStability.Unstable public
maintains
java
quarkusio__quarkus
integration-tests/hibernate-search-orm-elasticsearch-outbox-polling/src/main/java/io/quarkus/it/hibernate/search/orm/elasticsearch/coordination/outboxpolling/HibernateSearchOutboxPollingTestResource.java
{ "start": 642, "end": 3776 }
class ____ { @Inject EntityManager entityManager; @Inject UserTransaction userTransaction; @PUT @Path("/check-agents-running") @Produces(MediaType.TEXT_PLAIN) public String checkAgentsRunning() { OutboxPollingTestUtils.awaitAgentsRunning(entityManager, userTransaction, 1); ...
HibernateSearchOutboxPollingTestResource
java
grpc__grpc-java
xds/src/test/java/io/grpc/xds/WrrLocalityLoadBalancerTest.java
{ "start": 8826, "end": 9926 }
class ____ extends SocketAddress { private final String name; private FakeSocketAddress(String name) { this.name = name; } @Override public int hashCode() { return Objects.hash(name); } @Override public boolean equals(Object o) { if (this == o) ...
FakeSocketAddress
java
mapstruct__mapstruct
processor/src/test/java/org/mapstruct/ap/test/bugs/_1435/Issue1435Test.java
{ "start": 517, "end": 789 }
class ____ { @ProcessorTest public void mustNotSetListToNull() { InObject source = new InObject( "Rainbow Dash" ); OutObject result = Issue1435Mapper.INSTANCE.map( source ); assertThat( result.isRainbowDash() ).isTrue(); } }
Issue1435Test
java
redisson__redisson
redisson/src/main/java/org/redisson/api/RScript.java
{ "start": 963, "end": 1162 }
enum ____ { /** * Execute script as read operation */ READ_ONLY, /** * Execute script as write operation */ READ_WRITE }
Mode
java
google__auto
value/src/test/java/com/google/auto/value/processor/TypeEncoderTest.java
{ "start": 12943, "end": 15789 }
class ____<V> {} } } @Test public void testOuterParameterizedInnerNot() { TypeElement outerElement = typeElementOf(Outer.class); DeclaredType doubleMirror = typeMirrorOf(Double.class); DeclaredType outerOfDoubleMirror = typeUtils.getDeclaredType(outerElement, doubleMirror); TypeElement innerW...
InnerWithTypeParam
java
quarkusio__quarkus
extensions/grpc/deployment/src/test/java/io/quarkus/grpc/auth/SecurityEventObserver.java
{ "start": 282, "end": 548 }
class ____ { private final List<SecurityEvent> storage = new CopyOnWriteArrayList<>(); void observe(@Observes SecurityEvent event) { storage.add(event); } List<SecurityEvent> getStorage() { return storage; } }
SecurityEventObserver
java
mockito__mockito
mockito-core/src/test/java/org/mockitousage/matchers/CustomMatchersTest.java
{ "start": 850, "end": 1013 }
class ____ implements ArgumentMatcher<Boolean> { public boolean matches(Boolean arg) { return true; } } private final
IsAnyBoolean
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/script/ScriptStats.java
{ "start": 9028, "end": 9368 }
class ____ { static final String SCRIPT_STATS = "script"; static final String CONTEXTS = "contexts"; static final String COMPILATIONS = "compilations"; static final String CACHE_EVICTIONS = "cache_evictions"; static final String COMPILATION_LIMIT_TRIGGERED = "compilation_limit_tr...
Fields
java
spring-projects__spring-framework
spring-beans/src/main/java/org/springframework/beans/factory/BeanClassLoaderAware.java
{ "start": 1304, "end": 1412 }
interface ____ extends Aware { /** * Callback that supplies the bean {@link ClassLoader
BeanClassLoaderAware
java
spring-projects__spring-framework
spring-context/src/main/java/org/springframework/scripting/config/LangNamespaceHandler.java
{ "start": 1443, "end": 2125 }
class ____ extends NamespaceHandlerSupport { @Override public void init() { registerScriptBeanDefinitionParser("groovy", "org.springframework.scripting.groovy.GroovyScriptFactory"); registerScriptBeanDefinitionParser("bsh", "org.springframework.scripting.bsh.BshScriptFactory"); registerScriptBeanDefinitionPars...
LangNamespaceHandler
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/commit/CommitterEventHandler.java
{ "start": 2771, "end": 5567 }
class ____ extends AbstractService implements EventHandler<CommitterEvent> { private static final Logger LOG = LoggerFactory.getLogger(CommitterEventHandler.class); private final AppContext context; private final OutputCommitter committer; private final RMHeartbeatHandler rmHeartbeatHandler; priva...
CommitterEventHandler
java
apache__dubbo
dubbo-metadata/dubbo-metadata-definition-protobuf/src/main/java/org/apache/dubbo/metadata/definition/protobuf/ProtobufTypeBuilder.java
{ "start": 6916, "end": 11746 }
class ____ java<br/> * * @param fieldName * @param typeName * @return */ private void validateMapType(String fieldName, String typeName) { Matcher matcher = MAP_PATTERN.matcher(typeName); if (!matcher.matches()) { throw new IllegalArgumentException("Map protobuf ...
in
java
apache__commons-lang
src/test/java/org/apache/commons/lang3/text/CompositeFormatTest.java
{ "start": 1231, "end": 3313 }
class ____ extends AbstractLangTest { /** * Ensures that the parse/format separation is correctly maintained. */ @Test void testCompositeFormat() { final Format parser = new Format() { private static final long serialVersionUID = 1L; @Override public ...
CompositeFormatTest
java
apache__camel
core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregationStrategyAsPredicateTest.java
{ "start": 1151, "end": 2415 }
class ____ extends ContextTestSupport { @Test public void testAggregateCompletionAware() throws Exception { MockEndpoint result = getMockEndpoint("mock:aggregated"); result.expectedBodiesReceived("A+B+C", "X+Y+ZZZZ"); result.message(0).exchangeProperty(Exchange.AGGREGATED_COMPLETED_BY)....
AggregationStrategyAsPredicateTest
java
spring-projects__spring-framework
spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsComposedOnSingleAnnotatedElementTests.java
{ "start": 6762, "end": 7049 }
interface ____ { @AliasFor("cacheName") String value() default ""; @AliasFor("value") String cacheName() default ""; String key() default ""; } @Cacheable("fooCache") @Target({ ElementType.METHOD, ElementType.TYPE }) @Retention(RetentionPolicy.RUNTIME) @Inherited @
Cacheable
java
alibaba__fastjson
src/test/java/com/alibaba/json/bvt/bug/Issue64.java
{ "start": 240, "end": 686 }
class ____ extends TestCase { public void test_for_issue() throws Exception { VO vo = new VO(); vo.foo = "xxxxxx"; String text = JSON.toJSONString(vo, SerializerFeature.BeanToArray); Assert.assertEquals("[\"xxxxxx\"]", text); VO vo2 = JSON.parseObje...
Issue64
java
quarkusio__quarkus
core/deployment/src/test/java/io/quarkus/deployment/proxy/SimpleInvocationHandler.java
{ "start": 831, "end": 1089 }
class ____ implements InvocationHandler { public int invocationCount = 0; @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { invocationCount++; return args; } }
SimpleInvocationHandler
java
elastic__elasticsearch
x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator/topn/TopNEncoder.java
{ "start": 850, "end": 2857 }
interface ____ { /** * An encoder that encodes values such that sorting the bytes sorts the values. */ DefaultSortableTopNEncoder DEFAULT_SORTABLE = new DefaultSortableTopNEncoder(); /** * An encoder that encodes values as compactly as possible without making the * encoded bytes sortable...
TopNEncoder