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/search/aggregations/bucket/histogram/VariableWidthHistogramAggregator.java
{ "start": 2909, "end": 4264 }
class ____ implements Releasable { /** * This method will collect the doc and then either return itself or a new CollectionPhase * It is responsible for determining when a phase is over and what phase will run next */ abstract CollectionPhase collectValue(LeafBucketCollector ...
CollectionPhase
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/common/util/LongArray.java
{ "start": 705, "end": 1804 }
interface ____ extends BigArray, Writeable { static LongArray readFrom(StreamInput in) throws IOException { return new ReleasableLongArray(in); } /** * Get an element given its index. */ long get(long index); /** * Set a value at the given index and return the previous valu...
LongArray
java
spring-projects__spring-framework
spring-test/src/test/java/org/springframework/test/web/servlet/samples/client/standalone/ExceptionHandlerTests.java
{ "start": 5923, "end": 6207 }
class ____ { @ExceptionHandler Error handleException(Throwable exception) { return new Error("globalPersonController - " + exception.getClass().getSimpleName()); } } @RestControllerAdvice @Order(Ordered.LOWEST_PRECEDENCE) private static
RestPersonControllerExceptionHandler
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/test/SysPropsForTestsLoader.java
{ "start": 1007, "end": 2686 }
class ____ { public static final String TEST_PROPERTIES_PROP = "test.properties"; static { try { String testFileName = System.getProperty(TEST_PROPERTIES_PROP, "test.properties"); File currentDir = new File(testFileName).getAbsoluteFile().getParentFile(); File testFile = new File(currentDir,...
SysPropsForTestsLoader
java
google__error-prone
check_api/src/main/java/com/google/errorprone/bugpatterns/BugChecker.java
{ "start": 21115, "end": 21237 }
interface ____ extends Suppressible { Description matchTry(TryTree tree, VisitorState state); } public
TryTreeMatcher
java
apache__camel
components/camel-whatsapp/src/main/java/org/apache/camel/component/whatsapp/model/TextMessage.java
{ "start": 1023, "end": 1468 }
class ____ { @JsonProperty("preview_url") private boolean previewUrl; private String body; public TextMessage() { } public boolean isPreviewUrl() { return previewUrl; } public void setPreviewUrl(boolean previewUrl) { this.previewUrl = previewUrl; } public St...
TextMessage
java
quarkusio__quarkus
independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/interceptors/bindings/conflicting/ConflictingStereotypeBindingOnBeanTest.java
{ "start": 2003, "end": 2094 }
interface ____ { } @Stereotype1 @Stereotype2 @Dependent static
Stereotype2
java
apache__kafka
streams/src/main/java/org/apache/kafka/streams/StreamsConfig.java
{ "start": 38090, "end": 43832 }
class ____ that implements the <code>org.apache.kafka.streams.state.ProcessorWrapper</code> interface. " + "Must be passed in to the StreamsBuilder or Topology constructor in order to take effect"; /** {@code repartition.purge.interval.ms} */ @SuppressWarnings("WeakerAccess") public static final St...
name
java
mapstruct__mapstruct
processor/src/test/java/org/mapstruct/ap/test/bugs/_2505/Issue2505Mapper.java
{ "start": 582, "end": 804 }
class ____ { private Status status; public Status getStatus() { return status; } public void setStatus(Status stat) { this.status = stat; } }
Customer
java
elastic__elasticsearch
x-pack/plugin/esql/src/main/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundToLongBinarySearchEvaluator.java
{ "start": 4044, "end": 4757 }
class ____ implements EvalOperator.ExpressionEvaluator.Factory { private final Source source; private final EvalOperator.ExpressionEvaluator.Factory field; private final long[] points; public Factory(Source source, EvalOperator.ExpressionEvaluator.Factory field, long[] points) { this.source = s...
Factory
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/test/java/org/apache/hadoop/mapreduce/v2/api/records/TestIds.java
{ "start": 1266, "end": 5078 }
class ____ { @Test public void testJobId() { long ts1 = 1315890136000l; long ts2 = 1315890136001l; JobId j1 = createJobId(ts1, 2); JobId j2 = createJobId(ts1, 1); JobId j3 = createJobId(ts2, 1); JobId j4 = createJobId(ts1, 2); assertEquals(j1, j4); assertNotEquals(j1, j2); asse...
TestIds
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/sort/PushSorter.java
{ "start": 986, "end": 1313 }
interface ____<E> extends Sorter<E> { /** Writers a new record to the sorter. */ void writeRecord(E record) throws IOException, InterruptedException; /** * Finalizes the sorting. The method {@link #getIterator()} will not complete until this method * is called. */ void finishReading(); }...
PushSorter
java
quarkusio__quarkus
independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/AbstractSharedContext.java
{ "start": 365, "end": 4233 }
class ____ implements InjectableContext, InjectableContext.ContextState { protected final ContextInstances instances; public AbstractSharedContext() { this(new ComputingCacheContextInstances()); } public AbstractSharedContext(ContextInstances instances) { this.instances = Objects.requ...
AbstractSharedContext
java
apache__flink
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/state/rocksdb/snapshot/RocksDBFullSnapshotResources.java
{ "start": 2540, "end": 11453 }
class ____<K> implements FullSnapshotResources<K> { private final List<StateMetaInfoSnapshot> stateMetaInfoSnapshots; private final ResourceGuard.Lease lease; private final Snapshot snapshot; private final RocksDB db; private final List<MetaData> metaData; /** Number of bytes in the key-group p...
RocksDBFullSnapshotResources
java
apache__camel
components/camel-sql/src/test/java/org/apache/camel/component/sql/stored/ProducerTest.java
{ "start": 1475, "end": 3227 }
class ____ extends CamelTestSupport { EmbeddedDatabase db; @Override public void doPreSetup() throws Exception { db = new EmbeddedDatabaseBuilder() .setName(getClass().getSimpleName()) .setType(EmbeddedDatabaseType.DERBY) .addScript("sql/storedProce...
ProducerTest
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/checkpoint/CheckpointNamingService.java
{ "start": 929, "end": 1080 }
interface ____ { /** * Generate a new checkpoint Name * @return the checkpoint name */ public String getNewName(); }
CheckpointNamingService
java
elastic__elasticsearch
server/src/test/java/org/elasticsearch/common/util/concurrent/TaskExecutionTimeTrackingEsThreadPoolExecutorTests.java
{ "start": 1665, "end": 20064 }
class ____ extends ESTestCase { public void testExecutionEWMACalculation() throws Exception { ThreadContext context = new ThreadContext(Settings.EMPTY); TaskExecutionTimeTrackingEsThreadPoolExecutor executor = new TaskExecutionTimeTrackingEsThreadPoolExecutor( "test-threadpool", ...
TaskExecutionTimeTrackingEsThreadPoolExecutorTests
java
mockito__mockito
mockito-core/src/main/java/org/mockito/internal/invocation/InvocationComparator.java
{ "start": 303, "end": 523 }
class ____ implements Comparator<Invocation> { @Override public int compare(Invocation o1, Invocation o2) { return Integer.compare(o1.getSequenceNumber(), o2.getSequenceNumber()); } }
InvocationComparator
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java
{ "start": 4564, "end": 25064 }
class ____ be instantiated by Interceptor)", id = 182) void noDefaultConstructor(String name); @LogMessage(level = INFO) @Message(value = "Loaded properties from resource hibernate.properties: %s", id = 205) void propertiesLoaded(Properties maskOut); @LogMessage(level = DEBUG) @Message(value = "'hibernate.pr...
must
java
alibaba__nacos
core/src/main/java/com/alibaba/nacos/core/controller/compatibility/ApiCompatibilityConfig.java
{ "start": 866, "end": 3323 }
class ____ extends AbstractDynamicConfig { private static final String API_COMPATIBILITY = "ApiCompatibility"; private static final ApiCompatibilityConfig INSTANCE = new ApiCompatibilityConfig(); private static final String PREFIX = "nacos.core.api.compatibility"; public static final...
ApiCompatibilityConfig
java
apache__maven
impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultProfileActivationContext.java
{ "start": 1886, "end": 2028 }
class ____ implements ProfileActivationContext { record ExistRequest(String path, boolean enableGlob) {}
DefaultProfileActivationContext
java
apache__dubbo
dubbo-common/src/main/java/org/apache/dubbo/common/utils/DateUtils.java
{ "start": 1290, "end": 9220 }
class ____ { public static final ZoneId GMT = ZoneId.of("GMT"); public static final ZoneId UTC = ZoneId.of("UTC"); public static final String DATE = "yyyy-MM-dd"; public static final String DATE_MIN = "yyyy-MM-dd HH:mm"; public static final String DATE_TIME = "yyyy-MM-dd HH:mm:ss"; public stat...
DateUtils
java
google__guava
android/guava/src/com/google/common/primitives/UnsignedBytes.java
{ "start": 2225, "end": 10950 }
class ____ { private UnsignedBytes() {} /** * The largest power of two that can be represented as an unsigned {@code byte}. * * @since 10.0 */ public static final byte MAX_POWER_OF_TWO = (byte) 0x80; /** * The largest value that fits into an unsigned byte. * * @since 13.0 */ public s...
UnsignedBytes
java
redisson__redisson
redisson/src/main/java/org/redisson/api/search/index/TagIndex.java
{ "start": 726, "end": 2243 }
interface ____ extends FieldIndex { /** * Defines the attribute associated to the field name * * @param as the associated attribute * @return options object */ TagIndex as(String as); /** * Defines separator used for splitting the value of this attribute. * The separator...
TagIndex
java
google__dagger
javatests/dagger/internal/codegen/DuplicateBindingsValidationTest.java
{ "start": 10276, "end": 11513 }
interface ____ {", " Set<String> getStringSet();", " }", "}"); CompilerTests.daggerCompiler(component) .withProcessingOptions( ImmutableMap.<String, String>builder() .putAll(fullBindingGraphValidationOption()) .buildOrThrow...
TestComponent
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/asyncprocessing/SimpleAsyncExecutionController.java
{ "start": 3831, "end": 6110 }
class ____<K> implements AsyncExecutor<RunnableTask<K, ?>> { private final ExecutorService taskExecutorService; private final boolean managedExecutor; public TaskExecutor(ExecutorService taskExecutorService) { this.taskExecutorService = taskExecutorService; this.managed...
TaskExecutor
java
apache__camel
core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultBackOffTimer.java
{ "start": 1387, "end": 2919 }
class ____ extends ServiceSupport implements BackOffTimer { private final CamelContext camelContext; private final ScheduledExecutorService scheduler; private final String name; private final Set<Task> tasks = new CopyOnWriteArraySet<>(); public DefaultBackOffTimer(CamelContext camelContext, Strin...
DefaultBackOffTimer
java
bumptech__glide
instrumentation/src/main/java/com/bumptech/glide/test/GlideWithBeforeSuperOnCreateActivity.java
{ "start": 217, "end": 564 }
class ____ extends FragmentActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { Glide.with(this); super.onCreate(savedInstanceState); setContentView(new TextView(this)); } @Override protected void onResume() { super.onResume(); Glide.with(this); } }
GlideWithBeforeSuperOnCreateActivity
java
netty__netty
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2DataFrame.java
{ "start": 783, "end": 1773 }
interface ____ extends Http2StreamFrame, ByteBufHolder { /** * Frame padding to use. Will be non-negative and less than 256. */ int padding(); /** * Payload of DATA frame. Will not be {@code null}. */ @Override ByteBuf content(); /** * Returns the number of bytes that...
Http2DataFrame
java
elastic__elasticsearch
modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/RomanianAnalyzerProvider.java
{ "start": 1422, "end": 3364 }
class ____ extends AbstractIndexAnalyzerProvider<StopwordAnalyzerBase> { private final StopwordAnalyzerBase analyzer; RomanianAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) { super(name); CharArraySet stopwords = Analysis.parseStopWords(env, sett...
RomanianAnalyzerProvider
java
quarkusio__quarkus
integration-tests/test-extension/tests/src/main/java/io/quarkus/it/extension/EnvironmentVariableTestEndpoint.java
{ "start": 364, "end": 709 }
class ____ extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { DummyMapping dummyMapping = Arc.container().select(DummyMapping.class).get(); resp.getWriter().write(dummyMapping.name() + "-" + dummyMapping.age()); } }
EnvironmentVariableTestEndpoint
java
spring-projects__spring-framework
spring-context/src/main/java/org/springframework/stereotype/Indexed.java
{ "start": 2985, "end": 3197 }
interface ____ is indexed, it will be * automatically included with the {@code com.example.AdminService} stereotype. * If there are more {@code @Indexed} interfaces and/or superclasses in the * hierarchy, the
that
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/LongKeyedBucketOrds.java
{ "start": 6414, "end": 7364 }
interface ____ { /** * Advance to the next value. * @return {@code true} if there *is* a next value, * {@code false} if there isn't */ boolean next(); /** * The ordinal of the current value. */ long ord(); /** ...
BucketOrdsEnum
java
mybatis__mybatis-3
src/test/java/org/apache/ibatis/submitted/lazy_deserialize/LazyObjectFoo.java
{ "start": 812, "end": 1271 }
class ____ implements Serializable { private static final long serialVersionUID = 1L; private Integer id; private LazyObjectBar lazyObjectBar; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public LazyObjectBar getLazyObjectBar() { return this.lazyO...
LazyObjectFoo
java
elastic__elasticsearch
x-pack/plugin/mapper-aggregate-metric/src/main/java/org/elasticsearch/xpack/aggregatemetric/aggregations/metrics/AggregateMetricBackedAvgAggregator.java
{ "start": 1610, "end": 5791 }
class ____ extends NumericMetricsAggregator.SingleValue { final AggregateMetricsValuesSource.AggregateMetricDouble valuesSource; LongArray counts; DoubleArray sums; DoubleArray compensations; DocValueFormat format; AggregateMetricBackedAvgAggregator( String name, ValuesSourceC...
AggregateMetricBackedAvgAggregator
java
apache__flink
flink-state-backends/flink-statebackend-common/src/test/java/org/apache/flink/state/common/PeriodicMaterializationManagerTest.java
{ "start": 1504, "end": 3168 }
class ____ { void testInitialDelay() { ManuallyTriggeredScheduledExecutorService scheduledExecutorService = new ManuallyTriggeredScheduledExecutorService(); long periodicMaterializeDelay = 10_000L; try (PeriodicMaterializationManager test = new PeriodicMater...
PeriodicMaterializationManagerTest
java
spring-projects__spring-framework
spring-test/src/main/java/org/springframework/test/web/servlet/assertj/ModelAssert.java
{ "start": 5578, "end": 5804 }
class ____ extends AbstractBindingResultAssert<BindingResultAssert> { public BindingResultAssert(String name, BindingResult bindingResult) { super(name, bindingResult, BindingResultAssert.class); } } }
BindingResultAssert
java
apache__hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/container/ContainerResourceLocalizedEvent.java
{ "start": 1065, "end": 1593 }
class ____ extends ContainerResourceEvent { private final Path loc; // > 0: downloaded // < 0: cached // private long size; public ContainerResourceLocalizedEvent(ContainerId container, LocalResourceRequest rsrc, Path loc) { super(container, ContainerEventType.RESOURCE_LOCALIZED, rsrc); thi...
ContainerResourceLocalizedEvent
java
apache__camel
components/camel-whatsapp/src/main/java/org/apache/camel/component/whatsapp/model/Name.java
{ "start": 917, "end": 2223 }
class ____ { @JsonProperty("formatted_name") private String formattedName; @JsonProperty("first_name") private String firstName; @JsonProperty("last_name") private String lastName; @JsonProperty("middle_name") private String middleName; private String suffix; private String...
Name
java
eclipse-vertx__vert.x
vertx-core/src/main/java/io/vertx/core/http/impl/http2/Http2ServerStream.java
{ "start": 930, "end": 2097 }
interface ____ extends Http2Stream { static Http2ServerStream create(Http2ServerConnection connection, HttpServerMetrics serverMetrics, Object socketMetric, ContextInternal context, ...
Http2ServerStream
java
elastic__elasticsearch
x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/connector/action/ConnectorUpdateActionResponse.java
{ "start": 1100, "end": 2422 }
class ____ extends ActionResponse implements ToXContentObject { final DocWriteResponse.Result result; public ConnectorUpdateActionResponse(StreamInput in) throws IOException { result = DocWriteResponse.Result.readFrom(in); } public ConnectorUpdateActionResponse(DocWriteResponse.Result result) ...
ConnectorUpdateActionResponse
java
apache__hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/allocationfile/UserSettings.java
{ "start": 1062, "end": 1756 }
class ____ { private final String username; private final Integer maxRunningApps; UserSettings(Builder builder) { this.username = builder.username; this.maxRunningApps = builder.maxRunningApps; } public String render() { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(...
UserSettings
java
junit-team__junit5
junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClassSelector.java
{ "start": 1901, "end": 2684 }
class ____ implements DiscoverySelector { private final @Nullable ClassLoader classLoader; private final String className; private @Nullable Class<?> javaClass; ClassSelector(@Nullable ClassLoader classLoader, String className) { this.className = className; this.classLoader = classLoader; } ClassSelector...
ClassSelector
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/streaming/api/functions/sink/legacy/RichSinkFunction.java
{ "start": 1266, "end": 1416 }
class ____<IN> extends AbstractRichFunction implements SinkFunction<IN> { private static final long serialVersionUID = 1L; }
RichSinkFunction
java
quarkusio__quarkus
extensions/tls-registry/deployment/src/test/java/io/quarkus/tls/DefaultKeyStoreProviderTest.java
{ "start": 1075, "end": 2276 }
class ____ { private static final String configuration = """ # no configuration by default """; @RegisterExtension static final QuarkusUnitTest config = new QuarkusUnitTest().setArchiveProducer( () -> ShrinkWrap.create(JavaArchive.class) .add(new Str...
DefaultKeyStoreProviderTest
java
junit-team__junit5
junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/FieldArgumentsProvider.java
{ "start": 1463, "end": 6445 }
class ____ extends AnnotationBasedArgumentsProvider<FieldSource> { @Override protected Stream<? extends Arguments> provideArguments(ParameterDeclarations parameters, ExtensionContext context, FieldSource fieldSource) { Class<?> testClass = context.getRequiredTestClass(); Object testInstance = context.getTestI...
FieldArgumentsProvider
java
elastic__elasticsearch
server/src/test/java/org/elasticsearch/index/shard/LiveDocsEstimationTests.java
{ "start": 876, "end": 3727 }
class ____ extends IndexShardTestCase { @Override protected Settings nodeSettings() { return Settings.builder().put(DiscoveryNode.STATELESS_ENABLED_SETTING_NAME, true).build(); } public void testShardFieldStatsWithDeletes() throws IOException { Settings settings = Settings.builder() ...
LiveDocsEstimationTests
java
apache__camel
components/camel-micrometer-observability/src/main/java/org/apache/camel/micrometer/observability/MicrometerObservabilityTracer.java
{ "start": 2200, "end": 4990 }
class ____ extends org.apache.camel.telemetry.Tracer { private static final Logger LOG = LoggerFactory.getLogger(MicrometerObservabilityTracer.class); private Tracer tracer; private ObservationRegistry observationRegistry; private Propagator propagator; public Tracer getTracer() { return ...
MicrometerObservabilityTracer
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/ops/MergeExplicitInitialVersionTest.java
{ "start": 1590, "end": 1687 }
class ____ { @Id long id = 5; @Version int version = 1; String text; } @Entity static
F
java
spring-projects__spring-framework
spring-expression/src/test/java/org/springframework/expression/spel/MethodInvocationTests.java
{ "start": 20754, "end": 20907 }
class ____ { public int doit(int i) { return i; } @Anno public String doit(double d) { return "double "+d; } } public static
TestObject
java
quarkusio__quarkus
core/deployment/src/main/java/io/quarkus/runner/bootstrap/ForkJoinClassLoading.java
{ "start": 204, "end": 2427 }
class ____ { private static final Logger log = Logger.getLogger(ForkJoinClassLoading.class.getName()); /** * A yucky hack, basically attempt to make sure every thread in the common pool has * the correct CL. * <p> * It's not perfect, but as this only affects test and dev mode and not produ...
ForkJoinClassLoading
java
apache__flink
flink-table/flink-table-common/src/test/java/org/apache/flink/table/utils/TableSchemaUtilsTest.java
{ "start": 1803, "end": 6444 }
class ____ { @Test void testBuilderWithGivenSchema() { TableSchema oriSchema = TableSchema.builder() .field("a", DataTypes.INT().notNull()) .field("b", DataTypes.STRING()) .field("c", DataTypes.INT(), "a + 1") ...
TableSchemaUtilsTest
java
google__guice
core/test/com/google/inject/TypeListenerTest.java
{ "start": 21060, "end": 24688 }
class ____. */ @Test public void testTypesWithNoInjectableMembersAreNotified() { final AtomicInteger notificationCount = new AtomicInteger(); Guice.createInjector( new AbstractModule() { @Override protected void configure() { bindListener( onlyAbcd...
constructor
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/StringConcatToTextBlockTest.java
{ "start": 2055, "end": 2227 }
class ____ { String s = "hello\\n" + "world\\n"; } """) .addOutputLines( "Test.java", """
Test
java
apache__dubbo
dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/filter/DemoService.java
{ "start": 855, "end": 944 }
interface ____ { String sayHello(String name); int plus(int a, int b); }
DemoService
java
apache__camel
components/camel-twitter/src/main/java/org/apache/camel/component/twitter/timeline/MentionsConsumerHandler.java
{ "start": 1104, "end": 1754 }
class ____ extends AbstractStatusConsumerHandler { public MentionsConsumerHandler(TwitterEndpoint endpoint) { super(endpoint); } @Override protected List<Status> doPoll() throws TwitterException { Paging paging = getLastIdPaging(); log.trace("doPoll.getMentionsTimeline(sinceId=...
MentionsConsumerHandler
java
spring-projects__spring-framework
spring-core/src/main/java/org/springframework/util/ClassUtils.java
{ "start": 19325, "end": 19595 }
class ____ a primitive, void, or * a wrapper class */ public static boolean isPrimitiveOrWrapper(Class<?> clazz) { Assert.notNull(clazz, "Class must not be null"); return (clazz.isPrimitive() || isPrimitiveWrapper(clazz)); } /** * Check if the given
represents
java
greenrobot__greendao
DaoCore/src/main/java/org/greenrobot/greendao/test/DbTest.java
{ "start": 1064, "end": 1381 }
class ____ database related testing, which prepares an in-memory or an file-based DB (using the test {@link * android.content.Context}). Also, offers some convenience methods to create new {@link Application} objects similar * to {@link android.test.ApplicationTestCase}. * <p/> * Unlike ApplicationTestCase, this
for
java
quarkusio__quarkus
extensions/arc/runtime/src/main/java/io/quarkus/arc/lookup/LookupUnlessProperty.java
{ "start": 1682, "end": 2304 }
interface ____ { /** * Name of the runtime time property to check */ String name(); /** * Expected {@code String} value of the runtime time property (specified by {@code name}) if the bean should be skipped at * runtime. */ String stringValue(); /** * Determines if t...
LookupUnlessProperty
java
apache__camel
components/camel-workday/src/test/java/org/apache/camel/WorkdayCommonAPIProducerTest.java
{ "start": 1403, "end": 8619 }
class ____ extends CamelTestSupport { @Test public void createProducerMinimalConfiguration() throws Exception { WorkdayComponent workdayComponent = context.getComponent("workday", WorkdayComponent.class); WorkdayEndpoint workdayEndpoint = (WorkdayEndpoint) workdayComponent .cre...
WorkdayCommonAPIProducerTest
java
apache__dubbo
dubbo-common/src/main/java/org/apache/dubbo/common/resource/GlobalResourceInitializer.java
{ "start": 1072, "end": 2144 }
class ____<T> extends CallableSafeInitializer<T> { /** * The Dispose action to be executed on shutdown. */ private Consumer<T> disposeAction; private Disposable disposable; public GlobalResourceInitializer(Callable<T> initializer) { super(initializer); } public GlobalResour...
GlobalResourceInitializer
java
apache__kafka
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/clients/Murmur2Benchmark.java
{ "start": 2855, "end": 3426 }
class ____ { @Param public TestCase testCase; } @Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.MICROSECONDS) @Warmup(iterations = 5, time = 1000, timeUnit = MILLISECONDS) @Measurement(iterations = 20, time = 1000, timeUnit = MILLISECONDS) @Fork(value = ...
TestCaseState
java
apache__camel
components/camel-google/camel-google-sheets/src/generated/java/org/apache/camel/component/google/sheets/GoogleSheetsEndpointUriFactory.java
{ "start": 523, "end": 4576 }
class ____ extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory { private static final String BASE = ":apiName/methodName"; private static final Set<String> PROPERTY_NAMES; private static final Set<String> SECRET_PROPERTY_NAMES; private static final Map<St...
GoogleSheetsEndpointUriFactory
java
elastic__elasticsearch
qa/smoke-test-http/src/internalClusterTest/java/org/elasticsearch/http/NodeStatsRestCancellationIT.java
{ "start": 682, "end": 948 }
class ____ extends BlockedSearcherRestCancellationTestCase { public void testNodeStatsRestCancellation() throws Exception { runTest(new Request(HttpGet.METHOD_NAME, "/_nodes/stats"), TransportNodesStatsAction.TYPE.name()); } }
NodeStatsRestCancellationIT
java
apache__camel
components/camel-mail/src/main/java/org/apache/camel/component/mail/MailUtils.java
{ "start": 1187, "end": 7921 }
class ____ { public static final int DEFAULT_PORT_SMTP = 25; public static final int DEFAULT_PORT_SMTPS = 465; public static final int DEFAULT_PORT_POP3 = 110; public static final int DEFAULT_PORT_POP3S = 995; public static final int DEFAULT_PORT_NNTP = 119; public static final int DEFAULT_PORT...
MailUtils
java
resilience4j__resilience4j
resilience4j-circularbuffer/src/main/java/io/github/resilience4j/circularbuffer/ConcurrentEvictingQueue.java
{ "start": 10816, "end": 11976 }
class ____ implements Iterator<E> { private int visitedCount = 0; private int cursor; private int expectedModificationsCount; Iter(final int headIndex, final int modificationsCount) { this.cursor = headIndex; this.expectedModificationsCount = modificationsCount;...
Iter
java
redisson__redisson
redisson/src/main/java/org/redisson/api/RLocalCachedMap.java
{ "start": 1036, "end": 2786 }
interface ____<K, V> extends RMap<K, V> { /** * Pre-warm the cached entries. Not guaranteed to load ALL values, but statistically * will preload approximately all (all if no concurrent mutating activity). * Entries are loaded in a batch with size of 10 elements. */ void preloadCache(); ...
RLocalCachedMap
java
apache__hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/AboutBlock.java
{ "start": 1196, "end": 1809 }
class ____ extends HtmlBlock { @Inject AboutBlock(View.ViewContext ctx) { super(ctx); } @Override protected void render(Block html) { TimelineAbout tsInfo = TimelineUtils.createTimelineAbout( "Timeline Server - Generic History Service UI"); info("Timeline Server Overview"). __("Ti...
AboutBlock
java
apache__camel
components/camel-zookeeper-master/src/main/java/org/apache/camel/component/zookeepermaster/CamelNodeState.java
{ "start": 985, "end": 1607 }
class ____ extends NodeState { @JsonProperty String consumer; @JsonProperty boolean started; public CamelNodeState() { } public CamelNodeState(String id) { super(id); } public CamelNodeState(String id, String container) { super(id, container); } public S...
CamelNodeState
java
apache__kafka
clients/src/main/java/org/apache/kafka/common/telemetry/internals/TelemetryMetricNamingConvention.java
{ "start": 1109, "end": 1386 }
class ____ naming and mapping conventions defined as part of * <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-714%3A+Client+metrics+and+observability#KIP714:Clientmetricsandobservability-Metricsnamingandformat">Metrics naming and format</a> */ public
encapsulates
java
google__guava
android/guava/src/com/google/common/base/Converter.java
{ "start": 3684, "end": 5341 }
class ____ implement its {@link #doForward} and {@link #doBackward} methods. * </ul> * * <p>Using a converter: * * <ul> * <li>Convert one instance in the "forward" direction using {@code converter.convert(a)}. * <li>Convert multiple instances "forward" using {@code converter.convertAll(as)}. * <li>Convert...
and
java
google__guice
core/src/com/google/inject/internal/BytecodeGen.java
{ "start": 1564, "end": 1900 }
class ____ heavy use of {@link Function} and {@link BiFunction} types when interacting * with generated fast-classes and enhanced proxies. This is a deliberate design decision to avoid * using Guice-specific types in the generated classes. This means generated classes can be defined * in the same {@link ClassLoader}...
makes
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/common/compress/Compressor.java
{ "start": 818, "end": 3086 }
interface ____ { boolean isCompressed(BytesReference bytes); /** * Same as {@link #threadLocalInputStream(InputStream)} but wraps the returned stream as a {@link StreamInput}. */ default StreamInput threadLocalStreamInput(InputStream in) throws IOException { // wrap stream in buffer sinc...
Compressor
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/filter/LineItem.java
{ "start": 201, "end": 1237 }
class ____ { private Long id; private Order order; private int sequence; private Product product; private long quantity; /*package*/ LineItem() {} public static LineItem generate(Order order, int sequence, Product product, long quantity) { LineItem item = new LineItem(); item.order = order; item.sequence...
LineItem
java
apache__flink
flink-core/src/main/java/org/apache/flink/api/common/functions/FlatJoinFunction.java
{ "start": 2402, "end": 2972 }
interface ____<IN1, IN2, OUT> extends Function, Serializable { /** * The join method, called once per joined pair of elements. * * @param first The element from first input. * @param second The element from second input. * @param out The collector used to return zero, one, or more elements...
FlatJoinFunction
java
apache__kafka
connect/api/src/main/java/org/apache/kafka/connect/sink/SinkConnector.java
{ "start": 1391, "end": 4509 }
class ____ extends Connector { /** * <p> * Configuration key for the list of input topics for this connector. * </p> * <p> * Usually this setting is only relevant to the Kafka Connect framework, but is provided here for * the convenience of Connector developers if they also need to kn...
SinkConnector
java
google__guava
android/guava-tests/test/com/google/common/cache/LongAdderTest.java
{ "start": 829, "end": 1522 }
class ____ extends TestCase { /** * No-op null-pointer test for {@link LongAdder} to override the {@link PackageSanityTests} * version, which checks package-private methods that we don't want to have to annotate as {@code * Nullable} because we don't want diffs from jsr166e. */ public void testNulls() ...
LongAdderTest
java
elastic__elasticsearch
x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/tree/NodeInfo.java
{ "start": 16195, "end": 18655 }
interface ____<P1, P2, P3, P4, P5, P6, P7, P8, P9, T> { T apply(Source l, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9); } public static <T extends Node<?>, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> NodeInfo<T> create( T n, NodeCtor10<P1, P2, P3, P4, P5, P6, P7, P8, P9, ...
NodeCtor9
java
spring-projects__spring-boot
module/spring-boot-jms/src/test/java/org/springframework/boot/jms/autoconfigure/JmsAutoConfigurationTests.java
{ "start": 21393, "end": 21729 }
class ____ { @Bean JmsMessagingTemplate jmsMessagingTemplate(JmsTemplate jmsTemplate) { JmsMessagingTemplate messagingTemplate = new JmsMessagingTemplate(jmsTemplate); messagingTemplate.setDefaultDestinationName("fooBar"); return messagingTemplate; } } @Configuration(proxyBeanMethods = false) stati...
TestConfiguration5
java
quarkusio__quarkus
integration-tests/kafka-snappy/src/test/java/io/quarkus/it/kafka/KafkaSnappyProducerITCase.java
{ "start": 115, "end": 184 }
class ____ extends KafkaSnappyProducerTest { }
KafkaSnappyProducerITCase
java
apache__dubbo
dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/SpringCloudMetadataServiceURLBuilder.java
{ "start": 1532, "end": 2186 }
class ____ implements MetadataServiceURLBuilder { public static final String NAME = "spring-cloud"; @Override public List<URL> build(ServiceInstance serviceInstance) { Map<String, String> metadata = serviceInstance.getMetadata(); String dubboUrlsForJson = metadata.get(METADATA_SERVICE_URLS_...
SpringCloudMetadataServiceURLBuilder
java
mapstruct__mapstruct
processor/src/test/java/org/mapstruct/ap/test/conditional/propertyname/sourcepropertyname/ConditionalMethodInMapperWithAllExceptTarget.java
{ "start": 1011, "end": 1856 }
class ____ { Set<String> visited = new LinkedHashSet<>(); Set<String> visitedSources = new LinkedHashSet<>(); } @Mapping(target = "country", source = "originCountry") @Mapping(target = "addresses", source = "originAddresses") Employee map(EmployeeDto employee, @Context PresenceUtils uti...
PresenceUtils
java
grpc__grpc-java
core/src/test/java/io/grpc/internal/SpiffeUtilTest.java
{ "start": 4882, "end": 8350 }
class ____ { @Test public void spiffeUriFormatTest() { NullPointerException npe = assertThrows(NullPointerException.class, () -> SpiffeUtil.parse(null)); assertEquals("uri", npe.getMessage()); IllegalArgumentException iae = assertThrows(IllegalArgumentException.class, () -> ...
ExceptionMessageTest
java
apache__flink
flink-core/src/main/java/org/apache/flink/api/common/io/compression/XZInputStreamFactory.java
{ "start": 1152, "end": 1696 }
class ____ implements InflaterInputStreamFactory<XZCompressorInputStream> { private static final XZInputStreamFactory INSTANCE = new XZInputStreamFactory(); public static XZInputStreamFactory getInstance() { return INSTANCE; } @Override public XZCompressorInputStream create(InputStream in...
XZInputStreamFactory
java
redisson__redisson
redisson/src/main/java/org/redisson/api/map/MapLoader.java
{ "start": 858, "end": 1223 }
interface ____<K, V> { /** * Loads map value by key. * * @param key - map key * @return value or <code>null</code> if value doesn't exists */ V load(K key); /** * Loads all keys. * * @return Iterable object. It's helpful if all keys don't fit in memory. *...
MapLoader
java
spring-projects__spring-data-jpa
spring-data-jpa/src/test/java/org/springframework/data/jpa/repository/config/RepositoriesJavaConfigTests.java
{ "start": 1643, "end": 1966 }
class ____ { @Autowired Repositories repositories; @Test // DATAJPA-323 void foo() { assertThat(repositories.hasRepositoryFor(User.class)).isTrue(); } @Configuration @EnableJpaRepositories(basePackageClasses = UserRepository.class) @ImportResource("classpath:infrastructure.xml") static
RepositoriesJavaConfigTests
java
apache__spark
sql/catalyst/src/test/java/org/apache/spark/sql/catalyst/JavaTypeInferenceBeans.java
{ "start": 2527, "end": 2593 }
class ____ extends BarWrapper<String> { } static
StringBarWrapper
java
grpc__grpc-java
xds/src/main/java/io/grpc/xds/XdsServerWrapper.java
{ "start": 29880, "end": 33698 }
class ____ implements ResourceWatcher<RdsUpdate> { private final String resourceName; private ImmutableList<VirtualHost> savedVirtualHosts; private boolean isPending = true; private RouteDiscoveryState(String resourceName) { this.resourceName = checkNotNull(resourceName, "resourceName")...
RouteDiscoveryState
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/aggregate/TestMapReduceAggregates.java
{ "start": 1644, "end": 4867 }
class ____ { private static NumberFormat idFormat = NumberFormat.getInstance(); static { idFormat.setMinimumIntegerDigits(4); idFormat.setGroupingUsed(false); } @Test public void testAggregates() throws Exception { launch(); } public static void launch() throws Exception { Configu...
TestMapReduceAggregates
java
processing__processing4
app/src/processing/app/contrib/UpdateListPanel.java
{ "start": 902, "end": 3872 }
class ____ extends ListPanel { Contribution.Filter contribFilter; public UpdateListPanel(ContributionTab contributionTab, Contribution.Filter contribFilter) { super(contributionTab, contribFilter, true, ContributionColumn.STATUS_NO_HEADER, ContributionColumn.NAME, ...
UpdateListPanel
java
resilience4j__resilience4j
resilience4j-spring/src/main/java/io/github/resilience4j/ratelimiter/configure/RateLimiterConfigurationProperties.java
{ "start": 707, "end": 1616 }
class ____ extends io.github.resilience4j.common.ratelimiter.configuration.CommonRateLimiterConfigurationProperties { private int rateLimiterAspectOrder = Ordered.LOWEST_PRECEDENCE - 2; /** * As of release 0.16.0 as we set an implicit spring aspect order now which is retry then * circuit breaker...
RateLimiterConfigurationProperties
java
google__error-prone
core/src/main/java/com/google/errorprone/bugpatterns/time/JavaInstantGetSecondsGetNano.java
{ "start": 2094, "end": 2909 }
class ____ extends BugChecker implements MethodInvocationTreeMatcher { private static final Matcher<ExpressionTree> GET_EPOCH_SECOND = instanceMethod().onExactClass("java.time.Instant").named("getEpochSecond"); private static final Matcher<ExpressionTree> GET_NANO = allOf( instanceMethod(...
JavaInstantGetSecondsGetNano
java
ReactiveX__RxJava
src/main/java/io/reactivex/rxjava3/internal/operators/maybe/MaybeContains.java
{ "start": 1643, "end": 3004 }
class ____ implements MaybeObserver<Object>, Disposable { final SingleObserver<? super Boolean> downstream; final Object value; Disposable upstream; ContainsMaybeObserver(SingleObserver<? super Boolean> actual, Object value) { this.downstream = actual; this.va...
ContainsMaybeObserver
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/action/support/CancellableFanOut.java
{ "start": 1743, "end": 8528 }
class ____<Item, ItemResponse, FinalResponse> { private static final Logger logger = LogManager.getLogger(CancellableFanOut.class); /** * Run the fan-out action. * * @param task The task to watch for cancellations. If {@code null} or not a {@link CancellableTask} then the fan-out still...
CancellableFanOut
java
mockito__mockito
mockito-extensions/mockito-junit-jupiter/src/test/java/org/mockitousage/GenericTypeMockTest.java
{ "start": 12663, "end": 12998 }
class ____ implements BaseRepository<Map<Integer, String>, String> { public Map<Integer, String> findById(String id) { return Map.of(); } public Map<Integer, String> save(Map<Integer, String> entity) { return entity; } } p...
TwoRepository
java
apache__logging-log4j2
log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/PathCondition.java
{ "start": 1088, "end": 2298 }
interface ____ { /** * The empty array. */ static final PathCondition[] EMPTY_ARRAY = {}; /** * Copies the given input. * * @param source What to copy * @return a copy, never null. */ static PathCondition[] copy(PathCondition... source) { return source == nul...
PathCondition
java
elastic__elasticsearch
x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/cohere/embeddings/CohereEmbeddingsServiceSettingsTests.java
{ "start": 1786, "end": 18048 }
class ____ extends AbstractWireSerializingTestCase<CohereEmbeddingsServiceSettings> { public static CohereEmbeddingsServiceSettings createRandom() { var commonSettings = CohereServiceSettingsTests.createRandom(); var embeddingType = randomFrom(CohereEmbeddingType.values()); return new Coher...
CohereEmbeddingsServiceSettingsTests
java
quarkusio__quarkus
extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/tracing/intrumentation/vertx/RedisClientInstrumenterVertxTracer.java
{ "start": 8342, "end": 8977 }
enum ____ implements AttributesExtractor<CommandTrace, Object> { INSTANCE; @Override public void onStart(AttributesBuilder attributes, io.opentelemetry.context.Context parentContext, CommandTrace request) { AttributesExtractorUtil.internalSet(attributes, DB_NAMESPACE...
RedisClientAttributesExtractor
java
assertj__assertj-core
assertj-core/src/test/java/org/assertj/core/api/atomic/referencearray/AtomicReferenceArrayAssert_isSubsetOf_with_Array_Test.java
{ "start": 1074, "end": 1659 }
class ____ extends AtomicReferenceArrayAssertBaseTest { private final Object[] values = array("Yoda", "Luke"); @Override protected AtomicReferenceArrayAssert<Object> invoke_api_method() { return assertions.isSubsetOf(values); } @Override protected void verify_internal_effects() { verify(arrays).a...
AtomicReferenceArrayAssert_isSubsetOf_with_Array_Test
java
spring-projects__spring-security
oauth2/oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/server/authorization/web/authentication/OAuth2DeviceAuthorizationConsentAuthenticationConverterTests.java
{ "start": 1932, "end": 14159 }
class ____ { private static final String VERIFICATION_URI = "/oauth2/device_verification"; private static final String USER_CODE = "BCDF-GHJK"; private static final String CLIENT_ID = "client-1"; private static final String STATE = "abc123"; private OAuth2DeviceAuthorizationConsentAuthenticationConverter conv...
OAuth2DeviceAuthorizationConsentAuthenticationConverterTests