language
stringclasses
1 value
repo
stringclasses
60 values
path
stringlengths
22
294
class_span
dict
source
stringlengths
13
1.16M
target
stringlengths
1
113
java
google__error-prone
core/src/test/java/com/google/errorprone/matchers/NonNullLiteralTest.java
{ "start": 2171, "end": 2516 }
class ____ { public void testClassLiteral() { Type klass = String.class; } } """); assertCompiles(nonNullLiteralMatches(/* shouldMatch= */ true, Matchers.nonNullLiteral())); } @Test public void shouldNotMatchClassDeclaration() { writeFile( "A.java",...
A
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/chain/Chain.java
{ "start": 24932, "end": 26859 }
class ____" + " not match the previous Mapper's output key class."); } if (!inputValueClass.isAssignableFrom(previousMapperConf.getClass( MAPPER_OUTPUT_VALUE_CLASS, null))) { throw new IllegalArgumentException("The specified Mapper input value class" + " does not ma...
does
java
quarkusio__quarkus
extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/items/InjectedEmitterBuildItem.java
{ "start": 540, "end": 3392 }
class ____ extends MultiBuildItem { /** * Creates a new instance of {@link InjectedEmitterBuildItem} setting the overflow strategy. * * @param name the name of the stream * @param emitterType emitterType * @param overflow the overflow strategy * @param bufferSize the buffer size, if o...
InjectedEmitterBuildItem
java
micronaut-projects__micronaut-core
http-server/src/main/java/io/micronaut/http/server/exceptions/URISyntaxHandler.java
{ "start": 1103, "end": 1777 }
class ____ extends ErrorExceptionHandler<URISyntaxException> { /** * Constructor. * @param responseProcessor Error Response Processor */ public URISyntaxHandler(ErrorResponseProcessor<?> responseProcessor) { super(responseProcessor); } @Override @NonNull protected Error ...
URISyntaxHandler
java
apache__hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/ApplicationClientProtocol.java
{ "start": 26883, "end": 27466 }
interface ____ get the details for a specific resource profile. * </p> * @param request request to get the details of a resource profile * @return Response containing the details for a particular resource profile * @throws YARNFeatureNotEnabledException if resource-profile is disabled * @throws YarnExcep...
to
java
elastic__elasticsearch
server/src/test/java/org/elasticsearch/action/support/IndexComponentSelectorTests.java
{ "start": 707, "end": 1988 }
class ____ extends ESTestCase { public void testIndexComponentSelectorFromKey() { assertThat(IndexComponentSelector.getByKey("data"), equalTo(IndexComponentSelector.DATA)); assertThat(IndexComponentSelector.getByKey("failures"), equalTo(IndexComponentSelector.FAILURES)); assertThat(IndexCom...
IndexComponentSelectorTests
java
google__error-prone
core/src/test/java/com/google/errorprone/matchers/HasIdentifierTest.java
{ "start": 1593, "end": 2200 }
class ____ { A() { this(0); } A(int foo) {} } """); assertCompiles( methodHasIdentifierMatching( /* shouldMatch= */ true, hasIdentifier( new Matcher<IdentifierTree>() { @Override ...
A
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/query/SubQueryInFromOneToManyTests.java
{ "start": 8603, "end": 9566 }
class ____ { private Integer id; private Name name; private Set<Contact> alternativeContacts; private Contact primaryContact; public Contact() { } public Contact(Integer id, Name name) { this.id = id; this.name = name; } @Id public Integer getId() { return id; } public void setId(I...
Contact
java
elastic__elasticsearch
benchmarks/src/main/java/org/elasticsearch/benchmark/bytes/BytesArrayReadLongBenchmark.java
{ "start": 1561, "end": 2576 }
class ____ { @Param(value = { "1" }) private int dataMb; private BytesReference bytesArray; private StreamInput streamInput; @Setup public void initResults() throws IOException { final BytesStreamOutput tmp = new BytesStreamOutput(); final long bytes = ByteSizeValue.of(dataMb...
BytesArrayReadLongBenchmark
java
micronaut-projects__micronaut-core
test-suite/src/test/java/io/micronaut/test/replaces/InterfaceBImpl.java
{ "start": 691, "end": 811 }
class ____ implements InterfaceB { @Override public String doStuff() { return "real"; } }
InterfaceBImpl
java
elastic__elasticsearch
server/src/test/java/org/elasticsearch/common/ChannelsTests.java
{ "start": 1230, "end": 6987 }
class ____ extends ESTestCase { byte[] randomBytes; FileChannel fileChannel; @Override @Before public void setUp() throws Exception { super.setUp(); Path tmpFile = createTempFile(); FileChannel randomAccessFile = FileChannel.open(tmpFile, StandardOpenOption.READ, StandardOp...
ChannelsTests
java
spring-projects__spring-framework
spring-context/src/main/java/org/springframework/jmx/support/NotificationListenerHolder.java
{ "start": 1539, "end": 6149 }
class ____ { private @Nullable NotificationListener notificationListener; private @Nullable NotificationFilter notificationFilter; private @Nullable Object handback; protected @Nullable Set<Object> mappedObjectNames; /** * Set the {@link javax.management.NotificationListener}. */ public void setNotifica...
NotificationListenerHolder
java
micronaut-projects__micronaut-core
core/src/main/java/io/micronaut/core/convert/value/ConvertibleValues.java
{ "start": 1594, "end": 9884 }
interface ____<V> extends ValueResolver<CharSequence>, Iterable<Map.Entry<String, V>>, ConversionServiceProvider { ConvertibleValues EMPTY = new ConvertibleValuesMap<>(Collections.emptyMap()); /** * @return The names of the values */ Set<String> names(); /** * @return The values *...
ConvertibleValues
java
quarkusio__quarkus
core/deployment/src/main/java/io/quarkus/deployment/steps/ClassTransformingBuildStep.java
{ "start": 17065, "end": 20797 }
class ____ it from the original archive Map<ArtifactKey, Set<String>> removed = new HashMap<>(); for (Map.Entry<String, Set<String>> entry : classLoadingConfig.removedResources().entrySet()) { removed.put(new GACT(entry.getKey().split(":")), entry.getValue()); } for (RemovedR...
removes
java
spring-projects__spring-framework
spring-test/src/test/java/org/springframework/test/context/TestExecutionListenersTests.java
{ "start": 10692, "end": 10918 }
class ____ extends InheritedDefaultListenersTestCase { } @TestExecutionListeners( {FooTestExecutionListener.class, BarTestExecutionListener.class, BazTestExecutionListener.class}) static
NonInheritedDefaultListenersTestCase
java
apache__avro
lang/java/perf/src/main/java/org/apache/avro/perf/test/reflect/ReflectNestedObjectArrayTest.java
{ "start": 2476, "end": 3563 }
class ____ extends BasicArrayState { private final Schema schema; private ObjectArrayWrapper[] testData; private Encoder encoder; private ReflectDatumWriter<ObjectArrayWrapper> datumWriter; public TestStateEncode() { super(ARRAY_SIZE); final String jsonText = ReflectData.get().getSche...
TestStateEncode
java
apache__camel
components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelTest.java
{ "start": 6224, "end": 6343 }
enum ____ no allowable values are set assertFalse(json.contains("\"enum\"")); context.stop(); } }
when
java
elastic__elasticsearch
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/math/AbstractTrigonometricFunction.java
{ "start": 1045, "end": 2104 }
class ____ extends UnaryScalarFunction { AbstractTrigonometricFunction(Source source, Expression field) { super(source, field); } protected AbstractTrigonometricFunction(StreamInput in) throws IOException { super(in); } /** * Build an evaluator for this function given the eval...
AbstractTrigonometricFunction
java
google__error-prone
check_api/src/main/java/com/google/errorprone/fixes/BranchedSuggestedFixes.java
{ "start": 772, "end": 1310 }
class ____ accumulating a branching tree of alternative fixes designed to help build as set * of potential fixes with different options in them. * * <p>Consider building a list of fixes from a set of operations A followed by B or C then D or E. * The resulting list should be ABD, ACD, ABE, ACE. * * <pre>{@code *...
for
java
alibaba__druid
core/src/test/java/com/alibaba/druid/benckmark/pool/Case1.java
{ "start": 1412, "end": 1947 }
class ____ extends TestCase { private String jdbcUrl; private String user; private String password; private String driverClass; private int initialSize = 10; private int minPoolSize = 10; private int maxPoolSize = 50; private int maxActive = 50; private String validationQuery = "SELE...
Case1
java
google__error-prone
core/src/test/java/com/google/errorprone/fixes/SuggestedFixesTest.java
{ "start": 18271, "end": 18626 }
class ____ { @SomeAnnotation Void foo() { return null; } } """) .doTest(); } @Test public void qualifyType_someOtherNullable() { AddAnnotation.testHelper(getClass()) .addInputLines( "in/SomeAnnotatio...
AddAnnotation
java
quarkusio__quarkus
extensions/oidc/deployment/src/test/java/io/quarkus/oidc/test/CodeFlowVerifyInjectedAccessTokenDisabledTest.java
{ "start": 601, "end": 1925 }
class ____ { @RegisterExtension static final QuarkusUnitTest test = new QuarkusUnitTest() .withApplicationRoot((jar) -> jar .addClasses(ProtectedResourceWithJwtAccessToken.class) .addAsResource("application-verify-injected-access-token-disabled.properties", "...
CodeFlowVerifyInjectedAccessTokenDisabledTest
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyBackRefImpl.java
{ "start": 2199, "end": 3156 }
class ____ implements Getter { private final String entityName; private final String propertyName; public GetterImpl(String entityName, String propertyName) { this.entityName = entityName; this.propertyName = propertyName; } @Override public Object get(Object owner) { return UNKNOWN; } @Over...
GetterImpl
java
apache__flink
flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/nfa/NFAStatusChangeITCase.java
{ "start": 1854, "end": 12503 }
class ____ { private SharedBuffer<Event> sharedBuffer; private SharedBufferAccessor<Event> sharedBufferAccessor; private AfterMatchSkipStrategy skipStrategy = AfterMatchSkipStrategy.noSkip(); private TimerService timerService = new TestTimerService(); @Before public void init() { this....
NFAStatusChangeITCase
java
qos-ch__slf4j
slf4j-ext/src/main/java/org/slf4j/profiler/TimeInstrumentStatus.java
{ "start": 1404, "end": 1455 }
enum ____ { STARTED, STOPPED; }
TimeInstrumentStatus
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/collections/mapcompelem/Product.java
{ "start": 244, "end": 585 }
class ____ { private String name; private Map parts = new HashMap(); Product() {} public Product(String n) { name = n; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Map getParts() { return parts; } public void setParts(Map users) { this.pa...
Product
java
apache__hadoop
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyProviderCryptoExtension.java
{ "start": 1442, "end": 1983 }
class ____ extends KeyProviderExtension<KeyProviderCryptoExtension.CryptoExtension> { /** * Designates an encrypted encryption key, or EEK. */ public static final String EEK = "EEK"; /** * Designates a decrypted encrypted encryption key, that is, an encryption key * (EK). */ public static fi...
KeyProviderCryptoExtension
java
elastic__elasticsearch
x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/support/QueryableBuiltInRoles.java
{ "start": 1075, "end": 1414 }
interface ____ { /** * @return the built-in roles. */ QueryableBuiltInRoles getRoles(); /** * Adds a listener to be notified when the built-in roles change. * * @param listener the listener to add. */ void addListener(Listener liste...
Provider
java
apache__camel
components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/ConnectionStrategy.java
{ "start": 1008, "end": 1199 }
interface ____ { Connection getConnection(DataSource dataSource) throws Exception; boolean isConnectionTransactional(Connection connection, DataSource dataSource); }
ConnectionStrategy
java
netty__netty
common/src/main/java/io/netty/util/concurrent/FastThreadLocalThread.java
{ "start": 8205, "end": 9836 }
class ____ { static final FallbackThreadSet EMPTY = new FallbackThreadSet(); private static final long EMPTY_VALUE = 0L; private final LongLongHashMap map; private FallbackThreadSet() { this.map = new LongLongHashMap(EMPTY_VALUE); } private FallbackThreadSe...
FallbackThreadSet
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/onetoone/bidirectional/BidirectionalOneToOneCascadeRemoveTest.java
{ "start": 828, "end": 1797 }
class ____ { @Test public void testWithFlush(SessionFactoryScope scope) { scope.inTransaction( session -> { final A a1 = new A( "1", "a1", 1 ); session.persist( a1 ); final B bRef = new B( "2", "b2", 2, a1 ); session.persist( bRef ); session.flush(); session.remove( bRef ); } ); scope.inTrans...
BidirectionalOneToOneCascadeRemoveTest
java
FasterXML__jackson-databind
src/test/java/tools/jackson/databind/ser/filter/JsonIncludeArrayTest.java
{ "start": 999, "end": 1180 }
class ____ { @JsonInclude(JsonInclude.Include.NON_EMPTY) public int[] value; public NonEmptyIntArray(int... v) { value = v; } } static
NonEmptyIntArray
java
apache__hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/ipc/TestRPCUtil.java
{ "start": 1705, "end": 5123 }
class ____<? extends Throwable> exception = FileNotFoundException.class; verifyRemoteExceptionUnwrapping(exception, exception.getName()); } @Test void testRemoteYarnExceptionUnwrapping() { Class<? extends Throwable> exception = YarnException.class; verifyRemoteExceptionUnwrapping(exception, excep...
Class
java
apache__logging-log4j2
log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/EnvironmentPasswordProvider.java
{ "start": 1051, "end": 1987 }
interface ____ obtain system environment variable values * requires us to use String objects. String objects are immutable and Java does not provide a way to erase this * sensitive data from the application memory. The password data will stay resident in memory until the String object * and its associated char[] arr...
to
java
apache__hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/ServiceContext.java
{ "start": 1328, "end": 2190 }
class ____ { public Service service = null; public SliderFileSystem fs; public String serviceHdfsDir = ""; public ApplicationAttemptId attemptId; public LoadingCache<ConfigFile, Object> configCache; public ServiceScheduler scheduler; public ClientToAMTokenSecretManager secretManager; public ClientAMServ...
ServiceContext
java
apache__camel
core/camel-core/src/test/java/org/apache/camel/issues/AdviceWithWeaveByToUriEnrichTest.java
{ "start": 1117, "end": 3095 }
class ____ extends ContextTestSupport { @Test public void testAdviceEnrichToString() throws Exception { RouteDefinition route = context.getRouteDefinitions().get(0); AdviceWith.adviceWith(route, context, new AdviceWithRouteBuilder() { @Override public void configure() th...
AdviceWithWeaveByToUriEnrichTest
java
apache__camel
test-infra/camel-test-infra-hashicorp-vault/src/test/java/org/apache/camel/test/infra/hashicorp/vault/services/HashicorpServiceFactory.java
{ "start": 957, "end": 1397 }
class ____ { private HashicorpServiceFactory() { } public static SimpleTestServiceBuilder<HashicorpVaultService> builder() { return new SimpleTestServiceBuilder<>("hashicorp-vault"); } public static HashicorpVaultService createService() { return builder() .addLocal...
HashicorpServiceFactory
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/counters/AbstractCounters.java
{ "start": 2291, "end": 2559 }
class ____<C extends Counter, G extends CounterGroupBase<C>> implements Writable, Iterable<G> { protected static final Logger LOG = LoggerFactory.getLogger("mapreduce.Counters"); /** * A cache from
AbstractCounters
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/MapKeyJavaTypeAnnotation.java
{ "start": 472, "end": 1627 }
class ____ implements MapKeyJavaType { private java.lang.Class<? extends org.hibernate.type.descriptor.java.BasicJavaType<?>> value; /** * Used in creating dynamic annotation instances (e.g. from XML) */ public MapKeyJavaTypeAnnotation(ModelsContext modelContext) { } /** * Used in creating annotation insta...
MapKeyJavaTypeAnnotation
java
qos-ch__slf4j
slf4j-ext/src/main/java/org/slf4j/cal10n/LocLoggerFactory.java
{ "start": 1343, "end": 1846 }
class ____ essentially a wrapper around an {@link LoggerFactory} producing * {@link LocLogger} instances. * * <p> * Contrary to {@link LoggerFactory#getLogger(String)} method of * {@link LoggerFactory}, each call to {@link #getLocLogger(String)} produces a new * instance of {@link LocLogger}. This should not matt...
is
java
elastic__elasticsearch
x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/service/FileTokensTool.java
{ "start": 1481, "end": 2174 }
class ____ extends MultiCommand { FileTokensTool() { super("Manages elasticsearch service account file-tokens"); subcommands.put("create", newCreateFileTokenCommand()); subcommands.put("delete", newDeleteFileTokenCommand()); subcommands.put("list", newListFileTokenCommand()); } ...
FileTokensTool
java
elastic__elasticsearch
x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/blockhash/BytesRef2BlockHash.java
{ "start": 3486, "end": 7293 }
class ____ extends AddPage { final IntBlock b1; final IntBlock b2; AddWork(IntBlock b1, IntBlock b2, GroupingAggregatorFunction.AddInput addInput) { super(blockFactory, emitBatchSize, addInput); this.b1 = b1; this.b2 = b2; } void add() { ...
AddWork
java
spring-projects__spring-boot
buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/BuildpackReference.java
{ "start": 1086, "end": 2517 }
class ____ { private final String value; private BuildpackReference(String value) { this.value = value; } boolean hasPrefix(String prefix) { return this.value.startsWith(prefix); } @Nullable String getSubReference(String prefix) { return this.value.startsWith(prefix) ? this.value.substring(prefix.length...
BuildpackReference
java
alibaba__druid
core/src/test/java/com/alibaba/druid/bvt/sql/mysql/alterTable/MySqlAlterTableTest.java
{ "start": 1076, "end": 6106 }
class ____ extends TestCase { public void test_alter_0() throws Exception { String sql = "ALTER TABLE `test`.`tb1` CHANGE COLUMN `fname` `fname1` VARCHAR(45) NULL DEFAULT NULL ;"; MySqlStatementParser parser = new MySqlStatementParser(sql); SQLStatement stmt = parser.parseStatementList().ge...
MySqlAlterTableTest
java
spring-projects__spring-boot
module/spring-boot-webclient-test/src/test/java/org/springframework/boot/webclient/test/autoconfigure/WebClientTestIntegrationTests.java
{ "start": 1210, "end": 2022 }
class ____ { @Autowired private MockWebServer server; @Autowired private ExampleWebClientService client; @Test void mockServerCall1() throws InterruptedException { this.server.enqueue(new MockResponse().setBody("1")); assertThat(this.client.test()).isEqualTo("1"); this.server.takeRequest(); } @Test v...
WebClientTestIntegrationTests
java
apache__camel
dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/IbmCosComponentBuilderFactory.java
{ "start": 14716, "end": 19027 }
class ____ use when storing objects (e.g., STANDARD, VAULT, * COLD, FLEX). * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: producer * * @param storageClass the value to set * @return the dsl builder */ ...
to
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/persister/entity/mutation/MutationCoordinator.java
{ "start": 405, "end": 616 }
interface ____ { /** * The operation group used to perform the mutation unless some form * of dynamic mutation is necessary. */ MutationOperationGroup getStaticMutationOperationGroup(); }
MutationCoordinator
java
processing__processing4
app/src/processing/app/ui/MarkerColumn.java
{ "start": 5887, "end": 6114 }
class ____ { /** y co-ordinate of the marker */ int y; /** Problem that the error marker represents */ final Problem problem; LineMarker(Problem problem) { this.problem = problem; } } }
LineMarker
java
spring-projects__spring-framework
spring-context/src/test/java/org/springframework/context/annotation/spr10546/Spr10546Tests.java
{ "start": 4076, "end": 4645 }
class ____ extends ParentWithImportConfig {} } @Test void childConfigFirst() { assertLoadsMyBean(AEnclosingConfig.ChildConfig.class, AEnclosingConfig.class); } @Test void enclosingConfigOnly() { assertLoadsMyBean(AEnclosingConfig.class); } @Test void childConfigOnly() { assertLoadsMyBean(AEnclosingCon...
ChildConfig
java
elastic__elasticsearch
x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/search/aggregations/bucket/geogrid/InternalGeoHexGridBucket.java
{ "start": 687, "end": 1322 }
class ____ extends InternalGeoGridBucket { InternalGeoHexGridBucket(long hashAsLong, long docCount, InternalAggregations aggregations) { super(hashAsLong, docCount, aggregations); } /** * Read from a stream. */ public InternalGeoHexGridBucket(StreamInput in) throws IOException { ...
InternalGeoHexGridBucket
java
alibaba__nacos
config/src/main/java/com/alibaba/nacos/config/server/utils/YamlParserUtil.java
{ "start": 3388, "end": 5760 }
class ____ extends AbstractConstruct { @Override public Object construct(Node node) { if (!YamlParserConstructor.configMetadataTag.getValue().equals(node.getTag().getValue())) { throw new NacosRuntimeException(NacosException.INVALID_PARAM, "co...
ConstructYamlConfigMetadata
java
google__error-prone
core/src/test/java/com/google/errorprone/bugpatterns/UnnecessarilyVisibleTest.java
{ "start": 940, "end": 1435 }
class ____ { private final BugCheckerRefactoringTestHelper helper = BugCheckerRefactoringTestHelper.newInstance(UnnecessarilyVisible.class, getClass()); private final CompilationTestHelper compilationHelper = CompilationTestHelper.newInstance(UnnecessarilyVisible.class, getClass()); @Test public v...
UnnecessarilyVisibleTest
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/index/codec/vectors/es816/BinaryQuantizer.java
{ "start": 1650, "end": 15933 }
class ____ { public static final byte B_QUERY = 4; private final int discretizedDimensions; private final VectorSimilarityFunction similarityFunction; private final float sqrtDimensions; public BinaryQuantizer(int dimensions, int discretizedDimensions, VectorSimilarityFunction similarityFunction)...
BinaryQuantizer
java
hibernate__hibernate-orm
hibernate-core/src/main/java/org/hibernate/dialect/function/array/HANAUnnestFunction.java
{ "start": 15265, "end": 18928 }
class ____ implements SelfRenderingExpression { private final List<ColumnInfo> idColumns; private final String tableQualifier; private final Expression argument; public XmlWrapperExpression(List<ColumnInfo> idColumns, String tableQualifier, Expression argument) { this.idColumns = idColumns; this.tableQua...
XmlWrapperExpression
java
spring-projects__spring-framework
spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java
{ "start": 109491, "end": 110921 }
class ____ extends MyAdaptedControllerBase<String> { @RequestMapping public void myHandle(HttpServletRequest request, HttpServletResponse response) throws IOException { response.getWriter().write("test"); } @Override public void myHandle(@RequestParam("param1") String p1, int param2, @RequestHeader Integ...
MyAdaptedController3
java
quarkusio__quarkus
extensions/hibernate-orm/deployment/src/test/java/io/quarkus/hibernate/orm/singlepersistenceunit/entityassignment/packageincludedthroughannotation/EntityIncludedThroughPackageAnnotation.java
{ "start": 275, "end": 621 }
class ____ { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "includedSeq") public long id; public String name; public EntityIncludedThroughPackageAnnotation() { } public EntityIncludedThroughPackageAnnotation(String name) { this.name = name; } }
EntityIncludedThroughPackageAnnotation
java
elastic__elasticsearch
x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/lucene/LuceneMaxDoubleOperatorTests.java
{ "start": 1116, "end": 3381 }
class ____ extends LuceneMaxOperatorTestCase { @Override public LuceneMaxFactory.NumberType getNumberType() { return LuceneMaxFactory.NumberType.DOUBLE; } @Override protected NumberTypeTest getNumberTypeTest() { return new NumberTypeTest() { double max = -Double.MAX_VA...
LuceneMaxDoubleOperatorTests
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/beanvalidation/MergeNotNullCollectionUsingIdentityTest.java
{ "start": 3123, "end": 3481 }
class ____ { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @ManyToOne private Parent parent; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Parent getParent() { return parent; } public void setParent(Parent parent)...
Child
java
hibernate__hibernate-orm
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/util/TestUtil.java
{ "start": 10359, "end": 10559 }
class ____ the specified entity. */ public static Class<?> getMetamodelClassFor(Class<?> entityClass) { return getMetamodelClassFor( entityClass, false ); } /** * Returns the static metamodel
for
java
google__error-prone
core/src/main/java/com/google/errorprone/bugpatterns/ImmutableSetForContains.java
{ "start": 11057, "end": 11642 }
enum ____ { /** No usage detected. */ NEVER_USED, /** At least one allowed usage detected. No disallowed usage detected. */ ONLY_ALLOWED_USAGE, /** Disallowed usage detected. Allowed usage is ignored. */ DISALLOWED_USAGE; UsageState markAllowedUsageDetected() { if (this == DISALLOWE...
UsageState
java
elastic__elasticsearch
server/src/internalClusterTest/java/org/elasticsearch/update/UpdateIT.java
{ "start": 3299, "end": 31075 }
class ____ extends MockScriptPlugin { @Override public String pluginScriptLang() { return UPDATE_SCRIPTS; } @Override protected Map<String, Function<Map<String, Object>, Object>> pluginScripts() { Map<String, Function<Map<String, Object>, Object>> scripts...
UpdateScriptsPlugin
java
quarkusio__quarkus
extensions/resteasy-reactive/rest-jackson/deployment/src/main/java/io/quarkus/resteasy/reactive/jackson/deployment/processor/JacksonDeserializerFactory.java
{ "start": 5445, "end": 5498 }
class ____ the following * * <pre>{@code * public
like
java
alibaba__fastjson
src/test/java/com/alibaba/json/bvt/typeRef/TypeReferenceTest13.java
{ "start": 1357, "end": 2030 }
class ____<I, F> extends BaseResult { /** * 大的结果对象,包含结果数据、耗时、数量统计等信息 */ @JSONField(name = "result") private ResultDO<I, F> result; /** * 目前没有用到 */ @JSONField(name = "tracer") private String tracer; public String getTr...
SearchResult
java
apache__camel
components/camel-cxf/camel-cxf-spring-soap/src/main/java/org/apache/camel/component/cxf/spring/jaxws/CxfEndpointBeanDefinitionParser.java
{ "start": 1273, "end": 3887 }
class ____ extends AbstractCxfBeanDefinitionParser { @Override protected Class<?> getBeanClass(Element arg0) { return CxfSpringEndpoint.class; } private boolean isSpringPlaceHolder(String value) { if (value != null && (value.startsWith("${") && value.endsWith("}") || va...
CxfEndpointBeanDefinitionParser
java
spring-projects__spring-boot
cli/spring-boot-cli/src/json-shade/java/org/springframework/boot/cli/json/JSONObject.java
{ "start": 1289, "end": 2583 }
class ____ coerce values to another type when requested. * <ul> * <li>When the requested type is a boolean, strings will be coerced using a * case-insensitive comparison to "true" and "false". * <li>When the requested type is a double, other {@link Number} types will be coerced * using {@link Number#doubleValue() ...
can
java
apache__logging-log4j2
log4j-api/src/main/java/org/apache/logging/log4j/util/PropertyFilePropertySource.java
{ "start": 1263, "end": 2340 }
class ____ extends PropertiesPropertySource { private static final Logger LOGGER = StatusLogger.getLogger(); public PropertyFilePropertySource(final String fileName) { this(fileName, true); } /** * @since 2.18.0 */ public PropertyFilePropertySource(final String fileName, final b...
PropertyFilePropertySource
java
apache__camel
dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MinioEndpointBuilderFactory.java
{ "start": 72732, "end": 76632 }
class ____ set in the request. * * The option is a: <code>java.lang.String</code> type. * * Group: producer * * @param storageClass the value to set * @return the dsl builder */ default MinioEndpointProducerBuilder storageClass(String st...
to
java
alibaba__druid
core/src/test/java/com/alibaba/druid/bvt/sql/oracle/OracleExplainTest.java
{ "start": 930, "end": 3000 }
class ____ extends OracleTest { public void test_0() throws Exception { String sql = // "EXPLAIN PLAN SET STATEMENT_ID='PLUS19628905' FOR select * from( select row_.*, rownum rownum_ from( SELECT h.id taskId, t.id tradeId, t.OUT_ORDER_ID orderId, t.SELLER_SEQ sellerSeq, t.BUYER_SEQ buye...
OracleExplainTest
java
spring-projects__spring-boot
system-test/spring-boot-image-system-tests/src/systemTest/java/org/springframework/boot/image/assertions/ContainerConfigAssert.java
{ "start": 2783, "end": 3225 }
class ____ extends AbstractMapAssert<LabelsAssert, Map<String, String>, String, String> { protected LabelsAssert(Map<String, String> labels) { super(labels, LabelsAssert.class); } } /** * Asserts for the JSON content in the {@code io.buildpacks.build.metadata} label. * * See <a href= * "https://gith...
LabelsAssert
java
spring-projects__spring-boot
smoke-test/spring-boot-smoke-test-structured-logging-log4j2/src/main/java/smoketest/structuredlogging/log4j2/DuplicateJsonMembersCustomizer.java
{ "start": 854, "end": 1109 }
class ____ implements StructuredLoggingJsonMembersCustomizer<Object> { @Override public void customize(Members<Object> members) { members.add("test").as(Objects::toString); members.add("test").as(Objects::toString); } }
DuplicateJsonMembersCustomizer
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/common/NamedRegistry.java
{ "start": 699, "end": 789 }
class ____. Used to ensure implementations are registered only once. */ public
implementation
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/insertordering/InsertOrderingRCATest.java
{ "start": 14806, "end": 16500 }
class ____ extends Expression { private Expression left; private Expression right; private MathOperator op; public MathExpression() { } public MathExpression(Expression left, Expression right, MathOperator op) { this.left = left; this.right = right; this.op = op; } @ManyToOne(cascade = Casca...
MathExpression
java
spring-projects__spring-framework
spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java
{ "start": 2930, "end": 3684 }
class ____ automatically opens a default "system" TCP connection to the * message broker that is used for sending messages that originate from the server * application (as opposed to from a client). Such messages are not associated with * any client and therefore do not have a session id header. The "system" connect...
also
java
elastic__elasticsearch
libs/entitlement/qa/entitlement-test-plugin/src/main/java/org/elasticsearch/entitlement/qa/test/DummyImplementations.java
{ "start": 11445, "end": 11691 }
class ____ extends ServerSocket { DummyBoundServerSocket() { super(new DummySocketImpl()); } @Override public boolean isBound() { return true; } } static
DummyBoundServerSocket
java
quarkusio__quarkus
extensions/oidc-token-propagation-reactive/deployment/src/test/java/io/quarkus/oidc/token/propagation/reactive/deployment/test/AccessTokenAnnotationTest.java
{ "start": 8449, "end": 8704 }
interface ____ { @AccessToken(exchangeTokenClient = "named") @GET String getUserName(); } // tests no AmbiguousResolutionException is raised @Singleton @Unremovable public static
NamedClientDefaultExchange_OnMethod
java
apache__hadoop
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/resources/DoAsParam.java
{ "start": 899, "end": 1415 }
class ____ extends StringParam { /** Parameter name. */ public static final String NAME = "doas"; /** Default parameter value. */ public static final String DEFAULT = ""; private static final Domain DOMAIN = new Domain(NAME, null); /** * Constructor. * @param str a string representation of the param...
DoAsParam
java
apache__camel
dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AWS2S3EndpointBuilderFactory.java
{ "start": 52687, "end": 67443 }
interface ____ extends EndpointConsumerBuilder { default AWS2S3EndpointConsumerBuilder basic() { return (AWS2S3EndpointConsumerBuilder) this; } /** * Define the customer algorithm to use in case CustomerKey is enabled. * * The o...
AdvancedAWS2S3EndpointConsumerBuilder
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/query/criteria/internal/NullPrecedenceTest.java
{ "start": 1929, "end": 2334 }
class ____ { private long id; private String bar; public Foo() { } public Foo(long id, String bar) { this.id = id; this.bar = bar; } @Id @Column(nullable = false) public long getId() { return this.id; } public void setId(final long id) { this.id = id; } public String getBar()...
Foo
java
alibaba__nacos
client/src/main/java/com/alibaba/nacos/client/config/impl/ConfigFuzzyWatcherWrapper.java
{ "start": 900, "end": 2131 }
class ____ { long syncVersion = 0; FuzzyWatchEventWatcher fuzzyWatchEventWatcher; public ConfigFuzzyWatcherWrapper(FuzzyWatchEventWatcher fuzzyWatchEventWatcher) { this.fuzzyWatchEventWatcher = fuzzyWatchEventWatcher; } /** * Unique identifier for the listener. ...
ConfigFuzzyWatcherWrapper
java
apache__camel
components/camel-mail/src/generated/java/org/apache/camel/component/mail/MailComponentConfigurer.java
{ "start": 731, "end": 20018 }
class ____ extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter { private org.apache.camel.component.mail.MailConfiguration getOrCreateConfiguration(MailComponent target) { if (target.getConfiguration() == null) { target.setConfiguration(new org.apa...
MailComponentConfigurer
java
apache__flink
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/schema/CatalogSourceTable.java
{ "start": 2864, "end": 8530 }
class ____ extends FlinkPreparingTableBase { private final CatalogSchemaTable schemaTable; public CatalogSourceTable( RelOptSchema relOptSchema, List<String> names, RelDataType rowType, CatalogSchemaTable schemaTable) { super(relOptSchema, rowType, names...
CatalogSourceTable
java
spring-projects__spring-boot
core/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfigurationTests.java
{ "start": 4955, "end": 5079 }
class ____ { @Bean Counter counter() { return new Counter(); } } @ManagedResource public static
TestConfiguration
java
apache__logging-log4j2
log4j-api-test/src/test/java/org/apache/logging/log4j/message/JsonMessage.java
{ "start": 1066, "end": 1991 }
class ____ implements Message { private static final long serialVersionUID = 1L; private static final ObjectMapper mapper = new ObjectMapper(); private final Object object; /** * Constructs a JsonMessage. * * @param object the Object to serialize. */ public JsonMessage(final Ob...
JsonMessage
java
quarkusio__quarkus
extensions/devservices/mysql/src/main/java/io/quarkus/devservices/mysql/deployment/MySQLDatasourceServiceConfigurator.java
{ "start": 742, "end": 2193 }
class ____ implements DatasourceServiceConfigurator { private final static String[] USERNAME_ENVS = new String[] { "MYSQL_USER" }; private final static String[] PASSWORD_ENVS = new String[] { "MYSQL_PASSWORD" }; private final static String[] DATABASE_ENVS = new String[] { "MYSQL_DATABASE" }; public ...
MySQLDatasourceServiceConfigurator
java
spring-projects__spring-framework
spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/JRubyScriptTemplateTests.java
{ "start": 1433, "end": 2698 }
class ____ { @Test void renderTemplate() throws Exception { Map<String, Object> model = Map.of( "title", "Layout example", "body", "This is the body" ); String url = "org/springframework/web/reactive/result/view/script/jruby/template.erb"; MockServerHttpResponse response = renderViewWithModel(url, mode...
JRubyScriptTemplateTests
java
assertj__assertj-core
assertj-core/src/test/java/org/assertj/core/error/ShouldBeEqualNormalizingUnicode_create_Test.java
{ "start": 1255, "end": 2190 }
class ____ { @Test void should_create_error_message() { // GIVEN ErrorMessageFactory factory = shouldBeEqualNormalizingUnicode("\u00C4", "\u0041", "Ä", "A"); // WHEN String message = factory.create(new TestDescription("Test"), STANDARD_REPRESENTATION); // THEN then(message).isEqualTo(format(...
ShouldBeEqualNormalizingUnicode_create_Test
java
apache__flink
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/DefaultStateTransitionManager.java
{ "start": 9034, "end": 10338 }
class ____ extends Phase { @Nullable private Temporal firstChangeEventTimestamp; private Cooldown( Temporal timeOfLastRescale, Supplier<Temporal> clock, DefaultStateTransitionManager context, Duration cooldownTimeout) { super(...
Cooldown
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/action/support/replication/ReplicationOperation.java
{ "start": 31529, "end": 31991 }
class ____ extends ElasticsearchException { public RetryOnPrimaryException(ShardId shardId, String msg) { this(shardId, msg, null); } RetryOnPrimaryException(ShardId shardId, String msg, Throwable cause) { super(msg, cause); setShard(shardId); } ...
RetryOnPrimaryException
java
hibernate__hibernate-orm
hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/customtype/ObjectUserType.java
{ "start": 516, "end": 653 }
class ____ and the second one * containing binary data. * * @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com) */ public
name
java
quarkusio__quarkus
integration-tests/openapi/src/main/java/io/quarkus/it/openapi/jaxrs/IntegerResource.java
{ "start": 490, "end": 3167 }
class ____ { @GET @Path("/justInteger") public Integer justInteger() { return 0; } @POST @Path("/justInteger") public Integer justInteger(Integer body) { return body; } @GET @Path("/justInt") public int justInt() { return 0; } @POST @Pat...
IntegerResource
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/jakarta/JakartaXmlSmokeTests.java
{ "start": 1284, "end": 3242 }
class ____ { @Test public void testLoadingOrmXml(ServiceRegistryScope scope) { final ClassLoaderService cls = scope.getRegistry().getService( ClassLoaderService.class ); final MappingBinder mappingBinder = new MappingBinder( cls, MappingBinder.VALIDATING ); final InputStream inputStream = cls.locateResourceStre...
JakartaXmlSmokeTests
java
micronaut-projects__micronaut-core
test-suite/src/test/java/io/micronaut/docs/web/router/routematch/RouteMatchTest.java
{ "start": 833, "end": 1224 }
class ____ { @Test void testRouteMatchRetrieval(@Client("/")HttpClient httpClient) { BlockingHttpClient client = httpClient.toBlocking(); assertEquals("text/plain", client.retrieve(HttpRequest.GET("/routeMatch").accept(MediaType.TEXT_PLAIN), String.class)); } @Requires(property = "spec...
RouteMatchTest
java
FasterXML__jackson-databind
src/test/java/tools/jackson/databind/ser/JsonValueSerializationTest.java
{ "start": 5000, "end": 5330 }
class ____ { @JsonValue public List<Elem1806> getThings() { return Collections.singletonList(new Elem1806.Impl()); } } @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.WRAPPER_OBJECT) @JsonSubTypes(@JsonSubTypes.Type(value = Elem1806.Impl.class, name = "impl")...
Bean1806
java
spring-projects__spring-security
oauth2/oauth2-core/src/test/java/org/springframework/security/oauth2/core/OAuth2TokenIntrospectionClaimAccessorTests.java
{ "start": 1175, "end": 6815 }
class ____ { private final Map<String, Object> claims = new HashMap<>(); private final OAuth2TokenIntrospectionClaimAccessor claimAccessor = (() -> this.claims); @BeforeEach public void setup() { this.claims.clear(); } @Test public void isActiveWhenActiveClaimNotExistingThenReturnFalse() { assertThat(thi...
OAuth2TokenIntrospectionClaimAccessorTests
java
elastic__elasticsearch
server/src/main/java/org/elasticsearch/action/ActionRunnable.java
{ "start": 1004, "end": 5880 }
class ____<Response> extends AbstractRunnable { protected final ActionListener<Response> listener; /** * Creates a {@link Runnable} that invokes the given listener with {@code null} after the given runnable has executed. * @param listener Listener to invoke * @param runnable Runnable to execute...
ActionRunnable
java
apache__camel
components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvUnmarshalCommentMarkerSpringTest.java
{ "start": 1285, "end": 2446 }
class ____ extends CamelSpringTestSupport { @EndpointInject("mock:result") private MockEndpoint result; @SuppressWarnings("unchecked") @Test void testCsvUnmarshal() throws Exception { result.expectedMessageCount(1); template.sendBody("direct:start", "# Cool books list (comment)\n1...
CsvUnmarshalCommentMarkerSpringTest
java
hibernate__hibernate-orm
hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/EmbeddableWithPluralAttributeTest.java
{ "start": 1863, "end": 1950 }
class ____ { @Id private Integer id; private B b; } @Embeddable public static
A
java
quarkusio__quarkus
extensions/resteasy-classic/resteasy/deployment/src/test/java/io/quarkus/resteasy/test/root/BuildProfileTest.java
{ "start": 3513, "end": 3780 }
class ____ { @GET @Path("ok") public String ok() { return "ok2"; } } @IfBuildProperty(name = "some.prop1", stringValue = "v1") // will be enabled because the value matches @Provider public static
ResourceTest2
java
apache__hadoop
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/GetTaskReportsRequest.java
{ "start": 994, "end": 1215 }
interface ____ { public abstract JobId getJobId(); public abstract TaskType getTaskType(); public abstract void setJobId(JobId jobId); public abstract void setTaskType(TaskType taskType); }
GetTaskReportsRequest
java
google__dagger
javatests/dagger/hilt/android/AndroidEntryPointBaseClassTest.java
{ "start": 3301, "end": 3398 }
class ____ extends Hilt_AndroidEntryPointBaseClassTest_LS {} @AndroidEntryPoint public static
LS