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
google__dagger
javatests/dagger/functional/builder/BuilderTest.java
{ "start": 11225, "end": 11309 }
interface ____ { int i(); String s(); @Subcomponent.Builder
Grandchild
java
apache__flink
flink-datastream/src/main/java/org/apache/flink/datastream/impl/stream/GlobalStreamImpl.java
{ "start": 12775, "end": 13797 }
class ____<OUT1, OUT2> implements TwoGlobalStreams<OUT1, OUT2> { private final GlobalStreamImpl<OUT1> firstStream; private final GlobalStreamImpl<OUT2> secondStream; public static <OUT1, OUT2> TwoGlobalStreamsImpl<OUT1, OUT2> of( GlobalStreamImpl<OUT1> firstStream, GlobalStrea...
TwoGlobalStreamsImpl
java
apache__camel
core/camel-core/src/test/java/org/apache/camel/issues/OnExceptionBeforeErrorHandlerIssueTest.java
{ "start": 1039, "end": 3473 }
class ____ extends ContextTestSupport { @Test public void testOk() throws Exception { context.getRouteController().startRoute("foo"); getMockEndpoint("mock:error").expectedMessageCount(0); getMockEndpoint("mock:dead").expectedMessageCount(0); getMockEndpoint("mock:result").expe...
OnExceptionBeforeErrorHandlerIssueTest
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/indices/NodeIndicesStats.java
{ "start": 2906, "end": 12954 }
class ____ implements Writeable, ChunkedToXContent { private static final TransportVersion VERSION_SUPPORTING_STATS_BY_INDEX = TransportVersions.V_8_5_0; private static final TransportVersion NODES_STATS_SUPPORTS_MULTI_PROJECT = TransportVersion.fromName( "nodes_stats_supports_multi_project" ); ...
NodeIndicesStats
java
FasterXML__jackson-databind
src/main/java/tools/jackson/databind/type/ClassStack.java
{ "start": 129, "end": 267 }
class ____ to keep track of 'call stack' for classes being referenced * (as well as unbound variables) * * @since 2.7 */ public final
used
java
spring-projects__spring-boot
core/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringBootContextLoaderTests.java
{ "start": 17881, "end": 18125 }
class ____ { public static void main() { new SpringApplication(ConfigWithPublicMain.class).run("--spring.profiles.active=frommain"); } } @SpringBootConfiguration(proxyBeanMethods = false) public static
ConfigWithPublicParameterlessMain
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/orphan/onetoone/multilevelcascade/DeleteMultiLevelOrphansTest.java
{ "start": 885, "end": 8930 }
class ____ { @BeforeEach public void createData(EntityManagerFactoryScope scope) { scope.inTransaction( entityManager -> { Preisregelung preisregelung = new Preisregelung(); Tranchenmodell tranchenmodell = new Tranchenmodell(); X x = new X(); Tranche tranche1 = new Tranche(); Y y = new Y(); Tranc...
DeleteMultiLevelOrphansTest
java
spring-projects__spring-framework
spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java
{ "start": 38300, "end": 38895 }
class ____ fallback if (mbd.getInstanceSupplier() == null) { result = getFactoryBeanGeneric(mbd.targetType); if (result.resolve() != null) { return result; } result = getFactoryBeanGeneric(mbd.hasBeanClass() ? ResolvableType.forClass(mbd.getBeanClass()) : null); if (result.resolve() != null) { ...
as
java
apache__kafka
streams/test-utils/src/main/java/org/apache/kafka/streams/processor/api/MockProcessorContext.java
{ "start": 17726, "end": 20551 }
interface ____ assumed by state stores that add change-logging. // Rather than risk a mysterious ClassCastException during unit tests, throw an explanatory exception. throw new UnsupportedOperationException( "MockProcessorContext does not provide record collection. " + "For ...
is
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/slive/ReadOp.java
{ "start": 1858, "end": 5136 }
class ____ extends Operation { private static final Logger LOG = LoggerFactory.getLogger(ReadOp.class); ReadOp(ConfigExtractor cfg, Random rnd) { super(ReadOp.class.getSimpleName(), cfg, rnd); } /** * Gets the file name to read * * @return Path */ protected Path getReadFile() { Path fn ...
ReadOp
java
google__error-prone
core/src/main/java/com/google/errorprone/bugpatterns/ThreeLetterTimeZoneID.java
{ "start": 1745, "end": 6943 }
class ____ extends BugChecker implements MethodInvocationTreeMatcher { private static final Matcher<ExpressionTree> METHOD_MATCHER = MethodMatchers.staticMethod() .onClass("java.util.TimeZone") .named("getTimeZone") .withParameters("java.lang.String"); private static final Match...
ThreeLetterTimeZoneID
java
apache__flink
flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/NFASerializerUpgradeTest.java
{ "start": 12092, "end": 13292 }
class ____ implements TypeSerializerUpgradeTestBase.UpgradeVerifier<SharedBufferNode> { @Override public TypeSerializer<SharedBufferNode> createUpgradedSerializer() { return new SharedBufferNodeSerializer(); } @Override public Condition<SharedBufferNode>...
SharedBufferNodeSerializerVerifier
java
apache__flink
flink-core/src/main/java/org/apache/flink/types/variant/BinaryVariant.java
{ "start": 3127, "end": 18594 }
class ____ implements Variant { private final byte[] value; private final byte[] metadata; // The variant value doesn't use the whole `value` binary, but starts from its `pos` index and // spans a size of `valueSize(value, pos)`. This design avoids frequent copies of the value // binary when readin...
BinaryVariant
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/streaming/api/windowing/windows/TimeWindow.java
{ "start": 1765, "end": 4160 }
class ____ extends Window { private final long start; private final long end; public TimeWindow(long start, long end) { this.start = start; this.end = end; } /** * Gets the starting timestamp of the window. This is the first timestamp that belongs to this * window. ...
TimeWindow
java
spring-projects__spring-framework
spring-context/src/testFixtures/java/org/springframework/context/testfixture/index/CandidateComponentsTestClassLoader.java
{ "start": 1181, "end": 3328 }
class ____ extends ClassLoader { /** * Create a test {@link ClassLoader} that disables the use of the index, even * if resources are present at the standard location. * @param classLoader the classloader to use for all other operations * @return a test {@link ClassLoader} that has no index * @see org.spring...
CandidateComponentsTestClassLoader
java
spring-projects__spring-framework
spring-test/src/test/java/org/springframework/test/context/testng/transaction/ejb/AbstractEjbTxDaoTestNGTests.java
{ "start": 1510, "end": 2740 }
class ____ extends AbstractTransactionalTestNGSpringContextTests { protected static final String TEST_NAME = "test-name"; @EJB protected TestEntityDao dao; @Autowired protected EntityManager em; @Test void test1InitialState() { int count = dao.getCount(TEST_NAME); assertThat(count).as("New TestEntity sh...
AbstractEjbTxDaoTestNGTests
java
FasterXML__jackson-databind
src/test/java/tools/jackson/databind/jsontype/SealedTypesWithExistingPropertyTest.java
{ "start": 839, "end": 1059 }
class ____ permits Apple, Orange { public String name; protected Fruit(String n) { name = n; } } @JsonTypeName("apple") @JsonPropertyOrder({ "name", "seedCount", "type" }) static final
Fruit
java
processing__processing4
core/src/processing/data/DoubleDict.java
{ "start": 4166, "end": 18763 }
class ____ { public String key; public double value; Entry(String key, double value) { this.key = key; this.value = value; } } public Iterable<Entry> entries() { return new Iterable<Entry>() { public Iterator<Entry> iterator() { return entryIterator(); } }...
Entry
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/id/hhh12973/SequenceMismatchStrategyLogTest.java
{ "start": 1685, "end": 3522 }
class ____ extends EntityManagerFactoryBasedFunctionalTest { @RegisterExtension public LoggerInspectionExtension logInspection = LoggerInspectionExtension.builder().setLogger( SEQUENCE_GENERATOR_LOGGER ).build(); private final Triggerable triggerable = logInspection.watchForLogMessages( "HHH090202:" ); protec...
SequenceMismatchStrategyLogTest
java
apache__dubbo
dubbo-compatible/src/main/java/com/alibaba/dubbo/rpc/RpcResult.java
{ "start": 895, "end": 1147 }
class ____ extends AppResponse implements com.alibaba.dubbo.rpc.Result { public RpcResult() {} public RpcResult(Object result) { super(result); } public RpcResult(Throwable exception) { super(exception); } }
RpcResult
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/rest/action/cat/RestThreadPoolAction.java
{ "start": 2493, "end": 12395 }
class ____ extends AbstractCatAction { private static final Set<String> RESPONSE_PARAMS = addToCopy(AbstractCatAction.RESPONSE_PARAMS, "thread_pool_patterns"); @Override public List<Route> routes() { return List.of(new Route(GET, "/_cat/thread_pool"), new Route(GET, "/_cat/thread_pool/{thread_pool...
RestThreadPoolAction
java
quarkusio__quarkus
extensions/redis-cache/deployment/src/test/java/io/quarkus/cache/redis/deployment/SimpleCachedService.java
{ "start": 271, "end": 673 }
class ____ { static final String CACHE_NAME = "test-cache"; @CacheResult(cacheName = CACHE_NAME) public String cachedMethod(String key) { return UUID.randomUUID().toString(); } @CacheInvalidate(cacheName = CACHE_NAME) public void invalidate(String key) { } @CacheInvalidateAll...
SimpleCachedService
java
quarkusio__quarkus
extensions/hibernate-validator/runtime/src/main/java/io/quarkus/hibernate/validator/runtime/locale/LocaleResolversWrapper.java
{ "start": 552, "end": 1056 }
class ____ implements LocaleResolver { @Inject Instance<LocaleResolver> resolvers; @Override public Locale resolve(LocaleResolverContext context) { for (LocaleResolver resolver : resolvers) { if (!resolver.equals(this)) { Locale locale = resolver.resolve(context); ...
LocaleResolversWrapper
java
spring-projects__spring-boot
module/spring-boot-restclient/src/test/java/org/springframework/boot/restclient/autoconfigure/observation/RestClientObservationAutoConfigurationWithoutMetricsTests.java
{ "start": 2284, "end": 3441 }
class ____ { private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() .withBean(ObservationRegistry.class, TestObservationRegistry::create) .withConfiguration(AutoConfigurations.of(ObservationAutoConfiguration.class, RestClientAutoConfiguration.class, RestClientObservationAutoConf...
RestClientObservationAutoConfigurationWithoutMetricsTests
java
apache__hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/server/api/protocolrecords/SaveFederationQueuePolicyResponse.java
{ "start": 1149, "end": 1715 }
class ____ { public static SaveFederationQueuePolicyResponse newInstance() { return Records.newRecord(SaveFederationQueuePolicyResponse.class); } public static SaveFederationQueuePolicyResponse newInstance(String msg) { SaveFederationQueuePolicyResponse response = Records.newRecord(SaveFederation...
SaveFederationQueuePolicyResponse
java
spring-projects__spring-boot
integration-test/spring-boot-test-integration-tests/src/test/java/org/springframework/boot/web/server/test/SpringBootTestReactiveWebEnvironmentUserDefinedTestRestTemplateTests.java
{ "start": 1622, "end": 1987 }
class ____ extends AbstractSpringBootTestEmbeddedReactiveWebEnvironmentTests { @Test void restTemplateIsUserDefined() { assertThat(getContext().getBean("testRestTemplate")).isInstanceOf(RestTemplate.class); } @Configuration(proxyBeanMethods = false) @EnableWebFlux @RestController static
SpringBootTestReactiveWebEnvironmentUserDefinedTestRestTemplateTests
java
google__gson
gson/src/test/java/com/google/gson/ParameterizedTypeFixtures.java
{ "start": 1263, "end": 2690 }
class ____<T> { public final T value; public MyParameterizedType(T value) { this.value = value; } public T getValue() { return value; } public String getExpectedJson() { String valueAsJson = getExpectedJson(value); return String.format("{\"value\":%s}", valueAsJson); ...
MyParameterizedType
java
spring-projects__spring-framework
spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassProcessingTests.java
{ "start": 17764, "end": 17860 }
class ____ { @Bean public void testBean() { } } @Configuration static
ConfigWithVoidBean
java
alibaba__fastjson
src/test/java/com/alibaba/json/test/benchmark/decode/Map1Decode.java
{ "start": 153, "end": 606 }
class ____ extends BenchmarkCase { private String text; public Map1Decode(){ super("StringArray1000Decode"); this.text = "{\"badboy\":true,\"description\":\"神棍敌人姐\",\"name\":\"校长\",\"age\":3,\"birthdate\":1293278091773,\"salary\":123456789.0123}"; } @Override public void execute(...
Map1Decode
java
FasterXML__jackson-databind
src/main/java/tools/jackson/databind/cfg/DatatypeFeatures.java
{ "start": 152, "end": 246 }
class ____ contains settings for multiple * {@link DatatypeFeature} enumerations. */ public
that
java
apache__camel
components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/spi/PlatformHttpConsumer.java
{ "start": 1023, "end": 1210 }
interface ____ extends Consumer { /** * Gets the {@link PlatformHttpEndpoint} for the consumer. */ @Override PlatformHttpEndpoint getEndpoint(); }
PlatformHttpConsumer
java
elastic__elasticsearch
x-pack/plugin/ql/src/main/java/org/elasticsearch/xpack/ql/expression/gen/processor/FunctionalBinaryProcessor.java
{ "start": 571, "end": 1839 }
class ____<T, U, R, F extends BiFunction<T, U, R>> extends BinaryProcessor { private final F function; protected FunctionalBinaryProcessor(Processor left, Processor right, F function) { super(left, right); this.function = function; } protected FunctionalBinaryProcessor(StreamInput in,...
FunctionalBinaryProcessor
java
apache__dubbo
dubbo-test/dubbo-test-check/src/main/java/org/apache/dubbo/test/check/registrycenter/processor/ZookeeperWindowsProcessor.java
{ "start": 1259, "end": 1838 }
class ____ implements Processor { @Override public void process(Context context) throws DubboTestException { ZookeeperWindowsContext zookeeperWindowsContext = (ZookeeperWindowsContext) context; this.doProcess(zookeeperWindowsContext); } /** * Use {@link Process} to handle the comm...
ZookeeperWindowsProcessor
java
apache__camel
dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DaprEndpointBuilderFactory.java
{ "start": 39723, "end": 44381 }
interface ____ extends DaprEndpointConsumerBuilder, DaprEndpointProducerBuilder { default AdvancedDaprEndpointBuilder advanced() { return (AdvancedDaprEndpointBuilder) this; } /** * The Dapr Client. * * The opti...
DaprEndpointBuilder
java
apache__flink
flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/process/timer/TimerUtils.java
{ "start": 1222, "end": 2011 }
class ____ { public static TypeInformation<Row> createTimerDataTypeInfo(TypeInformation<Row> keyType) { // structure: [timerType/timerOperationType, watermark, timestamp, key, namespace] // 1) setTimer: [timerOperationType, null, timestamp, key, namespace] // 2) onTimer: [timerType, waterma...
TimerUtils
java
elastic__elasticsearch
x-pack/plugin/esql/src/main/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModUnsignedLongsEvaluator.java
{ "start": 1127, "end": 5173 }
class ____ implements EvalOperator.ExpressionEvaluator { private static final long BASE_RAM_BYTES_USED = RamUsageEstimator.shallowSizeOfInstance(ModUnsignedLongsEvaluator.class); private final Source source; private final EvalOperator.ExpressionEvaluator lhs; private final EvalOperator.ExpressionEvaluator rh...
ModUnsignedLongsEvaluator
java
quarkusio__quarkus
extensions/resteasy-classic/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/vertx/JsonArrayWriter.java
{ "start": 740, "end": 1736 }
class ____ implements AsyncMessageBodyWriter<JsonArray> { @Override public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) { return type == JsonArray.class; } @Override public void writeTo(JsonArray jsonArray, Class<?> type, Type genericT...
JsonArrayWriter
java
FasterXML__jackson-databind
src/test/java/tools/jackson/databind/jsonschema/NewSchemaTest.java
{ "start": 1056, "end": 1234 }
enum ____ { A, B, C; @JsonValue public String forSerialize() { return "value-"+name(); } } // silly little
TestEnumWithJsonValue
java
google__error-prone
core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/ImmutableAnalysis.java
{ "start": 2400, "end": 4678 }
class ____ { private final WellKnownMutability wellKnownMutability; @Inject Factory(WellKnownMutability wellKnownMutability) { this.wellKnownMutability = wellKnownMutability; } public ImmutableAnalysis create( BiPredicate<Symbol, VisitorState> suppressionChecker, VisitorState...
Factory
java
apache__camel
core/camel-core/src/test/java/org/apache/camel/processor/SplitTokenizerXmlMultilineTest.java
{ "start": 984, "end": 1968 }
class ____ extends ContextTestSupport { @Test public void testSingleLine() throws Exception { String payload = "<Parent>\n" + "\t<Child A=\"1\" B=\"2\"/>\n" + "</Parent>"; getMockEndpoint("mock:result").expectedMessageCount(1); template.sendBody("direct:start", payload); asse...
SplitTokenizerXmlMultilineTest
java
spring-projects__spring-boot
module/spring-boot-jdbc/src/test/java/org/springframework/boot/jdbc/docker/compose/MySqlEnvironmentTests.java
{ "start": 1090, "end": 3499 }
class ____ { @Test void createWhenHasMysqlRandomRootPasswordThrowsException() { assertThatIllegalStateException() .isThrownBy(() -> new MySqlEnvironment(Map.of("MYSQL_RANDOM_ROOT_PASSWORD", "true"))) .withMessage("MYSQL_RANDOM_ROOT_PASSWORD is not supported"); } @Test void createWhenHasNoPasswordThrowsEx...
MySqlEnvironmentTests
java
google__dagger
javatests/dagger/functional/builderbinds/BuilderSupertype.java
{ "start": 702, "end": 804 }
interface ____ { @BindsInstance void boundInSubtype(@Named("subtype") int subtype); }
BuilderSupertype
java
assertj__assertj-core
assertj-core/src/test/java/org/example/test/AutoClosableSoftAssertionsLineNumberTest.java
{ "start": 1171, "end": 2565 }
class ____ { @Test void should_print_line_numbers_of_failed_assertions() { AutoCloseableSoftAssertions softly = new AutoCloseableSoftAssertions(); softly.assertThat(1) .isLessThan(0) .isLessThan(1); // WHEN var error = expectAssertionError(softly::close); // THEN assertT...
AutoClosableSoftAssertionsLineNumberTest
java
apache__kafka
server/src/main/java/org/apache/kafka/server/AssignmentsManager.java
{ "start": 10080, "end": 10997 }
class ____ implements EventQueue.Event { private final Map<TopicIdPartition, Assignment> sent; private final Optional<ClientResponse> response; HandleResponseEvent( Map<TopicIdPartition, Assignment> sent, Optional<ClientResponse> response ) { this.sen...
HandleResponseEvent
java
google__dagger
javatests/dagger/internal/codegen/ComponentProcessorTest.java
{ "start": 55450, "end": 55766 }
class ____ {", " @Inject Foo() {}", "}"); Source module = CompilerTests.javaSource( "test.TestModule", "package test;", "", "import dagger.Module;", "", "@Module(subcomponents = Pruned.class)", "
Foo
java
elastic__elasticsearch
x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/InferenceFeatures.java
{ "start": 2658, "end": 7980 }
class ____ implements FeatureSpecification { private static final NodeFeature SEMANTIC_TEXT_HIGHLIGHTER = new NodeFeature("semantic_text.highlighter"); private static final NodeFeature SEMANTIC_TEXT_HIGHLIGHTER_DEFAULT = new NodeFeature("semantic_text.highlighter.default"); private static final NodeFeature...
InferenceFeatures
java
alibaba__fastjson
src/test/java/com/alibaba/json/bvt/parser/TypeUtilsTest_interface.java
{ "start": 2654, "end": 3013 }
interface ____ { @JSONField(name = "ID") int getId(); @JSONField(name = "xid") void setId(int value); @JSONField(name = "NAME") String getName(String xx); @JSONField(name = "NAME") String getName(String xx, int v); @JSONField(name = "xid_1") ...
IV
java
apache__camel
core/camel-api/src/generated/java/org/apache/camel/spi/annotations/InfraService.java
{ "start": 1399, "end": 2299 }
interface ____ used by Camel JBang infra run to retrieve testing information like port, endpoint, username... * * @return */ Class service(); /** * Returns a description of this Service. * * This is used for documentation and tooling. * * @return */ String descr...
is
java
junit-team__junit5
documentation/src/test/java/example/DisplayNameGeneratorDemo.java
{ "start": 1964, "end": 2327 }
class ____ { @SentenceFragment("if it is divisible by 4 but not by 100") @Test void divisibleBy4ButNotBy100() { } @SentenceFragment("if it is one of the following years") @ParameterizedTest(name = "{0}") @ValueSource(ints = { 2016, 2020, 2048 }) void validLeapYear(int year) { } } // end::user_gui...
LeapYearTests
java
mybatis__mybatis-3
src/test/java/org/apache/ibatis/submitted/extend/ExtendMapper.java
{ "start": 702, "end": 778 }
interface ____ { Parent selectParent(); Child selectChild(); }
ExtendMapper
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/StorageInfo.java
{ "start": 1827, "end": 9612 }
class ____ { public int layoutVersion; // layout version of the storage data public int namespaceID; // id of the file system public String clusterID; // id of the cluster public long cTime; // creation time of the file system state protected final NodeType storageType; // Type of t...
StorageInfo
java
apache__dubbo
dubbo-plugin/dubbo-rest-spring/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/spring/SpringRestToolKit.java
{ "start": 2958, "end": 8024 }
class ____ implements RestToolKit { private static final Logger LOGGER = LoggerFactory.getLogger(SpringRestToolKit.class); private final Map<MethodParameterMeta, TypeDescriptor> cache = CollectionUtils.newConcurrentHashMap(); private final ConfigurableBeanFactory beanFactory; private final PropertyPla...
SpringRestToolKit
java
apache__kafka
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java
{ "start": 19637, "end": 19765 }
class ____ { private static final int METADATA_REFRESH_INTERVAL_MS = Integer.MAX_VALUE; private static
GroupMetadataManager
java
mapstruct__mapstruct
processor/src/test/java/org/mapstruct/ap/test/bugs/_3807/Issue3807Mapper.java
{ "start": 501, "end": 737 }
class ____ { private final String value; public Source(String value) { this.value = value; } public String getValue() { return value; } } //CHECKSTYLE:OFF
Source
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/CriteriaPrimitiveIdTest.java
{ "start": 2205, "end": 2354 }
class ____ { @Id private long id; private String name; public MyEntity() { } public MyEntity(long id) { this.id = id; } } }
MyEntity
java
google__guava
android/guava/src/com/google/common/io/LittleEndianDataInputStream.java
{ "start": 1369, "end": 1625 }
class ____ violates the specification of its supertype {@code * DataInput}, which explicitly requires big-endian byte order. * * @author Chris Nokleberg * @author Keith Bottner * @since 8.0 */ @J2ktIncompatible @GwtIncompatible public final
intentionally
java
spring-projects__spring-framework
spring-web/src/test/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequestTests.java
{ "start": 1901, "end": 3488 }
class ____ { @Test void isAsyncStarted() { assertThat(asyncRequest.isAsyncStarted()).isFalse(); asyncRequest.startAsync(); assertThat(asyncRequest.isAsyncStarted()).isTrue(); } @Test void startAsync() { asyncRequest.startAsync(); MockAsyncContext context = (MockAsyncContext) request.getAsy...
StartAsync
java
elastic__elasticsearch
server/src/test/java/org/elasticsearch/index/codec/tsdb/ES87TSDBDocValuesFormatTests.java
{ "start": 2119, "end": 2366 }
class ____ extends BaseDocValuesFormatTestCase { private static final int NUM_DOCS = 10; static { LogConfigurator.loadLog4jPlugins(); LogConfigurator.configureESLogging(); } public static
ES87TSDBDocValuesFormatTests
java
apache__flink
flink-core/src/main/java/org/apache/flink/api/common/operators/SlotSharingGroup.java
{ "start": 6652, "end": 10553 }
class ____ { private String name; private CPUResource cpuCores; private MemorySize taskHeapMemory; private MemorySize taskOffHeapMemory; private MemorySize managedMemory; private Map<String, Double> externalResources = new HashMap<>(); private Builder(String nam...
Builder
java
alibaba__druid
core/src/test/java/com/alibaba/druid/bvt/sql/mysql/select/MySqlSelectTest_9.java
{ "start": 1169, "end": 2326 }
class ____ extends MysqlTest { public void test_0() throws Exception { String sql = "SELECT `group`.* FROM `group` WHERE (group.group_id=159754)"; MySqlStatementParser parser = new MySqlStatementParser(sql); List<SQLStatement> statementList = parser.parseStatementList(); SQLStatemen...
MySqlSelectTest_9
java
elastic__elasticsearch
x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/ValuesDoubleAggregator.java
{ "start": 1620, "end": 1805 }
class ____ generated. Edit @{code X-ValuesAggregator.java.st} instead * of this file. */ @Aggregator({ @IntermediateState(name = "values", type = "DOUBLE_BLOCK") }) @GroupingAggregator
is
java
google__error-prone
core/src/main/java/com/google/errorprone/bugpatterns/javadoc/EmptyBlockTag.java
{ "start": 3308, "end": 4973 }
class ____ extends DocTreePathScanner<Void, Void> { private final VisitorState state; private EmptyBlockTagChecker(VisitorState state) { this.state = state; } @Override public Void visitParam(ParamTree paramTree, Void unused) { reportMatchIfEmpty(paramTree, paramTree.getDescription());...
EmptyBlockTagChecker
java
apache__camel
core/camel-api/src/main/java/org/apache/camel/catalog/SuggestionStrategy.java
{ "start": 940, "end": 1311 }
interface ____ { /** * Provides a list of valid option names for a did you mean function. * * @param names valid names * @param unknownOption unknown option name * @return an array of suggested names (did you mean) */ String[] suggestEndpointOptions(Set<Str...
SuggestionStrategy
java
hibernate__hibernate-orm
hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/function/json/SingleStoreJsonMergepatchFunction.java
{ "start": 554, "end": 1279 }
class ____ extends AbstractJsonMergepatchFunction { public SingleStoreJsonMergepatchFunction(TypeConfiguration typeConfiguration) { super( typeConfiguration ); } @Override public void render( SqlAppender sqlAppender, List<? extends SqlAstNode> arguments, ReturnableType<?> returnType, SqlAstTranslato...
SingleStoreJsonMergepatchFunction
java
quarkusio__quarkus
extensions/resteasy-classic/resteasy-client/deployment/src/main/java/io/quarkus/restclient/deployment/RestClientPredicateProviderBuildItem.java
{ "start": 253, "end": 1021 }
class ____ extends MultiBuildItem { private final String providerClass; private final Predicate<ClassInfo> matcher; /** * Register JAX-RS client provider against Rest clients matching {@code matcher} condition. */ public RestClientPredicateProviderBuildItem(String providerClass, Predicate<Cl...
RestClientPredicateProviderBuildItem
java
apache__camel
components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyTextlineInOutNonBlockingTest.java
{ "start": 1179, "end": 3854 }
class ____ extends BaseNettyTest { private static String beforeThreadName; private static String afterThreadName; private static String beforeThreadName2; private static String afterThreadName2; @Test public void testNonBlocking() throws Exception { getMockEndpoint("mock:result").expec...
NettyTextlineInOutNonBlockingTest
java
hibernate__hibernate-orm
hibernate-jcache/src/test/java/org/hibernate/orm/test/jcache/domain/HolidayCalendar.java
{ "start": 319, "end": 1399 }
class ____ { private Long id; private String name; // Date -> String private Map holidays = new HashMap(); public HolidayCalendar init() { name = "default"; DateFormat df = new SimpleDateFormat("yyyy.MM.dd"); try { holidays.clear(); holidays.put(df.parse("2009.01.01"), "New Year's Day"); holidays...
HolidayCalendar
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/DiskBalancerConstants.java
{ "start": 1095, "end": 1530 }
class ____ { public static final String DISKBALANCER_BANDWIDTH = "DiskBalancerBandwidth"; public static final String DISKBALANCER_VOLUME_NAME = "DiskBalancerVolumeName"; /** Min and Max Plan file versions that we know of. **/ public static final int DISKBALANCER_MIN_VERSION = 1; public static final int...
DiskBalancerConstants
java
elastic__elasticsearch
x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/notification/slack/message/Action.java
{ "start": 3354, "end": 5962 }
class ____ implements ToXContent { private TextTemplate type; private TextTemplate name; private TextTemplate text; private TextTemplate url; private TextTemplate style; public Action render(TextTemplateEngine engine, Map<String, Object> model) { String styl...
Template
java
redisson__redisson
redisson/src/main/java/org/redisson/connection/DNSMonitor.java
{ "start": 1323, "end": 10838 }
class ____ { private static final Logger log = LoggerFactory.getLogger(DNSMonitor.class); private final AddressResolver<InetSocketAddress> resolver; private final ConnectionManager connectionManager; private final Map<RedisURI, InetSocketAddress> masters = new HashMap<>(); private final Map<Re...
DNSMonitor
java
netty__netty
codec-http2/src/test/java/io/netty/handler/codec/http2/LastInboundHandler.java
{ "start": 6397, "end": 6528 }
class ____ { private final Object evt; UserEvent(Object evt) { this.evt = evt; } } }
UserEvent
java
spring-projects__spring-framework
spring-core/src/test/java/example/type/AssignableTypeFilterTestsTypes.java
{ "start": 1411, "end": 1472 }
class ____ implements JdbcDaoSupport { } }
SimpleJdbcDaoSupport
java
alibaba__fastjson
src/test/java/com/alibaba/fastjson/serializer/issue3479/TestIssue3479.java
{ "start": 320, "end": 597 }
class ____ { private String typeKey; public String getTypeKey() { return typeKey; } public void setTypeKey(String typeKey) { this.typeKey = typeKey; } } @JSONType(typeName = "dog") public static
Animal
java
spring-projects__spring-security
config/src/main/java/org/springframework/security/config/annotation/web/configurers/PermitAllSupport.java
{ "start": 2005, "end": 2749 }
class ____ implements RequestMatcher { private String processUrl; private ExactUrlRequestMatcher(String processUrl) { this.processUrl = processUrl; } @Override public boolean matches(HttpServletRequest request) { String uri = request.getRequestURI(); String query = request.getQueryString(); if ...
ExactUrlRequestMatcher
java
apache__camel
components/camel-cxf/camel-cxf-soap/src/test/java/org/apache/camel/component/cxf/holder/MyOrderType.java
{ "start": 1046, "end": 1128 }
class ____ { @XmlElement(required = true) protected int iAmount; }
MyOrderType
java
spring-projects__spring-framework
spring-test/src/test/java/org/springframework/test/context/support/DirtiesContextTestExecutionListenerTests.java
{ "start": 17057, "end": 17181 }
class ____ { void test() { } } @DirtiesContext(classMode = AFTER_CLASS) static
DirtiesContextDeclaredLocallyBeforeClass
java
apache__camel
components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/multibytes/BindyMultiBytesTest.java
{ "start": 1523, "end": 3479 }
class ____ extends CamelTestSupport { @Produce("direct:in") private ProducerTemplate producer; @EndpointInject("mock:result") private MockEndpoint result; // ************************************************************************* // TESTS // *********************************************...
BindyMultiBytesTest
java
quarkusio__quarkus
extensions/resteasy-reactive/rest-client/deployment/src/test/java/io/quarkus/rest/client/reactive/BasicAuthTest.java
{ "start": 840, "end": 3220 }
class ____ { @RegisterExtension static final QuarkusUnitTest TEST = new QuarkusUnitTest() .withApplicationRoot((jar) -> jar .addClasses(Resource.class) .addAsResource("application-basic-auth.properties", "application.properties") .addAsReso...
BasicAuthTest
java
quarkusio__quarkus
extensions/elytron-security-ldap/deployment/src/test/java/io/quarkus/elytron/security/ldap/rest/RolesEndpointClassLevel.java
{ "start": 291, "end": 366 }
class ____ */ @Path("/roles-class") @RolesAllowed("standardRole") public
level
java
elastic__elasticsearch
x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/SeenGroupIds.java
{ "start": 405, "end": 1203 }
interface ____ { /** * The grouping ids that have been seen already. This {@link BitArray} is * kept and mutated by the caller so make a copy if it's something you * need your own copy of it. */ BitArray seenGroupIds(BigArrays bigArrays); record Empty() implements SeenGroupIds { ...
SeenGroupIds
java
apache__camel
components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpConsumerDisconnectIT.java
{ "start": 1365, "end": 5071 }
class ____ extends SftpServerTestSupport { private static final String SAMPLE_FILE_NAME_1 = String.format("sample-1-%s.txt", SftpConsumerDisconnectIT.class.getSimpleName()); private static final String SAMPLE_FILE_NAME_2 = String.format("sample-2-%s.txt", SftpConsumerDisconnectIT.class.g...
SftpConsumerDisconnectIT
java
spring-projects__spring-framework
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyEmitterReturnValueHandler.java
{ "start": 4000, "end": 10294 }
class ____ implements HandlerMethodReturnValueHandler { private final List<HttpMessageConverter<?>> sseMessageConverters; private final ReactiveTypeHandler reactiveHandler; private final List<ViewResolver> viewResolvers; private final LocaleResolver localeResolver; /** * Simple constructor with reactive ty...
ResponseBodyEmitterReturnValueHandler
java
apache__camel
components/camel-twitter/src/main/java/org/apache/camel/component/twitter/timeline/TwitterTimelineEndpoint.java
{ "start": 2015, "end": 4997 }
class ____ extends AbstractTwitterEndpoint { @UriPath(description = "The timeline type to produce/consume.") @Metadata(required = true) private TimelineType timelineType; @UriParam(description = "The username when using timelineType=user") private String user; @UriParam(description = "The list ...
TwitterTimelineEndpoint
java
apache__camel
dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/KubernetesPodsComponentBuilderFactory.java
{ "start": 1415, "end": 1956 }
interface ____ { /** * Kubernetes Pods (camel-kubernetes) * Perform operations on Kubernetes Pods and get notified on Pod changes. * * Category: container,cloud * Since: 2.17 * Maven coordinates: org.apache.camel:camel-kubernetes * * @return the dsl builder */ sta...
KubernetesPodsComponentBuilderFactory
java
mapstruct__mapstruct
processor/src/test/java/org/mapstruct/ap/test/references/statics/BeerMapperWithNonUsedMapper.java
{ "start": 458, "end": 1070 }
class ____ { public static final BeerMapperWithNonUsedMapper INSTANCE = Mappers.getMapper( BeerMapperWithNonUsedMapper.class ); @Mapping( target = "category", source = "percentage") public abstract BeerDto mapBeer(Beer beer); public static Category toCategory(float in) { if ( in < 2.5 ) { ...
BeerMapperWithNonUsedMapper
java
apache__camel
components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultConstants.java
{ "start": 908, "end": 1818 }
class ____ { private static final String HEADER_PREFIX = "CamelHashicorpVault"; // headers set by the producer only @Metadata(label = "producer", description = "Overrides the desired operation to be used in the producer.", javaType = "String") public static final String OPERATION = HEADER...
HashicorpVaultConstants
java
google__dagger
javatests/dagger/internal/codegen/MembersInjectionValidationTest.java
{ "start": 10560, "end": 11562 }
interface ____ {", " void inject(KotlinObjectWithMemberInjection injected);", "}"); CompilerTests.daggerCompiler(component, testModule) .compile( subject -> { subject.hasErrorCount(3); subject.hasErrorContaining( "Dagger does...
TestComponent
java
playframework__playframework
dev-mode/sbt-plugin/src/sbt-test/play-sbt-plugin/routes-compiler-routes-compilation-java/tests/test/PatternPathParamTest.java
{ "start": 516, "end": 944 }
class ____ extends AbstractRoutesTest { @Test public void checkPattern() { var result = route(app, fakeRequest(GET, "/pattern/123")); assertThat(result.status()).isEqualTo(OK); assertThat(contentAsString(result)).isEqualTo("123"); // Invalid result = route(app, fakeReque...
PatternPathParamTest
java
google__dagger
javatests/dagger/internal/codegen/ProductionGraphValidationTest.java
{ "start": 3238, "end": 3756 }
class ____ {}"); CompilerTests.daggerCompiler(EXECUTOR_MODULE, module, component, foo, bar) .withProcessingOptions(compilerMode.processorOptions()) .compile( subject -> { subject.hasErrorCount(1); subject.hasErrorContaining( "Bar cannot b...
Bar
java
apache__logging-log4j2
log4j-core/src/main/java/org/apache/logging/log4j/core/layout/AbstractLayout.java
{ "start": 1342, "end": 1469 }
class ____ Layouts. * * @param <T> * The Class that the Layout will format the LogEvent into. */ public abstract
for
java
spring-projects__spring-boot
core/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java
{ "start": 21907, "end": 24651 }
class ____ implements SpringApplicationHook { private final Mode mode; private final @Nullable ApplicationContextInitializer<ConfigurableApplicationContext> initializer; private final Consumer<SpringApplication> configurer; private final List<ApplicationContext> contexts = Collections.synchronizedList(new A...
ContextLoaderHook
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestDelegationTokensWithHA.java
{ "start": 3423, "end": 8643 }
class ____ { private static final Configuration conf = new Configuration(); private static final Logger LOG = LoggerFactory.getLogger(TestDelegationTokensWithHA.class); private static MiniDFSCluster cluster; private static NameNode nn0; private static NameNode nn1; private static FileSystem fs; priv...
TestDelegationTokensWithHA
java
spring-projects__spring-security
test/src/test/java/org/springframework/security/test/context/showcase/WithMockCustomUser.java
{ "start": 1003, "end": 1579 }
interface ____ { /** * The username to be used. The default is rob * @return */ String username() default "rob"; /** * The roles to use. The default is "USER". A * {@link org.springframework.security.core.GrantedAuthority} will be created for each * value within roles. Each value in roles will automati...
WithMockCustomUser
java
apache__flink
flink-table/flink-table-api-java-bridge/src/test/java/org/apache/flink/table/factories/DataGenTableSourceFactoryTest.java
{ "start": 33966, "end": 34670 }
class ____ implements SourceFunction.SourceContext<RowData> { private final Object lock = new Object(); private final List<RowData> results = new ArrayList<>(); @Override public void collect(RowData element) { results.add(element); } @Override publ...
TestContext
java
apache__camel
components/camel-microprofile/camel-microprofile-fault-tolerance/src/main/java/org/apache/camel/component/microprofile/faulttolerance/FaultToleranceProcessor.java
{ "start": 2752, "end": 14606 }
class ____ extends BaseProcessorSupport implements CamelContextAware, Navigate<Processor>, org.apache.camel.Traceable, IdAware, RouteIdAware { private static final Logger LOG = LoggerFactory.getLogger(FaultToleranceProcessor.class); private CamelContext camelContext; private String id; private...
FaultToleranceProcessor
java
alibaba__druid
core/src/main/java/com/alibaba/druid/sql/dialect/odps/ast/OdpsCreateTableStatement.java
{ "start": 1150, "end": 2683 }
class ____ extends HiveCreateTableStatement { protected SQLAliasedExpr autoPartitionedBy; protected final List<SQLExpr> withSerdeproperties = new ArrayList<SQLExpr>(); public OdpsCreateTableStatement() { super(DbType.odps); } public SQLExprTableSource getLike() { return like; }...
OdpsCreateTableStatement
java
apache__flink
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/JobInitializationMetricsTest.java
{ "start": 1177, "end": 6409 }
class ____ { @Test public void testBuildingJobInitializationMetricsFromSingleSubtask() { final ExecutionAttemptID executionAttemptID = ExecutionAttemptID.randomId(); JobInitializationMetricsBuilder initializationMetricsBuilder = new JobInitializationMetricsBuilder(Collections.si...
JobInitializationMetricsTest
java
alibaba__druid
core/src/test/java/com/alibaba/druid/pool/ha/selector/RandomDataSourceSelectorSingleDataSourceTest.java
{ "start": 463, "end": 3978 }
class ____ { private static final Log LOG = LogFactory .getLog(RandomDataSourceSelectorSingleDataSourceTest.class); private HighAvailableDataSource highAvailableDataSource; @Before public void setUp() throws Exception { highAvailableDataSource = new HighAvailableDataSource(); ...
RandomDataSourceSelectorSingleDataSourceTest
java
apache__kafka
trogdor/src/main/java/org/apache/kafka/trogdor/coordinator/TaskManager.java
{ "start": 18483, "end": 19970 }
class ____ implements Callable<Void> { private final String id; DestroyTask(String id) { this.id = id; } @Override public Void call() throws Exception { if (id.isEmpty()) { throw new InvalidRequestException("Invalid empty ID in destroyTas...
DestroyTask
java
spring-projects__spring-framework
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ArgumentAware.java
{ "start": 916, "end": 1191 }
interface ____ { /** * Callback hook for nested spring:argument tags to pass their value * to the parent tag. * @param argument the result of the nested {@code spring:argument} tag */ void addArgument(@Nullable Object argument) throws JspTagException; }
ArgumentAware