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 | quarkusio__quarkus | integration-tests/opentelemetry-reactive/src/test/java/io/quarkus/it/opentelemetry/reactive/OpenTelemetryReactiveTest.java | {
"start": 1733,
"end": 18472
} | class ____ {
@BeforeEach
@AfterEach
void reset() {
await().atMost(Duration.ofSeconds(30L)).until(() -> {
// make sure spans are cleared
List<Map<String, Object>> spans = getSpans();
if (!spans.isEmpty()) {
given().get("/reset").then().statusCode(H... | OpenTelemetryReactiveTest |
java | elastic__elasticsearch | x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/mistral/embeddings/MistralEmbeddingsModel.java | {
"start": 1345,
"end": 3427
} | class ____ extends MistralModel {
public MistralEmbeddingsModel(
String inferenceEntityId,
TaskType taskType,
String service,
Map<String, Object> serviceSettings,
ChunkingSettings chunkingSettings,
@Nullable Map<String, Object> secrets,
ConfigurationParseCont... | MistralEmbeddingsModel |
java | elastic__elasticsearch | server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWithRandomIOExceptionsIT.java | {
"start": 1755,
"end": 10284
} | class ____ extends ESIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return Arrays.asList(MockFSIndexStore.TestPlugin.class);
}
public void testRandomDirectoryIOExceptions() throws IOException, InterruptedException, ExecutionException {
String ma... | SearchWithRandomIOExceptionsIT |
java | micronaut-projects__micronaut-core | json-core/src/main/java/io/micronaut/json/bind/JsonBeanPropertyBinderExceptionHandler.java | {
"start": 888,
"end": 1050
} | interface ____ converts json binding exceptions to more specific {@link ConversionErrorException}s.
*
* @author Jonas Konrad
* @since 3.1
*/
@Internal
public | that |
java | alibaba__fastjson | src/test/java/com/derbysoft/spitfire/fastjson/dto/HotelRefDTO.java | {
"start": 53,
"end": 1142
} | class ____ extends AbstractDTO{
private String code;
private String name;
private String chainCode;
private String brandCode;
private TPAExtensionsDTO tpaExtensions;
public HotelRefDTO() {
}
public HotelRefDTO(String code) {
this.code = code;
}
public String getCo... | HotelRefDTO |
java | spring-projects__spring-framework | spring-messaging/src/main/java/org/springframework/messaging/simp/user/UserDestinationMessageHandler.java | {
"start": 2357,
"end": 8146
} | class ____ implements MessageHandler, SmartLifecycle {
private static final Log logger = SimpLogging.forLogName(UserDestinationMessageHandler.class);
private final SubscribableChannel clientInboundChannel;
private final SubscribableChannel brokerChannel;
private final UserDestinationResolver destinationResolve... | UserDestinationMessageHandler |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/pagination/Entry.java | {
"start": 193,
"end": 1232
} | class ____ {
private int id;
private String name;
private Set<Tag> tags = new HashSet<Tag>();
public Entry() {
}
public Entry(String name) {
this.name = name;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void... | Entry |
java | apache__hadoop | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/QueuePlacementPolicy.java | {
"start": 2454,
"end": 2599
} | class ____ {
private static final Logger LOG =
LoggerFactory.getLogger(QueuePlacementPolicy.class);
// Simple private | QueuePlacementPolicy |
java | apache__flink | flink-table/flink-table-common/src/main/java/org/apache/flink/table/data/columnar/vector/heap/HeapBooleanVector.java | {
"start": 1102,
"end": 1976
} | class ____ extends AbstractHeapVector implements WritableBooleanVector {
private static final long serialVersionUID = 4131239076731313596L;
public boolean[] vector;
public HeapBooleanVector(int len) {
super(len);
vector = new boolean[len];
}
@Override
public HeapIntVector res... | HeapBooleanVector |
java | apache__logging-log4j2 | log4j-1.2-api/src/main/java/org/apache/log4j/Layout.java | {
"start": 1919,
"end": 3001
} | class ____
* <code>null</code>.
* @return The footer.
*/
public String getFooter() {
return null;
}
/**
* If the layout handles the throwable object contained within
* {@link LoggingEvent}, then the layout should return
* {@code false}. Otherwise, if the layout ignores... | returns |
java | elastic__elasticsearch | server/src/main/java/org/elasticsearch/plugins/SearchPlugin.java | {
"start": 25698,
"end": 26773
} | class ____<T extends RescorerBuilder<T>> extends SearchExtensionSpec<T, CheckedFunction<XContentParser, T, IOException>> {
public RescorerSpec(ParseField name, Writeable.Reader<? extends T> reader, CheckedFunction<XContentParser, T, IOException> parser) {
super(name, reader, parser);
}
... | RescorerSpec |
java | google__error-prone | check_api/src/test/java/com/google/errorprone/util/ASTHelpersTest.java | {
"start": 21148,
"end": 22215
} | class ____ extends RuntimeException {}
void foo() throws RuntimeException, IllegalArgumentException, MyException,
Error, VerifyError {}
}
""");
TestScanner scanner = isCheckedExceptionTypeScanner(false);
tests.add(scanner);
assertCompiles(scanner);
}
/* Tests for... | MyException |
java | apache__hadoop | hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ReencryptionUpdater.java | {
"start": 3416,
"end": 4557
} | class ____ {
private boolean submissionDone;
private LinkedList<Future> tasks;
private int numCheckpointed;
private int numFutureDone;
ZoneSubmissionTracker() {
submissionDone = false;
tasks = new LinkedList<>();
numCheckpointed = 0;
numFutureDone = 0;
}
void reset(... | ZoneSubmissionTracker |
java | spring-projects__spring-security | core/src/main/java/org/springframework/security/core/session/SessionInformation.java | {
"start": 1496,
"end": 2520
} | class ____ implements Serializable {
private static final long serialVersionUID = 620L;
private Date lastRequest;
private final Object principal;
private final String sessionId;
private boolean expired = false;
public SessionInformation(Object principal, String sessionId, Date lastRequest) {
Assert.notNul... | SessionInformation |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/filter/FilterWitSubSelectFetchModeTest.java | {
"start": 1696,
"end": 4014
} | class ____ {
@BeforeEach
void setUp(SessionFactoryScope scope) {
scope.inTransaction( session -> {
final Customer firstCustomer = new Customer( 1L, "First" );
final Customer secondCustomer = new Customer( 2L, "Second" );
final Customer thirdCustomer = new Customer( 3L, "Third" );
final Customer fourthC... | FilterWitSubSelectFetchModeTest |
java | google__dagger | javatests/dagger/hilt/android/processor/internal/customtestapplication/CustomTestApplicationProcessorTest.java | {
"start": 10911,
"end": 11670
} | class ____ {}"))
.compile(
subject -> {
subject.hasErrorContaining(
"@CustomTestApplication does not support application classes (or super classes)"
+ " with @Inject constructors. Found test.BaseApplication with @Inject"
+ "... | HiltTest |
java | elastic__elasticsearch | x-pack/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/GraphInfoTransportAction.java | {
"start": 803,
"end": 1674
} | class ____ extends XPackInfoFeatureTransportAction {
private final boolean enabled;
private final XPackLicenseState licenseState;
@Inject
public GraphInfoTransportAction(
TransportService transportService,
ActionFilters actionFilters,
Settings settings,
XPackLicenseStat... | GraphInfoTransportAction |
java | apache__hadoop | hadoop-cloud-storage-project/hadoop-tos/src/main/java/org/apache/hadoop/fs/tosfs/common/Chain.java | {
"start": 3549,
"end": 4440
} | class ____<T extends Closeable> {
private final Deque<ItemFactory<T>> factories = Queues.newArrayDeque();
private Predicate<IOException> shouldContinue;
public Builder<T> addFirst(ItemFactory<T> factory) {
factories.addFirst(factory);
return this;
}
public Builder<T> addLast(ItemFactor... | Builder |
java | alibaba__fastjson | src/test/java/com/alibaba/json/bvt/issue_2300/Issue2343.java | {
"start": 713,
"end": 898
} | class ____ {
@JSONField(ordinal = 1)
public int f1;
@JSONField(ordinal = 0)
public int f2;
@JSONField(ordinal = 2)
public int f3;
}
}
| A |
java | google__error-prone | check_api/src/test/java/com/google/errorprone/util/ASTHelpersTest.java | {
"start": 14621,
"end": 15485
} | class ____ extends B {}");
TestScanner scanner =
new TestScanner() {
@Override
public Void visitMethod(MethodTree tree, VisitorState state) {
if (tree.getName().contentEquals("f")) {
assertMatch(
tree,
state,
... | C |
java | alibaba__druid | core/src/test/java/com/alibaba/druid/bvt/pool/DruidDataSourceTest_interrupt3.java | {
"start": 248,
"end": 1774
} | class ____ extends TestCase {
private DruidDataSource dataSource;
protected void setUp() throws Exception {
dataSource = new DruidDataSource();
dataSource.setUrl("jdbc:mock:xxx");
dataSource.setTestOnBorrow(false);
dataSource.setDefaultAutoCommit(true);
dataSource.setMa... | DruidDataSourceTest_interrupt3 |
java | apache__logging-log4j2 | log4j-core/src/main/java/org/apache/logging/log4j/core/appender/HttpManager.java | {
"start": 1098,
"end": 1672
} | class ____ extends AbstractManager {
private final Configuration configuration;
protected HttpManager(final Configuration configuration, final LoggerContext loggerContext, final String name) {
super(loggerContext, name);
this.configuration = Objects.requireNonNull(configuration);
}
pub... | HttpManager |
java | apache__kafka | clients/src/main/java/org/apache/kafka/common/requests/VoteResponse.java | {
"start": 1447,
"end": 2606
} | class ____ extends AbstractResponse {
private final VoteResponseData data;
public VoteResponse(VoteResponseData data) {
super(ApiKeys.VOTE);
this.data = data;
}
@Override
public Map<Errors, Integer> errorCounts() {
Map<Errors, Integer> errors = new EnumMap<>(Errors.class);
... | VoteResponse |
java | apache__camel | components/camel-google/camel-google-pubsub-lite/src/main/java/org/apache/camel/component/google/pubsublite/serializer/GooglePubsubSerializer.java | {
"start": 1027,
"end": 1391
} | interface ____ {
/**
* Serializes an object payload to a byte array.
*
* @param payload The payload to serialize
* @return The serialized payload as a byte array
* @throws IOException If the serialization process encountered errors
*/
byte[] serialize(Object paylo... | GooglePubsubSerializer |
java | quarkusio__quarkus | core/deployment/src/main/java/io/quarkus/deployment/builditem/LogHandlerBuildItem.java | {
"start": 314,
"end": 930
} | class ____ extends MultiBuildItem {
private final RuntimeValue<Optional<Handler>> handlerValue;
/**
* Construct a new instance.
*
* @param handlerValue the handler value to add to the run time configuration
*/
public LogHandlerBuildItem(final RuntimeValue<Optional<Handler>> handlerValue... | LogHandlerBuildItem |
java | redisson__redisson | redisson/src/test/java/org/redisson/codec/protobuf/nativeData/Proto2AllTypes.java | {
"start": 30424,
"end": 67579
} | class ____ extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:AllTypes2)
Proto2AllTypes.AllTypes2OrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return Proto2... | Builder |
java | apache__kafka | streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java | {
"start": 1856,
"end": 29333
} | class ____ {
final String namespace = "0.0-namespace";
final String namespace1 = "0.1-namespace";
final String namespace2 = "0.2-namespace";
private final LogContext logContext = new LogContext("testCache ");
private final byte[][] bytes = new byte[][]{{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9... | ThreadCacheTest |
java | lettuce-io__lettuce-core | src/main/java/io/lettuce/core/output/KeyValueScanStreamingOutput.java | {
"start": 338,
"end": 1114
} | class ____<K, V> extends ScanOutput<K, V, StreamScanCursor> {
private K key;
private boolean hasKey;
private KeyValueStreamingChannel<K, V> channel;
public KeyValueScanStreamingOutput(RedisCodec<K, V> codec, KeyValueStreamingChannel<K, V> channel) {
super(codec, new StreamScanCursor());
... | KeyValueScanStreamingOutput |
java | elastic__elasticsearch | modules/repository-gcs/src/internalClusterTest/java/org/elasticsearch/repositories/gcs/GcsProxyIntegrationTests.java | {
"start": 2162,
"end": 4880
} | class ____ extends ESBlobStoreRepositoryIntegTestCase {
private static HttpServer upstreamServer;
private static WebProxyServer proxyServer;
@BeforeClass
public static void startServers() throws Exception {
upstreamServer = MockHttpServer.createHttp(new InetSocketAddress(InetAddress.getLoopbac... | GcsProxyIntegrationTests |
java | apache__hadoop | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TaskImpl.java | {
"start": 35583,
"end": 36853
} | class ____
implements SingleArcTransition<TaskImpl, TaskEvent> {
@Override
public void transition(TaskImpl task, TaskEvent event) {
TaskTAttemptEvent taskTAttemptEvent = (TaskTAttemptEvent) event;
TaskAttemptId taskAttemptId = taskTAttemptEvent.getTaskAttemptID();
task.handleTaskAttempt... | AttemptSucceededTransition |
java | apache__kafka | clients/src/main/java/org/apache/kafka/clients/admin/ListTransactionsOptions.java | {
"start": 1039,
"end": 5788
} | class ____ extends AbstractOptions<ListTransactionsOptions> {
private Set<TransactionState> filteredStates = Collections.emptySet();
private Set<Long> filteredProducerIds = Collections.emptySet();
private long filteredDuration = -1L;
private String filteredTransactionalIdPattern;
/**
* Filter ... | ListTransactionsOptions |
java | apache__camel | components/camel-infinispan/camel-infinispan-embedded/src/test/java/org/apache/camel/component/infinispan/embedded/spring/SpringInfinispanEmbeddedIdempotentRepositoryCamelTest.java | {
"start": 1096,
"end": 1496
} | class ____
extends SpringInfinispanEmbeddedIdempotentRepositoryTestSupport {
@Override
protected AbstractApplicationContext createApplicationContext() {
return new ClassPathXmlApplicationContext(
"org/apache/camel/component/infinispan/spring/SpringInfinispanEmbeddedIdempotentRepo... | SpringInfinispanEmbeddedIdempotentRepositoryCamelTest |
java | ReactiveX__RxJava | src/test/java/io/reactivex/rxjava3/observable/ObservableCombineLatestTests.java | {
"start": 823,
"end": 2490
} | class ____ extends RxJavaTest {
/**
* This won't compile if super/extends isn't done correctly on generics.
*/
@Test
public void covarianceOfCombineLatest() {
Observable<HorrorMovie> horrors = Observable.just(new HorrorMovie());
Observable<CoolRating> ratings = Observable.just(new ... | ObservableCombineLatestTests |
java | quarkusio__quarkus | extensions/amazon-lambda-http/runtime/src/main/java/io/quarkus/amazon/lambda/http/DefaultLambdaIdentityProvider.java | {
"start": 603,
"end": 4420
} | class ____ implements IdentityProvider<DefaultLambdaAuthenticationRequest> {
@Override
public Class<DefaultLambdaAuthenticationRequest> getRequestType() {
return DefaultLambdaAuthenticationRequest.class;
}
@Override
public Uni<SecurityIdentity> authenticate(DefaultLambdaAuthenticationReque... | DefaultLambdaIdentityProvider |
java | apache__camel | dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/config/ConfigGet.java | {
"start": 1269,
"end": 2065
} | class ____ extends CamelCommand {
@CommandLine.Parameters(description = "Configuration key", arity = "1")
String key;
@CommandLine.Option(names = { "--global" }, description = "Use global or local configuration")
boolean global = true;
public ConfigGet(CamelJBangMain main) {
super(main);
... | ConfigGet |
java | spring-projects__spring-security | config/src/main/java/org/springframework/security/config/http/SessionCreationPolicy.java | {
"start": 913,
"end": 1396
} | enum ____ {
/**
* Always create an {@link HttpSession}
*/
ALWAYS,
/**
* Spring Security will never create an {@link HttpSession}, but will use the
* {@link HttpSession} if it already exists
*/
NEVER,
/**
* Spring Security will only create an {@link HttpSession} if required
*/
IF_REQUIRED,
/**
... | SessionCreationPolicy |
java | apache__spark | common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java | {
"start": 77695,
"end": 78538
} | class ____ {
public final String appId;
public final int attemptId;
@JsonCreator
public AppAttemptId(
@JsonProperty("appId") String appId,
@JsonProperty("attemptId") int attemptId) {
this.appId = appId;
this.attemptId = attemptId;
}
@Override
public boolean equa... | AppAttemptId |
java | assertj__assertj-core | assertj-core/src/test/java/org/assertj/core/internal/bytes/Bytes_assertIsStrictlyBetween_Test.java | {
"start": 1554,
"end": 3865
} | class ____ extends BytesBaseTest {
private static final Byte ZERO = (byte) 0;
private static final Byte ONE = (byte) 1;
private static final Byte TWO = (byte) 2;
private static final Byte TEN = (byte) 10;
@Test
void should_fail_if_actual_is_null() {
assertThatExceptionOfType(AssertionError.class).isTh... | Bytes_assertIsStrictlyBetween_Test |
java | quarkusio__quarkus | integration-tests/test-extension/extension/deployment/src/test/java/io/quarkus/config/SecretKeysConfigTest.java | {
"start": 1390,
"end": 1449
} | interface ____ {
String secret();
}
}
| MappingSecret |
java | elastic__elasticsearch | x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/OpenJobAction.java | {
"start": 1491,
"end": 1779
} | class ____ extends ActionType<NodeAcknowledgedResponse> {
public static final OpenJobAction INSTANCE = new OpenJobAction();
public static final String NAME = "cluster:admin/xpack/ml/job/open";
private OpenJobAction() {
super(NAME);
}
public static | OpenJobAction |
java | apache__flink | flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarksWithIdlenessTest.java | {
"start": 1340,
"end": 4358
} | class ____ {
@Test
void testZeroTimeout() {
assertThatThrownBy(
() ->
new WatermarksWithIdleness<>(
new AscendingTimestampsWatermarks<>(),
Duration.ZERO,
... | WatermarksWithIdlenessTest |
java | apache__camel | dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ScpEndpointBuilderFactory.java | {
"start": 1578,
"end": 16156
} | interface ____
extends
EndpointProducerBuilder {
default AdvancedScpEndpointBuilder advanced() {
return (AdvancedScpEndpointBuilder) this;
}
/**
* If provided, then Camel will write a checksum file when the original
* file has been writt... | ScpEndpointBuilder |
java | quarkusio__quarkus | extensions/spring-data-rest/deployment/src/test/java/io/quarkus/spring/data/rest/JpaResourceTest.java | {
"start": 959,
"end": 19621
} | class ____ {
@RegisterExtension
static final QuarkusUnitTest TEST = new QuarkusUnitTest()
.withApplicationRoot((jar) -> jar
.addClasses(AbstractEntity.class, Record.class, JpaRecordsRepository.class)
.addAsResource("application.properties")
... | JpaResourceTest |
java | apache__hadoop | hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureCoderBenchmark.java | {
"start": 1971,
"end": 2598
} | class ____ {
private RawErasureCoderBenchmark() {
// prevent instantiation
}
// target size of input data buffer
private static final int TARGET_BUFFER_SIZE_MB = 126;
private static final int MAX_CHUNK_SIZE =
TARGET_BUFFER_SIZE_MB / BenchData.NUM_DATA_UNITS * 1024;
private static final List<Ra... | RawErasureCoderBenchmark |
java | apache__hadoop | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/FlagSet.java | {
"start": 7747,
"end": 8332
} | enum ____
* @return a mutable FlagSet
*/
@SafeVarargs
public static <E extends Enum<E>> FlagSet<E> createFlagSet(
final Class<E> enumClass,
final String prefix,
final E... enabled) {
final FlagSet<E> flagSet = new FlagSet<>(enumClass, prefix, null);
Arrays.stream(enabled).forEach(fla... | type |
java | micronaut-projects__micronaut-core | inject-java/src/test/groovy/io/micronaut/inject/qualifiers/multiple/MultipleCompositeQualifierSpec.java | {
"start": 1344,
"end": 2698
} | class ____ {
@Inject
@XPayBy(XPaymentMethod.CREDIT_CARD)
MoneyProcessor creditCartProcessor1;
@Inject
@RequiresSignature
MoneyProcessor creditCartProcessor2;
@Inject
@RequiresSignature
@Credit
MoneyProcessor creditCartProcessor3;
@Inject
@XPayBy(XPaymentMethod.TRANSFE... | XMyBean |
java | quarkusio__quarkus | extensions/resteasy-reactive/rest-client/deployment/src/test/java/io/quarkus/rest/client/reactive/subresource/SubResourceTest.java | {
"start": 7473,
"end": 10050
} | class ____$RootClient$$QuarkusRestClientInterface implements Closeable, RootClient {
final WebTarget target1_1;
final WebTarget target1_2;
final WebTarget target1_3;
public SubResourceTest$RootClient$$QuarkusRestClientInterface(WebTarget var1) {
WebTarget var3 = var1.path("/path/{rootParam}");
... | SubResourceTest |
java | elastic__elasticsearch | x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/ComputeSearchContextByShardId.java | {
"start": 3156,
"end": 4066
} | class ____<T> implements IndexedByShardId<T> {
private final T[] array;
private final int from;
private final int to;
SubRanged(T[] array, int from, int to) {
this.array = array;
this.from = from;
this.to = to;
}
@Override
pub... | SubRanged |
java | apache__camel | components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyInvalidJSonClientResponseValidationTest.java | {
"start": 1440,
"end": 3142
} | class ____ extends BaseJettyTest {
@Test
public void testJettyInvalidJSon() {
FluentProducerTemplate requestTemplate = fluentTemplate.withHeader(Exchange.CONTENT_TYPE, "application/json")
.withHeader(Exchange.HTTP_METHOD, "post")
.withBody("{\"name\": \"Donald\"}") // th... | RestJettyInvalidJSonClientResponseValidationTest |
java | alibaba__fastjson | src/test/java/com/alibaba/json/bvt/issue_1100/Issue1177_3.java | {
"start": 329,
"end": 857
} | class ____ extends TestCase {
public void test_for_issue() throws Exception {
String text = "[{\"x\":\"y\"},{\"x\":\"y\"}]";
List<Model> jsonObject = JSONObject.parseObject(text, new TypeReference<List<Model>>(){});
System.out.println(JSON.toJSONString(jsonObject));
String jsonpath =... | Issue1177_3 |
java | google__error-prone | core/src/test/java/com/google/errorprone/bugpatterns/inlineme/SuggesterTest.java | {
"start": 988,
"end": 2161
} | class ____ {
private final BugCheckerRefactoringTestHelper refactoringTestHelper =
BugCheckerRefactoringTestHelper.newInstance(Suggester.class, getClass());
@Test
public void buildAnnotation_withImports() {
assertThat(
InlineMeData.buildAnnotation(
"REPLACEMENT",
... | SuggesterTest |
java | google__guava | android/guava/src/com/google/common/graph/PredecessorsFunction.java | {
"start": 752,
"end": 879
} | interface ____ <a
* href="https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)">graph</a>-structured data.
*
* <p>This | for |
java | apache__kafka | streams/src/main/java/org/apache/kafka/streams/kstream/internals/suppress/StrictBufferConfigImpl.java | {
"start": 1097,
"end": 4284
} | class ____ extends BufferConfigInternal<Suppressed.StrictBufferConfig> implements Suppressed.StrictBufferConfig {
private final long maxRecords;
private final long maxBytes;
private final BufferFullStrategy bufferFullStrategy;
private final Map<String, String> logConfig;
public StrictBufferConfigI... | StrictBufferConfigImpl |
java | hibernate__hibernate-orm | hibernate-core/src/main/java/org/hibernate/type/descriptor/jdbc/ObjectNullAsNullTypeJdbcType.java | {
"start": 563,
"end": 1849
} | class ____ extends ObjectJdbcType {
/**
* Singleton access
*/
public static final ObjectNullAsNullTypeJdbcType INSTANCE = new ObjectNullAsNullTypeJdbcType( Types.JAVA_OBJECT );
public ObjectNullAsNullTypeJdbcType(int jdbcTypeCode) {
super( jdbcTypeCode );
}
@Override
public <X> ValueBinder<X> getBinder(Ja... | ObjectNullAsNullTypeJdbcType |
java | apache__camel | core/camel-main/src/main/java/org/apache/camel/main/MainConfigurationProperties.java | {
"start": 35935,
"end": 37362
} | class ____ the known list of configurations classes.
*/
@SuppressWarnings("unchecked")
public MainConfigurationProperties withConfigurations(
Class<? extends CamelConfiguration>... configuration) {
addConfigurationClass(configuration);
return this;
}
/**
* Sets the... | to |
java | apache__dubbo | dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/OpenAPIRequestOrBuilder.java | {
"start": 845,
"end": 5181
} | interface ____
extends
// @@protoc_insertion_point(interface_extends:org.apache.dubbo.metadata.OpenAPIRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The openAPI group.
* </pre>
*
* <code>string group = 1;</code>
* @return The group.
*/
S... | OpenAPIRequestOrBuilder |
java | google__dagger | javatests/dagger/internal/codegen/kotlin/KspComponentProcessorTest.java | {
"start": 871,
"end": 1197
} | class ____ {
@Test
public void emptyComponentTest() throws Exception {
Source componentSrc =
CompilerTests.kotlinSource(
"MyComponent.kt",
"package test",
"",
"import dagger.Component",
"",
"@Component",
" | KspComponentProcessorTest |
java | google__error-prone | core/src/test/java/com/google/errorprone/bugpatterns/StatementSwitchToExpressionSwitchTest.java | {
"start": 118280,
"end": 119504
} | class ____ {
int x;
public Test(int foo) {
x = -1;
}
public int foo(Suit suit) {
before:
for (; ; ) {
switch (suit) {
case HEART:
x = 2;
... | Test |
java | apache__camel | dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ControlbusComponentBuilderFactory.java | {
"start": 1847,
"end": 3965
} | interface ____ extends ComponentBuilder<ControlBusComponent> {
/**
* Whether the producer should be started lazy (on the first message).
* By starting lazy you can use this to allow CamelContext and routes to
* startup in situations where a producer may otherwise fail du... | ControlbusComponentBuilder |
java | apache__flink | flink-formats/flink-parquet/src/main/java/org/apache/flink/formats/parquet/protobuf/ParquetProtoWriters.java | {
"start": 1931,
"end": 2690
} | class ____<T extends Message>
extends ParquetWriter.Builder<T, ParquetProtoWriterBuilder<T>> {
private final Class<T> clazz;
public ParquetProtoWriterBuilder(OutputFile outputFile, Class<T> clazz) {
super(outputFile);
this.clazz = clazz;
}
@Override... | ParquetProtoWriterBuilder |
java | apache__camel | core/camel-core/src/test/java/org/apache/camel/component/validator/ValidatorWithResourceResolverRouteTest.java | {
"start": 1408,
"end": 4297
} | class ____ extends ContextTestSupport {
protected MockEndpoint validEndpoint;
protected MockEndpoint finallyEndpoint;
protected MockEndpoint invalidEndpoint;
@Test
public void testValidMessage() throws Exception {
validEndpoint.expectedMessageCount(1);
finallyEndpoint.expectedMessa... | ValidatorWithResourceResolverRouteTest |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/mapping/generated/GeneratedAnnotationBatchTest.java | {
"start": 3370,
"end": 4382
} | class ____ {
@Id
@GeneratedValue
private Long id;
private String name;
@Generated(event = INSERT)
@ColumnDefault("1")
private Integer generatedProp;
@CurrentTimestamp(event = { INSERT, UPDATE })
private Instant updateTimestamp;
public GeneratedEntity() {
}
public GeneratedEntity(String name... | GeneratedEntity |
java | quarkusio__quarkus | extensions/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/reactive/ReactivePanacheMongoEntity.java | {
"start": 666,
"end": 1031
} | class ____ extends ReactivePanacheMongoEntityBase {
/**
* The auto-generated ID field.
* This field is set by Mongo when this entity is persisted.
*
* @see #persist()
*/
public ObjectId id;
@Override
public String toString() {
return this.getClass().getSimpleName() + "... | ReactivePanacheMongoEntity |
java | spring-projects__spring-framework | spring-jdbc/src/test/java/org/springframework/jdbc/core/support/SqlCharacterValueTests.java | {
"start": 1271,
"end": 4309
} | class ____ {
@Test
void withString() throws SQLException {
String content = "abc";
SqlCharacterValue value = new SqlCharacterValue(content);
PreparedStatement ps = mock();
value.setTypeValue(ps, 1, JdbcUtils.TYPE_UNKNOWN, null);
verify(ps).setString(1, content);
}
@Test
void withStringForClob() throws ... | SqlCharacterValueTests |
java | apache__spark | connector/spark-ganglia-lgpl/src/main/java/com/codahale/metrics/ganglia/GangliaReporter.java | {
"start": 1887,
"end": 17288
} | class ____ {
private final MetricRegistry registry;
private String prefix;
private int tMax;
private int dMax;
private TimeUnit rateUnit;
private TimeUnit durationUnit;
private MetricFilter filter;
private ScheduledExecutorService executor;
private... | Builder |
java | redisson__redisson | redisson-spring-data/redisson-spring-data-32/src/test/java/org/redisson/spring/data/connection/RedissonClusterConnectionTest.java | {
"start": 881,
"end": 11319
} | class ____ extends BaseTest {
@Test
public void testRandomKey() {
testInCluster(connection -> {
RedissonClient redisson = (RedissonClient) connection.getNativeConnection();
StringRedisTemplate redisTemplate = new StringRedisTemplate();
redisTemplate.setConnectionFact... | RedissonClusterConnectionTest |
java | hibernate__hibernate-orm | hibernate-core/src/main/java/org/hibernate/type/descriptor/java/EnumJavaType.java | {
"start": 6745,
"end": 8753
} | enum ____
*/
public T fromName(String relationalForm) {
return relationalForm == null ? null : Enum.valueOf( getJavaTypeClass(), relationalForm.trim() );
}
@Override
public String getCheckCondition(String columnName, JdbcType jdbcType, BasicValueConverter<T, ?> converter, Dialect dialect) {
if ( converter !=... | type |
java | micronaut-projects__micronaut-core | core-processor/src/main/java/io/micronaut/inject/beans/visitor/BeanIntrospectionWriter.java | {
"start": 12307,
"end": 24243
} | class ____ the introspection will write.
*/
public String getIntrospectionName() {
return introspectionName;
}
/**
* @return The constructor.
*/
@Nullable
public MethodElement getConstructor() {
return constructor;
}
/**
* The bean type.
*
* @r... | that |
java | apache__hadoop | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/timeline/TimelineDelegationTokenResponse.java | {
"start": 1355,
"end": 1806
} | class ____ {
private String type;
private Object content;
public TimelineDelegationTokenResponse() {
}
@XmlElement(name = "type")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@XmlElement(name = "content")
public Object getContent() {... | TimelineDelegationTokenResponse |
java | google__guava | android/guava/src/com/google/common/io/LittleEndianDataOutputStream.java | {
"start": 1159,
"end": 1416
} | class ____ violates the specification of its supertype {@code
* DataOutput}, which explicitly requires big-endian byte order.
*
* @author Chris Nokleberg
* @author Keith Bottner
* @since 8.0
*/
@J2ktIncompatible
@GwtIncompatible
public final | intentionally |
java | hibernate__hibernate-orm | hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/components/dynamic/AuditedDynamicComponentTest.java | {
"start": 1529,
"end": 8495
} | class ____ {
//@Test
public void testAuditedDynamicComponentFailure(EntityManagerFactoryScope scope) throws URISyntaxException {
final Configuration config = new Configuration();
final URL hbm = Thread.currentThread().getContextClassLoader().getResource(
"mappings/dynamicComponents/mapAudited.hbm.xml"
);
... | AuditedDynamicComponentTest |
java | lettuce-io__lettuce-core | src/main/java/io/lettuce/core/api/reactive/BaseRedisReactiveCommands.java | {
"start": 1301,
"end": 6306
} | interface ____<K, V> {
/**
* Post a message to a channel.
*
* @param channel the channel type: key.
* @param message the message type: value.
* @return Long integer-reply the number of clients that received the message.
*/
Mono<Long> publish(K channel, V message);
/**
* ... | BaseRedisReactiveCommands |
java | apache__dubbo | dubbo-spring-boot-project/dubbo-spring-boot/src/main/java/org/apache/dubbo/spring/boot/interceptor/DubboTagCookieInterceptor.java | {
"start": 1147,
"end": 2173
} | class ____ implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
String tag = getSingleCookieValue(request.getCookies(), CommonConstants.TAG_KEY);
RpcContext.getClientAttachment... | DubboTagCookieInterceptor |
java | apache__hadoop | hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestEditLogRace.java | {
"start": 3424,
"end": 3564
} | class ____ various synchronization bugs in FSEditLog rolling
* and namespace saving.
*/
@MethodSource("data")
@ParameterizedClass
public | tests |
java | elastic__elasticsearch | x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/voyageai/VoyageAIResponseHandlerTests.java | {
"start": 1200,
"end": 6943
} | class ____ extends ESTestCase {
public void testCheckForFailureStatusCode_DoesNotThrowForStatusCodesBetween200And299() {
callCheckForFailureStatusCode(randomIntBetween(200, 299), "id");
}
public void testCheckForFailureStatusCode_ThrowsFor503() {
var exception = expectThrows(RetryException.... | VoyageAIResponseHandlerTests |
java | apache__flink | flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/TestingResultPartitionProvider.java | {
"start": 3349,
"end": 5274
} | class ____ {
private CreateSubpartitionView createSubpartitionViewFunction =
(resultPartitionID, indexSet, availabilityListener) -> null;
private CreateSubpartitionViewOrRegisterListener
createSubpartitionViewOrRegisterListenerFunction =
(partition... | TestingResultPartitionProviderBuilder |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/jpa/lock/OptimisticLockTests.java | {
"start": 833,
"end": 2148
} | class ____ {
@Test
@JiraKey(value = "HHH-9419")
public void testNoVersionCheckAfterRemove(SessionFactoryScope sessions) {
final SQLStatementInspector sqlCollector = sessions.getCollectingStatementInspector();
sqlCollector.clear();
final Lockable created = sessions.fromTransaction( (session) -> {
final Lock... | OptimisticLockTests |
java | apache__camel | components/camel-test/camel-test-spring-junit5/src/main/java/org/apache/camel/test/spring/junit5/RouteCoverageEventNotifier.java | {
"start": 1092,
"end": 2008
} | class ____ extends EventNotifierSupport {
private final String testClassName;
private final Function<RouteCoverageEventNotifier, String> testMethodName;
public RouteCoverageEventNotifier(String testClassName, Function<RouteCoverageEventNotifier, String> testMethodName) {
this.testClassName = testC... | RouteCoverageEventNotifier |
java | apache__dubbo | dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/MetadataInfo.java | {
"start": 10051,
"end": 10278
} | interface ____ specified group, version.
* There may have several service infos of different protocols, this method will simply pick the first one.
*
* @param serviceKeyWithoutProtocol key is of format '{group}/{ | with |
java | quarkusio__quarkus | integration-tests/main/src/test/java/io/quarkus/it/main/RBACAccessTest.java | {
"start": 401,
"end": 5161
} | class ____ {
@Test
public void shouldRestrictAccessToSpecificRole() {
String path = "/rbac-secured/forTesterOnly";
assertForAnonymous(path, 401, Optional.empty());
assertStatusAndContent(RestAssured.given().auth().preemptive().basic("stuart", "test"), path, 403, Optional.empty());
... | RBACAccessTest |
java | apache__maven | impl/maven-impl/src/main/java/org/apache/maven/impl/cache/Cache.java | {
"start": 11732,
"end": 12419
} | class ____<T> extends RefConcurrentReference<T> {
private final T referent;
HardRefConcurrentReference(T referent, ReferenceQueue<T> queue) {
super(referent);
this.referent = referent;
// Note: queue is ignored for hard references since they're ne... | HardRefConcurrentReference |
java | apache__hadoop | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAHSClient.java | {
"start": 3291,
"end": 7970
} | class ____ {
@Test
public void testClientStop() {
Configuration conf = new Configuration();
AHSClient client = AHSClient.createAHSClient();
client.init(conf);
client.start();
client.stop();
}
@Test
@Timeout(value = 10)
public void testGetApplications() throws YarnException, IOException... | TestAHSClient |
java | apache__camel | components/camel-swift/src/main/java/org/apache/camel/dataformat/swift/mx/ReadConfiguration.java | {
"start": 1174,
"end": 1422
} | class ____ extends MxReadConfiguration {
public TypeAdaptersConfiguration getAdapters() {
return adapters;
}
public void setAdapters(TypeAdaptersConfiguration adapters) {
this.adapters = adapters;
}
}
| ReadConfiguration |
java | apache__flink | flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/DefaultSyncPreferredLocationsRetrieverTest.java | {
"start": 1314,
"end": 3017
} | class ____ {
private static final JobVertexID JV1 = new JobVertexID();
private static final ExecutionVertexID EV11 = new ExecutionVertexID(JV1, 0);
private static final ExecutionVertexID EV12 = new ExecutionVertexID(JV1, 1);
private static final ExecutionVertexID EV13 = new ExecutionVertexID(JV1, 2);
... | DefaultSyncPreferredLocationsRetrieverTest |
java | apache__hadoop | hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeRecovery.java | {
"start": 10439,
"end": 11501
} | class ____ extends EditLogTestSetup {
private final int paddingLength;
public EltsTestOpcodesAfterPadding(int paddingLength) {
this.paddingLength = paddingLength;
}
@Override
public void addTransactionsToLog(EditLogOutputStream elos,
OpInstanceCache cache) throws IOException {
... | EltsTestOpcodesAfterPadding |
java | spring-projects__spring-boot | core/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindHandler.java | {
"start": 1005,
"end": 4139
} | interface ____ {
/**
* Default no-op bind handler.
*/
BindHandler DEFAULT = new BindHandler() {
};
/**
* Called when binding of an element starts but before any result has been determined.
* @param <T> the bindable source type
* @param name the name of the element being bound
* @param target the item... | BindHandler |
java | apache__flink | flink-clients/src/main/java/org/apache/flink/client/deployment/application/ApplicationRunner.java | {
"start": 1300,
"end": 1451
} | interface ____ access to the cluster's {@link DispatcherGateway}, and it does not go
* through the publicly exposed REST API.
*/
@Internal
public | assumes |
java | assertj__assertj-core | assertj-core/src/test/java/org/assertj/core/testkit/AlwaysEqualComparator.java | {
"start": 755,
"end": 1429
} | class ____<T> implements Comparator<T> {
public static final AlwaysEqualComparator<Object> ALWAYS_EQUALS = alwaysEqual();
public static final AlwaysEqualComparator<String> ALWAYS_EQUALS_STRING = alwaysEqual();
public static final AlwaysEqualComparator<Timestamp> ALWAYS_EQUALS_TIMESTAMP = alwaysEqual();
public ... | AlwaysEqualComparator |
java | apache__camel | components/camel-hl7/src/main/java/org/apache/camel/component/hl7/HL7MLLPNettyDecoder.java | {
"start": 1192,
"end": 3715
} | class ____ extends DelimiterBasedFrameDecoder {
private static final Logger LOG = LoggerFactory.getLogger(HL7MLLPNettyDecoder.class);
private static final int MAX_FRAME_LENGTH = Integer.MAX_VALUE;
private final HL7MLLPConfig config;
/**
* Creates a decoder instance using a default HL7MLLPConfig
... | HL7MLLPNettyDecoder |
java | hibernate__hibernate-orm | hibernate-core/src/test/java/org/hibernate/orm/test/query/CorrelatedListJoinInSubqueryTest.java | {
"start": 3442,
"end": 3676
} | class ____ {
@Id
@GeneratedValue
private Long id;
private String uniqueKey;
public Entity1() {
}
public Entity1(String uniqueKey) {
this.uniqueKey = uniqueKey;
}
}
@Entity( name = "Entity2" )
public static | Entity1 |
java | apache__dubbo | dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/MemoryLimitedLinkedBlockingQueue.java | {
"start": 1124,
"end": 3514
} | class ____<E> extends LinkedBlockingQueue<E> {
private static final long serialVersionUID = 1374792064759926198L;
private final MemoryLimiter memoryLimiter;
public MemoryLimitedLinkedBlockingQueue(Instrumentation inst) {
this(Integer.MAX_VALUE, inst);
}
public MemoryLimitedLinkedBlocking... | MemoryLimitedLinkedBlockingQueue |
java | netty__netty | transport/src/main/java/io/netty/channel/group/ChannelGroupFuture.java | {
"start": 4841,
"end": 7054
} | interface ____ extends Future<Void>, Iterable<ChannelFuture> {
/**
* Returns the {@link ChannelGroup} which is associated with this future.
*/
ChannelGroup group();
/**
* Returns the {@link ChannelFuture} of the individual I/O operation which
* is associated with the specified {@link C... | ChannelGroupFuture |
java | apache__hadoop | hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockRecovery.java | {
"start": 30266,
"end": 31403
} | class ____ {
final Semaphore sem;
final AtomicBoolean gotInterruption = new AtomicBoolean(false);
TestStopWorkerSemaphore() {
this.sem = new Semaphore(0);
}
/**
* Attempt to acquire a sempahore within a given timeout.
*
* This is useful for unit tests where we need to ignore ... | TestStopWorkerSemaphore |
java | google__error-prone | core/src/test/java/com/google/errorprone/bugpatterns/StatementSwitchToExpressionSwitchTest.java | {
"start": 92179,
"end": 92824
} | class ____ {
public int foo(Suit suit) {
var a = 0;
String b = "b";
int y = 0, x;
switch (suit) {
case HEART:
case DIAMOND:
x = ((y + 1) * (y * y)) << 1;
break;
... | Test |
java | elastic__elasticsearch | server/src/test/java/org/elasticsearch/search/aggregations/metrics/GeoBoundsAggregatorTests.java | {
"start": 1859,
"end": 10050
} | class ____ extends AggregatorTestCase {
public void testEmpty() throws Exception {
try (Directory dir = newDirectory(); RandomIndexWriter w = new RandomIndexWriter(random(), dir)) {
GeoBoundsAggregationBuilder aggBuilder = new GeoBoundsAggregationBuilder("my_agg").field("field").wrapLongitude(fa... | GeoBoundsAggregatorTests |
java | apache__camel | components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/integration/FtpShutdownCompleteCurrentTaskOnlyIT.java | {
"start": 1186,
"end": 3261
} | class ____ extends FtpServerTestSupport {
private String getFtpUrl() {
return "ftp://admin@localhost:{{ftp.server.port}}/pending?password=admin&initialDelay=5000";
}
@Override
public void doPostSetup() throws Exception {
prepareFtpServer();
}
private void prepareFtpServer() {
... | FtpShutdownCompleteCurrentTaskOnlyIT |
java | spring-projects__spring-framework | spring-web/src/main/java/org/springframework/web/service/invoker/RequestHeaderArgumentResolver.java | {
"start": 1867,
"end": 2576
} | class ____ extends AbstractNamedValueArgumentResolver {
public RequestHeaderArgumentResolver(ConversionService conversionService) {
super(conversionService);
}
@Override
protected @Nullable NamedValueInfo createNamedValueInfo(MethodParameter parameter) {
RequestHeader annot = parameter.getParameterAnnotatio... | RequestHeaderArgumentResolver |
java | lettuce-io__lettuce-core | src/main/java/io/lettuce/core/RedisPublisher.java | {
"start": 25957,
"end": 26721
} | class ____<T> extends StreamingOutput.Subscriber<T> {
private final StreamingOutput.Subscriber<T> first;
private final StreamingOutput.Subscriber<T> second;
public CompositeSubscriber(StreamingOutput.Subscriber<T> first, StreamingOutput.Subscriber<T> second) {
this.first = first;
... | CompositeSubscriber |
java | spring-projects__spring-framework | spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBeanTests.java | {
"start": 15264,
"end": 15741
} | class ____ extends Module {
@Override
public String getModuleName() {
return getClass().getSimpleName();
}
@Override
public Version version() {
return Version.unknownVersion();
}
@Override
public void setupModule(SetupContext context) {
SimpleSerializers serializers = new SimpleSerializers()... | CustomIntegerModule |
java | apache__flink | flink-runtime/src/test/java/org/apache/flink/runtime/operators/CombineTaskTest.java | {
"start": 2340,
"end": 8110
} | class ____
extends UnaryOperatorTestBase<
RichGroupReduceFunction<Tuple2<Integer, Integer>, Tuple2<Integer, Integer>>,
Tuple2<Integer, Integer>,
Tuple2<Integer, Integer>> {
private static final long COMBINE_MEM = 3 * 1024 * 1024;
private final double com... | CombineTaskTest |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.