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
apache__hadoop
hadoop-tools/hadoop-dynamometer/hadoop-dynamometer-workload/src/main/java/org/apache/hadoop/tools/dynamometer/workloadgenerator/WorkloadMapper.java
{ "start": 1501, "end": 2611 }
class ____<KEYIN, VALUEIN, KEYOUT, VALUEOUT> extends Mapper<KEYIN, VALUEIN, KEYOUT, VALUEOUT> { /** * Get the description of the behavior of this mapper. * @return description string. */ public abstract String getDescription(); /** * Get a list of the description of each configuration that this ...
WorkloadMapper
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/TriggerId.java
{ "start": 2288, "end": 2816 }
class ____ extends StdSerializer<TriggerId> { private static final long serialVersionUID = 1L; protected TriggerIdSerializer() { super(TriggerId.class); } @Override public void serialize( final TriggerId value, final JsonGenerator gen, final Seriali...
TriggerIdSerializer
java
elastic__elasticsearch
x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/jwt/JwtStringClaimValidatorTests.java
{ "start": 710, "end": 24632 }
class ____ extends ESTestCase { public void testClaimIsNotString() throws ParseException { final String claimName = randomAlphaOfLength(10); final String fallbackClaimName = randomAlphaOfLength(12); final JwtStringClaimValidator validator; final JWTClaimsSet jwtClaimsSet; i...
JwtStringClaimValidatorTests
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/graph/spi/SubGraphImplementor.java
{ "start": 360, "end": 755 }
interface ____<J> extends SubGraph<J>, GraphImplementor<J> { @Override SubGraphImplementor<J> makeCopy(boolean mutable); @Override @Deprecated(forRemoval = true) SubGraphImplementor<J> makeSubGraph(boolean mutable); @Override @Deprecated(forRemoval = true) RootGraphImplementor<J> makeRootGraph(String name, boo...
SubGraphImplementor
java
google__guava
android/guava-tests/test/com/google/common/util/concurrent/AbstractServiceTest.java
{ "start": 24663, "end": 24892 }
class ____ extends AbstractService { @Override protected void doStart() { notifyStarted(); } @Override protected void doStop() { notifyFailed(EXCEPTION); } } private static
StopFailingService
java
alibaba__druid
core/src/main/java/com/alibaba/druid/util/jdbc/PreparedStatementBase.java
{ "start": 976, "end": 9573 }
class ____ extends StatementBase implements PreparedStatement { private List<Object> parameters = new ArrayList<Object>(); private MockParameterMetaData metadata = new MockParameterMetaData(); private MockResultSetMetaData resultSetMetaData = new MockResultSetMetaData(); public PreparedStatementBase(...
PreparedStatementBase
java
spring-projects__spring-data-jpa
spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/JpaEntityInformationSupport.java
{ "start": 2821, "end": 3291 }
class ____ {@link Metamodel}. * * @param domainClass must not be {@literal null}. * @param metamodel must not be {@literal null}. * @param persistenceUnitUtil must not be {@literal null}. * @return * @since 4.0 */ @SuppressWarnings({ "rawtypes", "unchecked" }) public static <T> JpaEntityInformation<T, ?...
and
java
spring-projects__spring-security
web/src/test/java/org/springframework/security/web/debug/DebugFilterTests.java
{ "start": 1866, "end": 4844 }
class ____ { @Captor private ArgumentCaptor<HttpServletRequest> requestCaptor; @Captor private ArgumentCaptor<String> logCaptor; @Mock private HttpServletRequest request; @Mock private HttpServletResponse response; @Mock private FilterChain filterChain; @Mock private FilterChainProxy fcp; @Mock pri...
DebugFilterTests
java
quarkusio__quarkus
extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/ReadOnlyAttributeException.java
{ "start": 130, "end": 402 }
class ____ extends Exception { public ReadOnlyAttributeException() { } public ReadOnlyAttributeException(final String attributeName, final String newValue) { super("Could not set " + attributeName + " to " + newValue); } }
ReadOnlyAttributeException
java
spring-projects__spring-framework
spring-core/src/main/java/org/springframework/util/ClassUtils.java
{ "start": 20014, "end": 20159 }
class ____ an array of primitive wrappers, * i.e. Boolean, Byte, Character, Short, Integer, Long, Float, or Double. * @param clazz the
represents
java
apache__flink
flink-datastream/src/main/java/org/apache/flink/datastream/impl/extension/window/operators/TwoInputNonBroadcastWindowProcessOperator.java
{ "start": 3310, "end": 36183 }
class ____<K, IN1, IN2, OUT, W extends Window> extends BaseKeyedTwoInputNonBroadcastProcessOperator<K, IN1, IN2, OUT> implements Triggerable<K, W> { private static final long serialVersionUID = 1L; // ------------------------------------------------------------------------ // Configuration...
TwoInputNonBroadcastWindowProcessOperator
java
spring-projects__spring-framework
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
{ "start": 35158, "end": 36387 }
class ____ extends AttachmentUnmarshaller { private final MimeContainer mimeContainer; public Jaxb2AttachmentUnmarshaller(MimeContainer mimeContainer) { this.mimeContainer = mimeContainer; } @Override public byte[] getAttachmentAsByteArray(String cid) { try { DataHandler dataHandler = getAttachme...
Jaxb2AttachmentUnmarshaller
java
apache__hadoop
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/SASKeyGeneratorInterface.java
{ "start": 1342, "end": 2491 }
interface ____ { /** * Interface method to retrieve SAS Key for a container within the storage * account. * * @param accountName * - Storage account name * @param container * - Container name within the storage account. * @return SAS URI for the container. * @throws SASKe...
SASKeyGeneratorInterface
java
ReactiveX__RxJava
src/main/java/io/reactivex/rxjava3/internal/operators/flowable/FlowablePublish.java
{ "start": 15005, "end": 15977 }
class ____<T> extends AtomicLong implements Subscription { private static final long serialVersionUID = 2845000326761540265L; final Subscriber<? super T> downstream; final PublishConnection<T> parent; long emitted; InnerSubscription(Subscriber<? super T> downstream, Publ...
InnerSubscription
java
apache__flink
flink-python/src/test/java/org/apache/flink/python/util/PartitionCustomTestMapFunction.java
{ "start": 1162, "end": 2086 }
class ____ extends RichMapFunction<Row, Row> { private int currentTaskIndex; @Override public void open(OpenContext openContext) { this.currentTaskIndex = getRuntimeContext().getTaskInfo().getIndexOfThisSubtask(); } @Override public Row map(Row value) throws Exception { int ex...
PartitionCustomTestMapFunction
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/testshell/ExternalMapReduce.java
{ "start": 4034, "end": 4201 }
class ____ libjar try { testConf.getClassByName("testjar.ClassWordCount"); } catch (ClassNotFoundException e) { System.out.println("Could not find
from
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/polymorphic/PolymorphicQueriesTest.java
{ "start": 6904, "end": 7411 }
class ____ implements I { @Id private Long id; private String displayName; @ManyToOne private EntityC entityC; @OneToMany private List<EntityC> cs; public EntityB() { } public EntityB(Long id, String displayName, EntityC entityC) { this.id = id; this.displayName = displayName; this.ent...
EntityB
java
eclipse-vertx__vert.x
vertx-core-logging/src/main/java/io/vertx/core/logging/SLF4JLogDelegateFactory.java
{ "start": 787, "end": 1586 }
class ____ implements LogDelegateFactory { static { // Check we have a valid ILoggerFactory // Replace the error stream since SLF4J will actually log the classloading error // when no implementation is available PrintStream err = System.err; try { System.setErr(new PrintStream(new ByteArray...
SLF4JLogDelegateFactory
java
elastic__elasticsearch
modules/lang-painless/src/test/java/org/elasticsearch/painless/LookupTests.java
{ "start": 2326, "end": 2575 }
interface ____ extends X { // in whitelist String getString2(int x, int y); // in whitelist String getString1(int param0); // in whitelist String getString0(); // not in whitelist } public
U
java
elastic__elasticsearch
x-pack/plugin/stack/src/test/java/org/elasticsearch/xpack/stack/LegacyStackTemplateRegistryTests.java
{ "start": 1095, "end": 2540 }
class ____ extends ESTestCase { private LegacyStackTemplateRegistry registry; private ThreadPool threadPool; @Before public void createRegistryAndClient() { threadPool = new TestThreadPool(this.getClass().getName()); Client client = new NoOpClient(threadPool); ClusterService clu...
LegacyStackTemplateRegistryTests
java
FasterXML__jackson-databind
src/main/java/tools/jackson/databind/AnnotationIntrospector.java
{ "start": 14900, "end": 15217 }
class ____ introspect * * @return Subclass or instance of {@link EnumNamingStrategy}, if one * is specified for given class; null if not. */ public Object findEnumNamingStrategy(MapperConfig<?> config, AnnotatedClass ac) { return null; } /** * Method used to check whether specified
to
java
spring-projects__spring-boot
core/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/lifecycle/DockerComposeServicesReadyEvent.java
{ "start": 1287, "end": 1873 }
class ____ extends ApplicationEvent { private final List<RunningService> runningServices; DockerComposeServicesReadyEvent(ApplicationContext source, List<RunningService> runningServices) { super(source); this.runningServices = runningServices; } @Override public ApplicationContext getSource() { return (Ap...
DockerComposeServicesReadyEvent
java
apache__flink
flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/S3Recoverable.java
{ "start": 1243, "end": 3739 }
class ____ implements RecoverableWriter.ResumeRecoverable { private final String uploadId; private final String objectName; private final List<PartETag> parts; @Nullable private final String lastPartObject; private long numBytesInParts; private long lastPartObjectLength; S3Recoverable...
S3Recoverable
java
quarkusio__quarkus
extensions/resteasy-reactive/rest-client/deployment/src/test/java/io/quarkus/rest/client/reactive/SendInputStreamTest.java
{ "start": 1130, "end": 1266 }
interface ____ { @POST @Path("count") long count(InputStream is); } @Path("test") public static
Client
java
apache__avro
lang/java/avro/src/main/java/org/apache/avro/SchemaBuilder.java
{ "start": 70817, "end": 71297 }
class ____<R> extends FieldDefault<R, IntDefault<R>> { private IntDefault(FieldBuilder<R> field) { super(field); } /** Completes this field with the default value provided **/ public final FieldAssembler<R> intDefault(int defaultVal) { return super.usingDefault(defaultVal); } @Over...
IntDefault
java
apache__flink
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/data/conversion/DateDateConverter.java
{ "start": 1102, "end": 1497 }
class ____ implements DataStructureConverter<Integer, java.sql.Date> { private static final long serialVersionUID = 1L; @Override public Integer toInternal(java.sql.Date external) { return DateTimeUtils.toInternal(external); } @Override public java.sql.Date toExternal(Integer internal...
DateDateConverter
java
hibernate__hibernate-orm
tooling/hibernate-gradle-plugin/src/test/resources/projects/multi-part-source-set-name/src/mySpecialSourceSet/java/TheEmbeddable.java
{ "start": 59, "end": 395 }
class ____ { private String valueOne; private String valueTwo; public String getValueOne() { return valueOne; } public void setValueOne(String valueOne) { this.valueOne = valueOne; } public String getValueTwo() { return valueTwo; } public void setValueTwo(String valueTwo) { this.valueTwo = valueTwo...
TheEmbeddable
java
elastic__elasticsearch
x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/analytics/action/TransportGetAnalyticsCollectionAction.java
{ "start": 1479, "end": 3110 }
class ____ extends TransportMasterNodeReadAction< GetAnalyticsCollectionAction.Request, GetAnalyticsCollectionAction.Response> { private final AnalyticsCollectionService analyticsCollectionService; @Inject public TransportGetAnalyticsCollectionAction( TransportService transportService, ...
TransportGetAnalyticsCollectionAction
java
FasterXML__jackson-databind
src/main/java/tools/jackson/databind/deser/UnresolvedForwardReference.java
{ "start": 363, "end": 2816 }
class ____ extends DatabindException { private static final long serialVersionUID = 1L; private ReadableObjectId _roid; private List<UnresolvedId> _unresolvedIds; public UnresolvedForwardReference(JsonParser p, String msg, TokenStreamLocation loc, ReadableObjectId roid) { super(...
UnresolvedForwardReference
java
apache__camel
components/camel-graphql/src/test/java/org/apache/camel/component/graphql/server/Author.java
{ "start": 862, "end": 1150 }
class ____ { private final String id; private final String name; public Author(String id, String name) { this.id = id; this.name = name; } public String getId() { return id; } public String getName() { return name; } }
Author
java
spring-projects__spring-security
access/src/test/java/org/springframework/security/web/access/expression/WebExpressionVoterTests.java
{ "start": 1688, "end": 4265 }
class ____ { private Authentication user = new TestingAuthenticationToken("user", "pass", "X"); @Test public void supportsWebConfigAttributeAndFilterInvocation() { WebExpressionVoter voter = new WebExpressionVoter(); assertThat(voter.supports( new WebExpressionConfigAttribute(mock(Expression.class), mock(E...
WebExpressionVoterTests
java
spring-projects__spring-framework
spring-test/src/test/java/org/springframework/test/context/junit/jupiter/nested/ConstructorInjectionTestClassScopedExtensionContextNestedTests.java
{ "start": 2811, "end": 3108 }
class ____ { final String bar; @Autowired AutowiredConstructorTests(String bar) { this.bar = bar; } @Test void nestedTest() { assertThat(foo).isEqualTo("foo"); assertThat(bar).isEqualTo("bar"); } } @Nested @SpringJUnitConfig(NestedConfig.class)
AutowiredConstructorTests
java
spring-projects__spring-framework
spring-webflux/src/main/java/org/springframework/web/reactive/result/method/HandlerMethodArgumentResolverComposite.java
{ "start": 1345, "end": 4556 }
class ____ implements HandlerMethodArgumentResolver { private final List<HandlerMethodArgumentResolver> argumentResolvers = new ArrayList<>(); private final Map<MethodParameter, HandlerMethodArgumentResolver> argumentResolverCache = new ConcurrentHashMap<>(256); /** * Add the given {@link HandlerMethodArgum...
HandlerMethodArgumentResolverComposite
java
apache__camel
components/camel-vertx/camel-vertx-http/src/test/java/org/apache/camel/component/vertx/http/VertxHttpFileUploadMultipartTest.java
{ "start": 1429, "end": 2938 }
class ____ extends VertxHttpTestSupport { @Test public void testVertxFileUpload() { File f = new File("src/test/resources/log4j2.properties"); Exchange out = template.request(getProducerUri() + "/upload", exchange -> { Buffer buf = Buffer.buffer(Files.readAllBytes(f.toPath())); ...
VertxHttpFileUploadMultipartTest
java
apache__camel
test-infra/camel-test-infra-kafka/src/main/java/org/apache/camel/test/infra/kafka/services/RedpandaTransactionsEnabledContainer.java
{ "start": 1221, "end": 2341 }
class ____ extends RedpandaContainer { public static final String REDPANDA_CONTAINER = LocalPropertyResolver.getProperty( RedpandaTransactionsEnabledContainer.class, KafkaProperties.REDPANDA_CONTAINER); public static final int REDPANDA_PORT = 9092; public RedpandaTransactionsEnabled...
RedpandaTransactionsEnabledContainer
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/ResourceMetricsChecker.java
{ "start": 6610, "end": 11588 }
enum ____ { ALLOCATED_MB("AllocatedMB", GAUGE_LONG), ALLOCATED_V_CORES("AllocatedVCores", GAUGE_INT), ALLOCATED_CONTAINERS("AllocatedContainers", GAUGE_INT), AGGREGATE_CONTAINERS_ALLOCATED("AggregateContainersAllocated", COUNTER_LONG), AGGREGATE_CONTAINERS_RELEASED("AggregateContainersReleas...
ResourceMetricsKey
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/shortcircuit/DfsClientShm.java
{ "start": 2008, "end": 4024 }
class ____ extends ShortCircuitShm implements DomainSocketWatcher.Handler { /** * The EndpointShmManager associated with this shared memory segment. */ private final EndpointShmManager manager; /** * The UNIX domain socket associated with this DfsClientShm. * We rely on the DomainSocketWatcher to...
DfsClientShm
java
elastic__elasticsearch
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/action/role/PutRoleRequestBuilder.java
{ "start": 771, "end": 3439 }
class ____ extends ActionRequestBuilder<PutRoleRequest, PutRoleResponse> { private static final RoleDescriptor.Parser ROLE_DESCRIPTOR_PARSER = RoleDescriptor.parserBuilder().allowDescription(true).build(); public PutRoleRequestBuilder(ElasticsearchClient client) { super(client, PutRoleAction.INSTANCE,...
PutRoleRequestBuilder
java
spring-projects__spring-framework
spring-core/src/main/java/org/springframework/util/MultiToSingleValueMapAdapter.java
{ "start": 1204, "end": 1391 }
class ____ in the opposite * direction. * * @author Arjen Poutsma * @since 6.2 * @param <K> the key type * @param <V> the value element type */ @SuppressWarnings("serial") final
adapts
java
elastic__elasticsearch
x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/notifications/InferenceAuditor.java
{ "start": 565, "end": 1110 }
class ____ extends AbstractMlAuditor<InferenceAuditMessage> { private final boolean includeNodeInfo; public InferenceAuditor( Client client, ClusterService clusterService, IndexNameExpressionResolver indexNameExpressionResolver, boolean includeNodeInfo ) { super(cli...
InferenceAuditor
java
spring-projects__spring-framework
spring-web/src/test/java/org/springframework/web/method/support/InvocableHandlerMethodTests.java
{ "start": 1866, "end": 7116 }
class ____ { private NativeWebRequest request; private final HandlerMethodArgumentResolverComposite composite = new HandlerMethodArgumentResolverComposite(); @BeforeEach void setUp() { this.request = new ServletWebRequest(new MockHttpServletRequest(), new MockHttpServletResponse()); } @Test void resolveA...
InvocableHandlerMethodTests
java
spring-projects__spring-security
config/src/test/java/org/springframework/security/config/annotation/web/builders/NamespaceHttpTests.java
{ "start": 17328, "end": 17845 }
class ____ { static AuthenticationManager AUTHENTICATION_MANAGER; @Bean AuthenticationManager authenticationManager() { return AUTHENTICATION_MANAGER; } @Bean SecurityFilterChain filterChain(HttpSecurity http) throws Exception { // @formatter:off http .authorizeHttpRequests((requests) -> req...
AuthenticationManagerRefConfig
java
spring-projects__spring-boot
smoke-test/spring-boot-smoke-test-parent-context/src/test/java/smoketest/parent/consumer/SampleIntegrationParentApplicationTests.java
{ "start": 1515, "end": 3126 }
class ____ { @Test void testVanillaExchange(@TempDir Path temp) { File inputDir = new File(temp.toFile(), "input"); File outputDir = new File(temp.toFile(), "output"); try (ConfigurableApplicationContext app = SpringApplication.run(SampleParentContextApplication.class, "--service.input-dir=" + inputDir, "-...
SampleIntegrationParentApplicationTests
java
quarkusio__quarkus
integration-tests/hibernate-search-orm-elasticsearch/src/main/java/io/quarkus/it/hibernate/search/orm/elasticsearch/analysis/BackendAnalysisConfigurer.java
{ "start": 413, "end": 1172 }
class ____ implements ElasticsearchAnalysisConfigurer { @Inject MyCdiContext cdiContext; @Override public void configure(ElasticsearchAnalysisConfigurationContext context) { MyCdiContext.checkAvailable(cdiContext); context.analyzer("standard").type("standard"); context.normaliz...
BackendAnalysisConfigurer
java
dropwizard__dropwizard
docs/source/examples/getting-started/src/main/java/com/example/helloworld/HelloWorldApplication.java
{ "start": 286, "end": 1470 }
class ____ extends Application<HelloWorldConfiguration> { public static void main(String[] args) throws Exception { new HelloWorldApplication().run(args); } @Override public String getName() { return "hello-world"; } @Override public void initialize(Bootstrap<HelloWorldConf...
HelloWorldApplication
java
apache__flink
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/api/reader/AbstractReaderTest.java
{ "start": 6373, "end": 6516 }
class ____ extends AbstractReader { protected MockReader(InputGate inputGate) { super(inputGate); } } }
MockReader
java
elastic__elasticsearch
x-pack/plugin/security/qa/security-basic/src/javaRestTest/java/org/elasticsearch/xpack/security/SecuritySlowLogIT.java
{ "start": 1473, "end": 16057 }
class ____ extends ESRestTestCase { private record TestIndexData( String name, boolean searchSlowLogEnabled, boolean indexSlowLogEnabled, boolean searchSlowLogUserEnabled, boolean indexSlowLogUserEnabled ) {} private static int currentSearchLogIndex = 0; private...
SecuritySlowLogIT
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/jpa/HibernatePersistenceConfiguration.java
{ "start": 3652, "end": 5093 }
class ____ extends PersistenceConfiguration { private final URL rootUrl; private final List<URL> jarFileUrls = new ArrayList<>(); /** * Create a new empty configuration. An empty configuration does not * typically hold enough information for successful invocation of * {@link #createEntityManagerFactory()}. ...
HibernatePersistenceConfiguration
java
spring-projects__spring-boot
core/spring-boot/src/main/java/org/springframework/boot/context/ContextIdApplicationContextInitializer.java
{ "start": 2603, "end": 2912 }
class ____ { private final AtomicLong children = new AtomicLong(); private final String id; ContextId(String id) { this.id = id; } ContextId createChildId() { return new ContextId(this.id + "-" + this.children.incrementAndGet()); } String getId() { return this.id; } } }
ContextId
java
apache__rocketmq
namesrv/src/main/java/org/apache/rocketmq/namesrv/NamesrvStartup.java
{ "start": 1954, "end": 9884 }
class ____ { private static final Logger log = LoggerFactory.getLogger(LoggerName.NAMESRV_LOGGER_NAME); private static final Logger logConsole = LoggerFactory.getLogger(LoggerName.NAMESRV_CONSOLE_LOGGER_NAME); private static Properties properties = null; private static NamesrvConfig namesrvConfig = nul...
NamesrvStartup
java
apache__avro
lang/java/mapred/src/test/java/org/apache/avro/hadoop/io/TestAvroSerializer.java
{ "start": 1291, "end": 2551 }
class ____ { @Test void serialize() throws IOException { // Create a serializer. Schema writerSchema = Schema.create(Schema.Type.STRING); AvroSerializer<CharSequence> serializer = new AvroSerializer<>(writerSchema); // Check the writer schema. assertEquals(writerSchema, serializer.getWriterSche...
TestAvroSerializer
java
micronaut-projects__micronaut-core
inject-java/src/test/groovy/io/micronaut/visitors/InterfaceGenVisitor.java
{ "start": 250, "end": 796 }
class ____ implements TypeElementVisitor<InterfaceGen, Object> { @Override public void visitClass(ClassElement element, VisitorContext context) { context.visitGeneratedSourceFile( "test", "GeneratedInterface", element ).ifPresent(sourceFile -> { t...
InterfaceGenVisitor
java
apache__avro
lang/java/thrift/src/test/java/org/apache/avro/thrift/test/Foo.java
{ "start": 28412, "end": 29340 }
class ____ extends org.apache.thrift.scheme.TupleScheme<ping_args> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol)...
ping_argsTupleScheme
java
FasterXML__jackson-databind
src/test/java/tools/jackson/databind/deser/AnySetterTest.java
{ "start": 5404, "end": 6062 }
class ____ { private MyGeneric<String> myStringGeneric; private MyGeneric<Integer> myIntegerGeneric; public MyGeneric<String> getMyStringGeneric() { return myStringGeneric; } public void setMyStringGeneric(MyGeneric<String> myStringGeneric) { this.my...
MyWrapper
java
micronaut-projects__micronaut-core
function/src/main/java/io/micronaut/function/DefaultLocalFunctionRegistry.java
{ "start": 1668, "end": 8029 }
class ____ implements BeanDefinitionProcessor<FunctionBean>, LocalFunctionRegistry, MediaTypeCodecRegistry { private final Map<String, ExecutableMethod<?, ?>> consumers = new LinkedHashMap<>(1); private final Map<String, ExecutableMethod<?, ?>> functions = new LinkedHashMap<>(1); private final Map<String, E...
DefaultLocalFunctionRegistry
java
spring-projects__spring-framework
spring-test/src/test/java/org/springframework/test/context/orm/hibernate/domain/Person.java
{ "start": 761, "end": 1638 }
class ____ { private Long id; private String name; private DriversLicense driversLicense; public Person() { } public Person(Long id) { this(id, null, null); } public Person(String name) { this(name, null); } public Person(String name, DriversLicense driversLicense) { this(null, name, driversLicens...
Person
java
elastic__elasticsearch
modules/lang-painless/src/main/java/org/elasticsearch/painless/node/EConditional.java
{ "start": 695, "end": 1879 }
class ____ extends AExpression { private final AExpression conditionNode; private final AExpression trueNode; private final AExpression falseNode; public EConditional(int identifier, Location location, AExpression conditionNode, AExpression trueNode, AExpression falseNode) { super(identifier, ...
EConditional
java
spring-projects__spring-boot
core/spring-boot/src/main/java/org/springframework/boot/task/ThreadPoolTaskSchedulerCustomizer.java
{ "start": 757, "end": 910 }
interface ____ can be used to customize a {@link ThreadPoolTaskScheduler}. * * @author Stephane Nicoll * @since 3.2.0 */ @FunctionalInterface public
that
java
apache__hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/AsyncDiskService.java
{ "start": 1372, "end": 1789 }
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 "TO_BE_DELETED" folder before asychronously * deleting it, to make sure the caller can run it faster...
is
java
alibaba__fastjson
src/test/java/com/alibaba/json/bvt/issue_1100/Issue1177_4.java
{ "start": 307, "end": 806 }
class ____ extends TestCase { public void test_for_issue() throws Exception { String text = "{\"models\":[{\"x\":\"y\"},{\"x\":\"y\"}]}"; Root root = JSONObject.parseObject(text, Root.class); System.out.println(JSON.toJSONString(root)); String jsonpath = "$..x"; String value=...
Issue1177_4
java
quarkusio__quarkus
extensions/smallrye-fault-tolerance/runtime/src/main/java/io/quarkus/smallrye/faulttolerance/runtime/SmallRyeFaultToleranceRecorder.java
{ "start": 554, "end": 2798 }
class ____ { public void createFaultToleranceOperation(List<FaultToleranceMethod> ftMethods) { List<Throwable> allExceptions = new ArrayList<>(); Map<QuarkusFaultToleranceOperationProvider.CacheKey, FaultToleranceOperation> operationCache = new HashMap<>( ftMethods.size()); ...
SmallRyeFaultToleranceRecorder
java
alibaba__druid
core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLDateTimeExpr.java
{ "start": 872, "end": 3617 }
class ____ extends SQLDateTypeExpr { public SQLDateTimeExpr() { super(new SQLDataTypeImpl(SQLDataType.Constants.DATETIME)); } public SQLDateTimeExpr(Date now, TimeZone timeZone) { this(); setValue(now, timeZone); } public void setValue(Date x, TimeZone timeZone) { i...
SQLDateTimeExpr
java
quarkusio__quarkus
integration-tests/opentelemetry-jdbc-instrumentation/src/test/java/io/quarkus/it/opentelemetry/Db2LifecycleManager.java
{ "start": 298, "end": 1777 }
class ____ implements QuarkusTestResourceLifecycleManager { private static final Logger LOGGER = Logger.getLogger(Db2LifecycleManager.class); private static final String QUARKUS = "quarkus"; private static final String DB2_IMAGE = System.getProperty("db2.image"); private StartedDb2Container db2Container...
Db2LifecycleManager
java
google__dagger
javatests/dagger/internal/codegen/ComponentCreatorTest.java
{ "start": 34874, "end": 35173 }
interface ____ {", " Foo foo();", "}"); Source component = preprocessedJavaSource( "test.HasSupertype", "package test;", "", "import dagger.Component;", "", "@Component", "
Supertype
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/linux/resources/gpu/GpuResourceAllocator.java
{ "start": 3364, "end": 11817 }
class ____ { private Set<GpuDevice> allowed = Collections.emptySet(); private Set<GpuDevice> denied = Collections.emptySet(); GpuAllocation(Set<GpuDevice> allowed, Set<GpuDevice> denied) { if (allowed != null) { this.allowed = ImmutableSet.copyOf(allowed); } if (denied != null) { ...
GpuAllocation
java
spring-projects__spring-boot
core/spring-boot/src/test/java/org/springframework/boot/system/ApplicationTempTests.java
{ "start": 1234, "end": 2837 }
class ____ { @BeforeEach @AfterEach void cleanup() { FileSystemUtils.deleteRecursively(new ApplicationTemp().getDir()); } @Test void generatesConsistentTemp() { ApplicationTemp t1 = new ApplicationTemp(); ApplicationTemp t2 = new ApplicationTemp(); assertThat(t1.getDir()).isNotNull(); assertThat(t1.ge...
ApplicationTempTests
java
quarkusio__quarkus
integration-tests/gradle/src/main/resources/custom-filesystem-provider/application/src/test/java/org/acme/TestResource.java
{ "start": 183, "end": 493 }
class ____ implements QuarkusTestResourceLifecycleManager { @Override public Map<String, String> start() { final CommonBean bean = new CommonBean(); System.out.println("TestResource start " + bean.getClass().getName()); return Collections.emptyMap(); } @Override public void stop() { } }
TestResource
java
spring-projects__spring-boot
module/spring-boot-data-elasticsearch/src/test/java/org/springframework/boot/data/elasticsearch/autoconfigure/DataElasticsearchAutoConfigurationTests.java
{ "start": 2593, "end": 5654 }
class ____ { private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() .withConfiguration(AutoConfigurations.of(ElasticsearchRestClientAutoConfiguration.class, ElasticsearchClientAutoConfiguration.class, DataElasticsearchAutoConfiguration.class)); @Test void defaultRestBeansRegist...
DataElasticsearchAutoConfigurationTests
java
apache__dubbo
dubbo-common/src/test/java/org/apache/dubbo/rpc/support/DemoServiceImpl.java
{ "start": 848, "end": 991 }
class ____ implements DemoService { @Override public String sayHello(String name) { return "hello " + name; } }
DemoServiceImpl
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/tool/schema/extract/internal/ExtractionContextImpl.java
{ "start": 709, "end": 3172 }
class ____ implements ExtractionContext { private final ServiceRegistry serviceRegistry; private final JdbcEnvironment jdbcEnvironment; private final SqlStringGenerationContext context; private final JdbcConnectionAccess jdbcConnectionAccess; private final DatabaseObjectAccess registeredTableAccess; private Conn...
ExtractionContextImpl
java
apache__flink
flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/extraction/DataTypeExtractorTest.java
{ "start": 40107, "end": 40200 }
interface ____<T> { // no implementation } private abstract static
BaseInterface
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/UnnecessaryDefaultInEnumSwitchTest.java
{ "start": 5190, "end": 5699 }
enum ____ { ONE, TWO, THREE, UNRECOGNIZED } boolean m(Case c) { switch (c) { case ONE: case TWO: case THREE: return true; ...
Case
java
apache__rocketmq
broker/src/main/java/org/apache/rocketmq/broker/transaction/TransactionMetrics.java
{ "start": 5719, "end": 7901 }
class ____ extends RemotingSerializable { private ConcurrentMap<String, Metric> transactionCount = new ConcurrentHashMap<>(1024); private DataVersion dataVersion = new DataVersion(); public ConcurrentMap<String, Metric> getTransactionCount() { return transactionCount...
TransactionMetricsSerializeWrapper
java
elastic__elasticsearch
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/watcher/transport/actions/stats/WatcherStatsAction.java
{ "start": 441, "end": 737 }
class ____ extends ActionType<WatcherStatsResponse> { public static final WatcherStatsAction INSTANCE = new WatcherStatsAction(); public static final String NAME = "cluster:monitor/xpack/watcher/stats/dist"; private WatcherStatsAction() { super(NAME); } }
WatcherStatsAction
java
elastic__elasticsearch
test/framework/src/main/java/org/elasticsearch/index/mapper/NumberFieldBlockLoaderTestCase.java
{ "start": 650, "end": 2711 }
class ____<T extends Number> extends BlockLoaderTestCase { public NumberFieldBlockLoaderTestCase(FieldType fieldType, Params params) { super(fieldType.toString(), params); } @Override @SuppressWarnings("unchecked") protected Object expected(Map<String, Object> fieldMapping, Object value, Te...
NumberFieldBlockLoaderTestCase
java
apache__camel
components/camel-sql/src/test/java/org/apache/camel/processor/aggregate/jdbc/JdbcRemoveConfirmOrderAggregateTest.java
{ "start": 1681, "end": 2272 }
class ____ extends DataSourceTransactionManager { int count; @Override protected void doCommit(DefaultTransactionStatus status) { if ("main".equals(Thread.currentThread().getName()) && ++count == 2) { try { LOG.debug("sleeping while committing..."...
SlowCommitDataSourceTransactionManager
java
google__dagger
javatests/dagger/internal/codegen/ComponentCreatorTest.java
{ "start": 33515, "end": 34319 }
interface ____ {}"); CompilerTests.daggerCompiler( moduleFile, module2File, module3File, componentFile, otherComponent) .withProcessingOptions(compilerOptions) .compile( subject -> { subject.hasErrorCount(1); subject.hasErrorContaining( ...
OtherComponent
java
apache__logging-log4j2
log4j-1.2-api/src/main/java/org/apache/log4j/helpers/FileWatchdog.java
{ "start": 1094, "end": 3457 }
class ____ extends Thread { /** * The default delay between every file modification check, set to 60 seconds. */ public static final long DEFAULT_DELAY = 60_000; /** * The name of the file to observe for changes. */ protected String filename; /** * The delay to observe be...
FileWatchdog
java
spring-projects__spring-boot
module/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/logging/OnEnabledLoggingExportCondition.java
{ "start": 1335, "end": 3060 }
class ____ extends SpringBootCondition { private static final String GLOBAL_PROPERTY = "management.logging.export.enabled"; private static final String EXPORTER_PROPERTY = "management.logging.export.%s.enabled"; @Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata met...
OnEnabledLoggingExportCondition
java
elastic__elasticsearch
libs/tdigest/src/test/java/org/elasticsearch/tdigest/TDigestTestCase.java
{ "start": 1723, "end": 1926 }
class ____ arrays that will be automatically closed after the test. * It will also test that all memory have been freed, as the arrays use a counting CircuitBreaker. * </p> */ public abstract
provides
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-examples/src/test/java/org/apache/hadoop/examples/pi/math/TestLongLong.java
{ "start": 1011, "end": 2640 }
class ____ { static final Random RAN = new Random(); static final long MASK = (1L << (LongLong.SIZE >> 1)) - 1; static long nextPositiveLong() { return RAN.nextLong() & MASK; } static void verifyMultiplication(long a, long b) { final LongLong ll = LongLong.multiplication(new LongLong(), a, b); ...
TestLongLong
java
apache__avro
lang/java/avro/src/main/java/org/apache/avro/util/ClassSecurityValidator.java
{ "start": 3145, "end": 3419 }
class ____ trusted, false otherwise */ boolean isTrusted(Class<?> clazz); /** * Throws a {@link SecurityException} with a message indicating that the class * is not trusted to be included in Avro schemas. * * @param className the name of the
is
java
apache__flink
flink-python/src/main/java/org/apache/flink/python/env/AbstractPythonEnvironmentManager.java
{ "start": 2188, "end": 18105 }
class ____ implements PythonEnvironmentManager { private static final Logger LOG = LoggerFactory.getLogger(AbstractPythonEnvironmentManager.class); private static final long CHECK_INTERVAL = 20; private static final long CHECK_TIMEOUT = 1000; private transient Thread shutdownHook; pr...
AbstractPythonEnvironmentManager
java
bumptech__glide
annotation/compiler/test/src/test/resources/GlideExtensionOptionsTest/OverrideReplace/GlideOptions.java
{ "start": 1010, "end": 15219 }
class ____ extends RequestOptions implements Cloneable { private static GlideOptions fitCenterTransform0; private static GlideOptions centerInsideTransform1; private static GlideOptions centerCropTransform2; private static GlideOptions circleCropTransform3; private static GlideOptions noTransformation4; ...
GlideOptions
java
spring-projects__spring-framework
spring-test/src/main/java/org/springframework/test/web/servlet/setup/RouterFunctionMockMvcBuilder.java
{ "start": 3613, "end": 10073 }
class ____ extends AbstractMockMvcBuilder<RouterFunctionMockMvcBuilder> { private final RouterFunction<?> routerFunction; private List<HttpMessageConverter<?>> messageConverters = new ArrayList<>(); private final List<MappedInterceptor> mappedInterceptors = new ArrayList<>(); private @Nullable List<HandlerExcep...
RouterFunctionMockMvcBuilder
java
apache__camel
components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/client/impl/KinesisAsyncClientSessionTokenImpl.java
{ "start": 1895, "end": 5325 }
class ____ implements KinesisAsyncInternalClient { private static final Logger LOG = LoggerFactory.getLogger(KinesisAsyncClientSessionTokenImpl.class); private Kinesis2Configuration configuration; /** * Constructor that uses the config file. */ public KinesisAsyncClientSessionTokenImpl(Kinesi...
KinesisAsyncClientSessionTokenImpl
java
spring-projects__spring-framework
spring-core-test/src/test/java/org/springframework/core/test/tools/TestCompilerTests.java
{ "start": 2543, "end": 3917 }
class ____ implements Supplier<String> { @Deprecated public String get() { return "Hello Deprecated"; } } """; @Test @SuppressWarnings("unchecked") void compileWhenHasDifferentClassesWithSameClassNameCompilesBoth() { TestCompiler.forSystem().withSources(SourceFile.of(HELLO_WORLD)).compile...
Hello
java
apache__flink
flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/api/java/hadoop/mapred/wrapper/HadoopInputSplit.java
{ "start": 1453, "end": 4814 }
class ____ extends LocatableInputSplit { private static final long serialVersionUID = -6990336376163226160L; private final Class<? extends org.apache.hadoop.mapred.InputSplit> splitType; private transient org.apache.hadoop.mapred.InputSplit hadoopInputSplit; @Nullable private transient JobConf jobCo...
HadoopInputSplit
java
apache__rocketmq
common/src/test/java/org/apache/rocketmq/common/message/MessageTest.java
{ "start": 989, "end": 2292 }
class ____ { @Test(expected = RuntimeException.class) public void putUserPropertyWithRuntimeException() throws Exception { Message m = new Message(); m.putUserProperty(PROPERTY_TRACE_SWITCH, ""); } @Test(expected = IllegalArgumentException.class) public void putUserNullValuePropert...
MessageTest
java
google__dagger
javatests/dagger/internal/codegen/MapRequestRepresentationTest.java
{ "start": 5179, "end": 5972 }
interface ____ {", " UsesInaccessible usesInaccessible();", "}"); Compilation compilation = daggerCompilerWithoutGuava().compile(module, inaccessible, usesInaccessible, componentFile); assertThat(compilation).succeeded(); assertThat(compilation) .generatedSourceFile...
TestComponent
java
alibaba__druid
core/src/test/java/com/alibaba/druid/bvt/filter/wall/mysql/MySqlWallTest110.java
{ "start": 804, "end": 1142 }
class ____ extends TestCase { public void test_false() throws Exception { WallProvider provider = new MySqlWallProvider(); provider.getConfig().setCommentAllow(false); String sql = "select * from t where id = ? or 1 NOT between 79 and 126"; assertFalse(provider.checkValid(sql)); ...
MySqlWallTest110
java
quarkusio__quarkus
extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/typesafe/Machine.java
{ "start": 107, "end": 474 }
class ____ { public Integer ping = 1; private MachineStatus status; public Machine setStatus(MachineStatus status) { this.status = status; return this; } public MachineStatus getStatus() { return status; } public List<String> getNames(int pings) { return ...
Machine
java
quarkusio__quarkus
independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/interceptors/bindings/inherited/InheritedBindingOnInterceptorTest.java
{ "start": 1495, "end": 1710 }
class ____ { void doSomething() { } } @Target({ ElementType.TYPE, ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) @Documented @InterceptorBinding @Inherited @
MyBean
java
apache__logging-log4j2
log4j-1.2-api/src/test/java/org/apache/log4j/BasicConfiguratorTest.java
{ "start": 953, "end": 1785 }
class ____ { @Test void testConfigure() { // TODO More... BasicConfigurator.configure(); } @Test void testResetConfiguration() { // TODO More... BasicConfigurator.resetConfiguration(); } @Test void testConfigureAppender() { BasicConfigurator.con...
BasicConfiguratorTest
java
google__dagger
javatests/dagger/internal/codegen/InjectConstructorFactoryGeneratorTest.java
{ "start": 50587, "end": 50793 }
interface ____ {}"); Source differentPackageInterface = CompilerTests.javaSource( "other.pkg.CommonName", "package other.pkg;", "", "public
CommonName
java
assertj__assertj-core
assertj-core/src/main/java/org/assertj/core/internal/Byte2DArrays.java
{ "start": 845, "end": 6113 }
class ____ { private static final Byte2DArrays INSTANCE = new Byte2DArrays(); /** * Returns the singleton instance of this class. * @return the singleton instance of this class. */ public static Byte2DArrays instance() { return INSTANCE; } private Arrays2D arrays = Arrays2D.instance(); // T...
Byte2DArrays
java
ReactiveX__RxJava
src/test/java/io/reactivex/rxjava3/internal/operators/flowable/FlowableTimestampTest.java
{ "start": 1171, "end": 4848 }
class ____ extends RxJavaTest { Subscriber<Object> subscriber; @Before public void before() { subscriber = TestHelper.mockSubscriber(); } @Test public void timestampWithScheduler() { TestScheduler scheduler = new TestScheduler(); PublishProcessor<Integer> source = Publ...
FlowableTimestampTest
java
apache__logging-log4j2
log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/MemoryPasswordProvider.java
{ "start": 1370, "end": 1884 }
class ____ implements PasswordProvider { private final char[] password; public MemoryPasswordProvider(final char[] chars) { if (chars != null) { password = chars.clone(); } else { password = null; } } @Override public char[] getPassword() { i...
MemoryPasswordProvider
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/async/TestRouterAsyncErasureCoding.java
{ "start": 2987, "end": 9028 }
class ____ { private static Configuration routerConf; /** Federated HDFS cluster. */ private static MiniRouterDFSCluster cluster; private static String ns0; /** Random Router for this federated cluster. */ private MiniRouterDFSCluster.RouterContext router; private FileSystem routerFs; private RouterRpc...
TestRouterAsyncErasureCoding
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/DistinctVarargsCheckerTest.java
{ "start": 6606, "end": 7243 }
class ____ { void testFunction() { int first = 1, second = 2; Set.of(first, first); ImmutableSet.of(first, first); ImmutableSet.of(first, first, second); ImmutableSortedSet.of(first, first); ImmutableSortedSet....
Test