repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
google/gson | 1,139 | test-shrinker/src/main/java/com/example/TestExecutor.java | package com.example;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Supplier;
public class TestExecutor {
private TestExecutor() {}
/**
* Helper method for running individual tests. In case of an exception wraps it and includes the
* {@code name} of the test to make debugging issues with the obfuscated JARs a bit easier.
*/
public static void run(
BiConsumer<String, String> outputConsumer, String name, Supplier<String> resultSupplier) {
String result;
try {
result = resultSupplier.get();
} catch (Throwable t) {
throw new RuntimeException("Test failed: " + name, t);
}
outputConsumer.accept(name, result);
}
/**
* Returns {@code t}, but in a way which (hopefully) prevents code shrinkers from simplifying
* this.
*/
public static <T> T same(T t) {
// This is essentially `return t`, but contains some redundant code to try
// prevent the code shrinkers from simplifying this
return Optional.of(t)
.map(v -> Optional.of(v).get())
.orElseThrow(() -> new AssertionError("unreachable"));
}
}
|
google/guava | 1,112 | android/guava-testlib/src/com/google/common/collect/testing/TestSubjectGenerator.java | /*
* Copyright (C) 2008 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.common.collect.testing;
import com.google.common.annotations.GwtCompatible;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
* To be implemented by test generators that can produce test subjects without requiring any
* parameters.
*
* @param <T> the type created by this generator.
* @author George van den Driessche
*/
@GwtCompatible
@NullMarked
public interface TestSubjectGenerator<T extends @Nullable Object> {
T createTestSubject();
}
|
google/j2cl | 1,097 | transpiler/javatests/com/google/j2cl/integration/java/allsimplebridges/Tester674.java | /*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package allsimplebridges;
import static com.google.j2cl.integration.testing.Asserts.assertTrue;
public class Tester674 {
static interface I1 {
default String get(String value) {
return "I1.get";
}
}
static class C1 implements I1 {
C1() {}
public String get(Object value) {
return "C1.get";
}
}
public static void test() {
C1 s = new C1();
assertTrue(s.get(new Object()).equals("C1.get"));
assertTrue(((I1) s).get("").equals("I1.get"));
}
}
|
google/j2cl | 1,122 | benchmarking/java/com/google/j2cl/benchmarks/octane/DeltaBlueBenchmark.java | /*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.j2cl.benchmarks.octane;
import com.google.j2cl.benchmarking.framework.AbstractBenchmark;
import com.google.j2cl.benchmarks.octane.deltablue.DeltaBlue;
import javax.annotation.Nullable;
/**
* This is the Java port of the JavaScript implementation of DeltaBlue benchmark from the V8 octane
* benchmark suite.
*/
public class DeltaBlueBenchmark extends AbstractBenchmark {
@Nullable
@Override
public Object run() {
DeltaBlue.chainTest(100);
DeltaBlue.projectionTest(100);
return null;
}
}
|
google/nomulus | 1,108 | core/src/test/java/google/registry/privileges/secretmanager/SqlCredentialTest.java | // Copyright 2024 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.privileges.secretmanager;
import static com.google.common.truth.Truth.assertThat;
import org.junit.jupiter.api.Test;
/** Unit tests for {@link SqlCredential}. */
public class SqlCredentialTest {
@Test
void secrets_arentWrittenOutByToString() {
SqlCredential cred = SqlCredential.create("joshua", "rosebud");
String credStr = cred.toString();
assertThat(credStr).doesNotContain("joshua");
assertThat(credStr).doesNotContain("rosebud");
}
}
|
google/nomulus | 1,128 | core/src/main/java/google/registry/model/contact/ContactAuthInfo.java | // Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.model.contact;
import google.registry.model.eppcommon.AuthInfo;
import jakarta.persistence.Embeddable;
import jakarta.xml.bind.annotation.XmlType;
/** A version of authInfo specifically for contacts. */
@Embeddable
@XmlType(namespace = "urn:ietf:params:xml:ns:contact-1.0")
public class ContactAuthInfo extends AuthInfo {
public static ContactAuthInfo create(PasswordAuth pw) {
ContactAuthInfo instance = new ContactAuthInfo();
instance.pw = pw;
return instance;
}
}
|
google/oss-fuzz | 1,097 | projects/jetty/project-parent/fuzz-targets/src/test/java/com/example/URIUtilDecodePathFuzzer.java | // Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in co mpliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//////////////////////////////////////////////////////////////////////////////////
package com.example;
import com.code_intelligence.jazzer.api.FuzzedDataProvider;
import com.code_intelligence.jazzer.junit.FuzzTest;
import org.eclipse.jetty.util.URIUtil;
class URIUtilDecodePathFuzzer {
@FuzzTest
void myFuzzTest(FuzzedDataProvider data) {
try {
URIUtil.decodePath(data.consumeRemainingAsString());
}
catch(IllegalArgumentException e) {
}
}
}
|
google/oss-fuzz | 1,112 | projects/netty/src/main/java/io/netty/handler/codec/http/HttpRequestDecoderFuzzer.java | // Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
package io.netty.handler.codec.http;
import com.code_intelligence.jazzer.api.FuzzedDataProvider;
import io.netty.handler.HandlerFuzzerBase;
public class HttpRequestDecoderFuzzer extends HandlerFuzzerBase {
{
channel.pipeline().addLast(new HttpRequestDecoder());
}
public static void fuzzerTestOneInput(FuzzedDataProvider fuzzedDataProvider) {
new HttpRequestDecoderFuzzer().test(fuzzedDataProvider);
}
}
|
google/oss-fuzz | 1,119 | projects/osgi/CoreVersionFuzzer.java | /*
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.code_intelligence.jazzer.api.FuzzedDataProvider;
import org.osgi.framework.Version;
public class CoreVersionFuzzer {
public static void fuzzerTestOneInput(FuzzedDataProvider fuzzedDataProvider) {
Version v = null;
try {
v = new Version(fuzzedDataProvider.consumeRemainingAsString());
} catch(IllegalArgumentException ex) {
/* documented, ignore */
return;
}
/*
* these don't throw exceptions
*/
v.getMajor();
v.getMinor();
v.getMicro();
v.getQualifier();
v.toString();
}
} |
google/truth | 1,110 | refactorings/src/test/java/com/google/common/truth/refactorings/FailWithFactsTest.java | /*
* Copyright (c) 2019 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.common.truth.refactorings;
import com.google.errorprone.CompilationTestHelper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@RunWith(JUnit4.class)
public class FailWithFactsTest {
private final CompilationTestHelper compilationHelper =
CompilationTestHelper.newInstance(FailWithFacts.class, getClass());
@Test
public void positiveCase() {
compilationHelper.addSourceFile("testdata/FailWithFactsPositiveCases.java").doTest();
}
}
|
googleapis/discovery-artifact-manager | 1,089 | toolkit/src/main/java/com/google/api/codegen/transformer/TransformationContext.java | /* Copyright 2017 Google Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.api.codegen.transformer;
import com.google.api.codegen.config.ProductConfig;
/**
* The context for transforming an API model, in an input-agnostic way, into a view model to use for
* client library generation.
*/
public interface TransformationContext {
ProductConfig getProductConfig();
SurfaceNamer getNamer();
ImportTypeTable getImportTypeTable();
TransformationContext withNewTypeTable();
TransformationContext withNewTypeTable(String newPackageName);
}
|
googleapis/google-cloud-java | 1,032 | java-phishingprotection/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto
// Protobuf Java Version: 3.25.8
package com.google.phishingprotection.v1beta1;
public interface ReportPhishingResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.phishingprotection.v1beta1.ReportPhishingResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,033 | java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/CreateEvaluationMetadataOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/discoveryengine/v1alpha/evaluation_service.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.discoveryengine.v1alpha;
public interface CreateEvaluationMetadataOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.CreateEvaluationMetadata)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,037 | java-workspaceevents/proto-google-cloud-workspaceevents-v1/src/main/java/com/google/apps/events/subscriptions/v1/CreateSubscriptionMetadataOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/apps/events/subscriptions/v1/subscriptions_service.proto
// Protobuf Java Version: 3.25.8
package com.google.apps.events.subscriptions.v1;
public interface CreateSubscriptionMetadataOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.apps.events.subscriptions.v1.CreateSubscriptionMetadata)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,037 | java-workspaceevents/proto-google-cloud-workspaceevents-v1/src/main/java/com/google/apps/events/subscriptions/v1/DeleteSubscriptionMetadataOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/apps/events/subscriptions/v1/subscriptions_service.proto
// Protobuf Java Version: 3.25.8
package com.google.apps.events.subscriptions.v1;
public interface DeleteSubscriptionMetadataOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.apps.events.subscriptions.v1.DeleteSubscriptionMetadata)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,037 | java-workspaceevents/proto-google-cloud-workspaceevents-v1/src/main/java/com/google/apps/events/subscriptions/v1/UpdateSubscriptionMetadataOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/apps/events/subscriptions/v1/subscriptions_service.proto
// Protobuf Java Version: 3.25.8
package com.google.apps.events.subscriptions.v1;
public interface UpdateSubscriptionMetadataOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.apps.events.subscriptions.v1.UpdateSubscriptionMetadata)
com.google.protobuf.MessageOrBuilder {}
|
googleworkspace/java-samples | 1,132 | gmail/snippets/src/test/java/TestCreateDraft.java | // Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import static org.junit.Assert.assertNotNull;
import com.google.api.services.gmail.model.Draft;
import java.io.IOException;
import javax.mail.MessagingException;
import org.junit.Test;
// Unit testcase for gmail create draft snippet
public class TestCreateDraft extends BaseTest {
@Test
public void testCreateDraft() throws MessagingException, IOException {
Draft draft = CreateDraft.createDraftMessage(RECIPIENT, TEST_USER);
assertNotNull(draft);
this.service.users().drafts().delete("me", draft.getId()).execute();
}
}
|
hibernate/hibernate-orm | 1,031 | hibernate-core/src/test/java/org/hibernate/orm/test/jpa/CompositeIdRowValueTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.jpa;
import jakarta.persistence.Query;
import org.hibernate.testing.orm.junit.JiraKey;
import org.hibernate.testing.orm.junit.EntityManagerFactoryScope;
import org.hibernate.testing.orm.junit.Jpa;
import org.junit.jupiter.api.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
@JiraKey( value = "HHH-9029")
@Jpa(annotatedClasses = {
EntityWithCompositeId.class,
CompositeId.class
})
public class CompositeIdRowValueTest {
@Test
public void testTupleAfterSubQuery(EntityManagerFactoryScope scope) {
scope.inTransaction(
entityManager -> {
Query q = entityManager.createQuery("SELECT e FROM EntityWithCompositeId e "
+ "WHERE EXISTS (SELECT 1 FROM EntityWithCompositeId) "
+ "AND e.id = :id");
q.setParameter("id", new CompositeId(1, 2));
assertThat(q.getResultList().size(), is(0));
}
);
}
}
|
hibernate/hibernate-orm | 1,035 | hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/binding/annotations/access/jpa/Course2.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.bootstrap.binding.annotations.access.jpa;
import java.util.List;
import jakarta.persistence.Access;
import jakarta.persistence.AccessType;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.OneToMany;
/**
* @author Hardy Ferentschik
*/
@Entity
@Access(AccessType.PROPERTY)
public class Course2 {
private long id;
private String title;
private List<Student> students;
@Id
@GeneratedValue
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
@OneToMany(cascade = CascadeType.ALL)
public List<Student> getStudents() {
return students;
}
public void setStudents(List<Student> students) {
this.students = students;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}
|
hibernate/hibernate-orm | 1,035 | hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/binding/annotations/access/jpa/Course4.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.bootstrap.binding.annotations.access.jpa;
import java.util.List;
import jakarta.persistence.Access;
import jakarta.persistence.AccessType;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.OneToMany;
/**
* @author Hardy Ferentschik
*/
@Entity
@Access(AccessType.PROPERTY)
public class Course4 {
@Id
@GeneratedValue
private long id;
private String title;
@OneToMany(cascade = CascadeType.ALL)
private List<Student> students;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public List<Student> getStudents() {
return students;
}
public void setStudents(List<Student> students) {
this.students = students;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}
|
hibernate/hibernate-orm | 1,068 | hibernate-core/src/test/java/org/hibernate/orm/test/type/descriptor/jdbc/ArrayJdbcTypeTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.type.descriptor.jdbc;
import org.hibernate.testing.orm.junit.JiraKey;
import org.hibernate.type.descriptor.jdbc.ArrayJdbcType;
import org.hibernate.type.descriptor.jdbc.BigIntJdbcType;
import org.hibernate.type.descriptor.jdbc.IntegerJdbcType;
import org.hibernate.type.descriptor.jdbc.JdbcType;
import org.junit.jupiter.api.Test;
import java.util.HashMap;
import java.util.Map;
import static org.hamcrest.MatcherAssert.assertThat;
public class ArrayJdbcTypeTest {
@Test
@JiraKey(value = "HHH-17662")
public void testEquality() {
Map<JdbcType, String> typeMap = new HashMap<>();
JdbcType bigInt = new BigIntJdbcType();
typeMap.put(new ArrayJdbcType(bigInt), "bees");
typeMap.put(new ArrayJdbcType(bigInt), "bees");
typeMap.put(new ArrayJdbcType(bigInt), "bees");
typeMap.put(new ArrayJdbcType(new IntegerJdbcType()), "waffles");
assertThat("A map of arrays only contains non duplicate entries", typeMap.size() == 2);
}
}
|
hibernate/hibernate-orm | 1,108 | hibernate-core/src/main/java/org/hibernate/TransientObjectException.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate;
/**
* Thrown if a transient instance of an entity class is passed to
* a {@link Session} method that expects a persistent instance,
* or if the state of an entity instance cannot be made persistent
* because the instance holds a reference to a transient entity.
* <p>
* An entity is considered <em>transient</em> if it is:
* <ul>
* <li>a newly-instantiated instance of an entity class which has
* never been {@linkplain Session#persist made persistent} in
* the database, or
* <li>an entity instance previously associated with a persistence
* context which has been {@linkplain Session#remove removed}
* from the database.
* </ul>
*
* @author Gavin King
*/
public class TransientObjectException extends HibernateException {
/**
* Constructs a {@code TransientObjectException} using the supplied message.
*
* @param message The message explaining the exception condition
*/
public TransientObjectException(String message) {
super( message );
}
}
|
hibernate/hibernate-search | 1,031 | backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/analysis/model/dsl/impl/ElasticsearchCharFilterParametersStep.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.backend.elasticsearch.analysis.model.dsl.impl;
import org.hibernate.search.backend.elasticsearch.analysis.model.impl.ElasticsearchAnalysisDefinitionCollector;
import org.hibernate.search.backend.elasticsearch.logging.impl.AnalysisLog;
import org.hibernate.search.backend.elasticsearch.lowlevel.index.analysis.impl.CharFilterDefinition;
import org.hibernate.search.util.common.impl.StringHelper;
class ElasticsearchCharFilterParametersStep
extends AbstractElasticsearchAnalysisComponentParametersStep<CharFilterDefinition> {
ElasticsearchCharFilterParametersStep(String name) {
super( name, new CharFilterDefinition() );
}
@Override
public void contribute(ElasticsearchAnalysisDefinitionCollector collector) {
if ( StringHelper.isEmpty( definition.getType() ) ) {
throw AnalysisLog.INSTANCE.invalidElasticsearchCharFilterDefinition( name );
}
collector.collect( name, definition );
}
}
|
hibernate/hibernate-search | 1,040 | lucene-next/backend/lucene/src/main/java/org/hibernate/search/backend/lucene/work/spi/LuceneWorkExecutorProvider.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.backend.lucene.work.spi;
import org.hibernate.search.engine.cfg.ConfigurationPropertySource;
import org.hibernate.search.engine.common.execution.spi.SimpleScheduledExecutor;
import org.hibernate.search.engine.environment.thread.spi.ThreadPoolProvider;
import org.hibernate.search.util.common.annotation.Incubating;
@Incubating
public interface LuceneWorkExecutorProvider {
SimpleScheduledExecutor writeExecutor(Context context);
interface Context {
/**
* @return A provider of thread pools.
*/
ThreadPoolProvider threadPoolProvider();
/**
* Gives access to various configuration properties that might be useful during executor instantiation.
*/
ConfigurationPropertySource propertySource();
/**
* @return recommended thread name prefix that can be passed to work executor. Recommendation is based on the
* instantiation context.
*/
String recommendedThreadNamePrefix();
}
}
|
hibernate/hibernate-validator | 1,035 | engine/src/test/java/org/hibernate/validator/test/internal/engine/tracking/ProcessedBeansTrackingNoCycles3Test.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.validator.test.internal.engine.tracking;
import java.util.List;
import jakarta.validation.Valid;
import jakarta.validation.Validator;
import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.testutils.ValidatorUtil;
import org.testng.annotations.Test;
/**
* This is not a real test, just an illustration.
* <p>
* In this case, given we will have all the subclasses of Child in the metadata, we should be able to know there are no
* cycles.
*
* @author Guillaume Smet
*/
public class ProcessedBeansTrackingNoCycles3Test {
@Test
public void testSerializeHibernateEmail() throws Exception {
Validator validator = ValidatorUtil.getValidator();
validator.validate( new Parent() );
}
private static class Parent {
@NotNull
private String property;
private List<@Valid ? extends Child> children;
}
private static class Child {
@NotNull
private String property;
}
}
|
openjdk/jdk8 | 1,113 | jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/InternalRuntimeError.java | /*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: InternalRuntimeError.java,v 1.0 2009-11-25 04:34:28 joehw Exp $
*/
package com.sun.org.apache.xalan.internal.xsltc.runtime;
/**
* Class to express failed assertions and similar for the xsltc runtime.
* As java.lang.AssertionError was introduced in JDK 1.4 we can't use that yet.
*/
public class InternalRuntimeError extends Error {
public InternalRuntimeError(String message) {
super(message);
}
}
|
openjdk/jdk8 | 1,118 | langtools/test/tools/javac/diags/examples/StaticImportOnlyClassesAndInterfaces/Other.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package p;
public class Other {
public static int[] array;
}
|
openjdk/jdk8 | 1,140 | langtools/test/tools/javac/diags/examples/IllegalEscapeChar.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.illegal.esc.char
class IllegalEscapeChar {
String s = "\!";
}
|
openjdk/jdk8 | 1,143 | langtools/test/tools/javac/diags/examples/NoInterfaceExpected.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.no.intf.expected.here
class NoInterfaceExpected extends Runnable { }
|
openjdk/jdk8 | 1,148 | jdk/test/java/lang/ClassLoader/findSystemClass/Loadee.java | /*
* Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public class Loadee {
Loader app;
public Loadee() {
app = new Loader();
}
}
|
openjdk/jdk8 | 1,152 | langtools/test/tools/javac/OverrideChecks/T4720359b.java | /*
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package p2;
public class T4720359b extends p1.T4720359a {
public static int m() { return 1; }
}
|
openjdk/jtreg | 1,175 | test/skip/SkippedException.java | /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public class SkippedException extends RuntimeException {
public SkippedException(String s) {
super(s);
}
}
|
oracle/graalvm-reachability-metadata | 1,056 | tests/src/org.hibernate.orm/hibernate-core/6.1.1.Final/src/test/java/org/hibernate/orm/Item.java | /*
* Copyright and related rights waived via CC0
*
* You should have received a copy of the CC0 legalcode along with this
* work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
package org.hibernate.orm;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
@Entity
@Table(name = "ITEMS")
public class Item {
@Id
@GeneratedValue(generator = "increment")
@GenericGenerator(name = "increment", strategy = "increment")
private Long id;
@ManyToOne
@JoinColumn(name = "cart_id", nullable = false)
private Cart cart;
public Item() {
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Cart getCart() {
return cart;
}
public void setCart(Cart cart) {
this.cart = cart;
}
}
|
apache/commons-math | 1,104 | commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/DistanceMeasure.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.math4.neuralnet;
import java.util.function.ToDoubleBiFunction;
/**
* Interface for distance measures between two n-dimensional vectors.
*
* @since 4.0
*/
public interface DistanceMeasure extends ToDoubleBiFunction<double[], double[]> {
// Convenience interface
}
|
apache/cxf | 1,111 | systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/GenericBookStoreSpringInt2.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.systest.jaxrs;
import java.util.Collections;
import java.util.List;
public class GenericBookStoreSpringInt2 implements GenericBookServiceInterface {
public List<SuperBook> getSuperBook() {
return Collections.singletonList(new SuperBook("super", 111L, true));
}
}
|
apache/cxf | 1,114 | rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/service/QueryResult.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.jaxws.service;
/**
*
*/
public class QueryResult<Q, T> {
Q q;
T t;
public Q getQ() {
return q;
}
public void setQ(Q pq) {
this.q = pq;
}
public T getT() {
return t;
}
public void setT(T pt) {
this.t = pt;
}
}
|
apache/cxf | 1,116 | rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/dto/ObjectDTO.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.aegis.type.java5.dto;
import java.util.List;
public class ObjectDTO {
List<? extends Object> objects;
public List<? extends Object> getObjects() {
return objects;
}
public void setObjects(List<? extends Object> objects) {
this.objects = objects;
}
}
|
apache/cxf | 1,118 | rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/spring/NamespaceHandler.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.binding.soap.spring;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
public class NamespaceHandler extends NamespaceHandlerSupport {
public void init() {
registerBeanDefinitionParser("soapBinding", new SoapBindingInfoConfigBeanDefinitionParser());
}
}
|
apache/cxf | 1,127 | core/src/main/java/org/apache/cxf/validation/BeanValidationInInterceptor.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.validation;
import org.apache.cxf.phase.Phase;
public class BeanValidationInInterceptor extends AbstractBeanValidationInterceptor {
public BeanValidationInInterceptor() {
super(Phase.PRE_INVOKE);
}
public BeanValidationInInterceptor(String phase) {
super(phase);
}
}
|
apache/drill | 1,111 | exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillViewInfoProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.drill.exec.planner.logical;
/**
* Interface used by Drill components such as InformationSchema generator to get view info.
* All view tables need to implement this interface.
*/
public interface DrillViewInfoProvider {
/** Get the query part of the view. */
String getViewSql();
}
|
apache/druid | 1,106 | server/src/main/java/org/apache/druid/server/coordinator/rules/BroadcastDistributionRule.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.server.coordinator.rules;
import org.apache.druid.timeline.DataSegment;
public abstract class BroadcastDistributionRule implements Rule
{
@Override
public void run(DataSegment segment, SegmentActionHandler handler)
{
handler.broadcastSegment(segment);
}
}
|
apache/druid | 1,113 | processing/src/main/java/org/apache/druid/segment/historical/HistoricalColumnSelector.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.segment.historical;
import org.apache.druid.query.monomorphicprocessing.CalledFromHotLoop;
import org.apache.druid.segment.ColumnValueSelector;
public interface HistoricalColumnSelector<T> extends ColumnValueSelector<T>
{
@CalledFromHotLoop
double getDouble(int offset);
}
|
apache/druid | 1,126 | quidem-ut/src/main/java/org/apache/druid/quidem/QuidemCaptureModule.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.quidem;
import com.google.inject.Binder;
import com.google.inject.Module;
import org.apache.druid.guice.Jerseys;
public class QuidemCaptureModule implements Module
{
@Override
public void configure(Binder binder)
{
Jerseys.addResource(binder, QuidemCaptureResource.class);
}
}
|
apache/dubbo-spi-extensions | 1,066 | dubbo-rpc-extensions/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/exception/DoublePathCheckException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.rpc.protocol.rest.exception;
/**
* path mapper contains current path will throw
*/
public class DoublePathCheckException extends RuntimeException {
public DoublePathCheckException(String message) {
super(message);
}
}
|
apache/dubbo | 1,108 | dubbo-common/src/test/java/org/apache/dubbo/rpc/executor/Mock1IsolationExecutorSupportFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.rpc.executor;
import org.apache.dubbo.common.URL;
public class Mock1IsolationExecutorSupportFactory implements IsolationExecutorSupportFactory {
@Override
public ExecutorSupport createIsolationExecutorSupport(URL url) {
return new Mock1ExecutorSupport();
}
}
|
apache/dubbo | 1,108 | dubbo-common/src/test/java/org/apache/dubbo/rpc/executor/Mock2IsolationExecutorSupportFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.rpc.executor;
import org.apache.dubbo.common.URL;
public class Mock2IsolationExecutorSupportFactory implements IsolationExecutorSupportFactory {
@Override
public ExecutorSupport createIsolationExecutorSupport(URL url) {
return new Mock2ExecutorSupport();
}
}
|
apache/dubbo | 1,130 | dubbo-compatible/src/test/java/org/apache/dubbo/cache/MyCacheFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.cache;
import com.alibaba.dubbo.cache.Cache;
import com.alibaba.dubbo.cache.support.AbstractCacheFactory;
import com.alibaba.dubbo.common.URL;
public class MyCacheFactory extends AbstractCacheFactory {
@Override
protected Cache createCache(URL url) {
return new MyCache(url);
}
}
|
apache/eventmesh | 1,053 | eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/src/main/java/org/apache/eventmesh/protocol/cloudevents/CloudEventsProtocolConstant.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.protocol.cloudevents;
public enum CloudEventsProtocolConstant {
;
public static final String PROTOCOL_NAME = "cloudevents";
public static final String PROTOCOL_DESC_GRPC_CLOUD_EVENT = "grpc-cloud-event";
}
|
apache/felix-dev | 1,067 | ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/parser/replay/Replay.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.ipojo.manipulator.metadata.annotation.model.parser.replay;
import org.objectweb.asm.AnnotationVisitor;
/**
* User: guillaume
* Date: 30/05/13
* Time: 17:23
*/
public interface Replay {
void accept(AnnotationVisitor visitor);
}
|
apache/fineract | 1,069 | fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargebackTransactionEvent.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.test.messaging.event.loan.transaction;
public class LoanChargebackTransactionEvent extends AbstractLoanTransactionEvent {
@Override
public String getEventName() {
return "LoanChargebackTransactionBusinessEvent";
}
}
|
apache/fineract | 1,083 | fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/MessageGatewayConfigurationData.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.campaigns.sms.data;
public record MessageGatewayConfigurationData(Long id, String connectionName, String hostName, int portNumber, String endPoint,
String userName, String password, boolean sslEnabled, String tenantAppKey) {
}
|
apache/fineract | 1,092 | fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/ImportHandler.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.bulkimport.importhandler;
import org.apache.fineract.infrastructure.bulkimport.data.Count;
import org.apache.poi.ss.usermodel.Workbook;
public interface ImportHandler {
Count process(Workbook workbook, String locale, String dateFormat);
}
|
apache/fineract | 1,094 | fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/request/AccrualAccountRequest.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.accounting.accrual.request;
import java.io.Serial;
import java.io.Serializable;
public record AccrualAccountRequest(String locale, String dateFormat, String tillDate) implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
}
|
apache/fineract | 1,098 | fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeExpenseOptions.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.test.data;
public enum AccountTypeExpenseOptions {
CREDIT_LOSS_BAD_DEBT(12), //
CREDIT_LOSS_BAD_DEBT_FRAUD(13), //
WRITTEN_OFF(16); //
public final Integer value;
AccountTypeExpenseOptions(Integer value) {
this.value = value;
}
}
|
apache/fineract | 1,100 | fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferChangedData.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.investor.data;
import java.time.LocalDate;
import lombok.Data;
@Data
public class ExternalTransferChangedData {
private LocalDate settlementDate;
private String transferExternalId;
private String ownerExternalId;
private String purchasePriceRatio;
}
|
apache/flink-statefun | 1,081 | statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/functions/ApplyingContext.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.statefun.flink.core.functions;
import org.apache.flink.statefun.flink.core.message.Message;
import org.apache.flink.statefun.sdk.Context;
public interface ApplyingContext extends Context {
void apply(LiveFunction function, Message inMessage);
}
|
apache/flink | 1,121 | flink-python/src/test/java/org/apache/flink/python/util/TestScalarFunction1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.python.util;
import org.apache.flink.table.functions.ScalarFunction;
/** Just a simple scalar function for testing add jars from python side. */
public class TestScalarFunction1 extends ScalarFunction {
public String eval(long a, String b) {
return a + " and " + b;
}
}
|
apache/freemarker | 1,129 | freemarker-core/src/main/java/freemarker/ext/xml/_JaxenNamespaces.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package freemarker.ext.xml;
import org.jaxen.NamespaceContext;
/**
* Don't use this class; it's only public to work around Google App Engine Java
* compliance issues. FreeMarker developers only: treat this class as package-visible.
*/
public class _JaxenNamespaces extends Namespaces implements NamespaceContext {
} |
apache/geaflow | 1,076 | geaflow/geaflow-core/geaflow-runtime/geaflow-operator/src/main/java/org/apache/geaflow/operator/base/io/SourceOperator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.geaflow.operator.base.io;
import org.apache.geaflow.operator.Operator;
public interface SourceOperator<T, R> extends Operator {
/**
* Fetch data from source function with windowId.
*/
R emit(long windowId) throws Exception;
}
|
apache/geaflow | 1,081 | geaflow/geaflow-dsl/geaflow-dsl-runtime/src/main/java/org/apache/geaflow/dsl/runtime/function/graph/StepSortFunction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.geaflow.dsl.runtime.function.graph;
import org.apache.geaflow.dsl.common.data.Path;
import org.apache.geaflow.dsl.common.data.RowVertex;
public interface StepSortFunction extends StepFunction {
void process(RowVertex currentVertex, Path path);
}
|
apache/geaflow | 1,086 | geaflow-console/app/common/dal/src/main/java/org/apache/geaflow/console/common/dal/mapper/UserRoleMappingMapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.geaflow.console.common.dal.mapper;
import org.apache.geaflow.console.common.dal.entity.UserRoleMappingEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface UserRoleMappingMapper extends GeaflowBaseMapper<UserRoleMappingEntity> {
}
|
apache/geode | 1,086 | geode-lucene/src/integrationTest/java/org/apache/geode/cache/lucene/NestedObjectSerializerOnSubclassIntegrationTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.geode.cache.lucene;
import org.apache.geode.cache.lucene.test.SubCustomer;
public class NestedObjectSerializerOnSubclassIntegrationTest
extends NestedObjectSeralizerIntegrationTest {
protected CustomerFactory getCustomerFactory() {
return SubCustomer::new;
}
}
|
apache/gobblin | 1,134 | gobblin-api/src/main/java/org/apache/gobblin/typedconfig/Key.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.gobblin.typedconfig;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Key {
String value();
}
|
apache/hadoop-common | 1,082 | hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/s3/TestInMemoryS3FileSystemContract.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.fs.s3;
import java.io.IOException;
public class TestInMemoryS3FileSystemContract
extends S3FileSystemContractBaseTest {
@Override
FileSystemStore getFileSystemStore() throws IOException {
return new InMemoryFileSystemStore();
}
}
|
apache/hadoop-common | 1,103 | hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/FSConstants.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hdfs.protocol;
/**
* @deprecated Please use {@link HdfsConstants}. This class
* is left only for other ecosystem projects which depended on
* it for SafemodeAction and DatanodeReport types.
*/
@Deprecated
public abstract class FSConstants extends HdfsConstants {
}
|
apache/hadoop | 1,045 | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/security/token/delegation/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@InterfaceAudience.Private
@InterfaceStability.Unstable
package org.apache.hadoop.mapreduce.security.token.delegation;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
|
apache/harmony | 1,109 | classlib/modules/awt/src/main/java/common/java/awt/datatransfer/MimeTypeParseException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package java.awt.datatransfer;
public class MimeTypeParseException extends Exception {
private static final long serialVersionUID = -5604407764691570741L;
public MimeTypeParseException(String s) {
super(s);
}
public MimeTypeParseException() {
super();
}
}
|
apache/harmony | 1,127 | classlib/modules/applet/src/main/java/java/applet/AppletStub.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author Pavel Dolgov
*/
package java.applet;
import java.net.URL;
public interface AppletStub {
URL getCodeBase();
void appletResize(int width, int height);
AppletContext getAppletContext();
URL getDocumentBase();
String getParameter(String name);
boolean isActive();
}
|
apache/harmony | 1,155 | drlvm/src/test/regression/H3738/Test.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.harmony.drlvm.tests.regression.h3738;
import junit.framework.TestCase;
import org.vmmagic.unboxed.*;
public class Test extends TestCase {
static Address a;
static long val;
public static void test() {
a = Address.fromLong(1L);
//crash in I8Lowerer here
val = a.toLong();
}
}
|
apache/hbase | 1,113 | hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/ServerNotRunningYetException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.ipc;
import java.io.IOException;
import org.apache.yetus.audience.InterfaceAudience;
@SuppressWarnings("serial")
@InterfaceAudience.Public
public class ServerNotRunningYetException extends IOException {
public ServerNotRunningYetException(String s) {
super(s);
}
}
|
apache/hbase | 1,116 | hbase-client/src/main/java/org/apache/hadoop/hbase/PleaseRestartMasterException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase;
import org.apache.yetus.audience.InterfaceAudience;
/**
* Thrown if the master requires restart.
*/
@InterfaceAudience.Public
public class PleaseRestartMasterException extends HBaseIOException {
public PleaseRestartMasterException(final String s) {
super(s);
}
}
|
apache/hive | 1,069 | standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LockState.java | /**
* Autogenerated by Thrift Compiler (0.16.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hive.metastore.api;
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)")
public enum LockState implements org.apache.thrift.TEnum {
ACQUIRED(1),
WAITING(2),
ABORT(3),
NOT_ACQUIRED(4);
private final int value;
private LockState(int value) {
this.value = value;
}
/**
* Get the integer value of this enum value, as defined in the Thrift IDL.
*/
public int getValue() {
return value;
}
/**
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
@org.apache.thrift.annotation.Nullable
public static LockState findByValue(int value) {
switch (value) {
case 1:
return ACQUIRED;
case 2:
return WAITING;
case 3:
return ABORT;
case 4:
return NOT_ACQUIRED;
default:
return null;
}
}
}
|
apache/hive | 1,099 | itests/hive-unit/src/test/java/org/apache/hive/service/auth/TestImproperTrustDomainAuthenticationHttp.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hive.service.auth;
import org.junit.BeforeClass;
public class TestImproperTrustDomainAuthenticationHttp extends TrustDomainAuthenticationTest {
@BeforeClass
public static void setUp() throws Exception {
initialize(HS2_TRANSPORT_MODE_HTTP, false);
}
}
|
apache/hive | 1,141 | ql/src/java/org/apache/hadoop/hive/ql/io/HivePartitioner.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hive.ql.io;
import org.apache.hadoop.mapred.Partitioner;
/** Partition keys by their {@link Object#hashCode()}. */
public interface HivePartitioner<K2, V2> extends Partitioner<K2, V2> {
/**
* Get the final bucket within a partition.
*/
public int getBucket(K2 key, V2 value, int numBuckets);
}
|
apache/ignite-3 | 1,093 | modules/cli/src/main/java/org/apache/ignite/internal/cli/config/exception/NonexistentPropertyException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.cli.config.exception;
/** CLI config property not found. */
public class NonexistentPropertyException extends RuntimeException {
public NonexistentPropertyException(String property) {
super("Property " + property + " doesn't exist.");
}
}
|
apache/ignite-3 | 1,105 | modules/cli/src/main/java/org/apache/ignite/internal/cli/core/repl/completer/DummyCompleter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.cli.core.repl.completer;
import java.util.List;
/** Dummy completer that returns empty list on any input. */
public class DummyCompleter implements DynamicCompleter {
@Override
public List<String> complete(String[] words) {
return List.of();
}
}
|
apache/ignite-extensions | 1,069 | modules/geospatial-ext/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/H2IndexingGeoSelfTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.processors.query.h2;
/**
* Geo-indexing test.
*/
public class H2IndexingGeoSelfTest extends H2IndexingAbstractGeoSelfTest {
/**
* Constructor.
*/
public H2IndexingGeoSelfTest() {
super(false);
}
}
|
apache/ignite | 1,086 | modules/core/src/test/java/org/apache/ignite/internal/processors/cache/warmup/SimpleObservableWarmUpConfiguration.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.processors.cache.warmup;
import org.apache.ignite.configuration.WarmUpConfiguration;
/**
* Configuration for {@link SimpleObservableWarmUpStrategy}.
*/
class SimpleObservableWarmUpConfiguration implements WarmUpConfiguration {
// No-op.
}
|
apache/ignite | 1,090 | modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/sql/generated/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Contains generated parser files.
*
* WARNING: Do not modify files in this package manually.
*
* To regenerate classes use command:
*
* mvn generate-sources -pl :ignite-calcite
*/
package org.apache.ignite.internal.processors.query.calcite.sql.generated;
|
apache/ignite | 1,099 | modules/core/src/test/java/org/apache/ignite/internal/metric/IoStatisticsCachePersistenceSelfTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.ignite.internal.metric;
/**
* Tests for cache IO statistics for persistence mode.
*/
public class IoStatisticsCachePersistenceSelfTest extends IoStatisticsCacheSelfTest {
/** {@inheritDoc} */
@Override protected boolean persist() {
return true;
}
}
|
apache/incubator-brooklyn | 1,080 | brooklyn-server/software/base/src/test/java/org/apache/brooklyn/entity/software/base/lifecycle/MyEntityApp.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.brooklyn.entity.software.base.lifecycle;
public class MyEntityApp {
public static void main(String[] args) throws InterruptedException {
System.out.println("Properties: "+System.getProperties());
Thread.sleep(60*60*1000);
}
}
|
apache/incubator-gluten | 1,111 | tools/qualification-tool/src/main/java/org/apache/gluten/qt/support/GlutenSupport.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.gluten.qt.support;
/**
* Serves as a base class for indicating whether a specific node or operator is supported by Gluten.
* Subclasses, such as {@code Supported} or {@code NotSupported}, provide the specific status and
* any relevant details.
*/
public abstract class GlutenSupport {}
|
apache/incubator-gluten | 1,126 | gluten-core/src/main/java/org/apache/gluten/utils/ConfigUtil.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.gluten.utils;
import org.apache.gluten.proto.ConfigMap;
import java.util.Map;
public class ConfigUtil {
public static byte[] serialize(Map<String, String> conf) {
ConfigMap.Builder builder = ConfigMap.newBuilder();
builder.putAllConfigs(conf);
return builder.build().toByteArray();
}
}
|
apache/incubator-heron | 1,112 | heron/packing/src/java/org/apache/heron/packing/constraints/InstanceConstraint.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.heron.packing.constraints;
import org.apache.heron.packing.exceptions.ConstraintViolationException;
import org.apache.heron.spi.packing.PackingPlan;
public interface InstanceConstraint {
void validate(PackingPlan.InstancePlan instancePlan) throws ConstraintViolationException;
}
|
apache/incubator-hugegraph | 1,098 | hugegraph-pd/hg-pd-test/src/main/java/org/apache/hugegraph/pd/grpc/GrpcSuiteTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hugegraph.pd.grpc;
import org.apache.hugegraph.pd.common.Useless;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import lombok.extern.slf4j.Slf4j;
@Useless("empty now")
@RunWith(Suite.class)
@Suite.SuiteClasses({
})
@Slf4j
public class GrpcSuiteTest {
}
|
apache/incubator-kie-drools | 1,107 | kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/typesafe/DMNOutputSetType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.dmn.typesafe;
class DMNOutputSetType extends AbstractDMNSetType {
DMNOutputSetType(DMNAllTypesIndex index, DMNStronglyCodeGenConfig codeGenConfig) {
super(index, codeGenConfig);
}
@Override
public String getTypeName() {
return "OutputSet";
}
}
|
apache/incubator-kie-kogito-examples | 1,052 | kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNRegressionIT.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.kogito.dmn.pmml.quarkus.example;
import io.quarkus.test.junit.QuarkusIntegrationTest;
@QuarkusIntegrationTest
public class NativeDMNRegressionIT extends DMNRegressionTest {
// Execute the same tests but in native mode.
}
|
apache/incubator-kie-kogito-examples | 1,055 | kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSimpleScorecardTestIT.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.kogito.pmml.quarkus.example;
import io.quarkus.test.junit.QuarkusIntegrationTest;
@QuarkusIntegrationTest
public class NativeSimpleScorecardTestIT extends SimpleScorecardTest {
// Execute the same tests but in native mode.
} |
apache/incubator-kie-kogito-runtimes | 1,088 | addons/common/process-svg/src/main/java/org/kie/kogito/svg/model/NodeTransformation.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.kogito.svg.model;
public abstract class NodeTransformation implements Transformation {
private String nodeId;
public NodeTransformation(String nodeId) {
this.nodeId = nodeId;
}
public String getNodeId() {
return nodeId;
}
}
|
apache/incubator-kie-kogito-runtimes | 1,094 | grafana-api/src/main/java/org/kie/kogito/grafana/model/panel/graph/AliasColors.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.kogito.grafana.model.panel.graph;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AliasColors {
@JsonProperty("colors")
public String colors;
}
|
apache/incubator-nemo | 1,099 | runtime/executor/src/main/java/org/apache/nemo/runtime/executor/data/stores/RemoteFileStore.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.nemo.runtime.executor.data.stores;
import org.apache.reef.tang.annotations.DefaultImplementation;
/**
* Interface for remote block stores (e.g., GlusterFS, ...).
*/
@DefaultImplementation(GlusterFileStore.class)
public interface RemoteFileStore extends BlockStore {
}
|
apache/incubator-retired-wave | 1,095 | wave/src/main/java/org/waveprotocol/wave/client/wavepanel/view/IntrinsicReplyBoxView.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.waveprotocol.wave.client.wavepanel.view;
/**
* View of a reply indicator associated with a root thread.
*/
public interface IntrinsicReplyBoxView extends IntrinsicReplyIndicatorView {
/**
* Sets the avatar image.
*/
void setAvatarImageUrl(String imageUrl);
}
|
apache/inlong | 1,094 | inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sort/standalone/SortTaskInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.inlong.manager.pojo.sort.standalone;
import lombok.Data;
@Data
public class SortTaskInfo {
private static final long serialVersionUID = 1L;
String sortClusterName;
String sortTaskName;
String sortConsumerGroup;
String sinkType;
String dataNodeName;
}
|
apache/jclouds | 1,127 | blobstore/src/main/java/org/jclouds/blobstore/strategy/MkdirStrategy.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jclouds.blobstore.strategy;
import org.jclouds.blobstore.strategy.internal.MarkerFileMkdirStrategy;
import com.google.inject.ImplementedBy;
/**
* Creates a directory
*/
@ImplementedBy(MarkerFileMkdirStrategy.class)
public interface MkdirStrategy {
void execute(String containerName, String directory);
}
|
apache/jena | 1,136 | jena-iri/src/main/java/org/apache/jena/iri/impl/ErrorAction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.iri.impl;
import java.util.regex.Matcher;
public class ErrorAction extends GroupAction {
final private int eCode;
ErrorAction(int code){
this.eCode = code;
}
@Override
public void check(Matcher m, Parser parser, int range) {
parser.recordError(range,eCode);
}
}
|
apache/jena | 1,141 | jena-fuseki2/jena-fuseki-main/src/main/java/fuseki/run.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package fuseki;
import org.apache.jena.fuseki.main.FusekiMainRunner;
/**
* Run FusekiMain.
* @deprecated Use {@link FusekiMainRunner#run}.
*/
@Deprecated(forRemoval = true)
public class run {
public static void main (String... args) {
// This does FusekiLogging.setLogging
FusekiMainRunner.run(args);
}
}
|
apache/johnzon | 1,116 | johnzon-websocket/src/main/java/org/apache/johnzon/websocket/jsonb/JsonbLocator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.johnzon.websocket.jsonb;
import org.apache.johnzon.websocket.internal.servlet.IgnoreIfMissing;
import jakarta.servlet.annotation.WebListener;
@WebListener
public class JsonbLocator extends IgnoreIfMissing {
public JsonbLocator() {
super(() -> new JsonbLocatorDelegate());
}
}
|
apache/kafka | 1,125 | raft/src/main/java/org/apache/kafka/raft/errors/BufferAllocationException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kafka.raft.errors;
/**
* Indicates that an operation is failed because we failed to allocate memory for it.
*/
public class BufferAllocationException extends RaftException {
private static final long serialVersionUID = 1L;
public BufferAllocationException(String s) {
super(s);
}
}
|
apache/kafka | 1,128 | tools/src/main/java/org/apache/kafka/tools/reassign/CompletedMoveState.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kafka.tools.reassign;
/**
* The completed replica log directory move state.
* @param targetLogDir The log directory that we wanted the replica to move to.
*/
record CompletedMoveState(String targetLogDir) implements LogDirMoveState {
@Override
public boolean done() {
return true;
}
}
|
apache/lens | 1,114 | lens-client/src/main/java/org/apache/lens/client/exceptions/LensClientIOException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.lens.client.exceptions;
import java.io.IOException;
public class LensClientIOException extends IOException {
public LensClientIOException(String message, Throwable cause) {
super(message, cause);
}
public LensClientIOException(String message) {
super(message);
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.