language stringclasses 1
value | repo stringclasses 60
values | path stringlengths 22 294 | class_span dict | source stringlengths 13 1.16M | target stringlengths 1 113 |
|---|---|---|---|---|---|
java | elastic__elasticsearch | x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/lucene/LuceneQueryEvaluator.java | {
"start": 1760,
"end": 2044
} | class ____ {@link LuceneQueryScoreEvaluator} for
* examples of subclasses that provide different types of scoring results for different ESQL constructs.
* It's much faster to push queries to the {@link LuceneSourceOperator} or the like, but sometimes this isn't possible. So
* this | and |
java | apache__hadoop | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSOutputSummer.java | {
"start": 1352,
"end": 9021
} | class ____ extends OutputStream implements
StreamCapabilities {
// data checksum
private final DataChecksum sum;
// internal buffer for storing data before it is checksumed
private byte buf[];
// internal buffer for storing checksum
private byte checksum[];
// The number of valid bytes in the buffer.
... | FSOutputSummer |
java | spring-projects__spring-framework | spring-jms/src/main/java/org/springframework/jms/support/converter/SmartMessageConverter.java | {
"start": 1147,
"end": 2018
} | interface ____ extends MessageConverter {
/**
* A variant of {@link #toMessage(Object, Session)} which takes an extra conversion
* context as an argument, allowing to take, for example, annotations on a payload parameter
* into account.
* @param object the object to convert
* @param session the Session to u... | SmartMessageConverter |
java | elastic__elasticsearch | x-pack/plugin/migrate/src/main/java/org/elasticsearch/xpack/migrate/action/GetMigrationReindexStatusAction.java | {
"start": 2979,
"end": 4422
} | class ____ extends LegacyActionRequest implements IndicesRequest {
private final String index;
public Request(String index) {
super();
this.index = index;
}
public Request(StreamInput in) throws IOException {
super(in);
this.index = in.re... | Request |
java | grpc__grpc-java | examples/src/main/java/io/grpc/examples/errorhandling/DetailErrorSample.java | {
"start": 2204,
"end": 7689
} | class ____ {
private static final Metadata.Key<DebugInfo> DEBUG_INFO_TRAILER_KEY =
ProtoUtils.keyForProto(DebugInfo.getDefaultInstance());
private static final DebugInfo DEBUG_INFO =
DebugInfo.newBuilder()
.addStackEntries("stack_entry_1")
.addStackEntries("stack_entry_2")
... | DetailErrorSample |
java | google__error-prone | check_api/src/main/java/com/google/errorprone/bugpatterns/BugChecker.java | {
"start": 5345,
"end": 12851
} | class ____ implements Suppressible, Serializable {
private final BugCheckerInfo info;
private final BiPredicate<Set<? extends Name>, VisitorState> checkSuppression;
public BugChecker() {
info = BugCheckerInfo.create(getClass());
checkSuppression = suppressionPredicate(info.customSuppressionAnnotations())... | BugChecker |
java | quarkusio__quarkus | independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/matching/PathParamOverlapTest.java | {
"start": 645,
"end": 2526
} | class ____ {
@RegisterExtension
static ResteasyReactiveUnitTest test = new ResteasyReactiveUnitTest()
.setArchiveProducer(new Supplier<>() {
@Override
public JavaArchive get() {
return ShrinkWrap.create(JavaArchive.class)
... | PathParamOverlapTest |
java | apache__camel | components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/SharedQueueSimpleMessageListenerContainer.java | {
"start": 1528,
"end": 2617
} | class ____ extends SimpleJmsMessageListenerContainer {
private String fixedMessageSelector;
private MessageSelectorCreator creator;
/**
* Use a fixed JMS message selector
*
* @param endpoint the endpoint
* @param fixedMessageSelector the fixed selector
*/
public Sh... | SharedQueueSimpleMessageListenerContainer |
java | spring-projects__spring-framework | spring-expression/src/test/java/org/springframework/expression/spel/SpelReproTests.java | {
"start": 68099,
"end": 68182
} | class ____ {
public boolean method(Object o) {
return false;
}
}
static | CCC |
java | junit-team__junit5 | jupiter-tests/src/test/java/org/junit/jupiter/engine/descriptor/LifecycleMethodUtilsTests.java | {
"start": 1655,
"end": 2646
} | class ____ {
List<DiscoveryIssue> discoveryIssues = new ArrayList<>();
DiscoveryIssueReporter issueReporter = DiscoveryIssueReporter.collecting(discoveryIssues);
@Test
void findNonVoidBeforeAllMethodsWithStandardLifecycle() throws Exception {
var methods = findBeforeAllMethods(TestCaseWithInvalidLifecycleMethod... | LifecycleMethodUtilsTests |
java | google__error-prone | core/src/test/java/com/google/errorprone/bugpatterns/checkreturnvalue/NoCanIgnoreReturnValueOnClassesTest.java | {
"start": 12766,
"end": 13112
} | class ____ {
abstract String id();
}
}
""")
.addOutputLines(
"Outer.java",
"package com.google.frobber;",
"import com.google.auto.value.AutoValue;",
"import com.google.errorprone.annotations.CanIgnoreReturnValu... | Inner |
java | elastic__elasticsearch | x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plan/physical/SampleExecSerializationTests.java | {
"start": 520,
"end": 1801
} | class ____ extends AbstractPhysicalPlanSerializationTests<SampleExec> {
/**
* Creates a random test instance to use in the tests. This method will be
* called multiple times during test execution and should return a different
* random instance each time it is called.
*/
@Override
protect... | SampleExecSerializationTests |
java | spring-projects__spring-security | config/src/test/java/org/springframework/security/config/http/OAuth2ClientBeanDefinitionParserTests.java | {
"start": 12870,
"end": 13151
} | class ____ {
@GetMapping("/authorized-client")
String authorizedClient(Model model,
@RegisteredOAuth2AuthorizedClient("google") OAuth2AuthorizedClient authorizedClient) {
return (authorizedClient != null) ? "resolved" : "not-resolved";
}
}
}
| AuthorizedClientController |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/mapping/manytomany/ManyToManyListBidirectionalTest.java | {
"start": 2477,
"end": 3313
} | class ____ {
@Id
private int id;
public Book() {
}
public Book(int id) {
this.id = id;
}
public Book(int id, Author author) {
this.id = id;
link( author );
}
private void link(Author author) {
authors.add( author );
author.books.add( this );
}
public Book(int id, Author... aut... | Book |
java | quarkusio__quarkus | extensions/resteasy-reactive/rest/runtime/src/main/java/io/quarkus/resteasy/reactive/server/runtime/EndpointScoresSupplier.java | {
"start": 189,
"end": 527
} | class ____ implements Supplier<ScoreSystem.EndpointScores> {
@Override
public ScoreSystem.EndpointScores get() {
var result = ScoreSystem.latestScores;
if (result != null) {
return result;
}
return new ScoreSystem.EndpointScores(0, Collections.emptyList());
}
}
| EndpointScoresSupplier |
java | quarkusio__quarkus | extensions/websockets-next/deployment/src/test/java/io/quarkus/websockets/next/test/broadcast/BroadcastOnMessageTest.java | {
"start": 736,
"end": 4077
} | class ____ {
@RegisterExtension
public static final QuarkusUnitTest test = new QuarkusUnitTest()
.withApplicationRoot(root -> {
root.addClasses(Up.class, UpBlocking.class, UpMultiBidi.class);
});
@TestHTTPResource("up")
URI upUri;
@TestHTTPResource("up-bloc... | BroadcastOnMessageTest |
java | quarkusio__quarkus | extensions/resteasy-reactive/rest-client/deployment/src/test/java/io/quarkus/rest/client/reactive/subresource/ParameterizedParentInterfaceTest.java | {
"start": 4061,
"end": 4153
} | interface ____<S> {
@GET
@Path("something")
S get();
}
public | Z |
java | alibaba__druid | core/src/main/java/com/alibaba/druid/sql/ast/statement/SQLShowACLStatement.java | {
"start": 864,
"end": 1615
} | class ____ extends SQLStatementImpl implements SQLShowStatement, SQLReplaceable {
protected SQLExprTableSource table;
public SQLExprTableSource getTable() {
return table;
}
public void setTable(SQLExprTableSource x) {
if (x != null) {
x.setParent(this);
}
th... | SQLShowACLStatement |
java | apache__hadoop | hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/find/TestFind.java | {
"start": 29748,
"end": 36033
} | class ____ extends BaseExpression implements Expression {
private Expression expr;
private FileStatusChecker checker;
public TestExpression(Expression expr, FileStatusChecker checker) {
this.expr = expr;
this.checker = checker;
}
@Override
public Result apply(PathData item, int depth... | TestExpression |
java | spring-projects__spring-framework | spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java | {
"start": 128977,
"end": 129259
} | interface ____ {
String strategy();
}
@Id
@GeneratedValue(strategy = "AUTO")
private Long getId() {
return 42L;
}
/**
* Mimics org.springframework.security.config.annotation.authentication.configuration.EnableGlobalAuthentication
*/
@Retention(RUNTIME)
@ | GeneratedValue |
java | google__error-prone | core/src/test/java/com/google/errorprone/refaster/testdata/input/VariableDeclTemplateExample.java | {
"start": 772,
"end": 982
} | class ____ {
@SuppressWarnings("unused")
public void example() {
int a = Integer.valueOf("3");
Integer b = Integer.valueOf("3");
final int c = Integer.valueOf("3");
}
}
| VariableDeclTemplateExample |
java | jhy__jsoup | src/test/java/org/jsoup/parser/StreamParserTest.java | {
"start": 962,
"end": 2443
} | class ____ {
@Test
void canStream() {
String html = "<title>Test</title></head><div id=1>D1</div><div id=2>D2<p id=3><span>P One</p><p id=4>P Two</p></div><div id=5>D3<p id=6>P three</p>";
try (StreamParser parser = new StreamParser(Parser.htmlParser()).parse(html, "")) {
StringBuil... | StreamParserTest |
java | spring-projects__spring-security | saml2/saml2-service-provider/src/main/java/org/springframework/security/saml2/provider/service/registration/RelyingPartyRegistrations.java | {
"start": 1290,
"end": 9461
} | class ____ {
private static final ResourceLoader resourceLoader = new DefaultResourceLoader();
private RelyingPartyRegistrations() {
}
/**
* Return a {@link RelyingPartyRegistration.Builder} based off of the given SAML 2.0
* Asserting Party (IDP) metadata location.
*
* Valid locations can be classpath- o... | RelyingPartyRegistrations |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyLoadingAndInheritanceTest.java | {
"start": 2519,
"end": 2758
} | class ____ {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public Long id;
public String name;
Contained() {
}
Contained(String name) {
this.name = name;
}
}
@Entity(name = "ContainedExtended")
static | Contained |
java | apache__flink | flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/PhysicalSlotRequestBulkCheckerImpl.java | {
"start": 9152,
"end": 9240
} | enum ____ {
PENDING,
FULFILLED,
TIMEOUT
}
}
| TimeoutCheckResult |
java | spring-projects__spring-boot | core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/ImportAutoConfigurationImportSelectorTests.java | {
"start": 10988,
"end": 11094
} | class ____ {
}
@ImportAutoConfiguration
@UnrelatedOne
static | ImportMetaAutoConfigurationWithUnrelatedTwo |
java | apache__camel | components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/processor/SpringLoopCopyTest.java | {
"start": 1033,
"end": 1278
} | class ____ extends LoopCopyTest {
@Override
protected CamelContext createCamelContext() throws Exception {
return createSpringCamelContext(this, "org/apache/camel/spring/processor/SpringLoopCopyTest.xml");
}
}
| SpringLoopCopyTest |
java | apache__kafka | clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/FetchCommittedOffsetsEvent.java | {
"start": 1050,
"end": 1719
} | class ____ extends CompletableApplicationEvent<Map<TopicPartition, OffsetAndMetadata>> {
/**
* Partitions to retrieve committed offsets for.
*/
private final Set<TopicPartition> partitions;
public FetchCommittedOffsetsEvent(final Set<TopicPartition> partitions, final long deadlineMs) {
s... | FetchCommittedOffsetsEvent |
java | alibaba__nacos | client-basic/src/test/java/com/alibaba/nacos/client/auth/ram/injector/ConfigResourceInjectorTest.java | {
"start": 1562,
"end": 7196
} | class ____ {
private ConfigResourceInjector configResourceInjector;
private RamContext ramContext;
private RequestResource resource;
private String cachedSecurityCredentialsUrl;
private String cachedSecurityCredentials;
private StsCredential stsCredential;
... | ConfigResourceInjectorTest |
java | quarkusio__quarkus | independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/interceptors/aroundconstruct/AroundConstructTest.java | {
"start": 1917,
"end": 2485
} | class ____ {
@AroundConstruct
void mySuperCoolAroundConstruct(InvocationContext ctx) throws Exception {
INTERCEPTOR_CALLED.set(true);
assertTrue(ctx.getParameters().length == 1);
Object param = ctx.getParameters()[0];
assertTrue(param instanceof MyDepende... | SimpleInterceptor |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/jpa/inheritance/Fruit.java | {
"start": 444,
"end": 582
} | class ____ {
Long id;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}
| Fruit |
java | apache__hadoop | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/ClientId.java | {
"start": 1165,
"end": 2984
} | class ____ {
/** The byte array of a UUID should be 16 */
public static final int BYTE_LENGTH = 16;
private static final int shiftWidth = 8;
/**
* @return Return clientId as byte[].
*/
public static byte[] getClientId() {
UUID uuid = UUID.randomUUID();
ByteBuffer buf = ByteBuffer.wrap(new... | ClientId |
java | elastic__elasticsearch | qa/no-bootstrap-tests/src/test/java/org/elasticsearch/bootstrap/SpawnerNoBootstrapTests.java | {
"start": 1955,
"end": 2151
} | class ____ doing its job. Also needs to run in a separate JVM to other
* tests that extend ESTestCase for the same reason.
*/
@ThreadLeakFilters(filters = { GraalVMThreadsFilter.class })
public | from |
java | apache__hadoop | hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/file/tfile/TestTFileSeek.java | {
"start": 7402,
"end": 15081
} | class ____ {
// hard coded constants
int dictSize = 1000;
int minWordLen = 5;
int maxWordLen = 20;
int osInputBufferSize = 64 * 1024;
int osOutputBufferSize = 64 * 1024;
int fsInputBufferSizeNone = 0;
int fsInputBufferSizeLzo = 0;
int fsInputBufferSizeGz = 0;
int fsOutputBufferSi... | MyOptions |
java | quarkusio__quarkus | extensions/resteasy-reactive/rest/deployment/src/test/java/io/quarkus/resteasy/reactive/server/test/multipart/FormData.java | {
"start": 303,
"end": 1092
} | class ____ extends FormDataBase {
@RestForm
// don't set a part type, use the default
private String name;
@RestForm
@PartType(MediaType.TEXT_PLAIN)
private Status status;
@RestForm("htmlFile")
private FileUpload htmlPart;
@RestForm("xmlFile")
public Path xmlPart;
@RestF... | FormData |
java | quarkusio__quarkus | extensions/resteasy-reactive/rest-jackson/deployment/src/test/java/io/quarkus/resteasy/reactive/jackson/deployment/test/TokenResponse.java | {
"start": 125,
"end": 572
} | class ____ {
private final String accessToken;
private final Integer expiresIn;
public TokenResponse(@JsonProperty("access_token") String accessToken, @JsonProperty("expires_in") Integer expiresIn) {
this.accessToken = accessToken;
this.expiresIn = expiresIn;
}
public String getAc... | TokenResponse |
java | quarkusio__quarkus | extensions/hibernate-search-orm-elasticsearch/deployment/src/main/java/io/quarkus/hibernate/search/orm/elasticsearch/deployment/HibernateSearchIntegrationRuntimeConfiguredBuildItem.java | {
"start": 224,
"end": 1444
} | class ____ extends MultiBuildItem {
private final String integrationName;
private final String persistenceUnitName;
private final HibernateOrmIntegrationRuntimeInitListener initListener;
public HibernateSearchIntegrationRuntimeConfiguredBuildItem(String integrationName, String persistenceUnitName,
... | HibernateSearchIntegrationRuntimeConfiguredBuildItem |
java | elastic__elasticsearch | x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/inference/assignment/TrainedModelAssignmentService.java | {
"start": 5596,
"end": 7552
} | interface ____ extends ActionListener<TrainedModelAssignment> {
default void onTimeout(TimeValue timeout) {
onFailure(
new ModelDeploymentTimeoutException(
format(
"Timed out after [%s] waiting for trained model deployment to start. "
... | WaitForAssignmentListener |
java | apache__kafka | connect/runtime/src/test/java/org/apache/kafka/connect/cli/AbstractConnectCliTest.java | {
"start": 7956,
"end": 8120
} | class ____ extends RuntimeException {
ExpectedException() {
super("Expected exception, createConfig succeeded");
}
}
}
| ExpectedException |
java | apache__spark | sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedValuesReader.java | {
"start": 3186,
"end": 3633
} | interface ____ {
void write(WritableColumnVector c, int rowId, ByteBuffer val, int length);
static void writeArrayByteBuffer(WritableColumnVector c, int rowId, ByteBuffer val,
int length) {
c.putByteArray(rowId,
val.array(),
val.arrayOffset() + val.position(),
length... | ByteBufferOutputWriter |
java | apache__dubbo | dubbo-plugin/dubbo-rest-jaxrs/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/support/jaxrs/filter/WriterInterceptorContextImpl.java | {
"start": 1372,
"end": 2886
} | class ____ extends InterceptorContextImpl implements WriterInterceptorContext {
private final HttpResponse response;
private final Result result;
private MultivaluedMap<String, Object> headers;
public WriterInterceptorContextImpl(HttpRequest request, HttpResponse response, Result result) {
su... | WriterInterceptorContextImpl |
java | quarkusio__quarkus | extensions/redis-client/runtime/src/main/java/io/quarkus/redis/runtime/datasource/ReactiveTransactionalHyperLogLogCommandsImpl.java | {
"start": 306,
"end": 1423
} | class ____<K, V> extends AbstractTransactionalCommands
implements ReactiveTransactionalHyperLogLogCommands<K, V> {
private final ReactiveHyperLogLogCommandsImpl<K, V> reactive;
public ReactiveTransactionalHyperLogLogCommandsImpl(ReactiveTransactionalRedisDataSource ds,
ReactiveHyperLogLogC... | ReactiveTransactionalHyperLogLogCommandsImpl |
java | apache__dubbo | dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/report/support/AbstractMetadataReport.java | {
"start": 12804,
"end": 21289
} | class ____ implements Runnable {
private long version;
private SaveProperties(long version) {
this.version = version;
}
@Override
public void run() {
doSaveProperties(version);
}
}
@Override
public void storeProviderMetadata(
... | SaveProperties |
java | mockito__mockito | mockito-core/src/test/java/org/mockitousage/annotation/SpyAnnotationTest.java | {
"start": 3184,
"end": 3750
} | class ____ {
@Spy NoValidConstructor noValidConstructor;
}
try {
MockitoAnnotations.openMocks(new FailingSpy());
fail();
} catch (MockitoException e) {
assertThat(e.getMessage())
.contains("Please ensure that the type")
... | FailingSpy |
java | netty__netty | transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringBufferRingSocketDataReadInitialStateTest.java | {
"start": 1056,
"end": 1871
} | class ____ extends SocketDataReadInitialStateTest {
@BeforeAll
public static void loadJNI() {
assumeTrue(IoUring.isAvailable());
assumeTrue(IoUring.isRegisterBufferRingSupported());
}
@Override
protected List<TestsuitePermutation.BootstrapComboFactory<ServerBootstrap, Bootstrap>> n... | IoUringBufferRingSocketDataReadInitialStateTest |
java | spring-projects__spring-framework | spring-test/src/test/java/org/springframework/test/context/transaction/MethodLevelTransactionalSpringTests.java | {
"start": 2219,
"end": 2609
} | class ____ tests usage of {@code @Transactional} defined
* at the <strong>method level</strong>.
*
* @author Sam Brannen
* @since 2.5
* @see ClassLevelTransactionalSpringTests
*/
@TestExecutionListeners({ DependencyInjectionTestExecutionListener.class, DirtiesContextTestExecutionListener.class,
TransactionalTest... | specifically |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/function/array/ArrayRemoveIndexTest.java | {
"start": 1610,
"end": 5376
} | class ____ {
@BeforeEach
public void prepareData(SessionFactoryScope scope) {
scope.inTransaction( em -> {
em.persist( new EntityWithArrays( 1L, new String[]{} ) );
em.persist( new EntityWithArrays( 2L, new String[]{ "abc", null, "def" } ) );
em.persist( new EntityWithArrays( 3L, null ) );
} );
}
@Af... | ArrayRemoveIndexTest |
java | hibernate__hibernate-orm | hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/helpdesk/Account.java | {
"start": 526,
"end": 1704
} | class ____ {
private Integer id;
private Status loginStatus;
private Status systemAccessStatus;
private Status serviceStatus;
public Account() {
}
public Account(
Integer id,
Status loginStatus,
Status systemAccessStatus,
Status serviceStatus) {
this.id = id;
this.loginStatus = loginStatus;
... | Account |
java | apache__maven | impl/maven-core/src/test/java/org/apache/maven/configuration/internal/EnhancedCompositeBeanHelperTest.java | {
"start": 8267,
"end": 8329
} | class ____ testing property setting.
*/
public static | for |
java | google__dagger | javatests/dagger/hilt/android/ViewModelAssistedTest.java | {
"start": 9367,
"end": 10080
} | class ____
extends Hilt_ViewModelAssistedTest_TestIncompatibleFactoriesActivity {
MyViewModel vm;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
vm =
new ViewModelProvider(
getViewModelStore(),
... | TestIncompatibleFactoriesActivity |
java | apache__commons-lang | src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java | {
"start": 15102,
"end": 15182
} | class ____ and no identity hash code.
*
* <p>
* This is an inner | name |
java | spring-projects__spring-framework | spring-context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationAdapter.java | {
"start": 8083,
"end": 9875
} | class ____ the method,
* or for an AOP proxy without a target (with all behavior in advisors), also
* check on proxied interfaces.
*/
@Override
public Class<?>[] determineValidationGroups(Object target, Method method) {
Validated validatedAnn = AnnotationUtils.findAnnotation(method, Validated.class);
if (va... | of |
java | spring-projects__spring-boot | module/spring-boot-tomcat/src/main/java/org/springframework/boot/tomcat/autoconfigure/TomcatServerProperties.java | {
"start": 10799,
"end": 15742
} | class ____ {
/**
* Enable access log.
*/
private boolean enabled;
/**
* Whether logging of the request will only be enabled if
* "ServletRequest.getAttribute(conditionIf)" does not yield null.
*/
private @Nullable String conditionIf;
/**
* Whether logging of the request will only be enabl... | Accesslog |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/SchemaMigrationTargetScriptCreationTest.java | {
"start": 1759,
"end": 3377
} | class ____ implements ServiceRegistryProducer {
private final File output;
public SchemaMigrationTargetScriptCreationTest(@TempDir File outputDir) {
this.output = new File( outputDir, "update_script.sql" );
}
@Override
public StandardServiceRegistry produceServiceRegistry(StandardServiceRegistryBuilder builder... | SchemaMigrationTargetScriptCreationTest |
java | apache__flink | flink-formats/flink-protobuf/src/main/java/org/apache/flink/formats/protobuf/PbDecodingFormat.java | {
"start": 1458,
"end": 2260
} | class ____ implements DecodingFormat<DeserializationSchema<RowData>> {
private final PbFormatConfig formatConfig;
public PbDecodingFormat(PbFormatConfig formatConfig) {
this.formatConfig = formatConfig;
}
@Override
public DeserializationSchema<RowData> createRuntimeDecoder(
Dyn... | PbDecodingFormat |
java | spring-projects__spring-boot | module/spring-boot-micrometer-metrics-test/src/main/java/org/springframework/boot/micrometer/metrics/test/autoconfigure/AutoConfigureMetrics.java | {
"start": 1167,
"end": 1557
} | class ____ enable auto-configuration for
* metrics.
* <p>
* If this annotation is applied to a sliced test, an in-memory {@link MeterRegistry} and
* an {@link ObservationRegistry} are added to the application context.
*
* @author Moritz Halbritter
* @since 4.0.0
*/
@Target(ElementType.TYPE)
@Retention(Retention... | to |
java | ReactiveX__RxJava | src/main/java/io/reactivex/rxjava3/internal/jdk8/ParallelMapOptional.java | {
"start": 2377,
"end": 4474
} | class ____<T, R> implements ConditionalSubscriber<T>, Subscription {
final Subscriber<? super R> downstream;
final Function<? super T, Optional<? extends R>> mapper;
Subscription upstream;
boolean done;
ParallelMapSubscriber(Subscriber<? super R> actual, Function<? super T, ... | ParallelMapSubscriber |
java | apache__camel | core/camel-api/src/main/java/org/apache/camel/ExtendedCamelContext.java | {
"start": 12373,
"end": 12560
} | class ____ META-INF
*/
void setDefaultFactoryFinder(FactoryFinder factoryFinder);
/**
* Gets the bootstrap FactoryFinder which will be used for the loading the factory | from |
java | eclipse-vertx__vert.x | vertx-core/src/main/java/examples/JsonPointerExamples.java | {
"start": 588,
"end": 1374
} | class ____ {
public void example1Pointers() {
// Build a pointer from a string
JsonPointer pointer1 = JsonPointer.from("/hello/world");
// Build a pointer manually
JsonPointer pointer2 = JsonPointer.create()
.append("hello")
.append("world");
}
public void example2Pointers(JsonPointe... | JsonPointerExamples |
java | apache__camel | components/camel-infinispan/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/remote/cluster/InfinispanRemoteClusteredTestSupport.java | {
"start": 1275,
"end": 3126
} | class ____ {
private InfinispanRemoteClusteredTestSupport() {
}
public static Configuration createConfiguration(InfinispanService service) {
if (SystemUtils.IS_OS_MAC) {
Properties properties = new Properties();
properties.put("infinispan.client.hotrod.client_intelligence", ... | InfinispanRemoteClusteredTestSupport |
java | quarkusio__quarkus | integration-tests/hibernate-orm-envers/src/main/java/io/quarkus/it/envers/Message2Provider.java | {
"start": 618,
"end": 2093
} | class ____ implements MessageBodyReader<Message2>, MessageBodyWriter<Message2> {
@Override
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
return Message2.class.isAssignableFrom(type);
}
@Override
public Message2 readFrom(Class<Me... | Message2Provider |
java | apache__maven | impl/maven-cli/src/main/java/org/apache/maven/cling/transfer/SimplexTransferListener.java | {
"start": 1859,
"end": 8054
} | class ____ extends AbstractTransferListener implements AutoCloseable {
private static final Logger LOGGER = LoggerFactory.getLogger(SimplexTransferListener.class);
private static final int QUEUE_SIZE = 1024;
private static final int BATCH_MAX_SIZE = 500;
private final TransferListener delegate;
priv... | SimplexTransferListener |
java | hibernate__hibernate-orm | hibernate-core/src/main/java/org/hibernate/query/sqm/tuple/internal/AnonymousTupleNonAggregatedEntityIdentifierMapping.java | {
"start": 1033,
"end": 3593
} | class ____ extends AnonymousTupleEmbeddableValuedModelPart
implements NonAggregatedIdentifierMapping {
private final NonAggregatedIdentifierMapping delegate;
public AnonymousTupleNonAggregatedEntityIdentifierMapping(
SqmExpressible<?> sqmExpressible,
SqlTypedMapping[] sqlTypedMappings,
int selectionIndex... | AnonymousTupleNonAggregatedEntityIdentifierMapping |
java | spring-projects__spring-framework | spring-core/src/main/java/org/springframework/cglib/core/GeneratorStrategy.java | {
"start": 1225,
"end": 1827
} | class ____ on which you can call {@link ClassGenerator#generateClass}
* @return a byte array containing the bits of a valid Class
*/
byte[] generate(ClassGenerator cg) throws Exception;
/**
* The <code>GeneratorStrategy</code> in use does not currently, but may
* in the future, affect the c... | generator |
java | elastic__elasticsearch | server/src/main/java/org/elasticsearch/node/PluginComponentBinding.java | {
"start": 1881,
"end": 2187
} | class ____ extends TransportMasterNodeAction<MyRequest, MyResponse> {
@Inject
public TransportMyAction(MyInterface myInterface) {
this.myInterface = myInterface; //implementation may vary depending on extensions defined for
}
...
}
}</pre>
*<p>
* Note - usage of the | TransportMyAction |
java | apache__camel | components/camel-twilio/src/generated/java/org/apache/camel/component/twilio/internal/AvailablePhoneNumberCountryLocalApiMethod.java | {
"start": 702,
"end": 1911
} | enum ____ implements ApiMethod {
READER(
com.twilio.rest.api.v2010.account.availablephonenumbercountry.LocalReader.class,
"reader",
arg("pathCountryCode", String.class)),
READER_1(
com.twilio.rest.api.v2010.account.availablephonenumbercountry.LocalReader.class,
"reader"... | AvailablePhoneNumberCountryLocalApiMethod |
java | quarkusio__quarkus | extensions/hibernate-validator/deployment/src/test/java/io/quarkus/hibernate/validator/test/valueextractor/SingletonCustomValueExtractorTest.java | {
"start": 1161,
"end": 1493
} | class ____ {
public Container<@NotBlank String> constrainedContainer;
public TestBean() {
Container<String> invalidContainer = new Container<>();
invalidContainer.value = " ";
this.constrainedContainer = invalidContainer;
}
}
@Singleton
public... | TestBean |
java | micronaut-projects__micronaut-core | inject-java/src/test/groovy/io/micronaut/inject/provider/BeanOne.java | {
"start": 90,
"end": 130
} | class ____ implements BeanNumber {
}
| BeanOne |
java | resilience4j__resilience4j | resilience4j-circuitbreaker/src/main/java/io/github/resilience4j/circuitbreaker/internal/CircuitBreakerStateMachine.java | {
"start": 2180,
"end": 17680
} | class ____ implements CircuitBreaker {
private static final Logger LOG = LoggerFactory.getLogger(CircuitBreakerStateMachine.class);
private final String name;
private final AtomicReference<CircuitBreakerState> stateReference;
private final CircuitBreakerConfig circuitBreakerConfig;
private final M... | CircuitBreakerStateMachine |
java | apache__kafka | clients/src/main/java/org/apache/kafka/common/utils/ImplicitLinkedHashCollection.java | {
"start": 7858,
"end": 8313
} | class ____ extends AbstractSequentialList<E> {
@Override
public ListIterator<E> listIterator(int index) {
if (index < 0 || index > size) {
throw new IndexOutOfBoundsException();
}
return ImplicitLinkedHashCollection.this.listIterator(index);
... | ImplicitLinkedHashCollectionListView |
java | alibaba__fastjson | src/test/java/com/alibaba/json/bvt/issue_2100/Issue2179.java | {
"start": 5892,
"end": 6458
} | class ____ implements ObjectDeserializer {
@SuppressWarnings("unchecked")
public <T> T deserialze(DefaultJSONParser parser, Type type, Object fieldName) {
String val = StringCodec.instance.deserialze(parser, type, fieldName);
System.out.println("-----------------EnumAwareSerializer1.deserialze----------------... | EnumAwareSerializer1 |
java | apache__dubbo | dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/AbstractConfiguratorListener.java | {
"start": 2167,
"end": 5431
} | class ____ implements ConfigurationListener {
private static final ErrorTypeAwareLogger logger =
LoggerFactory.getErrorTypeAwareLogger(AbstractConfiguratorListener.class);
protected List<Configurator> configurators = Collections.emptyList();
protected GovernanceRuleRepository ruleRepository;
... | AbstractConfiguratorListener |
java | apache__camel | dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/StompEndpointBuilderFactory.java | {
"start": 6220,
"end": 13259
} | interface ____
extends
EndpointConsumerBuilder {
default StompEndpointConsumerBuilder basic() {
return (StompEndpointConsumerBuilder) this;
}
/**
* Allows for bridging the consumer to the Camel routing Error Handler,
* which mean any exce... | AdvancedStompEndpointConsumerBuilder |
java | apache__camel | components/camel-aws/camel-aws2-kinesis/src/test/java/org/apache/camel/component/aws2/kinesis/integration/KinesisConsumerResumeIT.java | {
"start": 3340,
"end": 3679
} | class ____ {
private String partition;
private String body;
@Override
public String toString() {
return "KinesisData{" +
"partition='" + partition + '\'' +
", body='" + body + '\'' +
'}';
}
}
private s... | KinesisData |
java | spring-projects__spring-framework | spring-context/src/test/java/org/springframework/context/groovy/GroovyBeanDefinitionReaderTests.java | {
"start": 26529,
"end": 26588
} | class ____ {
void start() {
/* no-op */
}
}
| HolyGrailQuest |
java | apache__flink | flink-core/src/main/java/org/apache/flink/core/fs/EntropyInjector.java | {
"start": 1231,
"end": 1373
} | class ____ utilities for entropy injection for FileSystems that implement {@link
* EntropyInjectingFileSystem}.
*/
@PublicEvolving
public | offers |
java | assertj__assertj-core | assertj-tests/assertj-integration-tests/assertj-core-tests/src/test/java/org/assertj/tests/core/api/future/FutureAssert_failsWithin_Test.java | {
"start": 1264,
"end": 4962
} | class ____ extends AbstractFutureTest {
private static final Duration ONE_SECOND = Duration.ofSeconds(1);
@Test
void should_pass_when_future_does_not_complete_within_timeout_Duration() {
// GIVEN
Future<String> future = futureCompletingAfter(ONE_SECOND, executorService);
// WHEN/THEN
assertThat(... | FutureAssert_failsWithin_Test |
java | apache__kafka | streams/src/test/java/org/apache/kafka/streams/state/internals/OffsetCheckpointTest.java | {
"start": 1856,
"end": 7292
} | class ____ {
private final String topic = "topic";
@Test
public void testReadWrite() throws IOException {
final File f = TestUtils.tempFile();
final OffsetCheckpoint checkpoint = new OffsetCheckpoint(f);
try {
final Map<TopicPartition, Long> offsets = new HashMap<>();
... | OffsetCheckpointTest |
java | spring-projects__spring-framework | spring-context/src/test/java/org/springframework/resilience/ReactiveRetryInterceptorTests.java | {
"start": 17054,
"end": 17305
} | class ____ {
AtomicInteger counter = new AtomicInteger();
public Mono<Object> retryOperation() {
return Mono.fromCallable(() -> {
counter.incrementAndGet();
throw new NumberFormatException("always fails");
});
}
}
}
| AlwaysFailsBean |
java | micronaut-projects__micronaut-core | inject-java/src/test/groovy/io/micronaut/inject/field/nullableinjection/C.java | {
"start": 694,
"end": 786
} | class ____ {
@Inject protected A a;
public A getA() {
return this.a;
}
}
| C |
java | apache__hadoop | hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azure/InMemoryBlockBlobStore.java | {
"start": 5563,
"end": 6005
} | class ____ {
private byte[] content;
private HashMap<String, String> metadata;
private boolean isPageBlob;
@SuppressWarnings("unused") // TODO: use it
private long length;
public Entry(byte[] content, HashMap<String, String> metadata,
boolean isPageBlob, long length) {
this.conten... | Entry |
java | apache__camel | core/camel-core/src/test/java/org/apache/camel/processor/TransformXpathTest.java | {
"start": 1179,
"end": 2370
} | class ____ extends ContextTestSupport {
@Test
public void testTransformWithXpath() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedMessageCount(1);
mock.message(0).body().isInstanceOf(NodeList.class);
String xml = context.getTypeConverter().c... | TransformXpathTest |
java | apache__dubbo | dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/transport/TripleGoAwayHandler.java | {
"start": 1263,
"end": 2166
} | class ____ extends ChannelDuplexHandler {
private static final Logger logger = LoggerFactory.getLogger(TripleGoAwayHandler.class);
public TripleGoAwayHandler() {}
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
if (msg instanceof Http2GoAwayFrame) {... | TripleGoAwayHandler |
java | spring-projects__spring-framework | spring-core/src/main/java/org/springframework/core/convert/support/DefaultConversionService.java | {
"start": 1483,
"end": 8108
} | class ____ extends GenericConversionService {
private static volatile @Nullable DefaultConversionService sharedInstance;
/**
* Create a new {@code DefaultConversionService} with the set of
* {@linkplain DefaultConversionService#addDefaultConverters(ConverterRegistry) default converters}.
*/
public DefaultCo... | DefaultConversionService |
java | alibaba__druid | core/src/test/java/com/alibaba/druid/bvt/sql/mysql/create/MySqlCreateProcedureTest11.java | {
"start": 924,
"end": 3087
} | class ____ extends MysqlTest {
public void test_0() throws Exception {
String sql = "CREATE PROCEDURE curdemo()\n" +
"BEGIN\n" +
" DECLARE done INT DEFAULT FALSE;\n" +
" DECLARE a CHAR(16);\n" +
" DECLARE b, c INT;\n" +
" DE... | MySqlCreateProcedureTest11 |
java | elastic__elasticsearch | modules/lang-painless/src/main/java/org/elasticsearch/painless/antlr/PainlessParser.java | {
"start": 23630,
"end": 24754
} | class ____ extends RstatementContext {
public TerminalNode WHILE() {
return getToken(PainlessParser.WHILE, 0);
}
public TerminalNode LP() {
return getToken(PainlessParser.LP, 0);
}
public ExpressionContext expression() {
return getRuleContext... | WhileContext |
java | quarkusio__quarkus | extensions/websockets-next/deployment/src/test/java/io/quarkus/websockets/next/test/codec/TextInputCodecTest.java | {
"start": 628,
"end": 2466
} | class ____ {
@RegisterExtension
public static final QuarkusUnitTest test = new QuarkusUnitTest()
.withApplicationRoot(root -> {
root.addClasses(FindInputCodec.class, FindInputCodec.MyInputCodec.class, AbstractFind.class, Item.class);
});
@TestHTTPResource("find-inpu... | TextInputCodecTest |
java | quarkusio__quarkus | core/runtime/src/main/java/io/quarkus/runtime/logging/LogRuntimeConfig.java | {
"start": 6893,
"end": 8583
} | interface ____ {
/**
* Whether log rotation is enabled.
*/
@WithDefault("true")
boolean enabled();
/**
* The maximum log file size, after which a rotation is executed, up to {@code Long.MAX_VALUE} bytes.
* Note that th... | RotationConfig |
java | assertj__assertj-core | assertj-core/src/test/java/org/assertj/core/api/booleanarray/BooleanArrayAssert_hasSizeLessThanOrEqualTo_Test.java | {
"start": 809,
"end": 1184
} | class ____ extends BooleanArrayAssertBaseTest {
@Override
protected BooleanArrayAssert invoke_api_method() {
return assertions.hasSizeLessThanOrEqualTo(6);
}
@Override
protected void verify_internal_effects() {
verify(arrays).assertHasSizeLessThanOrEqualTo(getInfo(assertions), getActual(assertions),... | BooleanArrayAssert_hasSizeLessThanOrEqualTo_Test |
java | elastic__elasticsearch | server/src/internalClusterTest/java/org/elasticsearch/action/support/WaitActiveShardCountIT.java | {
"start": 1423,
"end": 5165
} | class ____ extends ESIntegTestCase {
public void testReplicationWaitsForActiveShardCount() throws Exception {
CreateIndexResponse createIndexResponse = prepareCreate("test", 1, indexSettings(1, 2)).get();
assertAcked(createIndexResponse);
// indexing, by default, will work (waiting for one... | WaitActiveShardCountIT |
java | assertj__assertj-core | assertj-core/src/main/java/org/assertj/core/util/xml/XmlStringPrettyFormatter.java | {
"start": 1336,
"end": 3213
} | class ____ {
private static final String FORMAT_ERROR = "Unable to format XML string";
public static String xmlPrettyFormat(String xmlStringToFormat) {
checkArgument(xmlStringToFormat != null, "Expecting XML String not to be null");
// convert String to an XML Document and then back to String but prettily... | XmlStringPrettyFormatter |
java | elastic__elasticsearch | x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/voyageai/request/VoyageAIEmbeddingsRequest.java | {
"start": 965,
"end": 2692
} | class ____ extends VoyageAIRequest {
private final List<String> input;
private final InputType inputType;
private final VoyageAIEmbeddingsModel embeddingsModel;
public VoyageAIEmbeddingsRequest(List<String> input, InputType inputType, VoyageAIEmbeddingsModel embeddingsModel) {
this.embeddingsM... | VoyageAIEmbeddingsRequest |
java | apache__logging-log4j2 | log4j-api/src/main/java/org/apache/logging/log4j/internal/DefaultLogBuilder.java | {
"start": 1548,
"end": 13715
} | class ____ implements BridgeAware, LogBuilder {
private static Message EMPTY_MESSAGE = new SimpleMessage("");
private static final String FQCN = DefaultLogBuilder.class.getName();
private static final Logger LOGGER = StatusLogger.getLogger();
private ExtendedLogger logger;
private Level level;
... | DefaultLogBuilder |
java | quarkusio__quarkus | extensions/devui/runtime/src/main/java/io/quarkus/devui/runtime/js/Result.java | {
"start": 124,
"end": 536
} | class ____ {
public final String messageType;
public final Object object;
public Result(String messageType, Object object) {
this.messageType = messageType;
this.object = object;
}
@Override
public String toString() {
return "Result{" +
"messageType='" +... | Result |
java | elastic__elasticsearch | modules/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/MaxMindSupportTests.java | {
"start": 22355,
"end": 27271
} | class ____ methods we want to traverse to generate field names
* @return A sorted set of bean-property-like field names that can recursively be found from aClass
*/
private static SortedSet<String> getFieldNamesUsedFromClass(String context, Class<?> aClass) {
SortedSet<String> fieldNames = new Tre... | whose |
java | spring-projects__spring-framework | spring-web/src/main/java/org/springframework/http/converter/xml/Jaxb2CollectionHttpMessageConverter.java | {
"start": 2478,
"end": 9164
} | class ____<T extends Collection>
extends AbstractJaxb2HttpMessageConverter<T> implements GenericHttpMessageConverter<T> {
private final XMLInputFactory inputFactory = createXmlInputFactory();
/**
* Always returns {@code false} since Jaxb2CollectionHttpMessageConverter
* required generic type information in o... | Jaxb2CollectionHttpMessageConverter |
java | alibaba__druid | core/src/test/java/com/alibaba/druid/stat/TestBeidou.java | {
"start": 785,
"end": 1347
} | class ____ extends TestCase {
public void test_0() throws Exception {
String url = "jdbc:mysql://172.22.32.5/beidou?useUnicode=true&characterEncoding=UTF-8";
Class.forName("com.mysql.jdbc.Driver");
Connection conn = DriverManager.getConnection(url, "beidou", "mzbSXikh48dTrVX8kuLYtuok1");
... | TestBeidou |
java | elastic__elasticsearch | server/src/test/java/org/elasticsearch/cluster/routing/RoutingTableTests.java | {
"start": 2266,
"end": 27598
} | class ____ extends ESAllocationTestCase {
private static final String TEST_INDEX_1 = "test1";
private static final String TEST_INDEX_2 = "test2";
private RoutingTable emptyRoutingTable;
private int numberOfShards;
private int numberOfReplicas;
private int shardsPerIndex;
private int totalNu... | RoutingTableTests |
java | spring-projects__spring-framework | spring-tx/src/main/java/org/springframework/dao/CleanupFailureDataAccessException.java | {
"start": 1309,
"end": 1677
} | class ____ extends NonTransientDataAccessException {
/**
* Constructor for CleanupFailureDataAccessException.
* @param msg the detail message
* @param cause the root cause from the underlying data access API,
* such as JDBC
*/
public CleanupFailureDataAccessException(String msg, Throwable cause) {
super(... | CleanupFailureDataAccessException |
java | FasterXML__jackson-databind | src/test/java/tools/jackson/databind/jsontype/ext/TestSubtypesExternalPropertyMissingProperty.java | {
"start": 695,
"end": 1035
} | class ____ {
public String type;
@JsonTypeInfo(use = Id.NAME, include = As.EXTERNAL_PROPERTY, property = "type")
public Fruit fruit;
public Box() {
}
protected Box(String type, Fruit fruit) {
this.type = type;
this.fruit = fruit;
}
}
... | Box |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.