repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/paimon
1,173
paimon-common/src/main/java/org/apache/paimon/lookup/sort/SortContext.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.paimon.lookup.sort; import org.apache.paimon.lookup.LookupStoreFactory.Context; /** A {@link Context} for sort store. */ public class SortContext implements Context { private final long fileSize; public SortContext(long fileSize) { this.fileSize = fileSize; } public long fileSize() { return fileSize; } }
apache/paimon
1,184
paimon-api/src/main/java/org/apache/paimon/annotation/Public.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.paimon.annotation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Target; /** * Annotation for marking classes as public, stable interfaces. * * <p>API classes or methods need to be marked with modified versions. */ @Documented @Target(ElementType.TYPE) @Public public @interface Public {}
apache/pig
1,220
src/org/apache/pig/Function.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.pig; /** * A convenience typedef that ties into both google's {@code Function} and * {@code ExceptionalFunction}. * * @param <S> The argument type for the function. * @param <T> The return type for the function. * */ public interface Function<S, T> extends ExceptionalFunction<S, T, RuntimeException>, com.google.common.base.Function<S, T> { @Override public T apply(S item); }
apache/plc4x
1,142
plc4j/drivers/iec-60870/src/test/java/org/apache/plc4x/java/iec608705104/IEC608705104ParserSerializerTest.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 * * 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 org.apache.plc4x.java.iec608705104; import org.apache.plc4x.test.parserserializer.ParserSerializerTestsuiteRunner; public class IEC608705104ParserSerializerTest extends ParserSerializerTestsuiteRunner { public IEC608705104ParserSerializerTest() { super("/protocols/iec608705104/IEC-60870-5-104.xml"); } }
apache/plc4x
1,143
plc4j/utils/pcap-shared/src/main/java/org/apache/plc4x/java/utils/pcap/netty/exception/PcapException.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 * * 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 org.apache.plc4x.java.utils.pcap.netty.exception; public class PcapException extends Exception { public PcapException() { super(); } public PcapException(String message) { super(message); } public PcapException(String message, Throwable cause) { super(message, cause); } }
apache/polaris
1,128
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/RelationalJdbcConfiguration.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.polaris.persistence.relational.jdbc; import java.util.Optional; public interface RelationalJdbcConfiguration { // max retries before giving up Optional<Integer> maxRetries(); // max retry duration Optional<Long> maxDurationInMs(); // initial delay Optional<Long> initialDelayInMs(); }
apache/polaris
1,157
runtime/service/src/main/java/org/apache/polaris/service/events/BeforeLimitRequestRateEvent.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.polaris.service.events; /** * Emitted before the RateLimiterFilter rejects a request due to exceeding the rate limit. * * @param method The request's HTTP method * @param absolutePath The request's absolute path */ public record BeforeLimitRequestRateEvent(String method, String absolutePath) implements PolarisEvent {}
apache/polygene-java
1,127
tools/envisage/src/test/java/org/apache/polygene/envisage/school/ui/admin/pages/composites/UserDetailPageComposite.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.polygene.envisage.school.ui.admin.pages.composites; import org.apache.polygene.api.composite.TransientComposite; import org.apache.polygene.envisage.school.ui.admin.pages.UserDetailPage; public interface UserDetailPageComposite extends UserDetailPage, TransientComposite { }
apache/polygene-java
1,145
tests/performance/src/main/java/org/apache/polygene/test/performance/entitystore/SimpleProduct.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.polygene.test.performance.entitystore; import org.apache.polygene.api.common.Optional; import org.apache.polygene.api.entity.EntityComposite; import org.apache.polygene.api.property.Property; public interface SimpleProduct extends EntityComposite { @Optional Property<String> name(); }
apache/reef
1,138
lang/java/reef-examples/src/main/java/org/apache/reef/examples/group/broadcast/parameters/NumberOfReceivers.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.reef.examples.group.broadcast.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; /** * */ @NamedParameter(doc = "The number of receivers for the operators", short_name = "receivers") public class NumberOfReceivers implements Name<Integer> { }
apache/rocketmq
1,167
client/src/main/java/org/apache/rocketmq/client/producer/TransactionCheckListener.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.rocketmq.client.producer; import org.apache.rocketmq.common.message.MessageExt; /** * @deprecated This interface will be removed in the version 5.0.0, interface {@link TransactionListener} is recommended. */ @Deprecated public interface TransactionCheckListener { LocalTransactionState checkLocalTransactionState(final MessageExt msg); }
apache/samza
1,163
samza-core/src/main/scala/org/apache/samza/serializers/MetricsSnapshotSerdeV2Factory.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.samza.serializers; import org.apache.samza.config.Config; import org.apache.samza.metrics.reporter.MetricsSnapshot; public class MetricsSnapshotSerdeV2Factory implements SerdeFactory<MetricsSnapshot> { @Override public Serde<MetricsSnapshot> getSerde(String name, Config config) { return new MetricsSnapshotSerdeV2(); } }
apache/samza
1,164
samza-core/src/test/java/org/apache/samza/operators/data/TestMessageEnvelope.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.samza.operators.data; public class TestMessageEnvelope { private final String key; private final Object value; public TestMessageEnvelope(String key, Object value) { this.key = key; this.value = value; } public Object getMessage() { return this.value; } public String getKey() { return this.key; } }
apache/seatunnel
1,113
seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/debezium/MetadataConverter.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.seatunnel.connectors.cdc.debezium; import org.apache.kafka.connect.source.SourceRecord; import java.io.Serializable; /** {@link SourceRecord} metadata info converter. */ @FunctionalInterface public interface MetadataConverter extends Serializable { Object read(SourceRecord record); }
apache/servicecomb-toolkit
1,121
oas-validator/oas-validator-core/src/main/java/org/apache/servicecomb/toolkit/oasv/validation/api/OpenApiValidator.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.servicecomb.toolkit.oasv.validation.api; import io.swagger.v3.oas.models.OpenAPI; /** * <a href="https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#openapi-object">OpenAPI Object</a> validator */ public interface OpenApiValidator extends OasObjectValidator<OpenAPI> { }
apache/servicemix
1,141
examples/cxf/cxf-ws-security-osgi/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.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. */ // START SNIPPET: service package org.apache.servicemix.examples.cxf; import javax.jws.WebService; @WebService(endpointInterface = "org.apache.servicemix.examples.cxf.HelloWorld") public class HelloWorldImpl implements HelloWorld { public String sayHi(String text) { return "Hello " + text; } } // END SNIPPET: service
apache/shardingsphere
1,118
parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/enums/OperationScope.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.shardingsphere.sql.parser.statement.core.enums; import lombok.Getter; import lombok.RequiredArgsConstructor; /** * Operation scope. */ @RequiredArgsConstructor @Getter public enum OperationScope { GLOBAL("GLOBAL"), SESSION("SESSION"); private final String scope; }
apache/shardingsphere
1,138
kernel/time-service/api/src/main/java/org/apache/shardingsphere/timeservice/spi/TimestampService.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.shardingsphere.timeservice.spi; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPI; import java.sql.Timestamp; /** * Timestamp service. */ public interface TimestampService extends TypedSPI { /** * Get timestamp. * * @return timestamp */ Timestamp getTimestamp(); }
apache/sis
1,170
endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/base/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. */ /** * Base classes for the implementation of SIS storages. * * <STRONG>Do not use!</STRONG> * * This package is for internal use by SIS only. Classes in this package * may change in incompatible ways in any future version without notice. * * @author Martin Desruisseaux (Geomatys) * @author Johann Sorel (Geomatys) */ package org.apache.sis.storage.base;
apache/sis
1,172
optional/src/org.apache.sis.gui/main/org/apache/sis/gui/metadata/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. */ /** * Widgets about metadata. * Those widgets can show a {@link org.opengis.metadata.Metadata} instance in a tree, * or show a summary of those metadata in an "overview" panel. * * @author Smaniotto Enzo (GSoC) * @author Johann Sorel (Geomatys) * @author Martin Desruisseaux (Geomatys) * @version 1.5 * @since 1.1 */ package org.apache.sis.gui.metadata;
apache/skywalking-java
1,080
test/plugin/scenarios/shardingsphere-4.0.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/shardingsphere/service/utility/config/ExampleConfiguration.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.skywalking.apm.testcase.shardingsphere.service.utility.config; import javax.sql.DataSource; import java.sql.SQLException; public interface ExampleConfiguration { DataSource createDataSource() throws SQLException; DataSource getDataSource(); }
apache/skywalking-java
1,124
apm-application-toolkit/apm-toolkit-kafka/src/main/java/org/apache/skywalking/apm/toolkit/kafka/KafkaPollAndInvoke.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.skywalking.apm.toolkit.kafka; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface KafkaPollAndInvoke { }
apache/skywalking-java
1,131
apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/test/tools/SegmentStoragePoint.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.skywalking.apm.agent.core.test.tools; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface SegmentStoragePoint { }
apache/skywalking
1,118
oap-server/server-query-plugin/promql-plugin/src/main/java/org/apache/skywalking/oap/query/promql/entity/response/ExprQueryRsp.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.skywalking.oap.query.promql.entity.response; import lombok.Data; import lombok.EqualsAndHashCode; import org.apache.skywalking.oap.query.promql.entity.ResponseData; @EqualsAndHashCode(callSuper = true) @Data public class ExprQueryRsp extends QueryResponse { private ResponseData data; }
apache/skywalking
1,143
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/worker/RemoteHandleWorker.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.skywalking.oap.server.core.worker; import lombok.AllArgsConstructor; import lombok.Getter; import org.apache.skywalking.oap.server.core.remote.data.StreamData; @AllArgsConstructor @Getter public class RemoteHandleWorker { private AbstractWorker worker; private Class<? extends StreamData> streamDataClass; }
apache/sling-org-apache-sling-app-cms
1,169
api/src/main/java/org/apache/sling/cms/FileManager.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.sling.cms; import org.osgi.annotation.versioning.ProviderType; /** * A interface used to retrieve sling:File Resources. Adaptable from a child * Resource of a sling:File. */ @ProviderType public interface FileManager { /** * Get the file containing the adapted resource * * @return the file */ File getFile(); }
apache/solr
1,182
solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyNothingIsSafeTest.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.solr.cloud; import org.apache.solr.SolrTestCaseJ4.SuppressSSL; /* * Implementation moved to AbstractChaosMonkeyNothingIsSafeTestBase.java as it is also * used by the HDFS contrib tests. */ @SuppressSSL(bugUrl = "https://issues.apache.org/jira/browse/SOLR-5776") public class ChaosMonkeyNothingIsSafeTest extends AbstractChaosMonkeyNothingIsSafeTestBase {}
apache/syncope
1,151
core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/ImplementationDAO.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.syncope.core.persistence.api.dao; import java.util.List; import org.apache.syncope.core.persistence.api.entity.Implementation; public interface ImplementationDAO extends DAO<Implementation> { List<Implementation> findByType(String type); List<Implementation> findByTypeAndKeyword(String type, String keyword); }
apache/tez
1,150
tez-runtime-library/src/main/java/org/apache/tez/runtime/library/hadoop/compat/NullProgressable.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.tez.runtime.library.hadoop.compat; import org.apache.hadoop.classification.InterfaceAudience.Private; import org.apache.hadoop.util.Progressable; @Private public class NullProgressable implements Progressable { public NullProgressable() { // TODO Auto-generated constructor stub } @Override public void progress() { } }
apache/tez
1,194
tez-api/src/main/java/org/apache/tez/runtime/api/Event.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.tez.runtime.api; import org.apache.hadoop.classification.InterfaceAudience.Public; /** * Base class for all events generated within the Tez execution engine. * Used as the primary mode of communication between the AM, Inputs, Processors * and Outputs. * Users are not expected to implement or derive from this class */ @Public public abstract class Event { }
apache/tomcat80
1,191
java/org/apache/catalina/realm/X509SubjectDnRetriever.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.catalina.realm; import java.security.cert.X509Certificate; /** * An X509UsernameRetriever that returns a certificate's entire * SubjectDN as the username. */ public class X509SubjectDnRetriever implements X509UsernameRetriever { @Override public String getUsername(X509Certificate clientCert) { return clientCert.getSubjectDN().getName(); } }
apache/tomee
1,153
container/openejb-core/src/main/java/org/apache/openejb/persistence/PersistenceClassLoaderHandler.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.openejb.persistence; import java.lang.instrument.ClassFileTransformer; public interface PersistenceClassLoaderHandler { void addTransformer(String unitId, ClassLoader classLoader, ClassFileTransformer classFileTransformer); void destroy(String unitId); ClassLoader getNewTempClassLoader(ClassLoader classLoader); }
apache/usergrid
1,149
stack/services/src/main/java/org/apache/usergrid/security/tokens/exceptions/BadTokenException.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.usergrid.security.tokens.exceptions; public class BadTokenException extends TokenException { private static final long serialVersionUID = 1L; public BadTokenException( String arg0, Throwable arg1 ) { super( arg0, arg1 ); } public BadTokenException( String arg0 ) { super( arg0 ); } }
apache/wicket
1,137
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/header/threelayers2/AbstractBasePage.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.wicket.markup.html.header.threelayers2; import org.apache.wicket.markup.html.WebPage; /** * @author Martijn Dashorst */ public abstract class AbstractBasePage extends WebPage { /** For serialization. */ private static final long serialVersionUID = 1L; /** * Construct. */ AbstractBasePage() { } }
apache/wicket
1,142
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPage_4.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.wicket.markup.html.panel; import org.apache.wicket.markup.html.WebPage; /** * * @author Juergen Donnerstag */ public class InlinePanelPage_4 extends WebPage { private static final long serialVersionUID = 1L; /** * Construct. * */ public InlinePanelPage_4() { add(new InlinePanel_4("myPanel")); } }
apache/wicket
1,152
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/page/TestHomePage.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.wicket.markup.html.page; import org.apache.wicket.util.tester.WicketTestCase; import org.junit.jupiter.api.Test; /** * Simple test using the WicketTester */ class TestHomePage extends WicketTestCase { /** * */ @Test void testRenderMyPage() { // no exception should occur tester.startPage(HomePage.class); } }
apache/wicket
1,154
wicket-request/src/main/java/org/apache/wicket/request/handler/logger/NoLogData.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.wicket.request.handler.logger; import org.apache.wicket.request.ILogData; /** * Stub for request handlers that do not log anything. * * @author Emond Papegaaij */ public final class NoLogData implements ILogData { private static final long serialVersionUID = 1L; @Override public String toString() { return "{}"; } }
apache/wicket
1,157
wicket-examples/src/main/java/org/apache/wicket/examples/forminput/BeforeAndAfterBorder.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.wicket.examples.forminput; import org.apache.wicket.markup.html.border.BorderBehavior; /** * Simple example to show how a border works. Adding this border to e.g. a label that displays 'x' * results in '[ x ]' being displayed. * * @author jcompagner */ public class BeforeAndAfterBorder extends BorderBehavior { }
apache/zookeeper
1,156
zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/SnapshotInfo.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.zookeeper.server.persistence; /** * stores the zxid (as in its file name) and the last modified timestamp * of a snapshot file */ public class SnapshotInfo { public long zxid; public long timestamp; SnapshotInfo(long zxid, long timestamp) { this.zxid = zxid; this.timestamp = timestamp; } }
google-ai-edge/mediapipe
1,149
mediapipe/tasks/java/com/google/mediapipe/tasks/genai/llminference/VisionModelOptions.java
package com.google.mediapipe.tasks.genai.llminference; import com.google.auto.value.AutoValue; import java.util.Optional; /** Options for configuring vision modality */ @AutoValue public abstract class VisionModelOptions { /** Returns the path to the vision encoder model file. */ public abstract Optional<String> getEncoderPath(); /** Path to the vision adapter model file. */ public abstract Optional<String> getAdapterPath(); /** Builder for {@link VisionModelOptions}. */ @AutoValue.Builder public abstract static class Builder { /** Sets the path to the vision encoder model file. */ public abstract Builder setEncoderPath(String encoderPath); /** Sets the to the vision adapter model file. */ public abstract Builder setAdapterPath(String adapterPath); abstract VisionModelOptions autoBuild(); /** Validates and builds the {@link VisionModelOptions} instance. */ public final VisionModelOptions build() { return autoBuild(); } } /** Instantiates a new VisionModelOption builder. */ public static Builder builder() { return new AutoValue_VisionModelOptions.Builder(); } }
google/adk-java
1,181
core/src/main/java/com/google/adk/tools/Annotations.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 * * 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.adk.tools; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** Annotations for tools. */ public final class Annotations { /** The annotation for binding the 'Schema' input. */ @Target({METHOD, PARAMETER}) @Retention(RetentionPolicy.RUNTIME) public @interface Schema { String name() default ""; String description() default ""; } private Annotations() {} }
google/automotive-design-compose
1,113
integration-tests/app-common/src/testFixtures/java/com/android/designcompose/testapp/common/InterFontTestRule.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 com.android.designcompose.testapp.common; import com.android.designcompose.DesignSettings; import org.junit.rules.TestRule; import org.junit.runner.Description; import org.junit.runners.model.Statement; /* *A test rule that adds the font family for "Inter". */ public class InterFontTestRule implements TestRule { @Override public Statement apply(Statement base, Description description) { DesignSettings.INSTANCE.addFontFamily("Inter", FontsKt.getInterFont()); return base; } }
google/caliper
1,173
caliper-core/src/main/java/com/google/caliper/bridge/TrialRequest.java
/* * Copyright (C) 2011 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.caliper.bridge; /** {@link WorkerRequest} for telling the worker to run a trial of the benchmark. */ public final class TrialRequest implements WorkerRequest { private static final long serialVersionUID = 1L; private final ExperimentSpec experiment; public TrialRequest(ExperimentSpec experiment) { this.experiment = experiment; } @Override public final Class<? extends WorkerRequest> type() { return TrialRequest.class; } /** Returns the experiment to run. */ public ExperimentSpec experiment() { return experiment; } }
google/crunchy
1,167
crunchy/java/src/main/java/com/google/security/crunchy/CrunchyHybridEncrypter.java
// Copyright 2017 The CrunchyCrypt 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.security.crunchy; import java.security.GeneralSecurityException; /** * An interface for hybrid (aka asymmetric) encryption. Implementations may use authenticated * encryption and key versioning. */ public interface CrunchyHybridEncrypter { /** * Encrypts a payload. * * @param plaintext The plaintext to be encrypted. * @return The encrypted plaintext. * @throws GeneralSecurityException If the underlying crypto library returns an error. */ public byte[] encrypt(byte[] plaintext) throws GeneralSecurityException; }
google/guava
1,195
guava/src/com/google/common/base/CommonMatcher.java
/* * Copyright (C) 2016 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.base; import com.google.common.annotations.GwtCompatible; /** * The subset of the {@link java.util.regex.Matcher} API which is used by this package, and also * shared with the {@code re2j} library. For internal use only. Please refer to the {@code Matcher} * javadoc for details. */ @GwtCompatible abstract class CommonMatcher { public abstract boolean matches(); public abstract boolean find(); public abstract boolean find(int index); public abstract String replaceAll(String replacement); public abstract int end(); public abstract int start(); }
google/j2cl
1,169
benchmarking/java/com/google/j2cl/benchmarks/jre/BigExceptionBenchmark.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.jre; import com.google.j2cl.benchmarking.framework.AbstractBenchmark; import com.google.j2cl.benchmarks.jre.helper.ExceptionUtil; /** * Benchmarks the performance of throwing and catching an exception without accessing the * stacktrace. */ public class BigExceptionBenchmark extends AbstractBenchmark { @Override public Object run() { try { ExceptionUtil.throwRecursive(20); } catch (Exception e) { if (!e.getMessage().equals("message")) { throw new AssertionError(); } } return null; } }
google/j2objc
1,125
jre_emul/android/platform/libcore/luni/src/test/java/libcore/java/lang/annotation/AnnotationTypeMismatchExceptionTest.java
/* * Copyright (C) 2011 The Android Open Source Project * * 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 libcore.java.lang.annotation; import java.lang.annotation.AnnotationTypeMismatchException; import java.lang.reflect.Method; public class AnnotationTypeMismatchExceptionTest extends junit.framework.TestCase { public void testGetters() throws Exception { Method m = String.class.getMethod("length"); AnnotationTypeMismatchException ex = new AnnotationTypeMismatchException(m, "poop"); assertSame(m, ex.element()); assertEquals("poop", ex.foundType()); } }
google/protobuf-gradle-plugin
1,187
examples/exampleKotlinDslProject/src/main/java/Foo.java
import com.google.protobuf.MessageLite; import java.util.ArrayList; import java.util.List; public class Foo { public static List<MessageLite> getDefaultInstances() { ArrayList<MessageLite> list = new ArrayList<MessageLite>(); // from src/main/proto/test.proto list.add(ws.antonov.protobuf.test.Test.TestMessage.getDefaultInstance()); list.add(ws.antonov.protobuf.test.Test.AnotherMessage.getDefaultInstance()); list.add(ws.antonov.protobuf.test.Test.Item.getDefaultInstance()); list.add(ws.antonov.protobuf.test.Test.DataMap.getDefaultInstance()); // from src/main/proto/sample.proto (java_multiple_files == true, thus no outter class) list.add(com.example.tutorial.Msg.getDefaultInstance()); list.add(com.example.tutorial.SecondMsg.getDefaultInstance()); // from lib/protos.tar.gz/stuff.proto list.add(Stuff.Blah.getDefaultInstance()); // from ext/more.proto list.add(More.MoreMsg.getDefaultInstance()); list.add(More.Foo.getDefaultInstance()); // from ext/test1.proto list.add(Test1.Test1Msg.getDefaultInstance()); // from ext/test2.proto list.add(Test2.Test2Msg.getDefaultInstance()); return list; } }
google/sagetv
1,194
java/sage/vfs/sort/BasicMediaNodeSorter.java
/* * Copyright 2015 The SageTV 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 sage.vfs.sort; import sage.vfs.*; /** * * @author Narflex */ public abstract class BasicMediaNodeSorter implements MediaNodeSorter { public BasicMediaNodeSorter(boolean ascending) { this.ascending = ascending; } public boolean equals(Object o) { return o != null && (o.getClass() == getClass()) && (((BasicMediaNodeSorter) o).ascending == ascending); } public int hashCode() { return getTechnique().hashCode() + (ascending ? 1 : 0); } public boolean isAscending() { return ascending; } protected boolean ascending; }
google/vpn-libraries
1,166
android/src/test/java/com/google/android/libraries/privacy/ppn/FakeDns.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 // // 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 com.google.android.libraries.privacy.ppn; import com.google.common.collect.ImmutableList; import java.net.InetAddress; import java.util.List; /** * A Fake implementation of the {@link Dns} interface. This implementation allows tests to perform * fake DNS queries and does not require network access. */ public final class FakeDns implements Dns { public FakeDns() {} /** Returns the loopback address for all DNS lookups. */ @Override public List<InetAddress> lookup(String hostname) { return ImmutableList.of(InetAddress.getLoopbackAddress()); } }
googleads/google-ads-java
1,150
google-ads/src/main/java/com/google/ads/googleads/lib/utils/messageproxy/MessageEditor.java
// Copyright 2020 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 com.google.ads.googleads.lib.utils.messageproxy; /** Provides an interface for abstracting edits that are made to a message. */ public interface MessageEditor<T> { /** Performs the edit on an input message. */ T edit(T input); /** * Checks if this can edit a given message. This check should be highly optimized for performance. * If a validation check cannot be completed extremely fast, this method should return true and * decide in the scrub() implementation whether to perform the edit or not. */ boolean supports(T input); }
googleapis/discovery-artifact-manager
1,144
toolkit/src/main/java/com/google/api/codegen/transformer/ImportSectionTransformer.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.metacode.InitCodeNode; import com.google.api.codegen.viewmodel.ImportSectionView; /** Generates import sections. */ public interface ImportSectionTransformer { /** Generates an ImportSectionView for a file header. */ ImportSectionView generateImportSection(TransformationContext context); /** Generates an ImportSectionView for the InitCodeTransformer. */ ImportSectionView generateImportSection( MethodContext context, Iterable<InitCodeNode> specItemNodes); }
googleapis/gapic-generator
1,168
src/main/java/com/google/api/codegen/configgen/PagingParameters.java
/* Copyright 2017 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. */ package com.google.api.codegen.configgen; import java.util.List; /** Definitions of parameter names. */ public interface PagingParameters { /** The name of the parameter that contains a page token. */ String getNameForPageToken(); /** The name of the parameter that contains the desired page size. */ String getNameForPageSize(); /** The name of the parameter that contains the next page token. */ String getNameForNextPageToken(); /** A list of parameters that do not need to be in the RPC's method signature. */ List<String> getIgnoredParameters(); }
googlearchive/gwt-google-apis
1,102
visualization/samples/visualizationshowcase/src/com/google/gwt/visualization/sample/visualizationshowcase/client/ReadyDemo.java
/* * Copyright 2009 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.gwt.visualization.sample.visualizationshowcase.client; import com.google.gwt.user.client.ui.Label; import com.google.gwt.visualization.client.events.ReadyHandler; /** * Demo for ReadyHandler that can be applied to any visualization. */ public class ReadyDemo extends ReadyHandler { private final Label label; public ReadyDemo(Label label) { this.label = label; } @Override public void onReady(ReadyEvent event) { label.setText("The visualization is ready"); } }
googlemaps-samples/android-places-demos
1,153
demo-java/app/src/main/java/com/example/placesdemo/model/Bounds.java
// Copyright 2020 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 com.example.placesdemo.model; import com.google.android.gms.maps.model.LatLng; import java.io.Serializable; /** The northeast and southwest points that delineate the outer bounds of a map. */ public class Bounds implements Serializable { private static final long serialVersionUID = 1L; /** The northeast corner of the bounding box. */ public LatLng northeast; /** The southwest corner of the bounding box. */ public LatLng southwest; @Override public String toString() { return String.format("[%s, %s]", northeast, southwest); } }
hibernate/hibernate-ogm
1,102
neo4j/src/test/java/org/hibernate/ogm/datastore/neo4j/test/query/nativequery/Neo4jPaginationWithCypherTest.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.datastore.neo4j.test.query.nativequery; import java.util.List; import org.hibernate.Session; import org.hibernate.ogm.backendtck.queries.pagination.PaginationUseCases; import org.hibernate.ogm.backendtck.queries.pagination.Poem; /** * Test pagination with Cypher queries. * * @author Davide D'Alto */ public class Neo4jPaginationWithCypherTest extends PaginationUseCases { private final String CYPHER_QUERY = "MATCH (p:" + Poem.TABLE_NAME + ") RETURN p ORDER BY p.name"; @SuppressWarnings("unchecked") protected List<Poem> findPoemsSortedAlphabetically(Session session, int startPosition, int maxResult) { List<Poem> result = session.createNativeQuery( CYPHER_QUERY ) .addEntity( Poem.TABLE_NAME, Poem.class ) .setFirstResult( startPosition ) .setMaxResults( maxResult ) .list(); return result; } }
hibernate/hibernate-ogm
1,104
infinispan-remote/src/main/java/org/hibernate/ogm/datastore/infinispanremote/options/navigation/impl/InfinispanRemotePropertyContextImpl.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.datastore.infinispanremote.options.navigation.impl; import org.hibernate.ogm.datastore.infinispanremote.options.navigation.InfinispanRemoteEntityContext; import org.hibernate.ogm.datastore.infinispanremote.options.navigation.InfinispanRemotePropertyContext; import org.hibernate.ogm.datastore.keyvalue.options.navigation.spi.BaseKeyValueStorePropertyContext; import org.hibernate.ogm.options.navigation.spi.ConfigurationContext; /** * Converts Infinispan Remote property-level options. * * @author Gunnar Morling */ public abstract class InfinispanRemotePropertyContextImpl extends BaseKeyValueStorePropertyContext<InfinispanRemoteEntityContext, InfinispanRemotePropertyContext> implements InfinispanRemotePropertyContext { public InfinispanRemotePropertyContextImpl(ConfigurationContext context) { super( context ); } }
hibernate/hibernate-orm
1,084
tooling/metamodel-generator/src/main/java/org/hibernate/processor/xml/XmlMetaMap.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.processor.xml; import org.hibernate.processor.model.Metamodel; /** * @author Hardy Ferentschik */ public class XmlMetaMap extends XmlMetaCollection { private final String keyType; public XmlMetaMap(XmlMetaEntity parent, String propertyName, String type, String collectionType, String keyType) { super( parent, propertyName, type, collectionType ); this.keyType = keyType; } @Override public String getAttributeDeclarationString() { final Metamodel hostingEntity = getHostingEntity(); return new StringBuilder().append( "public static volatile " ) .append( hostingEntity.importType( getMetaType() ) ) .append( "<" ) .append( hostingEntity.importType( hostingEntity.getQualifiedName() ) ) .append( ", " ) .append( hostingEntity.importType( keyType ) ) .append( ", " ) .append( hostingEntity.importType( getTypeDeclaration() ) ) .append( "> " ) .append( getPropertyName() ) .append( ";" ) .toString(); } }
hibernate/hibernate-orm
1,088
hibernate-core/src/test/java/org/hibernate/orm/test/legacy/Bar.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.legacy; public class Bar extends Abstract implements BarProxy, Named { private String barString; private FooComponent barComponent = new FooComponent("bar", 69, null, null); private Baz baz; private int x; private Object object; public int getX() { return x; } public void setX(int x) { this.x = x; } public String getBarString() { return barString; } void setBarString(String barString) { this.barString = barString; } public FooComponent getBarComponent() { return barComponent; } public void setBarComponent(FooComponent barComponent) { this.barComponent = barComponent; } public Baz getBaz() { return baz; } public void setBaz(Baz baz) { this.baz = baz; } private String name = "bar"; public String getName() { return name; } public void setName(String name) { this.name = name; } public Object getObject() { return object; } public void setObject(Object object) { this.object = object; } }
hibernate/hibernate-orm
1,096
tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/NonManagedMetamodel.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.processor.annotation; import org.checkerframework.checker.nullness.qual.Nullable; import org.hibernate.processor.Context; import javax.lang.model.element.TypeElement; public class NonManagedMetamodel extends AnnotationMetaEntity { public NonManagedMetamodel(TypeElement element, Context context, boolean jakartaDataStaticMetamodel, @Nullable AnnotationMeta parent) { super( element, context, false, jakartaDataStaticMetamodel, parent, null ); } public static NonManagedMetamodel create( TypeElement element, Context context, boolean jakartaDataStaticMetamodel, @Nullable AnnotationMetaEntity parent) { final NonManagedMetamodel metamodel = new NonManagedMetamodel( element, context, jakartaDataStaticMetamodel, parent ); if ( parent != null ) { parent.addInnerClass( metamodel ); } return metamodel; } protected void init() { // Initialization is not needed when non-managed class } @Override public String javadoc() { return ""; } }
hibernate/hibernate-orm
1,105
hibernate-core/src/main/java/org/hibernate/mapping/DependantBasicValue.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.mapping; import org.hibernate.boot.spi.MetadataBuildingContext; /** * @author Steve Ebersole */ public class DependantBasicValue extends BasicValue { private final BasicValue referencedValue; private final boolean nullable; private final boolean updateable; public DependantBasicValue( MetadataBuildingContext buildingContext, Table table, BasicValue referencedValue, boolean nullable, boolean updateable) { super( buildingContext, table ); this.referencedValue = referencedValue; this.nullable = nullable; this.updateable = updateable; } private DependantBasicValue(DependantBasicValue original) { super( original ); this.referencedValue = original.referencedValue.copy(); this.nullable = original.nullable; this.updateable = original.updateable; } @Override public DependantBasicValue copy() { return new DependantBasicValue( this ); } @Override protected Resolution<?> buildResolution() { return referencedValue.resolve(); } }
hibernate/hibernate-orm
1,124
hibernate-core/src/main/java/org/hibernate/tool/schema/extract/spi/NameSpaceTablesInformation.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.tool.schema.extract.spi; import java.util.HashMap; import java.util.Map; import org.checkerframework.checker.nullness.qual.Nullable; import org.hibernate.engine.jdbc.env.spi.IdentifierHelper; import org.hibernate.mapping.Table; /** * @author Andrea Boriero */ public class NameSpaceTablesInformation { private final IdentifierHelper identifierHelper; private final Map<String, TableInformation> tables = new HashMap<>(); public NameSpaceTablesInformation(IdentifierHelper identifierHelper) { this.identifierHelper = identifierHelper; } public void addTableInformation(TableInformation tableInformation) { tables.put( tableInformation.getName().getTableName().getText(), tableInformation ); } public @Nullable TableInformation getTableInformation(Table table) { return tables.get( identifierHelper.toMetaDataObjectName( table.getQualifiedTableName().getTableName() ) ); } public @Nullable TableInformation getTableInformation(String tableName) { return tables.get( tableName ); } }
hibernate/hibernate-validator
1,091
engine/src/test/java/org/hibernate/validator/test/internal/bootstrap/Customer.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.validator.test.internal.bootstrap; import java.util.HashSet; import java.util.Set; import jakarta.validation.Valid; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; /** * @author Hardy Ferentschik */ public class Customer { @NotEmpty private String firstName; private String middleName; @NotEmpty private String lastName; @Valid private Set<Order> orders = new HashSet<Order>(); public void addOrder(@NotNull Order order) { orders.add( order ); } public Set<Order> getOrders() { return orders; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getMiddleName() { return middleName; } public void setMiddleName(String middleName) { this.middleName = middleName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } }
openjdk/jdk8
1,180
langtools/test/tools/javac/protectedAccess/ProtectedMemberAccess5/z1/Z1.java
/* * Copyright (c) 2003, 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 z1; public class Z1 { protected int x; public static void main(String[] args) { new z2.Z2.T(); } }
openjdk/jdk8
1,184
langtools/test/tools/javac/diags/examples/CannotCreateArrayWithDiamond.java
/* * Copyright (c) 2011, 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.cannot.create.array.with.diamond class CannotCreateArrayWithDiamond { Object[] array = new Object<>[3]; }
openjdk/jdk8
1,185
jdk/test/java/awt/DataFlavor/MissedHtmlAndRtfBug/InterprocessMessages.java
/* * Copyright (c) 2013, 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. */ interface InterprocessMessages { final static int EXECUTION_IS_SUCCESSFULL = 0; final static int DATA_IS_CORRUPTED = 212; }
openjdk/jdk8
1,187
langtools/test/com/sun/javadoc/testMemberSummary/pkg/PublicChild.java
/* * Copyright (c) 2003, 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 pkg; public class PublicChild extends PrivateParent { public PublicChild returnTypeTest() { return this; } }
openjdk/jdk8
1,187
langtools/test/tools/javac/diags/examples/AnnotationMissingValue.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.annotation.missing.default.value @interface Anno { String value(); } @Anno class AnnotationMissingValue { }
openjdk/jdk8
1,192
langtools/test/com/sun/javadoc/testClassTree/pkg/Coin.java
/* * Copyright (c) 2004, 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 pkg; /** * This is a sample Enum. * * @author Jamie Ho */ public enum Coin { Penny, Nickel, Dime; public Coin(int i) {} }
openjdk/jdk8
1,208
langtools/test/tools/javac/importscope/B.java
/* * Copyright (c) 2004, 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; import static p1.A.*; class X extends p1.A { private static char c = 'X'; } class B extends X { char x = c; // not X.c, but p1.A.c }
openjdk/jdk8
1,209
jdk/test/java/rmi/testlibrary/RemoteExiter.java
/* * Copyright (c) 1999, 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. */ /** * */ import java.rmi.Remote; import java.rmi.RemoteException; public interface RemoteExiter extends Remote { void exit() throws RemoteException; }
openjdk/jtreg
1,217
test/disallowedActions/MainTest.java
/* * Copyright (c) 2025, 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. */ /* * @test */ public class MainTest { public static void main(final String[] args) throws Exception { System.out.println("MainTest executed"); } }
openjdk/skara
1,186
webrev/src/main/java/org/openjdk/skara/webrev/DiffTooLargeException.java
/* * Copyright (c) 2024, 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 org.openjdk.skara.webrev; public class DiffTooLargeException extends Exception { public DiffTooLargeException() { } }
openjdk/skara
1,194
forge/src/main/java/org/openjdk/skara/forge/ReferenceChange.java
/* * Copyright (c) 2022, 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 org.openjdk.skara.forge; import java.time.ZonedDateTime; public record ReferenceChange(String from, String to, ZonedDateTime at) { }
oracle/coherence
1,143
prj/test/unit/coherence-tests/src/test/java/com/tangosol/dev/introspect/TestAnnotation.java
/* * Copyright (c) 2000, 2022, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.tangosol.dev.introspect; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * TestAnnotation is used to test annotation scanning. * * @author hr 2011.10.18 * * @since Coherence 12.1.2 */ @Retention(RetentionPolicy.RUNTIME) public @interface TestAnnotation { String sParam() default ""; byte bParam() default 0x0; boolean fParam() default false; short shParam() default -1; char chParam() default 'a'; int nParam() default -1; long lParam() default -1; float flParam() default 1.1f; double dParam() default 1.1d; Class<? extends Number> clzParam() default Integer.class; Type enumType() default Type.FOO; // arrays int[] anParam() default {}; Type[] aEnumType() default {}; InnerAnnotation value(); InnerAnnotation[] aInnerAnno() default {}; public enum Type { FOO, BAR } }
oracle/coherence
1,158
prj/coherence-core/src/main/java/com/tangosol/application/ContainerHelper.java
/* * Copyright (c) 2000, 2020, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.tangosol.application; import com.tangosol.net.Service; import com.tangosol.util.MapListener; /** * Helper methods for Container aware logic. * * @author gg 2005.10.24 * @since Coherence 12.2.1 */ public class ContainerHelper { /** * Initialize the thread context for the given Service. * * @param service a Service instance */ public static void initializeThreadContext(Service service) { } /** * Wrap the specified MapListener in such a way that the returned listener * would dispatch events using the caller's context rather than context * associated with the specified Service. * * @param service a Service instance * @param listener the listener to wrap * * @return the corresponding context aware listener */ public static MapListener getContextAwareListener(Service service, MapListener listener) { return listener; } }
oracle/json-in-db
1,155
YCSB/ycsb-soda/core/src/test/java/com/yahoo/ycsb/generator/TestZipfianGenerator.java
/** * Copyright (c) 2010 Yahoo! Inc. 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. See accompanying * LICENSE file. */ package com.yahoo.ycsb.generator; import org.testng.annotations.Test; import static org.testng.AssertJUnit.assertFalse; public class TestZipfianGenerator { @Test public void testMinAndMaxParameter() { long min = 5; long max = 10; ZipfianGenerator zipfian = new ZipfianGenerator(min, max); for (int i = 0; i < 10000; i++) { long rnd = zipfian.nextValue(); assertFalse(rnd < min); assertFalse(rnd > max); } } }
apache/commons-statistics
1,139
commons-statistics-descriptive/src/main/java/org/apache/commons/statistics/descriptive/NaNPolicy.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.statistics.descriptive; /** * Defines the policy for {@link Double#NaN NaN} values found in data. * * @since 1.1 */ public enum NaNPolicy { /** NaNs are included in the data. */ INCLUDE, /** NaNs are excluded from the data. */ EXCLUDE, /** NaNs result in an exception. */ ERROR }
apache/ctakes
1,161
ctakes-gui/src/main/java/org/apache/ctakes/gui/dictionary/umls/TuiCellRenderer.java
package org.apache.ctakes.gui.dictionary.umls; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.swing.*; import javax.swing.table.TableCellRenderer; import java.awt.*; /** * @author SPF , chip-nlp * @version %I% * @since 12/11/2015 */ final public class TuiCellRenderer implements TableCellRenderer { static private final Logger LOGGER = LoggerFactory.getLogger( "TuiCellRenderer" ); private final TuiTableModel _tuiModel; private final TableCellRenderer _delegate; public TuiCellRenderer( final TuiTableModel tuiModel, final TableCellRenderer delegate ) { _tuiModel = tuiModel; _delegate = delegate; } @Override public Component getTableCellRendererComponent( final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column ) { final Component renderer = _delegate.getTableCellRendererComponent( table, value, isSelected, hasFocus, row, column ); // final Tui tui = _tuiModel. return renderer; } }
apache/cxf
1,156
systests/uncategorized/src/test/java/org/apache/cxf/systest/coloc/ColocWrappedDocLitTest.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.coloc; import org.junit.Test; public class ColocWrappedDocLitTest extends AbstractWrappedDocLitTest { static final String TRANSPORT_URI = "http://localhost:" + PORT + "/SoapContext/SoapPort"; protected String getTransportURI() { return TRANSPORT_URI; } @Test public void testDummy() { } }
apache/cxf
1,157
rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/XmlMappedAttributeBean.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.services; /** * Test class for attribute forms. */ public class XmlMappedAttributeBean { private String attrXmlString = "attrXml"; public String getAttrXmlString() { return attrXmlString; } public void setAttrXmlString(String attrXmlString) { this.attrXmlString = attrXmlString; } }
apache/cxf
1,162
tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/SuperException.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.tools.fortest.exception; public class SuperException extends Exception { private static final long serialVersionUID = 1L; private int id; public SuperException(String message) { super(message); } public void setId(int id) { this.id = id; } public int getId() { return id; } }
apache/cxf
1,184
rt/wsdl/src/main/java/org/apache/cxf/wsdl/WSDLExtensibilityPlugin.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.wsdl; import java.util.Map; import javax.wsdl.WSDLException; import javax.wsdl.extensions.ExtensibilityElement; import javax.wsdl.extensions.ExtensionRegistry; public interface WSDLExtensibilityPlugin { void setExtensionRegistry(ExtensionRegistry registry); ExtensibilityElement createExtension(Map<String, Object> args) throws WSDLException; }
apache/datasketches-java
1,182
src/main/java/org/apache/datasketches/filters/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. */ /** * The filters package contains data structures used to determine * approximate set-membership. Classes in this package may not follow * the standard sub-linear properties of other offerings in this * library, but they fit with the spirit of DataSketches by providing * fast and approximate answers to complex problems. */ package org.apache.datasketches.filters;
apache/deltaspike
1,117
deltaspike/modules/partial-bean/impl/src/test/java/org/apache/deltaspike/test/core/api/partialbean/uc012/MyPartialBeanBinding.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.deltaspike.test.core.api.partialbean.uc012; import org.apache.deltaspike.partialbean.api.PartialBeanBinding; import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; @PartialBeanBinding @Retention(RUNTIME) public @interface MyPartialBeanBinding { }
apache/deltaspike
1,136
deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/criteria/processor/QueryProcessor.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.deltaspike.data.impl.criteria.processor; import jakarta.persistence.criteria.CriteriaBuilder; import jakarta.persistence.criteria.CriteriaQuery; import jakarta.persistence.criteria.Path; public interface QueryProcessor<P> { <R> void process(CriteriaQuery<R> query, CriteriaBuilder builder, Path<P> path); }
apache/deltaspike
1,137
deltaspike/modules/partial-bean/api/src/main/java/org/apache/deltaspike/partialbean/api/PartialBeanBinding.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.deltaspike.partialbean.api; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @Retention(RUNTIME) @Target(ANNOTATION_TYPE) public @interface PartialBeanBinding { }
apache/deltaspike
1,143
deltaspike/modules/data/impl/src/test/java/org/apache/deltaspike/data/test/domain/SuperSimple.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.deltaspike.data.test.domain; import jakarta.persistence.MappedSuperclass; @MappedSuperclass public class SuperSimple { private String superName; public String getSuperName() { return superName; } public void setSuperName(String superName) { this.superName = superName; } }
apache/dolphinscheduler
1,090
dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-api/src/main/java/org/apache/dolphinscheduler/alert/api/AlertChannel.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.dolphinscheduler.alert.api; /** * alert channel for sending alerts */ public interface AlertChannel { /** * process and send alert * * @param info alert info * @return process alarm result */ AlertResult process(AlertInfo info); }
apache/dolphinscheduler
1,093
dolphinscheduler-extract/dolphinscheduler-extract-common/src/main/java/org/apache/dolphinscheduler/extract/common/transportor/GetAppIdResponse.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.dolphinscheduler.extract.common.transportor; import java.util.List; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor public class GetAppIdResponse { private List<String> appIds; }
apache/dolphinscheduler
1,135
dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/EncryptionUtilsTest.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.dolphinscheduler.common.utils; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; /** * encryption utils */ public class EncryptionUtilsTest { @Test public void testGetMd5() { Assertions.assertEquals(EncryptionUtils.getMd5(null), EncryptionUtils.getMd5("")); } }
apache/doris-manager
1,165
manager/manager/src/main/java/org/apache/doris/stack/driver/SimpleColumn.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.doris.stack.driver; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @NoArgsConstructor @AllArgsConstructor @Data public class SimpleColumn { private String displayName; private String name; // baseType, The unified type of front-end structured display field private String baseType; }
apache/drill
1,151
exec/java-exec/src/main/java/org/apache/drill/exec/resourcemgr/config/exception/RMConfigException.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.resourcemgr.config.exception; /** * Used in cases of any error with the ResourceManagement configuration */ public class RMConfigException extends Exception { public RMConfigException(String message) { super(message); } public RMConfigException(String message, Exception e) { super(message, e); } }
apache/drill
1,158
exec/java-exec/src/main/java/org/apache/drill/exec/client/InvalidConnectionInfoException.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.client; import org.apache.drill.exec.rpc.NonTransientRpcException; /** * Exception for malformed connection string from client */ @SuppressWarnings("serial") public class InvalidConnectionInfoException extends NonTransientRpcException { public InvalidConnectionInfoException(String message) { super(message); } }
apache/dubbo-samples
1,112
3-extensions/registry/dubbo-samples-default-config/src/main/java/org/apache/dubbo/samples/multi/registry/impl/HelloServiceImpl.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.samples.multi.registry.impl; import org.apache.dubbo.samples.multi.registry.api.HelloService; public class HelloServiceImpl implements HelloService { @Override public String sayHello(String name) { return "sayHello: " + name; } }
apache/dubbo-samples
1,132
online_bontique_demo/common/src/main/java/org/apache/dubbo/shop/common/dto/request/GetProductRequest.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.shop.common.dto.request; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; @Data @AllArgsConstructor @NoArgsConstructor public class GetProductRequest implements Serializable { /** * 商品id */ private String id; }
apache/dubbo
1,101
dubbo-spring-boot-project/dubbo-spring-boot-compatible/dubbo-spring-boot-autoconfigure-compatible/src/test/java/org/apache/dubbo/spring/boot/TestSuite.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.spring.boot; import org.apache.dubbo.spring.boot.autoconfigure.RelaxedDubboConfigBinderTest; import org.junit.runner.RunWith; import org.junit.runners.Suite; @RunWith(Suite.class) @Suite.SuiteClasses({ RelaxedDubboConfigBinderTest.class, }) public class TestSuite {}
apache/dubbo
1,130
dubbo-metrics/dubbo-metrics-config-center/src/main/java/org/apache/dubbo/metrics/config/ConfigCenterMetricsConstants.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.metrics.config; public interface ConfigCenterMetricsConstants { String ATTACHMENT_KEY_CONFIG_FILE = "configFileKey"; String ATTACHMENT_KEY_CONFIG_GROUP = "configGroup"; String ATTACHMENT_KEY_CONFIG_PROTOCOL = "configProtocol"; String ATTACHMENT_KEY_CHANGE_TYPE = "configChangeType"; }
apache/dubbo
1,141
dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/h1/Http1ServerTransportListener.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.remoting.http12.h1; import org.apache.dubbo.remoting.http12.HttpInputMessage; import org.apache.dubbo.remoting.http12.HttpTransportListener; import org.apache.dubbo.remoting.http12.RequestMetadata; public interface Http1ServerTransportListener extends HttpTransportListener<RequestMetadata, HttpInputMessage> {}
apache/dubbo
1,146
dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/HeartBeatResponse.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.remoting.exchange; public class HeartBeatResponse extends Response { private byte proto; public HeartBeatResponse(long id, String version) { super(id, version); } public byte getProto() { return proto; } public void setProto(byte proto) { this.proto = proto; } }