language
stringclasses
1 value
repo
stringclasses
60 values
path
stringlengths
22
294
class_span
dict
source
stringlengths
13
1.16M
target
stringlengths
1
113
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/action/admin/indices/sampling/GetAllSampleConfigurationAction.java
{ "start": 4857, "end": 7644 }
class ____ extends ActionResponse implements ChunkedToXContentObject { private final Map<String, SamplingConfiguration> indexToSamplingConfigMap; /** * Constructs a new Response with the given index to sampling configuration map. * * @param indexToSamplingConfigMap the index ...
Response
java
apache__hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/WritableName.java
{ "start": 2834, "end": 2984 }
class ____ a name. * Default is {@link Class#forName(String)}. * * @param name input name. * @param conf input configuration. * @return
for
java
apache__camel
core/camel-api/src/main/java/org/apache/camel/spi/UnitOfWorkFactory.java
{ "start": 1363, "end": 1747 }
interface ____ extends AfterPropertiesConfigured { /** * Creates a new {@link UnitOfWork} * * @param exchange the exchange * @return the created {@link UnitOfWork} */ UnitOfWork createUnitOfWork(Exchange exchange); @Override default void afterPropertiesConfigured(Cam...
UnitOfWorkFactory
java
apache__camel
components/camel-opensearch/src/test/java/org/apache/camel/component/opensearch/integration/OpensearchPingIT.java
{ "start": 1005, "end": 1548 }
class ____ extends OpensearchTestSupport { @Test void testPing() { boolean pingResult = template().requestBody("direct:ping", "test", Boolean.class); assertTrue(pingResult, "indexId should be set"); } @Override protected RouteBuilder createRouteBuilder() { return new RouteB...
OpensearchPingIT
java
google__error-prone
core/src/test/java/com/google/errorprone/refaster/testdata/input/EmitCommentBeforeTemplateExample.java
{ "start": 656, "end": 772 }
class ____ { public void example() { System.out.println("foobar".length()); } }
EmitCommentBeforeTemplateExample
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobConf.java
{ "start": 63693, "end": 64251 }
class ____ implements * {@link org.apache.hadoop.mapreduce.CustomJobEndNotifier} set through the * {@link org.apache.hadoop.mapreduce.MRJobConfig#MR_JOB_END_NOTIFICATION_CUSTOM_NOTIFIER_CLASS} * property * * @see JobConf#setJobEndNotificationCustomNotifierClass(java.lang.String) * @see org.apache.hado...
which
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbCheckable.java
{ "start": 277, "end": 360 }
interface ____ { List<JaxbCheckConstraintImpl> getCheckConstraints(); }
JaxbCheckable
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/jpa/internal/JpaEntityNotFoundDelegate.java
{ "start": 318, "end": 755 }
class ____ implements EntityNotFoundDelegate, Serializable { /** * Singleton access */ public static final JpaEntityNotFoundDelegate INSTANCE = new JpaEntityNotFoundDelegate(); public void handleEntityNotFound(String entityName, Object identifier) { final var exception = new ObjectNotFoundException( entityNam...
JpaEntityNotFoundDelegate
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ClientCache.java
{ "start": 1574, "end": 4010 }
class ____ { private final Configuration conf; private final ResourceMgrDelegate rm; private static final Logger LOG = LoggerFactory.getLogger(ClientCache.class); private Map<JobID, ClientServiceDelegate> cache = new HashMap<JobID, ClientServiceDelegate>(); private MRClientProtocol hsProxy; publ...
ClientCache
java
google__dagger
javatests/dagger/internal/codegen/ComponentShardTest.java
{ "start": 2905, "end": 4343 }
interface ____ {", " Binding1 binding1();", " Binding2 binding2();", " Binding3 binding3();", " Binding4 binding4();", " Binding5 binding5();", " Binding6 binding6();", " Binding7 binding7();", " Provider<Binding1> p...
TestComponent
java
apache__flink
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/factories/TestFileFactory.java
{ "start": 2975, "end": 4510 }
class ____ implements DynamicTableSourceFactory, DynamicTableSinkFactory { // -------------------------------------------------------------------------------------------- // Factory // -------------------------------------------------------------------------------------------- private static final Str...
TestFileFactory
java
apache__camel
core/camel-core-reifier/src/main/java/org/apache/camel/reifier/loadbalancer/CustomLoadBalancerReifier.java
{ "start": 1121, "end": 1704 }
class ____ extends LoadBalancerReifier<CustomLoadBalancerDefinition> { public CustomLoadBalancerReifier(Route route, LoadBalancerDefinition definition) { super(route, (CustomLoadBalancerDefinition) definition); } @Override public LoadBalancer createLoadBalancer() { if (definition.getCu...
CustomLoadBalancerReifier
java
elastic__elasticsearch
server/src/test/java/org/elasticsearch/action/admin/cluster/node/shutdown/NodePrevalidateShardPathRequestSerializationTests.java
{ "start": 793, "end": 1616 }
class ____ extends AbstractWireSerializingTestCase<NodePrevalidateShardPathRequest> { @Override protected Writeable.Reader<NodePrevalidateShardPathRequest> instanceReader() { return NodePrevalidateShardPathRequest::new; } @Override protected NodePrevalidateShardPathRequest createTestInstan...
NodePrevalidateShardPathRequestSerializationTests
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/streaming/api/graph/GlobalStreamExchangeMode.java
{ "start": 1385, "end": 2423 }
enum ____ { /** Set all job edges to be {@link ResultPartitionType#BLOCKING}. */ ALL_EDGES_BLOCKING, /** * Set job edges with {@link ForwardPartitioner} to be {@link * ResultPartitionType#PIPELINED_BOUNDED} and other edges to be {@link * ResultPartitionType#BLOCKING}. */ FORWARD_EDG...
GlobalStreamExchangeMode
java
spring-projects__spring-framework
spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java
{ "start": 40325, "end": 40497 }
class ____ { private TestBean bean; public TestBean getBean() { return bean; } public void setBean(TestBean bean) { this.bean = bean; } } }
TestBeanWrapper
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/JUnit4ClassUsedInJUnit3Test.java
{ "start": 1845, "end": 2474 }
class ____ { @Test public void testOne() { Assume.assumeTrue(true); } } """) .doTest(); } @Test public void negative_annotation_in_junit4() { compilationHelper .addSourceLines( "Foo.java", ...
Foo
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic/LocalDateTimeWithTemporalTimeTest.java
{ "start": 603, "end": 1089 }
class ____ { @Test public void testLifecycle(EntityManagerFactoryScope scope) { scope.inTransaction( entityManager -> { DateEvent dateEvent = new DateEvent(LocalDateTime.now()); dateEvent.id = 1L; entityManager.persist(dateEvent); }); scope.inTransaction( entityManager -> { DateEvent dateEvent = en...
LocalDateTimeWithTemporalTimeTest
java
apache__camel
core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncEndpointCustomAsyncInterceptorTest.java
{ "start": 3259, "end": 4476 }
class ____ implements InterceptStrategy { private final AtomicInteger counter = new AtomicInteger(); @Override public Processor wrapProcessorInInterceptors( final CamelContext context, final NamedNode definition, final Processor target, final Processor nextTarget) { ...
MyInterceptor
java
apache__camel
components/camel-pqc/src/main/java/org/apache/camel/component/pqc/lifecycle/KeyFormatConverter.java
{ "start": 1208, "end": 6633 }
class ____ { /** * Export a public key to the specified format */ public static byte[] exportPublicKey(PublicKey publicKey, KeyLifecycleManager.KeyFormat format) throws Exception { switch (format) { case PEM: return exportPublicKeyToPEM(publicKey); case...
KeyFormatConverter
java
spring-cloud__spring-cloud-gateway
spring-cloud-gateway-server-webflux/src/test/java/org/springframework/cloud/gateway/config/GatewayAutoConfigurationTests.java
{ "start": 23706, "end": 23994 }
class ____ { private final AtomicBoolean called = new AtomicBoolean(); @Bean HttpClientCustomizer myCustomCustomizer() { return httpClient -> { called.compareAndSet(false, true); return httpClient; }; } } @Configuration protected static
HttpClientCustomizedConfig
java
apache__flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/GenericWriteAheadSink.java
{ "start": 2719, "end": 12918 }
class ____<IN> extends AbstractStreamOperator<IN> implements OneInputStreamOperator<IN, IN> { private static final long serialVersionUID = 1L; protected static final Logger LOG = LoggerFactory.getLogger(GenericWriteAheadSink.class); private final String id; private final CheckpointCommitter c...
GenericWriteAheadSink
java
google__dagger
javatests/dagger/internal/codegen/MissingBindingValidationTest.java
{ "start": 60723, "end": 61087 }
interface ____ {}"); Source childModule = CompilerTests.javaSource( "test.ChildModule", "package test;", "", "import dagger.Module;", "import dagger.Provides;", "import java.util.Set;", "import java.util.HashSet;", ...
Child
java
apache__avro
lang/java/avro/src/test/java/org/apache/avro/reflect/TestReflectDatumReader.java
{ "start": 9384, "end": 10329 }
class ____ { private int id; private int[] relatedIds; public int getId() { return id; } public void setId(int id) { this.id = id; } public int[] getRelatedIds() { return relatedIds; } public void setRelatedIds(int[] relatedIds) { this.relatedIds = related...
PojoWithArray
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/EmbeddableWithToOneAssociation2Test.java
{ "start": 4323, "end": 4788 }
class ____ { @Id int id; String garage; @OneToOne(mappedBy = "location.parkingSpot") Employee assignedTo; public ParkingSpot() { } public ParkingSpot(int id, String garage, Employee assignedTo) { this.id = id; this.garage = garage; this.assignedTo = assignedTo; } public int getId() { ...
ParkingSpot
java
quarkusio__quarkus
extensions/undertow/deployment/src/test/java/io/quarkus/undertow/test/ServletDestroyTestCase.java
{ "start": 333, "end": 1104 }
class ____ { @RegisterExtension static QuarkusUnitTest runner = new QuarkusUnitTest() .withApplicationRoot((jar) -> jar .addClasses(PreDestroyServlet.class)) .setAllowTestClassOutsideDeployment(true) .setAfterUndeployListener(() -> { try {...
ServletDestroyTestCase
java
processing__processing4
app/src/processing/app/contrib/ManagerFrame.java
{ "start": 1093, "end": 1212 }
class ____ the main Contribution Manager Dialog. * It contains all the contributions tab and the update tab. */ public
is
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/compliance/CriteriaNoPredicateTest.java
{ "start": 3533, "end": 3918 }
class ____ { @Id private Integer id; private String code; @OneToMany private Collection<Deposit> deposits; public Account() { } public Account( Integer id, String code, Collection<Deposit> deposits) { this.id = id; this.code = code; this.deposits = deposits; } } @Entity(nam...
Account
java
quarkusio__quarkus
integration-tests/kubernetes/quarkus-standard-way/src/test/java/io/quarkus/it/kubernetes/KubernetesWithMetricsTest.java
{ "start": 865, "end": 5632 }
class ____ { @RegisterExtension static final QuarkusProdModeTest config = new QuarkusProdModeTest() .withApplicationRoot((jar) -> jar.addClasses(GreetingResource.class)) .setApplicationName("metrics") .setApplicationVersion("0.1-SNAPSHOT") .setRun(true) ...
KubernetesWithMetricsTest
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/NamedQueriesAnnotation.java
{ "start": 748, "end": 1717 }
class ____ implements NamedQueries, RepeatableContainer<NamedQuery> { private NamedQuery[] value; /** * Used in creating dynamic annotation instances (e.g. from XML) */ public NamedQueriesAnnotation(ModelsContext modelContext) { } /** * Used in creating annotation instances from JDK variant */ public Na...
NamedQueriesAnnotation
java
google__guava
android/guava-testlib/src/com/google/common/collect/testing/testers/ListAddAtIndexTester.java
{ "start": 2252, "end": 5589 }
class ____<E> extends AbstractListTester<E> { @ListFeature.Require(SUPPORTS_ADD_WITH_INDEX) @CollectionSize.Require(absent = ZERO) public void testAddAtIndex_supportedPresent() { getList().add(0, e0()); expectAdded(0, e0()); } @ListFeature.Require(absent = SUPPORTS_ADD_WITH_INDEX) @CollectionSize.R...
ListAddAtIndexTester
java
apache__camel
core/camel-base/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java
{ "start": 3387, "end": 3447 }
class ____ replacing properties. */ private final
helps
java
apache__kafka
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableKTableOuterJoin.java
{ "start": 1713, "end": 2519 }
class ____<K, V1, V2, VOut> extends KTableKTableAbstractJoin<K, V1, V2, VOut> { private static final Logger LOG = LoggerFactory.getLogger(KTableKTableOuterJoin.class); KTableKTableOuterJoin(final KTableImpl<K, ?, V1> table1, final KTableImpl<K, ?, V2> table2, ...
KTableKTableOuterJoin
java
spring-projects__spring-boot
module/spring-boot-micrometer-observation/src/main/java/org/springframework/boot/micrometer/observation/autoconfigure/ObservationAutoConfiguration.java
{ "start": 3675, "end": 4450 }
class ____ { @Bean @ConditionalOnMissingBean ObservedAspect observedAspect(ObservationRegistry observationRegistry, ObjectProvider<ObservationKeyValueAnnotationHandler> observationKeyValueAnnotationHandler) { ObservedAspect observedAspect = new ObservedAspect(observationRegistry); observationKeyValueAn...
ObservedAspectConfiguration
java
apache__hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Display.java
{ "start": 4032, "end": 5866 }
class ____ extends Cat { public static final String NAME = "text"; public static final String USAGE = Cat.USAGE; public static final String DESCRIPTION = "Takes a source file and outputs the file in text format.\n" + "The allowed formats are zip and TextRecordInputStream and Avro."; @Ov...
Text
java
quarkusio__quarkus
independent-projects/qute/core/src/main/java/io/quarkus/qute/SingleResultNode.java
{ "start": 255, "end": 1533 }
class ____ extends ResultNode { private final Object value; private final ExpressionNode node; public SingleResultNode(Object value) { this(value, null); } SingleResultNode(Object value, ExpressionNode expressionNode) { this.value = extractValue(value); this.node = express...
SingleResultNode
java
apache__flink
flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/NFASerializerUpgradeTest.java
{ "start": 13427, "end": 13835 }
class ____ implements TypeSerializerUpgradeTestBase.PreUpgradeSetup<NFAState> { @Override public TypeSerializer<NFAState> createPriorSerializer() { return new NFAStateSerializer(); } @Override public NFAState createTestData() { return new NFA...
NFAStateSerializerSetup
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/FSImageFormatPBSnapshot.java
{ "start": 5082, "end": 18021 }
class ____ { private final FSNamesystem fsn; private final FSDirectory fsDir; private final FSImageFormatProtobuf.Loader parent; private final Map<Integer, Snapshot> snapshotMap; public Loader(FSNamesystem fsn, FSImageFormatProtobuf.Loader parent) { this.fsn = fsn; this.fsDir = fsn.getF...
Loader
java
apache__camel
core/camel-core/src/test/java/org/apache/camel/impl/MockScheduledPollConsumer.java
{ "start": 1074, "end": 2053 }
class ____ extends ScheduledPollConsumer { private Exception exceptionToThrowOnPoll; public MockScheduledPollConsumer(DefaultEndpoint endpoint, Processor processor) { super(endpoint, processor); } // dummy constructor here - we just want to test the run() method, which // calls poll() ...
MockScheduledPollConsumer
java
hibernate__hibernate-orm
hibernate-envers/src/test/java/org/hibernate/orm/test/envers/entities/ids/ManyToOneIdNotAuditedTestEntity.java
{ "start": 391, "end": 1419 }
class ____ implements Serializable { @EmbeddedId private ManyToOneNotAuditedEmbId id; private String data; public ManyToOneIdNotAuditedTestEntity() { } public ManyToOneNotAuditedEmbId getId() { return id; } public void setId(ManyToOneNotAuditedEmbId id) { this.id = id; } public String getData() { r...
ManyToOneIdNotAuditedTestEntity
java
spring-projects__spring-boot
module/spring-boot-micrometer-metrics/src/main/java/org/springframework/boot/micrometer/metrics/autoconfigure/export/newrelic/NewRelicMetricsExportAutoConfiguration.java
{ "start": 2636, "end": 3725 }
class ____ { private final NewRelicProperties properties; NewRelicMetricsExportAutoConfiguration(NewRelicProperties properties) { this.properties = properties; } @Bean @ConditionalOnMissingBean NewRelicConfig newRelicConfig() { return new NewRelicPropertiesConfigAdapter(this.properties); } @Bean @Condi...
NewRelicMetricsExportAutoConfiguration
java
apache__camel
components/camel-influxdb2/src/main/java/org/apache/camel/component/influxdb2/InfluxDb2Constants.java
{ "start": 902, "end": 1675 }
class ____ { @Metadata(description = "The name of measurement", javaType = "String") public static final String MEASUREMENT = "CamelInfluxDB2MeasurementName"; @Metadata(description = "The string that defines the retention policy to the data created by the endpoint", javaType = "String") pu...
InfluxDb2Constants
java
apache__camel
components/camel-aws/camel-aws2-ddb/src/main/java/org/apache/camel/component/aws2/ddb/QueryCommand.java
{ "start": 1305, "end": 5325 }
class ____ extends AbstractDdbCommand { public QueryCommand(DynamoDbClient ddbClient, Ddb2Configuration configuration, Exchange exchange) { super(ddbClient, configuration, exchange); } @Override public void execute() { QueryRequest.Builder query = QueryRequest.builder().tableName(deter...
QueryCommand
java
quarkusio__quarkus
independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/spi/RuntimeConfiguration.java
{ "start": 452, "end": 540 }
interface ____ { List<String> fileContentTypes(); } }
MultiPart
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/engine/jdbc/BlobImplementer.java
{ "start": 175, "end": 287 }
interface ____ non-contextually created {@link java.sql.Blob} instances. * * @author Steve Ebersole */ public
for
java
quarkusio__quarkus
extensions/resteasy-reactive/rest-client/deployment/src/test/java/io/quarkus/rest/client/reactive/TestUtils.java
{ "start": 704, "end": 1575 }
class ____ { public static String randomAlphaString(int length) { StringBuilder builder = new StringBuilder(length); for (int i = 0; i < length; i++) { char c = (char) (65 + 25 * Math.random()); builder.append(c); } return builder.toString(); } publi...
TestUtils
java
spring-projects__spring-framework
spring-jms/src/main/java/org/springframework/jms/annotation/JmsBootstrapConfiguration.java
{ "start": 1695, "end": 2200 }
class ____ { @Bean(name = JmsListenerConfigUtils.JMS_LISTENER_ANNOTATION_PROCESSOR_BEAN_NAME) @Role(BeanDefinition.ROLE_INFRASTRUCTURE) public JmsListenerAnnotationBeanPostProcessor jmsListenerAnnotationProcessor() { return new JmsListenerAnnotationBeanPostProcessor(); } @Bean(name = JmsListenerConfigUtils.JMS...
JmsBootstrapConfiguration
java
apache__rocketmq
common/src/main/java/org/apache/rocketmq/common/statistics/StatisticsItemScheduledIncrementPrinter.java
{ "start": 1042, "end": 7659 }
class ____ extends StatisticsItemScheduledPrinter { private String[] tpsItemNames; public static final int TPS_INITIAL_DELAY = 0; public static final int TPS_INTREVAL = 1000; public static final String SEPARATOR = "|"; /** * last snapshots of all scheduled items */ private final Con...
StatisticsItemScheduledIncrementPrinter
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/RawKeyValueIterator.java
{ "start": 1287, "end": 2257 }
interface ____ { /** * Gets the current raw key. * * @return Gets the current raw key as a DataInputBuffer * @throws IOException */ DataInputBuffer getKey() throws IOException; /** * Gets the current raw value. * * @return Gets the current raw value as a DataInputBuffer * @throw...
RawKeyValueIterator
java
google__dagger
dagger-producers/main/java/dagger/producers/monitoring/TimingProductionComponentMonitor.java
{ "start": 1160, "end": 1782 }
class ____ extends ProductionComponentMonitor { private final ProductionComponentTimingRecorder recorder; private final Ticker ticker; private final Stopwatch stopwatch; TimingProductionComponentMonitor(ProductionComponentTimingRecorder recorder, Ticker ticker) { this.recorder = recorder; this.ticker =...
TimingProductionComponentMonitor
java
spring-projects__spring-boot
module/spring-boot-graphql/src/test/java/org/springframework/boot/graphql/autoconfigure/observation/GraphQlObservationAutoConfigurationTests.java
{ "start": 4494, "end": 4642 }
class ____ extends DefaultDataLoaderObservationConvention { } @Configuration(proxyBeanMethods = false) static
CustomDataLoaderObservationConvention
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/id/uuid/rfc9562/EntitySeven.java
{ "start": 469, "end": 855 }
class ____ { @Id @UuidGenerator(algorithm = UuidVersion7Strategy.class) public UUID id; @Basic public String name; private EntitySeven() { // for Hibernate use } public EntitySeven(String name) { this.name = name; } public UUID getId() { return id; } public String getName() { return name; } p...
EntitySeven
java
mockito__mockito
mockito-core/src/main/java/org/mockito/internal/configuration/injection/SpyOnInjectedFieldsHandler.java
{ "start": 834, "end": 2397 }
class ____ extends MockInjectionStrategy { private final MemberAccessor accessor = Plugins.getMemberAccessor(); @Override protected boolean processInjection(Field field, Object fieldOwner, Set<Object> mockCandidates) { FieldReader fieldReader = new FieldReader(fieldOwner, field); // TODO ...
SpyOnInjectedFieldsHandler
java
quarkusio__quarkus
extensions/reactive-routes/deployment/src/test/java/io/quarkus/vertx/web/mutiny/JsonMultiRouteWithContentTypeTest.java
{ "start": 2578, "end": 5227 }
class ____ { @Route(path = "hello", produces = ReactiveRoutes.APPLICATION_JSON) Multi<String> hello() { return Multi.createFrom().item("Hello world!"); } @Route(path = "hellos", produces = ReactiveRoutes.APPLICATION_JSON) Multi<String> hellos() { return ...
SimpleBean
java
quarkusio__quarkus
devtools/cli/src/main/java/io/quarkus/cli/config/Encrypt.java
{ "start": 4195, "end": 4250 }
enum ____ { base64, plain } }
KeyFormat
java
apache__hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-documentstore/src/test/java/org/apache/hadoop/yarn/server/timelineservice/documentstore/writer/cosmosdb/TestCosmosDBDocumentStoreWriter.java
{ "start": 1878, "end": 3953 }
class ____ { @BeforeEach public void setUp() { AsyncDocumentClient asyncDocumentClient = Mockito.mock(AsyncDocumentClient.class); Configuration conf = Mockito.mock(Configuration.class); mockStatic(DocumentStoreUtils.class); when(DocumentStoreUtils.getCosmosDBDatabaseName(conf)). the...
TestCosmosDBDocumentStoreWriter
java
elastic__elasticsearch
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/rules/logical/promql/AutomatonUtils.java
{ "start": 861, "end": 4131 }
class ____ { /** * Maximum number of values to extract for IN clause optimization. * Beyond this threshold, fall back to regex matching. */ private static final int MAX_IN_VALUES = 256; /** * Maximum pattern length for string analysis. * Very long patterns are kept as-is to avoid ...
AutomatonUtils
java
elastic__elasticsearch
x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/registry/ClearInferenceEndpointCacheAction.java
{ "start": 3060, "end": 6410 }
class ____ extends AcknowledgedTransportMasterNodeAction<ClearInferenceEndpointCacheAction.Request> { private static final Logger log = LogManager.getLogger(ClearInferenceEndpointCacheAction.class); private static final String NAME = "cluster:internal/xpack/inference/clear_inference_endpoint_cache"; public ...
ClearInferenceEndpointCacheAction
java
grpc__grpc-java
api/src/test/java/io/grpc/ServiceProvidersTest.java
{ "start": 8375, "end": 9004 }
class ____ extends BaseProvider { private PrivateClass() { super(true, 5); } } try { ServiceProviders.getCandidatesViaHardCoded( ServiceProvidersTestAbstractProvider.class, Collections.<Class<?>>singletonList(PrivateClass.class)); fail("Expected exception"); ...
PrivateClass
java
apache__flink
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adaptivebatch/AdaptiveExecutionPlanSchedulingContextTest.java
{ "start": 1872, "end": 7733 }
class ____ { @RegisterExtension private static final TestExecutorExtension<ScheduledExecutorService> EXECUTOR_RESOURCE = TestingUtils.defaultExecutorExtension(); @Test void testGetParallelismAndMaxParallelism() throws DynamicCodeLoadingException { int sinkParallelism = 4; i...
AdaptiveExecutionPlanSchedulingContextTest
java
assertj__assertj-core
assertj-tests/assertj-integration-tests/assertj-core-tests/src/test/java/org/assertj/tests/core/api/recursive/comparison/fields/WithComparingSnakeOrCamelCaseFieldsIntrospectionStrategyBaseTest.java
{ "start": 897, "end": 1197 }
class ____ extends RecursiveComparisonAssert_BaseTest { @BeforeEach public void beforeEachTest() { super.beforeEachTest(); recursiveComparisonConfiguration.setIntrospectionStrategy(new ComparingSnakeOrCamelCaseFields()); } }
WithComparingSnakeOrCamelCaseFieldsIntrospectionStrategyBaseTest
java
apache__dubbo
dubbo-test/dubbo-test-spring/src/main/java/org/apache/dubbo/test/spring/context/MockSpringInitCustomizer.java
{ "start": 1582, "end": 2360 }
class ____ implements DubboSpringInitCustomizer { private List<DubboSpringInitContext> contexts = new ArrayList<>(); @Override public void customize(DubboSpringInitContext context) { this.contexts.add(context); // register post-processor bean, expecting the bean is loaded and invoked by s...
MockSpringInitCustomizer
java
grpc__grpc-java
api/src/main/java/io/grpc/InternalChannelz.java
{ "start": 30866, "end": 32236 }
class ____ { private final Map<String, String> others = new HashMap<>(); private TcpInfo tcpInfo; private Integer timeoutMillis; private Integer lingerSeconds; /** The value of {@link java.net.Socket#getSoTimeout()}. */ public Builder setSocketOptionTimeoutMillis(Integer timeoutMil...
Builder
java
apache__flink
flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/embedded/EmbeddedPythonBatchKeyedCoBroadcastProcessOperator.java
{ "start": 1730, "end": 2896 }
class ____<K, IN1, IN2, OUT> extends EmbeddedPythonKeyedCoProcessOperator<K, IN1, IN2, OUT> implements BoundedMultiInput { private static final long serialVersionUID = 1L; private transient volatile boolean isBroadcastSideDone = false; public EmbeddedPythonBatchKeyedCoBroadcastProcessOper...
EmbeddedPythonBatchKeyedCoBroadcastProcessOperator
java
spring-projects__spring-security
core/src/main/java/org/springframework/security/authorization/method/PreFilterExpressionAttributeRegistry.java
{ "start": 2391, "end": 2713 }
class ____ extends ExpressionAttribute { private final String filterTarget; private PreFilterExpressionAttribute(Expression expression, String filterTarget) { super(expression); this.filterTarget = filterTarget; } String getFilterTarget() { return this.filterTarget; } } }
PreFilterExpressionAttribute
java
apache__hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/functional/RemoteIterators.java
{ "start": 12135, "end": 13206 }
class ____<T> implements RemoteIterator<T>, IOStatisticsSource, Closeable { /** * inner iterator.. */ private final Iterator<? extends T> source; private final Closeable sourceToClose; /** * Construct from an interator. * @param source source iterator. */ private W...
WrappedJavaIterator
java
apache__dubbo
dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/CommandLineBuilder.java
{ "start": 920, "end": 991 }
class ____ build the command-line arguments of a java process. */ final
to
java
micronaut-projects__micronaut-core
function/src/main/java/io/micronaut/function/FunctionBean.java
{ "start": 2041, "end": 2209 }
class ____ is the function to invoke. The method should take no more than two arguments * * @return The method name */ String method() default ""; }
that
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/insertordering/InsertOrderingWithCascadeOnPersist.java
{ "start": 2656, "end": 3314 }
class ____ { @Id @GeneratedValue(strategy = GenerationType.TABLE, generator = "ID_TABLE") @TableGenerator(name = "ID_TABLE", pkColumnValue = "MarketBid", allocationSize = 10000) private Long id; private String bidNote; @ManyToOne(optional = false, cascade = CascadeType.PERSIST) private MarketBidGroup gr...
MarketBid
java
quarkusio__quarkus
extensions/flyway/deployment/src/test/java/io/quarkus/flyway/test/FlywayExtensionCleanAndMigrateAtStartWithJavaMigrationTest.java
{ "start": 775, "end": 2169 }
class ____ { @Inject Flyway flyway; @Inject AgroalDataSource defaultDataSource; @RegisterExtension static final QuarkusUnitTest config = new QuarkusUnitTest() .withApplicationRoot((jar) -> jar .addClasses(V1_0_1__Update.class, V1_0_2__Update.class, V9_9_9__Upda...
FlywayExtensionCleanAndMigrateAtStartWithJavaMigrationTest
java
apache__spark
sql/core/src/test/java/test/org/apache/spark/sql/JavaDatasetSuite.java
{ "start": 66686, "end": 67839 }
class ____ implements Serializable { private ArrayList<Integer> arrayList; private LinkedList<Integer> linkedList; private List<Integer> list; public ArrayList<Integer> getArrayList() { return arrayList; } public void setArrayList(ArrayList<Integer> arrayList) { this.arrayList = ar...
SpecificListsBean
java
elastic__elasticsearch
server/src/test/java/org/elasticsearch/common/io/stream/BytesStreamsTests.java
{ "start": 38690, "end": 42242 }
class ____ extends BytesStream { private final BytesStreamOutput output = new BytesStreamOutput(); private final CountingStreamOutput counting = new CountingStreamOutput(); @Override public void writeByte(byte b) { output.writeByte(b); counting.writeByte(b); ...
TestStreamOutput
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/util/MRAsyncDiskService.java
{ "start": 1480, "end": 1958 }
class ____ a container of multiple thread pools, each for a volume, * so that we can schedule async disk operations easily. * * Examples of async disk operations are deletion of files. * We can move the files to a "toBeDeleted" folder before asychronously * deleting it, to make sure the caller can run it faster. ...
is
java
apache__kafka
connect/runtime/src/test/resources/test-plugins/bad-packaging/test/plugins/InnocuousSinkConnector.java
{ "start": 1448, "end": 2032 }
class ____ extends SinkConnector { @Override public String version() { return "0.0.0"; } @Override public void start(Map<String, String> props) { } @Override public Class<? extends Task> taskClass() { return InnocuousSinkTask.class; } @Override public List...
InnocuousSinkConnector
java
elastic__elasticsearch
modules/apm/src/main/java/org/elasticsearch/telemetry/apm/internal/MetricNameValidator.java
{ "start": 825, "end": 7616 }
class ____ { private static final Pattern ALLOWED_CHARACTERS = Pattern.compile("[a-z][a-z0-9_]*"); static final Set<String> ALLOWED_SUFFIXES = Set.of( "total", "current", "ratio", "status" /*a workaround for enums */, "usage", "size", "utilization", ...
MetricNameValidator
java
spring-projects__spring-framework
spring-test/src/test/java/org/springframework/test/web/servlet/client/RestTestClientTests.java
{ "start": 7726, "end": 7962 }
class ____ { @Test void testExpectCookie() { RestTestClientTests.this.client.get().uri("/test") .exchange() .expectCookie().value("session", v -> MatcherAssert.assertThat(v, equalTo("abc"))); } } @Nested
Expectations
java
FasterXML__jackson-databind
src/test/java/tools/jackson/databind/objectid/TestObjectIdDeserialization.java
{ "start": 3325, "end": 3732 }
class ____ { protected Map<String, AnySetterObjectId> values = new HashMap<String, AnySetterObjectId>(); @JsonAnySetter public void anySet(String field, AnySetterObjectId value) { // Ensure that it is never called with null because of unresolved reference. assertNotNull(...
AnySetterObjectId
java
apache__kafka
trogdor/src/main/java/org/apache/kafka/trogdor/workload/GaussianTimestampRandomPayloadGenerator.java
{ "start": 1089, "end": 2359 }
class ____ identically to TimestampRandomPayloadGenerator, except the message size follows a gaussian * distribution. * * This should be used in conjunction with TimestampRecordProcessor in the Consumer to measure true end-to-end latency * of a system. * * `messageSizeAverage` - The average size in bytes of each ...
behaves
java
quarkusio__quarkus
extensions/resteasy-reactive/rest-client-jaxrs/deployment/src/main/java/io/quarkus/jaxrs/client/reactive/deployment/JaxrsClientReactiveProcessor.java
{ "start": 29493, "end": 29746 }
class ____ later used to create a new instance of the response type * and to provide {@link FieldFiller field fillers} that are responsible for setting values for each of the fields and * setters * * @param multipartResponseTypeInfo a
is
java
quarkusio__quarkus
extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/ExchangeAttribute.java
{ "start": 178, "end": 849 }
interface ____ { /** * Resolve the attribute from the HTTP server exchange. This may return null if the attribute is not present. * * @param exchange The exchange * @return The attribute */ String readAttribute(final RoutingContext exchange); /** * Sets a new value for the at...
ExchangeAttribute
java
google__dagger
javatests/dagger/internal/codegen/InjectConstructorFactoryGeneratorTest.java
{ "start": 30025, "end": 30862 }
class ____ {", " @Inject CheckedExceptionClass() throws Exception {}", "}"); daggerCompiler(file) .withProcessingOptions(ImmutableMap.of("dagger.privateMemberValidation", "WARNING")) .compile( subject -> { subject.hasErrorCount(0); sub...
CheckedExceptionClass
java
apache__commons-lang
src/main/java/org/apache/commons/lang3/text/WordUtils.java
{ "start": 1062, "end": 1549 }
class ____ to handle {@code null} input gracefully. * An exception will not be thrown for a {@code null} input. * Each method documents its behavior in more detail.</p> * * @since 2.0 * @deprecated As of <a href="https://commons.apache.org/proper/commons-lang/changes-report.html#a3.6">3.6</a>, use Apache Commons T...
tries
java
resilience4j__resilience4j
resilience4j-rxjava2/src/test/java/io/github/resilience4j/timelimiter/transformer/TimeLimiterTransformerObservableTest.java
{ "start": 1323, "end": 5031 }
class ____ { @Rule public final TestSchedulerRule testSchedulerRule = new TestSchedulerRule(); private final TestScheduler testScheduler = testSchedulerRule.getTestScheduler(); private final TimeLimiter timeLimiter = mock(TimeLimiter.class); @Test public void otherError() { given(timeL...
TimeLimiterTransformerObservableTest
java
quarkusio__quarkus
extensions/spring-security/deployment/src/main/java/io/quarkus/spring/security/deployment/StringPropertyAccessorGenerator.java
{ "start": 1001, "end": 1083 }
class ____ the following: * * <pre> * &#64;Singleton * public
like
java
qos-ch__slf4j
slf4j-api/src/main/java/org/slf4j/MDC.java
{ "start": 1413, "end": 2357 }
class ____ and serves as a substitute for the underlying logging * system's MDC implementation. * * <p> * If the underlying logging system offers MDC functionality, then SLF4J's MDC, * i.e. this class, will delegate to the underlying system's MDC. Note that at * this time, only two logging systems, namely log4j ...
hides
java
apache__dubbo
dubbo-common/src/test/java/org/apache/dubbo/common/utils/PojoUtilsTest.java
{ "start": 45250, "end": 45506 }
class ____<T> implements Serializable { private List<T> list; public List<T> getList() { return list; } public void setList(List<T> list) { this.list = list; } } public static
InnerPojo
java
quarkusio__quarkus
integration-tests/picocli/src/test/java/io/quarkus/it/picocli/TestTopCommand.java
{ "start": 279, "end": 713 }
class ____ { @RegisterExtension static final QuarkusProdModeTest config = createConfig("goodbye-app", GoodbyeCommand.class, EntryCommand.class) .setCommandLineParameters("goodbye"); @Test public void simpleTest() { Assertions.assertThat(config.getStartupConsoleOutput()).containsOnl...
TestTopCommand
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/internal/util/collections/BoundedConcurrentHashMap.java
{ "start": 24219, "end": 31490 }
class ____<K, V> implements EvictionPolicy<K, V> { /** * The percentage of the cache which is dedicated to hot blocks. * See section 5.1 */ private static final float L_LIRS = 0.95f; /** * The owning segment */ private final Segment<K, V> segment; /** * The accessQueue for reducing lock c...
LIRS
java
apache__kafka
trogdor/src/main/java/org/apache/kafka/trogdor/workload/SustainedConnectionWorker.java
{ "start": 2589, "end": 6297 }
class ____ implements TaskWorker { private static final Logger log = LoggerFactory.getLogger(SustainedConnectionWorker.class); // This is the metadata for the test itself. private final String id; private final SustainedConnectionSpec spec; // These variables are used to maintain the connections. ...
SustainedConnectionWorker
java
spring-projects__spring-boot
module/spring-boot-jersey/src/main/java/org/springframework/boot/jersey/autoconfigure/actuate/web/JerseyManagementContextConfiguration.java
{ "start": 1226, "end": 1556 }
class ____ { @Bean ServletRegistrationBean<ServletContainer> jerseyServletRegistration(JerseyApplicationPath jerseyApplicationPath, ResourceConfig resourceConfig) { return new ServletRegistrationBean<>(new ServletContainer(resourceConfig), jerseyApplicationPath.getUrlMapping()); } }
JerseyManagementContextConfiguration
java
spring-projects__spring-security
core/src/test/java/org/springframework/security/authorization/method/PreAuthorizeAuthorizationManagerTests.java
{ "start": 9506, "end": 9622 }
interface ____ { @PreAuthorize("hasRole('USER')") void inheritedAnnotations(); } public
InterfaceAnnotationsTwo
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/InterfaceWithOnlyStaticsTest.java
{ "start": 3964, "end": 4200 }
interface ____ { int foo = 42; static int bar() { return 1; } } """) .addOutputLines( "Test.java", """ final
Test
java
apache__avro
lang/java/perf/src/main/java/org/apache/avro/perf/test/reflect/ReflectLongArrayTest.java
{ "start": 3347, "end": 4695 }
class ____ extends BasicArrayState { private final Schema schema; private byte[] testData; private Decoder decoder; public TestStateDecode() { super(ARRAY_SIZE); final String jsonText = ReflectData.get().getSchema(long[].class).toString(); this.schema = new Schema.Parser().parse(jso...
TestStateDecode
java
apache__kafka
clients/src/main/java/org/apache/kafka/common/TopicPartitionInfo.java
{ "start": 1051, "end": 1335 }
class ____ { private final int partition; private final Node leader; private final List<Node> replicas; private final List<Node> isr; private final List<Node> elr; private final List<Node> lastKnownElr; /** * Create an instance of this
TopicPartitionInfo
java
google__guava
android/guava/src/com/google/common/collect/Maps.java
{ "start": 157021, "end": 161405 }
class ____ extends EntrySet<K, V> { @Override Map<K, V> map() { return DescendingMap.this; } @Override public Iterator<Entry<K, V>> iterator() { return entryIterator(); } } return new EntrySetImpl(); } @Override public Set<K> ...
EntrySetImpl
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlStateContext.java
{ "start": 978, "end": 1860 }
class ____<T, SV> { /** Wrapped original state handler. */ public final T original; public final StateTtlConfig config; public final TtlTimeProvider timeProvider; /** Serializer of original user stored value without timestamp. */ public final TypeSerializer<SV> valueSerializer; /** This r...
TtlStateContext
java
apache__flink
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/windowing/functions/InternalWindowFunctionTest.java
{ "start": 28199, "end": 28909 }
class ____ extends ProcessWindowFunction<Map<Long, Long>, String, Long, TimeWindow> implements OutputTypeConfigurable<String> { private static final long serialVersionUID = 1L; @Override public void setOutputType( TypeInformation<String> outTypeInfo, Exe...
AggregateProcessWindowFunctionMock
java
apache__camel
core/camel-core-reifier/src/main/java/org/apache/camel/reifier/language/MethodCallExpressionReifier.java
{ "start": 1100, "end": 2394 }
class ____ extends TypedExpressionReifier<MethodCallExpression> { public MethodCallExpressionReifier(CamelContext camelContext, ExpressionDefinition definition) { super(camelContext, definition); } @Override protected Object[] createProperties() { Object[] properties = new Object[7]; ...
MethodCallExpressionReifier
java
spring-projects__spring-boot
module/spring-boot-hazelcast/src/test/java/org/springframework/boot/hazelcast/testcontainers/HazelcastContainerConnectionDetailsFactoryTests.java
{ "start": 1157, "end": 1461 }
class ____ { @Test void shouldRegisterHints() { RuntimeHints hints = ContainerConnectionDetailsFactoryHints.getRegisteredHints(getClass().getClassLoader()); assertThat(RuntimeHintsPredicates.reflection().onType(ClientConfig.class)).accepts(hints); } }
HazelcastContainerConnectionDetailsFactoryTests
java
spring-projects__spring-framework
spring-test/src/test/java/org/springframework/test/context/support/DirtiesContextTestExecutionListenerTests.java
{ "start": 18524, "end": 18669 }
class ____ { void test() { } } @NestedTestConfiguration(OVERRIDE) @DirtiesContext(classMode = AFTER_EACH_TEST_METHOD)
InheritedConfig
java
micronaut-projects__micronaut-core
http/src/test/java/io/micronaut/http/util/HtmlEntityEncodingHtmlSanitizerTest.java
{ "start": 273, "end": 1648 }
class ____ { @Test void sanitize() { HtmlEntityEncodingHtmlSanitizer sanitizer = new HtmlEntityEncodingHtmlSanitizer(); String html = sanitizer.sanitize("<b>Hello, World!</b>"); assertEquals("&lt;b&gt;Hello, World!&lt;/b&gt;", html); html = sanitizer.sanitize("\"Hello, World!\""...
HtmlEntityEncodingHtmlSanitizerTest