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__flink
flink-core/src/test/java/org/apache/flink/testutils/TestingUtils.java
{ "start": 1481, "end": 2287 }
class ____ { private static final UUID ZERO_UUID = new UUID(0L, 0L); public static final Duration TESTING_DURATION = Duration.ofMinutes(2L); public static final Duration TIMEOUT = Duration.ofMinutes(1L); public static final Duration DEFAULT_ASK_TIMEOUT = Duration.ofSeconds(200); public static Dura...
TestingUtils
java
apache__camel
components/camel-jms/src/test/java/org/apache/camel/component/jms/support/PurchaseOrder.java
{ "start": 926, "end": 1992 }
class ____ implements Serializable { private static final long serialVersionUID = 1L; private final String product; private final double amount; public PurchaseOrder(String product, double amount) { this.product = product; this.amount = amount; } @Override public boolean eq...
PurchaseOrder
java
quarkusio__quarkus
extensions/smallrye-reactive-messaging/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/signatures/PublisherSignatureTest.java
{ "start": 4558, "end": 4975 }
class ____ extends Spy { @Outgoing("C") public PublisherBuilder<Message<Integer>> produce() { return ReactiveStreams.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9) .map(Message::of); } @Incoming("C") public void consume(Integer item) { items.add(ite...
BeanProducingAPublisherBuilderOfMessage
java
alibaba__fastjson
src/test/java/com/alibaba/json/bvt/parser/array/BeanToArrayAutoTypeTest.java
{ "start": 2271, "end": 2474 }
class ____ extends A { public int age; public C() { } public C(int id, int age) { this.id = id; this.age = age; } } public static
C
java
apache__camel
components/camel-oauth/src/main/java/org/apache/camel/oauth/InMemorySessionStore.java
{ "start": 1259, "end": 3935 }
class ____ implements OAuthSessionStore { protected final Logger log = LoggerFactory.getLogger(getClass()); private final Map<String, OAuthSession> sessions = new HashMap<>(); @Override public Optional<OAuthSession> getSession(Exchange exchange) { var msg = exchange.getMessage(); // ...
InMemorySessionStore
java
apache__logging-log4j2
log4j-core/src/main/java/org/apache/logging/log4j/core/util/internal/instant/InstantPatternDynamicFormatter.java
{ "start": 17344, "end": 18282 }
class ____ implements InstantPatternFormatter { private final String pattern; private final Locale locale; private final TimeZone timeZone; private final ChronoUnit precision; AbstractFormatter( final String pattern, final Locale locale, final TimeZone timeZo...
AbstractFormatter
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestReporter.java
{ "start": 1655, "end": 2405 }
class ____ { private static final Path rootTempDir = new Path(System.getProperty("test.build.data", "/tmp")); private static final Path testRootTempDir = new Path(rootTempDir, "TestReporter"); private static FileSystem fs = null; @BeforeAll public static void setup() throws Exception { fs = F...
TestReporter
java
micronaut-projects__micronaut-core
core/src/main/java/io/micronaut/core/util/NativeImageUtils.java
{ "start": 1318, "end": 1873 }
class ____ will be contained in the image). If * the property returns the string given by {@link #PROPERTY_IMAGE_CODE_VALUE_RUNTIME} the code * is executing at image runtime. Otherwise, the property is not set. */ public static final String PROPERTY_IMAGE_CODE_KEY = "org.graalvm.nativeimage.imagecode...
that
java
redisson__redisson
redisson/src/main/java/org/redisson/api/RSortedSet.java
{ "start": 816, "end": 7062 }
interface ____<V> extends SortedSet<V>, RExpirable { /** * Returns <code>RMapReduce</code> object associated with this object * * @param <KOut> output key * @param <VOut> output value * @return MapReduce instance */ <KOut, VOut> RCollectionMapReduce<V, KOut, VOut> mapReduce(); ...
RSortedSet
java
elastic__elasticsearch
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/datatiers/NodesDataTiersUsageTransportAction.java
{ "start": 2232, "end": 7179 }
class ____ extends TransportNodesAction< NodesDataTiersUsageTransportAction.NodesRequest, NodesDataTiersUsageTransportAction.NodesResponse, NodesDataTiersUsageTransportAction.NodeRequest, NodeDataTiersUsage, Void> { public static final ActionType<NodesResponse> TYPE = new ActionType<>("cluster:...
NodesDataTiersUsageTransportAction
java
spring-projects__spring-framework
spring-test/src/test/java/org/springframework/test/context/support/BootstrapTestUtilsMergedConfigTests.java
{ "start": 22466, "end": 22552 }
class ____ extends EmptyConfigTestCase { @Configuration static
SubEmptyConfigTestCase
java
alibaba__druid
core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLAlterTableModifyClusteredBy.java
{ "start": 864, "end": 1406 }
class ____ extends SQLObjectImpl implements SQLAlterTableItem { private List<SQLName> clusterColumns = new ArrayList<SQLName>(); public List<SQLName> getClusterColumns() { return clusterColumns; } public void addClusterColumn(SQLName name) { this.clusterColumns.add(name); } @O...
SQLAlterTableModifyClusteredBy
java
apache__camel
components/camel-ai/camel-djl/src/main/java/org/apache/camel/component/djl/ImageNetUtil.java
{ "start": 1223, "end": 1304 }
class ____ handling ImageNet (https://image-net.org/) classifications. */ public
for
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/SelfAssignmentTest.java
{ "start": 9622, "end": 9733 }
class ____ { Foo foo; Bar bar; } private static
Foobar
java
quarkusio__quarkus
extensions/smallrye-graphql/deployment/src/test/java/io/quarkus/smallrye/graphql/deployment/GraphQLBlockingModeTest.java
{ "start": 12923, "end": 14357 }
class ____ { private long id; private String name; private int priority; private String state; private String group; public TestThread() { super(); } public TestThread(long id, String name, int priority, String state, String group) { ...
TestThread
java
apache__maven
its/core-it-support/core-it-plugins/maven-it-plugin-project/src/main/java/org/apache/maven/plugin/coreit/BuildRemotePomMojo.java
{ "start": 1579, "end": 3802 }
class ____ extends AbstractPomMojo { /** * The properties file to dump the POM info to. */ @Parameter(defaultValue = "target/pom.properties") private File propertiesFile; /** * The local repository. */ @Parameter(defaultValue = "${localRepository}", readonly = true, required = ...
BuildRemotePomMojo
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/index/analysis/Analysis.java
{ "start": 3496, "end": 17761 }
class ____ { private static final Logger logger = LogManager.getLogger(Analysis.class); public static CharArraySet parseStemExclusion(Settings settings, CharArraySet defaultStemExclusion) { String value = settings.get("stem_exclusion"); if ("_none_".equals(value)) { return CharArra...
Analysis
java
google__dagger
javatests/dagger/internal/codegen/ComponentProcessorTest.java
{ "start": 34961, "end": 35774 }
interface ____ {", " A a();", " other.test.A otherA();", "}"); CompilerTests.daggerCompiler(aFile, otherAFile, moduleFile, otherModuleFile, componentFile) .withProcessingOptions(compilerMode.processorOptions()) .compile( subject -> { su...
TestComponent
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/EmbeddedIdManyToOneFetchTest.java
{ "start": 3544, "end": 3825 }
class ____ { @ManyToOne( fetch = FetchType.LAZY ) private EntityC entityC; private String name; public EntityBId() { } public EntityBId(EntityC entityC, String name) { this.entityC = entityC; this.name = name; } } @Entity( name = "EntityC" ) static
EntityBId
java
google__error-prone
check_api/src/test/java/com/google/errorprone/util/FindIdentifiersTest.java
{ "start": 13192, "end": 13253 }
class ____ { String s1; static
Outer
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/AutoValueBuilderDefaultsInConstructorTest.java
{ "start": 2195, "end": 2410 }
class ____ { abstract int foo(); Builder builder() { return new AutoValue_Test.Builder(); } @AutoValue.Builder abstract static
Test
java
apache__hadoop
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AccessGrantConfiguration.java
{ "start": 1442, "end": 4540 }
class ____ extends AbstractHadoopTestBase { /** * This credential provider will be attached to any client * that has been configured with the S3 Access Grants plugin. * {@code software.amazon.awssdk.s3accessgrants.plugin.S3AccessGrantsPlugin}. */ public static final String S3_ACCESS_GRANTS_EXPECTED_CRED...
TestS3AccessGrantConfiguration
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/sps/ExternalSPSBlockMoveTaskHandler.java
{ "start": 3369, "end": 7574 }
class ____ implements BlockMoveTaskHandler { private static final Logger LOG = LoggerFactory .getLogger(ExternalSPSBlockMoveTaskHandler.class); private final ExecutorService moveExecutor; private final CompletionService<BlockMovementAttemptFinished> mCompletionServ; private final NameNodeConnector nnc; ...
ExternalSPSBlockMoveTaskHandler
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/graphs/Employee.java
{ "start": 526, "end": 724 }
class ____ { @Id @GeneratedValue public long id; @ManyToMany public Set<Manager> managers = new HashSet<Manager>(); @ManyToMany public Set<Employee> friends = new HashSet<Employee>(); }
Employee
java
alibaba__nacos
plugin/datasource/src/main/java/com/alibaba/nacos/plugin/datasource/impl/mysql/TenantInfoMapperByMySql.java
{ "start": 900, "end": 1090 }
class ____ extends AbstractMapperByMysql implements TenantInfoMapper { @Override public String getDataSource() { return DataSourceConstant.MYSQL; } }
TenantInfoMapperByMySql
java
apache__camel
core/camel-core/src/test/java/org/apache/camel/processor/DynamicRouter3Test.java
{ "start": 1039, "end": 2124 }
class ____ extends ContextTestSupport { @Test public void testDynamicRouter() throws Exception { getMockEndpoint("mock:a").expectedMessageCount(1); getMockEndpoint("mock:b").expectedMessageCount(1); getMockEndpoint("mock:c").expectedMessageCount(1); template.sendBody("direct:st...
DynamicRouter3Test
java
apache__logging-log4j2
log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/PropertyTest.java
{ "start": 1622, "end": 7306 }
class ____ { @Test void testEmptyAttribute(@Named("List") final ListAppender app) { final org.apache.logging.log4j.Logger logger = LogManager.getLogger(); logger.info("msg"); final List<String> messages = app.getMessages(); assertNotNull(messages, "No Messages"); assert...
PropertyTest
java
spring-projects__spring-boot
documentation/spring-boot-docs/src/main/java/org/springframework/boot/docs/io/restclient/httpservice/groups/repeat/EchoService.java
{ "start": 861, "end": 972 }
interface ____ { @PostExchange("/echo") Map<?, ?> echo(@RequestBody Map<String, String> message); }
EchoService
java
spring-projects__spring-framework
spring-core/src/main/java/org/springframework/util/ClassUtils.java
{ "start": 18304, "end": 18599 }
class ____ will be quite long, considering that they // SHOULD sit in a package, so a length check is worthwhile. if (name != null && name.length() <= 7) { // Could be a primitive - likely. result = primitiveTypeNameMap.get(name); } return result; } /** * Check if the given
names
java
elastic__elasticsearch
x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/rest/RestGetInferenceModelAction.java
{ "start": 1191, "end": 2837 }
class ____ extends BaseRestHandler { public static final String DEFAULT_ELSER_2_CAPABILITY = "default_elser_2"; @Override public String getName() { return "get_inference_model_action"; } @Override public List<Route> routes() { return List.of( new Route(GET, "_infere...
RestGetInferenceModelAction
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/ordering/AddressBook.java
{ "start": 411, "end": 996 }
class ____ { @Id private Integer id; @Basic private String name; @OrderBy( "last_name" ) @ElementCollection private Set<Contact> contacts; private AddressBook() { // for Hibernate use } public AddressBook(Integer id, String name) { this.id = id; this.name = name; } public Integer getId() { return...
AddressBook
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/bytecode/enhance/spi/interceptor/EnhancementHelper.java
{ "start": 7318, "end": 8869 }
enum ____ { NO_SESSION, CLOSED_SESSION, DISCONNECTED_SESSION, NO_SF_UUID } private static LazyInitializationException createLazyInitializationException(final Cause cause, final String entityName, final String attributeName) { final String reason = switch ( cause ) { case NO_SESSION -> "no session and se...
Cause
java
spring-projects__spring-framework
spring-web/src/main/java/org/springframework/web/service/registry/HttpServiceGroupConfigurer.java
{ "start": 1669, "end": 3093 }
interface ____<CB> { /** * Select groups to configure by name. */ Groups<CB> filterByName(String... groupNames); /** * Select groups to configure through a {@link Predicate}. */ Groups<CB> filter(Predicate<HttpServiceGroup> predicate); /** * Callback to customize the client builder for every...
Groups
java
micronaut-projects__micronaut-core
test-suite/src/test/java/io/micronaut/docs/function/client/aws/LocalFunctionInvokeSpec.java
{ "start": 2841, "end": 3122 }
interface ____ { @SingleResult Publisher<Long> max(); @Named("round") @SingleResult Publisher<Integer> rnd(@Body float value); @SingleResult Publisher<Long> sum(@Body Sum sum); } //end::rxFunctionClient[] }
RxMathClient
java
spring-projects__spring-framework
spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java
{ "start": 47355, "end": 47604 }
interface ____ { String value() default ""; String qualifier() default "transactionManager"; boolean readOnly() default false; } @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.METHOD}) @Inherited @
Transactional
java
FasterXML__jackson-databind
src/test/java/tools/jackson/databind/ser/AnyGetterTest.java
{ "start": 2217, "end": 2826 }
class ____ extends StdSerializer<Object> { public Issue705Serializer() { super(Map.class); } @Override public void serialize(Object value, JsonGenerator g, SerializationContext ctxt) { StringBuilder sb = new StringBuilder(); for (Map.Entry...
Issue705Serializer
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/batchfetch/BatchFetchReferencedColumnNameTest.java
{ "start": 1794, "end": 2551 }
class ____ { @Test @JiraKey(value = "HHH-13059") public void test(SessionFactoryScope scope) throws Exception { scope.inTransaction( session -> { Parent p = new Parent(); p.setId( 1L ); session.persist( p ); Child c1 = new Child(); c1.setCreatedOn( ZonedDateTime.now() ); c1.setParentId( 1L ); ...
BatchFetchReferencedColumnNameTest
java
apache__dubbo
dubbo-common/src/test/java/org/apache/dubbo/common/extension/compatible/impl/CompatibleExtImpl2.java
{ "start": 973, "end": 1266 }
class ____ implements CompatibleExt { public String echo(URL url, String s) { return "Ext1Impl2-echo"; } public String yell(URL url, String s) { return "Ext1Impl2-yell"; } public String bang(URL url, int i) { return "bang2"; } }
CompatibleExtImpl2
java
micronaut-projects__micronaut-core
http/src/main/java/io/micronaut/http/hateoas/AbstractResource.java
{ "start": 1629, "end": 6671 }
class ____<Impl extends AbstractResource<Impl>> implements Resource { private final Map<CharSequence, List<Link>> linkMap = new LinkedHashMap<>(1); private final Map<CharSequence, List<Resource>> embeddedMap = new LinkedHashMap<>(1); /** * Add a link with the given reference. * * @param ref ...
AbstractResource
java
spring-projects__spring-security
config/src/test/java/org/springframework/security/config/annotation/method/configuration/PrePostMethodSecurityConfigurationTests.java
{ "start": 71237, "end": 71525 }
class ____ { @Bean AnnotationTemplateExpressionDefaults methodSecurityDefaults() { return new AnnotationTemplateExpressionDefaults(); } @Bean MetaAnnotationService metaAnnotationService() { return new MetaAnnotationService(); } } static
MetaAnnotationPlaceholderConfig
java
quarkusio__quarkus
extensions/resteasy-classic/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/VertxHttpRequest.java
{ "start": 9888, "end": 15752 }
class ____ extends AbstractAsynchronousResponse { private final Object responseLock = new Object(); private long timerID = -1; private VertxHttpResponse vertxResponse; VertxHttpAsyncResponse(final SynchronousDispatcher dispatcher, final VertxHttpRequest request, ...
VertxHttpAsyncResponse
java
junit-team__junit5
jupiter-tests/src/test/java/org/junit/jupiter/engine/OverloadedTestMethodTests.java
{ "start": 1011, "end": 2622 }
class ____ extends AbstractJupiterTestEngineTests { @Test void executeTestCaseWithOverloadedMethodsAndThenRerunOnlyOneOfTheMethodsSelectedByUniqueId() { Events tests = executeTestsForClass(TestCase.class).testEvents(); tests.assertStatistics(stats -> stats.started(2).succeeded(2).failed(0)); Optional<Event> ...
OverloadedTestMethodTests
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/dialect/function/json/SQLServerJsonRemoveFunction.java
{ "start": 521, "end": 1174 }
class ____ extends AbstractJsonRemoveFunction { public SQLServerJsonRemoveFunction(TypeConfiguration typeConfiguration) { super( typeConfiguration ); } @Override public void render( SqlAppender sqlAppender, List<? extends SqlAstNode> arguments, ReturnableType<?> returnType, SqlAstTranslator<?> trans...
SQLServerJsonRemoveFunction
java
apache__maven
compat/maven-model/src/test/java/org/apache/maven/model/ActivationPropertyTest.java
{ "start": 1107, "end": 1719 }
class ____ { @Test void testHashCodeNullSafe() { new ActivationProperty().hashCode(); } @Test void testEqualsNullSafe() { assertFalse(new ActivationProperty().equals(null)); new ActivationProperty().equals(new ActivationProperty()); } @Test void testEqualsIden...
ActivationPropertyTest
java
assertj__assertj-core
assertj-core/src/test/java/org/assertj/core/api/intarray/IntArrayAssert_containsExactlyInAnyOrder_Test.java
{ "start": 1061, "end": 1561 }
class ____ extends IntArrayAssertBaseTest { @Override protected IntArrayAssert invoke_api_method() { return assertions.containsExactlyInAnyOrder(1, 2); } @Override protected void verify_internal_effects() { verify(arrays).assertContainsExactlyInAnyOrder(getInfo(assertions), getActual(assertions), ar...
IntArrayAssert_containsExactlyInAnyOrder_Test
java
spring-projects__spring-boot
module/spring-boot-jdbc/src/main/java/org/springframework/boot/jdbc/autoconfigure/DataSourceTransactionManagerAutoConfiguration.java
{ "start": 2483, "end": 2637 }
class ____ { @Configuration(proxyBeanMethods = false) @ConditionalOnSingleCandidate(DataSource.class) static
DataSourceTransactionManagerAutoConfiguration
java
spring-projects__spring-framework
spring-core/src/main/java/org/springframework/core/type/filter/RegexPatternTypeFilter.java
{ "start": 853, "end": 972 }
class ____ with a regex {@link Pattern}. * * @author Mark Fisher * @author Juergen Hoeller * @since 2.5 */ public
name
java
FasterXML__jackson-databind
src/main/java/tools/jackson/databind/node/BigIntegerNode.java
{ "start": 401, "end": 9886 }
class ____ extends NumericIntNode { private static final long serialVersionUID = 3L; final protected BigInteger _value; /* /********************************************************** /* Construction /********************************************************** */ public BigIntegerN...
BigIntegerNode
java
apache__flink
flink-filesystems/flink-s3-fs-base/src/test/java/org/apache/flink/fs/s3/common/writer/RecoverableMultiPartUploadImplTest.java
{ "start": 15512, "end": 16814 }
class ____ extends UploadPartResult { private static final long serialVersionUID = 1L; private byte[] content; void setContent(byte[] content) { this.content = content; } public byte[] getContent() { return content; } @Override ...
TestUploadPartResult
java
apache__camel
core/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInjectionTest.java
{ "start": 2680, "end": 3285 }
class ____ { public Map<String, Object> headers; public Object body; @Override public String toString() { return "MyBean[foo: " + headers + " body: " + body + "]"; } public void myMethod(@Headers Map<String, Object> headers, Object body) { this.h...
MyBean
java
FasterXML__jackson-databind
src/main/java/tools/jackson/databind/util/TypeKey.java
{ "start": 281, "end": 3272 }
class ____ { protected int _hashCode; protected Class<?> _class; protected JavaType _type; /** * Indicator of whether serializer stored has a type serializer * wrapper around it or not; if not, it is "untyped" serializer; * if it has, it is "typed" */ protected boolean _isType...
TypeKey
java
spring-projects__spring-framework
spring-r2dbc/src/test/java/org/springframework/r2dbc/connection/init/H2DatabasePopulatorIntegrationTests.java
{ "start": 878, "end": 1256 }
class ____ extends AbstractDatabasePopulatorTests { UUID databaseName = UUID.randomUUID(); ConnectionFactory connectionFactory = ConnectionFactories.get( "r2dbc:h2:mem:///" + databaseName + "?options=DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE"); @Override ConnectionFactory getConnectionFactory() { return thi...
H2DatabasePopulatorIntegrationTests
java
spring-projects__spring-security
web/src/main/java/org/springframework/security/web/savedrequest/SavedRequest.java
{ "start": 1185, "end": 1621 }
interface ____ extends java.io.Serializable { /** * @return the URL for the saved request, allowing a redirect to be performed. */ String getRedirectUrl(); List<Cookie> getCookies(); String getMethod(); List<String> getHeaderValues(String name); Collection<String> getHeaderNames(); List<Locale> getLoca...
SavedRequest
java
apache__flink
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/parameters/KubernetesJobManagerParametersTest.java
{ "start": 2061, "end": 12387 }
class ____ extends KubernetesTestBase { private static final double JOB_MANAGER_CPU = 2.0; private static final double JOB_MANAGER_CPU_LIMIT_FACTOR = 2.5; private static final double JOB_MANAGER_MEMORY_LIMIT_FACTOR = 2.0; private final ClusterSpecification clusterSpecification = new Cluste...
KubernetesJobManagerParametersTest
java
spring-projects__spring-framework
spring-test/src/main/java/org/springframework/test/context/TestContextAnnotationUtils.java
{ "start": 14309, "end": 14649 }
class ____. * <p>This method explicitly handles class-level annotations which are not * declared as {@linkplain java.lang.annotation.Inherited inherited} <em>as * well as meta-annotations</em>. * <p>The algorithm operates as follows: * <ol> * <li>Search for a local declaration of one of the annotation types...
itself
java
hibernate__hibernate-orm
tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ConnectionHelper.java
{ "start": 480, "end": 951 }
interface ____ { /** * Prepare the helper for use. * * @param needsAutoCommit Should connection be forced to auto-commit * if not already. */ void prepare(boolean needsAutoCommit) throws SQLException; /** * Get a reference to the connection we are using. * * @return The JDBC connection. */ Connec...
ConnectionHelper
java
elastic__elasticsearch
modules/dot-prefix-validation/src/main/java/org/elasticsearch/validation/DotPrefixValidationPlugin.java
{ "start": 961, "end": 2029 }
class ____ extends Plugin implements ActionPlugin { private final AtomicReference<List<MappedActionFilter>> actionFilters = new AtomicReference<>(); public DotPrefixValidationPlugin() {} @Override public Collection<?> createComponents(PluginServices services) { ThreadContext context = services...
DotPrefixValidationPlugin
java
apache__camel
test-infra/camel-test-infra-pinecone/src/main/java/org/apache/camel/test/infra/pinecone/services/PineconeLocalContainerInfraService.java
{ "start": 2435, "end": 4527 }
class ____ extends PineconeLocalContainer { public TestInfraPineconeLocalContainer(boolean fixedPort) { super(DockerImageName.parse(imageName) .asCompatibleSubstituteFor("pinecone-io/pinecone-local")); withStartupTimeout(Duration.ofMinutes(3L)); ...
TestInfraPineconeLocalContainer
java
quarkusio__quarkus
extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OTelExporterUtil.java
{ "start": 117, "end": 557 }
class ____ { private OTelExporterUtil() { } public static int getPort(URI uri) { int originalPort = uri.getPort(); if (originalPort > -1) { return originalPort; } if (isHttps(uri)) { return 443; } return 80; } public static ...
OTelExporterUtil
java
junit-team__junit5
junit-vintage-engine/src/test/java/org/junit/vintage/engine/discovery/VintageDiscovererTests.java
{ "start": 4817, "end": 4943 }
class ____ { @org.junit.Test public void test() { } } @SuppressWarnings("JUnitMalformedDeclaration") public static
Foo
java
spring-projects__spring-framework
spring-beans/src/main/java/org/springframework/beans/factory/support/GenericTypeAwareAutowireCandidateResolver.java
{ "start": 4196, "end": 8023 }
class ____ applicable. if (targetType == null && rbd != null && rbd.hasBeanClass() && rbd.getFactoryMethodName() == null) { Class<?> beanClass = rbd.getBeanClass(); if (!FactoryBean.class.isAssignableFrom(beanClass)) { targetType = ResolvableType.forClass(ClassUtils.getUserClass(beanClass)); } } ...
if
java
quarkusio__quarkus
extensions/funqy/funqy-knative-events/deployment/src/test/java/io/quarkus/funqy/test/WithAttributeFilter.java
{ "start": 309, "end": 2922 }
class ____ { @Funq @CloudEventMapping(attributes = { @EventAttribute(name = "source", value = "mytestvalue") }) public String listOfStrings(List<Identity> identityList) { return identityList .stream() .map(Identity::getName) .collect(Collectors.joinin...
WithAttributeFilter
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/sql/refcursor/NumValue.java
{ "start": 663, "end": 1750 }
class ____ implements Serializable { @Id @Column(name = "BOT_NUM", nullable = false) private long num; @Column(name = "BOT_VALUE") private String value; public NumValue() { } public NumValue(long num, String value) { this.num = num; this.value = value; } @Override public boolean equals(Object o) { ...
NumValue
java
spring-cloud__spring-cloud-gateway
spring-cloud-gateway-server-webflux/src/test/java/org/springframework/cloud/gateway/handler/RoutePredicateHandlerMappingEmptyPredicatesTests.java
{ "start": 1758, "end": 2034 }
class ____ { @Bean RouteDefinitionLocator myRouteDefinitionLocator() { RouteDefinition definition = new RouteDefinition(); definition.setId("empty_route"); definition.setUri(URI.create("https://example")); return () -> Flux.just(definition); } } }
TestConfig
java
alibaba__druid
core/src/test/java/com/alibaba/druid/bvt/sql/mysql/select/MySqlSelectTest_112_orderBy.java
{ "start": 987, "end": 6424 }
class ____ extends TestCase { public void test_0() throws Exception { String sql = "select coach_id, tournament_name ,tournament_id, season_id, season, count(1) as num,\n" + "sum(case when wdl = 0 then 1 else 0 end) as loss,\n" + "sum(case when wdl = 1 then 1 else 0 end) as d...
MySqlSelectTest_112_orderBy
java
spring-projects__spring-security
core/src/main/java/org/springframework/security/core/token/TokenService.java
{ "start": 1738, "end": 1866 }
interface ____ * be expanded to provide such capabilities directly. * </p> * * @author Ben Alex * @since 2.0.1 * */ public
to
java
apache__camel
components/camel-wal/src/test/java/org/apache/camel/component/wal/LogTestBase.java
{ "start": 1173, "end": 3365 }
class ____ { protected static final long RECORD_COUNT = TimeUnit.HOURS.toSeconds(1); private static final Logger LOG = LoggerFactory.getLogger(LogTestBase.class); @TempDir protected File testDir; protected static LogEntry createNewLogEntry(List<Instant> values, int i) { String keyData = "r...
LogTestBase
java
alibaba__druid
core/src/test/java/com/alibaba/druid/bvt/sql/mysql/createTable/MySqlCreateTableTest26.java
{ "start": 1016, "end": 2383 }
class ____ extends MysqlTest { public void test_0() throws Exception { String sql = "CREATE TABLE lookup" + " (id INT, INDEX USING BTREE (id))" + " MAX_ROWS 1024;"; MySqlStatementParser parser = new MySqlStatementParser(sql); List<SQLStatement> statementLis...
MySqlCreateTableTest26
java
FasterXML__jackson-databind
src/test/java/tools/jackson/databind/ser/JsonValueSerializationTest.java
{ "start": 1127, "end": 1361 }
class ____ check that it is also possible to * force specific serializer to use with @JsonValue annotated * method. Difference is between Integer serialization, and * conversion to a Json String. */ final static
to
java
spring-projects__spring-boot
module/spring-boot-jdbc/src/main/java/org/springframework/boot/jdbc/docker/compose/PostgresJdbcDockerComposeConnectionDetailsFactory.java
{ "start": 1475, "end": 2032 }
class ____ extends DockerComposeConnectionDetailsFactory<JdbcConnectionDetails> { protected PostgresJdbcDockerComposeConnectionDetailsFactory() { super("postgres"); } @Override protected JdbcConnectionDetails getDockerComposeConnectionDetails(DockerComposeConnectionSource source) { return new PostgresJdbcDo...
PostgresJdbcDockerComposeConnectionDetailsFactory
java
apache__logging-log4j2
log4j-api-test/src/test/java/org/apache/logging/log4j/util/Log4jCharsetsPropertiesTest.java
{ "start": 1095, "end": 1903 }
class ____ { /** * Tests that we can load all mappings. */ @Test void testLoadAll() { final ResourceBundle resourceBundle = PropertiesUtil.getCharsetsResourceBundle(); final Enumeration<String> keys = resourceBundle.getKeys(); while (keys.hasMoreElements()) { f...
Log4jCharsetsPropertiesTest
java
apache__hadoop
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestIndexedSort.java
{ "start": 6232, "end": 7813 }
class ____ implements IndexedSortable { private int[] valindex; private int[] valindirect; private int[] values; private final long seed; public SampleSortable() { this(50); } public SampleSortable(int j) { Random r = new Random(); seed = r.nextLong(); r.setSeed(see...
SampleSortable
java
apache__camel
components/camel-sjms/src/test/java/org/apache/camel/component/sjms/consumer/InOutConsumerTempQueueAsyncTest.java
{ "start": 1169, "end": 2899 }
class ____ extends JmsTestSupport { @Test public void testAsync() throws Exception { getMockEndpoint("mock:result").expectedBodiesReceived("Hello World", "Hello Camel"); template.sendBody("sjms:start.queue.InOutConsumerTempQueueAsyncTest", "Hello Camel"); template.sendBody("sjms:start....
InOutConsumerTempQueueAsyncTest
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobConf.java
{ "start": 27637, "end": 27917 }
class ____ be different than the final output * value class. * * @param theClass the map output key class. */ public void setMapOutputKeyClass(Class<?> theClass) { setClass(JobContext.MAP_OUTPUT_KEY_CLASS, theClass, Object.class); } /** * Get the value
to
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/android/BundleDeserializationCastTest.java
{ "start": 8335, "end": 9074 }
class ____ { void test() { Bundle bundle = new Bundle(); // BUG: Diagnostic matches: X CustomCharSequence[] cs = (CustomCharSequence[]) bundle.getSerializable("key"); } } """) .expectErrorMessage( "X"...
Test
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/metamodel/mapping/WhereRestrictable.java
{ "start": 496, "end": 874 }
interface ____ { /** * Does this restrictable have a where restriction? */ boolean hasWhereRestrictions(); /** * Apply the {@link org.hibernate.annotations.SQLRestriction} restrictions */ void applyWhereRestrictions( Consumer<Predicate> predicateConsumer, TableGroup tableGroup, boolean useQualifi...
WhereRestrictable
java
apache__flink
flink-core/src/main/java/org/apache/flink/configuration/JobManagerOptions.java
{ "start": 45108, "end": 47955 }
enum ____ { ALL_PRODUCERS_FINISHED(true), ONLY_FINISHED_PRODUCERS(true), UNFINISHED_PRODUCERS(false); private final boolean onlyConsumeFinishedPartition; HybridPartitionDataConsumeConstraint(boolean onlyConsumeFinishedPartition) { this.onlyConsumeFinishedPartition =...
HybridPartitionDataConsumeConstraint
java
alibaba__nacos
auth/src/main/java/com/alibaba/nacos/auth/context/GrpcIdentityContextBuilder.java
{ "start": 1185, "end": 2582 }
class ____ implements IdentityContextBuilder<Request> { private final NacosAuthConfig authConfig; public GrpcIdentityContextBuilder(NacosAuthConfig authConfig) { this.authConfig = authConfig; } /** * get identity context from grpc. * * @param request grpc request ...
GrpcIdentityContextBuilder
java
spring-projects__spring-boot
configuration-metadata/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/fieldvalues/javac/Trees.java
{ "start": 974, "end": 1967 }
class ____ extends ReflectionWrapper { private Trees(Object instance) { super("com.sun.source.util.Trees", instance); } Tree getTree(Element element) throws Exception { Object tree = findMethod("getTree", Element.class).invoke(getInstance(), element); return (tree != null) ? new Tree(tree) : null; } stati...
Trees
java
ReactiveX__RxJava
src/main/java/io/reactivex/rxjava3/internal/operators/observable/ObservableThrottleFirstTimed.java
{ "start": 1993, "end": 4382 }
class ____<T> extends AtomicReference<Disposable> implements Observer<T>, Disposable, Runnable { private static final long serialVersionUID = 786994795061867455L; final Observer<? super T> downstream; final long timeout; final TimeUnit unit; final Scheduler.Worker worker...
DebounceTimedObserver
java
apache__flink
flink-runtime/src/test/java/org/apache/flink/runtime/testutils/statemigration/TestType.java
{ "start": 2867, "end": 3769 }
class ____ extends TestTypeSerializerBase { private static final long serialVersionUID = 5053346160938769779L; @Override public void serialize(TestType record, DataOutputView target) throws IOException { target.writeUTF(record.getKey()); target.writeInt(record.getValue()...
V1TestTypeSerializer
java
elastic__elasticsearch
x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToGeohashTests.java
{ "start": 1081, "end": 2512 }
class ____ extends AbstractScalarFunctionTestCase { public ToGeohashTests(@Name("TestCase") Supplier<TestCaseSupplier.TestCase> testCaseSupplier) { this.testCase = testCaseSupplier.get(); } @ParametersFactory public static Iterable<Object[]> parameters() { final String attribute = "Attr...
ToGeohashTests
java
quarkusio__quarkus
independent-projects/tools/devtools-common/src/main/java/io/quarkus/cli/plugin/PluginUtil.java
{ "start": 532, "end": 8261 }
class ____ { private PluginUtil() { //Utility } public static boolean shouldSync(Path projectRoot, PluginCatalog catalog) { return shouldSync(Optional.ofNullable(projectRoot), catalog); } public static boolean shouldSync(Optional<Path> projectRoot, PluginCatalog catalog) { ...
PluginUtil
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/embeddable/OrderByEmbeddableX2Test.java
{ "start": 3370, "end": 3632 }
class ____ { @Embedded private Contained contained; public Embed() { } public Contained getContained() { return contained; } public void setContained(Contained contained) { this.contained = contained; } } @Embeddable public static
Embed
java
apache__logging-log4j2
log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/plugins/processor/FakePlugin.java
{ "start": 2010, "end": 2545 }
class ____ {} @PluginFactory public static FakePlugin newPlugin( @PluginAttribute("attribute") int attribute, @PluginElement("layout") Layout<? extends Serializable> layout, @PluginConfiguration Configuration config, @PluginNode Node node, @PluginLogg...
Nested
java
quarkusio__quarkus
extensions/vertx-http/deployment/src/test/java/io/quarkus/vertx/http/http2/Http2RSTFloodProtectionTest.java
{ "start": 1394, "end": 4113 }
class ____ { private static final String configuration = """ quarkus.http.ssl.certificate.key-store-file=server-keystore.jks quarkus.http.ssl.certificate.key-store-password=secret """; @TestHTTPResource(value = "/ping", ssl = true) URL sslUrl; @TestHTTPResource(val...
Http2RSTFloodProtectionTest
java
elastic__elasticsearch
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/Deriv.java
{ "start": 1838, "end": 4905 }
class ____ extends TimeSeriesAggregateFunction implements ToAggregator, TimestampAware { public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(Expression.class, "Deriv", Deriv::new); private final Expression timestamp; @FunctionInfo( type = FunctionType.TIME_SERI...
Deriv
java
elastic__elasticsearch
modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/PersianStemTokenFilterFactory.java
{ "start": 831, "end": 1185 }
class ____ extends AbstractTokenFilterFactory { PersianStemTokenFilterFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { super(name); } @Override public TokenStream create(TokenStream tokenStream) { return new PersianStemFilter(tokenStream);...
PersianStemTokenFilterFactory
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestSpeculativeExecOnCluster.java
{ "start": 11209, "end": 11989 }
class ____ implements SleepDurationCalculator { private double threshold = 1.0; private double slowFactor = 1.0; SleepDurationCalcImpl() { } public long calcSleepDuration(TaskAttemptID taId, int currCount, int totalCount, long defaultSleepDuration) { if (threshold <= ((double) curr...
SleepDurationCalcImpl
java
apache__camel
core/camel-core/src/test/java/org/apache/camel/component/bean/MyPrefixBean.java
{ "start": 852, "end": 1121 }
class ____ { private String prefix; public String getPrefix() { return prefix; } public void setPrefix(String prefix) { this.prefix = prefix; } public String hello(String s) { return prefix + " " + s; } }
MyPrefixBean
java
apache__hadoop
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestAfsCheckPath.java
{ "start": 2555, "end": 5377 }
class ____ extends AbstractFileSystem { public DummyFileSystem(URI uri) throws URISyntaxException { super(uri, "dummy", true, DEFAULT_PORT); } @Override public int getUriDefaultPort() { return DEFAULT_PORT; } @Override public FSDataOutputStream createInternal(Path f, E...
DummyFileSystem
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/ClassNamedLikeTypeParameterTest.java
{ "start": 1522, "end": 1735 }
class ____ {} } """) .doTest(); } @Test public void negativeCases() { compilationHelper .addSourceLines( "Test.java", """ public
X
java
quarkusio__quarkus
integration-tests/opentelemetry-reactive/src/test/java/io/quarkus/it/opentelemetry/reactive/Utils.java
{ "start": 403, "end": 1742 }
class ____ { private Utils() { } public static List<Map<String, Object>> getSpans() { return when().get("/export").body().as(new TypeRef<>() { }); } public static Map<String, Object> getSpanEventAttrs(String spanName, String eventName) { return given() .qu...
Utils
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/proxy/ProxyConfiguration.java
{ "start": 1762, "end": 2340 }
interface ____ { /** * Intercepts a method call to a proxy. * * @param instance The proxied instance. * @param method The invoked method. * @param arguments The intercepted method arguments. * * @return The method's return value. * * @throws Throwable If the intercepted method raises an ex...
Interceptor
java
apache__flink
flink-core/src/main/java/org/apache/flink/util/function/FunctionUtils.java
{ "start": 1092, "end": 1199 }
class ____ { private FunctionUtils() { throw new UnsupportedOperationException("This
FunctionUtils
java
alibaba__fastjson
src/test/java/com/alibaba/json/bvt/bug/Bug_127_for_qiuyan81.java
{ "start": 177, "end": 3107 }
class ____ extends TestCase { public void test_parserUndefined() { String jsonString = "{PayStatus:0,RunEmpId:undefined}"; Object json = JSON.parse(jsonString); Assert.assertEquals("{\"PayStatus\":0}", json.toString()); } public void test_parserUndefined_space() { Strin...
Bug_127_for_qiuyan81
java
apache__dubbo
dubbo-compatible/src/main/java/com/alibaba/dubbo/config/annotation/Reference.java
{ "start": 1776, "end": 3139 }
interface ____ */ @Deprecated boolean generic() default false; boolean injvm() default true; boolean check() default true; boolean init() default true; boolean lazy() default false; boolean stubevent() default false; String reconnect() default ""; boolean sticky() default...
class
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
{ "start": 5885, "end": 7298 }
class ____ extends DFSAdminCommand { private static final String NAME = "clrQuota"; private static final String USAGE = "-"+NAME+" <dirname>...<dirname>"; private static final String DESCRIPTION = USAGE + ": " + "Clear the quota for each directory <dirName>.\n" + "\t\tFor each directory, attempt to ...
ClearQuotaCommand
java
quarkusio__quarkus
independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/injection/constructornoinject/NoArgConstructorTakesPrecedenceTest.java
{ "start": 330, "end": 656 }
class ____ { @RegisterExtension public ArcTestContainer container = new ArcTestContainer(CombineHarvester.class); @Test public void testInjection() { assertEquals("OK", Arc.container().instance(CombineHarvester.class).get().getHead()); } @Singleton static
NoArgConstructorTakesPrecedenceTest
java
quarkusio__quarkus
extensions/resteasy-reactive/rest-client/deployment/src/test/java/io/quarkus/rest/client/reactive/registerclientheaders/HeaderSettingClient.java
{ "start": 458, "end": 781 }
interface ____ { String HEADER = "my-header"; @Path("/with-incoming-header") @GET RequestData setHeaderValue(@HeaderParam(HEADER) String headerName); @Path("/with-incoming-header/no-passing") @GET RequestData setHeaderValueNoPassing(@HeaderParam(HEADER) String headerName); }
HeaderSettingClient