repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/metron
1,077
metron-platform/metron-indexing/metron-indexing-common/src/main/java/org/apache/metron/indexing/dao/search/InvalidSearchException.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.metron.indexing.dao.search; public class InvalidSearchException extends Exception { public InvalidSearchException(String message) { super(message); } public InvalidSearchException(String message, Throwable t) { super(message, t); } }
apache/myfaces
1,122
impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletFunction.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.myfaces.config.element.facelets; import java.io.Serializable; /** * */ public abstract class FaceletFunction implements Serializable { public abstract String getFunctionName(); public abstract String getFunctionClass(); public abstract String getFunctionSignature(); }
apache/nifi-registry
1,079
nifi-registry-core/nifi-registry-data-model/src/main/java/org/apache/nifi/registry/flow/VersionedExtensionComponent.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.nifi.registry.flow; /** * A component that is an extension and has a type and bundle. */ public interface VersionedExtensionComponent { Bundle getBundle(); void setBundle(Bundle bundle); String getType(); void setType(String type); }
apache/nifi
1,068
nifi-extension-bundles/nifi-extension-utils/nifi-event-listen/src/main/java/org/apache/nifi/processor/util/listen/response/ChannelResponse.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.nifi.processor.util.listen.response; /** * A response to send back over channel. */ public interface ChannelResponse { /** * @return the bytes that should be written to a channel for this response */ byte[] toByteArray(); }
apache/nifi
1,068
nifi-extension-bundles/nifi-extension-utils/nifi-event-transport/src/main/java/org/apache/nifi/event/transport/configuration/BufferAllocator.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.nifi.event.transport.configuration; /** * Byte Buffer Allocator configuration options */ public enum BufferAllocator { /** Reusable pool of buffers */ POOLED, /** New buffer for each allocation without any pooling */ UNPOOLED }
apache/nifi
1,084
nifi-extension-bundles/nifi-websocket-bundle/nifi-websocket-services-api/src/main/java/org/apache/nifi/websocket/MessageSender.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.nifi.websocket; import java.io.IOException; import java.nio.ByteBuffer; public interface MessageSender extends WebSocketSessionInfo { void sendString(final String message) throws IOException; void sendBinary(final ByteBuffer data) throws IOException; }
apache/nifi
1,084
nifi-framework-bundle/nifi-framework/nifi-administration/src/main/java/org/apache/nifi/admin/service/entity/EntityProperty.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.nifi.admin.service.entity; /** * Abstraction for stored properties of persistent Entities */ public interface EntityProperty { /** * Get property name for an element of an Entity * * @return Property name */ String getProperty(); }
apache/nifi
1,138
nifi-framework-api/src/main/java/org/apache/nifi/nar/NarSource.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.nifi.nar; /** * The source of a NAR being saved to the {@link NarPersistenceProvider}. */ public enum NarSource { /** * Directly uploaded to NiFi through the REST API. */ UPLOAD, /** * Installed from an extension registry client. */ EXTENSION_REGISTRY_CLIENT; }
apache/oozie
1,146
client/src/main/java/org/apache/oozie/cli/ValidationUtil.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.oozie.cli; public class ValidationUtil { public static int parsePositiveInteger(String iStr) { int value = Integer.parseInt(iStr); if (value < 0) { throw new IllegalArgumentException("Input value should be a positive integer. Value: " + iStr); } return value; } }
apache/openjpa
1,100
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cache/jpa/model/ChildUncacheable.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.openjpa.persistence.cache.jpa.model; import jakarta.persistence.Basic; import jakarta.persistence.Cacheable; import jakarta.persistence.Entity; @Entity @Cacheable(value = false) public class ChildUncacheable extends ParentUnspecifiedEntity { @Basic String child; }
apache/opennlp
1,115
opennlp-extensions/opennlp-uima/src/main/java/opennlp/uima/dictionary/DictionaryResource.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 opennlp.uima.dictionary; import opennlp.tools.dictionary.Dictionary; /** * A resource encapsulating an OpenNLP {@link Dictionary} which can be shared between * <i>analysis engines</i> and loaded via the UIMA resource model. */ public interface DictionaryResource { Dictionary getDictionary(); }
apache/phoenix
1,116
phoenix-core-client/src/main/java/org/apache/phoenix/parse/ExecuteUpgradeStatement.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.phoenix.parse; import org.apache.phoenix.jdbc.PhoenixStatement.Operation; public class ExecuteUpgradeStatement implements BindableStatement { @Override public int getBindCount() { return 0; } @Override public Operation getOperation() { return Operation.UPGRADE; } }
apache/poi
1,147
poi/src/main/java/org/apache/poi/poifs/eventfilesystem/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 eventfilesystem is an efficient method for reading OLE 2 CDF files. It is to OLE 2 CDF what SAX is to XML. * * @see org.apache.poi.poifs.filesystem */ package org.apache.poi.poifs.eventfilesystem;
apache/pulsar
1,098
pulsar-io/elastic-search/src/test/java/org/apache/pulsar/io/elasticsearch/v7/ElasticSearch7SinkRawDataTest.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.pulsar.io.elasticsearch.v7; import org.apache.pulsar.io.elasticsearch.ElasticSearchSinkRawDataTest; public class ElasticSearch7SinkRawDataTest extends ElasticSearchSinkRawDataTest { public ElasticSearch7SinkRawDataTest() { super(ELASTICSEARCH_7); } }
apache/pulsar
1,098
pulsar-io/elastic-search/src/test/java/org/apache/pulsar/io/elasticsearch/v8/ElasticSearch8SinkRawDataTest.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.pulsar.io.elasticsearch.v8; import org.apache.pulsar.io.elasticsearch.ElasticSearchSinkRawDataTest; public class ElasticSearch8SinkRawDataTest extends ElasticSearchSinkRawDataTest { public ElasticSearch8SinkRawDataTest() { super(ELASTICSEARCH_8); } }
apache/qpid-broker-j
1,072
broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/type/messaging/NonEncodingRetainingSection.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.qpid.server.protocol.v1_0.type.messaging; import org.apache.qpid.server.protocol.v1_0.type.Section; public interface NonEncodingRetainingSection<T> extends Section<T> { EncodingRetainingSection<T> createEncodingRetainingSection(); }
apache/qpid-broker-j
1,128
broker-core/src/main/java/org/apache/qpid/server/model/User.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.qpid.server.model; @ManagedObject public interface User<X extends User<X>> extends ConfiguredObject<X> { String STATE = "state"; String PASSWORD = "password"; @ManagedAttribute( secure = true ) String getPassword(); void setPassword(String password); }
apache/ratis
1,130
ratis-common/src/main/java/org/apache/ratis/io/CorruptedFileException.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.ratis.io; import java.io.File; import java.io.IOException; public class CorruptedFileException extends IOException { public CorruptedFileException(File file, String message) { super("File " + file + " (exist? " + file.exists() + ", length=" + file.length() + ") is corrupted: " + message); } }
apache/reef
1,106
lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/api/ResourceRequestHandler.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.runtime.common.driver.api; import org.apache.reef.annotations.audience.RuntimeAuthor; import org.apache.reef.wake.EventHandler; /** * The evaluator request handler. */ @RuntimeAuthor public interface ResourceRequestHandler extends EventHandler<ResourceRequestEvent> { }
apache/royale-compiler
1,099
compiler/src/main/java/org/apache/royale/compiler/internal/parsing/as/DeferFunctionBody.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.royale.compiler.internal.parsing.as; /** * Options to turn on and off "deferred function body" feature. */ public enum DeferFunctionBody { /** * Enable the feature. */ ENABLED, /** * Disable the feature. */ DISABLED; }
apache/royale-compiler
1,113
compiler-externc/src/main/java/com/google/javascript/jscomp/JXCompilerOptions.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 com.google.javascript.jscomp; public class JXCompilerOptions extends CompilerOptions { private static final long serialVersionUID = 2021530437904249081L; public JXCompilerOptions() { super(); declaredGlobalExternsOnWindow = false; } }
apache/samza
1,139
samza-api/src/main/java/org/apache/samza/serializers/SerdeFactory.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; /** * Build an instance of {@link org.apache.samza.serializers.Serde} * @param <T> The type of serialized object this factory's output can both read and write */ public interface SerdeFactory<T> { Serde<T> getSerde(String name, Config config); }
apache/seatunnel
1,079
seatunnel-connectors-v2/connector-rocketmq/src/main/java/org/apache/seatunnel/connectors/seatunnel/rocketmq/common/StartMode.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.seatunnel.rocketmq.common; /** Consumer start mode */ public enum StartMode { CONSUME_FROM_LAST_OFFSET, CONSUME_FROM_FIRST_OFFSET, CONSUME_FROM_GROUP_OFFSETS, CONSUME_FROM_TIMESTAMP, CONSUME_FROM_SPECIFIC_OFFSETS, }
apache/sedona
1,121
common/src/main/java/org/apache/sedona/common/S2Geography/SinglePolylineGeography.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.sedona.common.S2Geography; import com.google.common.geometry.S2Polyline; public class SinglePolylineGeography extends PolylineGeography { public SinglePolylineGeography(S2Polyline p) { super(GeographyKind.SINGLEPOLYLINE, p); } public SinglePolylineGeography() { super(); } }
apache/servicecomb-java-chassis
1,078
foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/bean/ArrayGetter.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.foundation.common.utils.bean; public class ArrayGetter<T> implements Getter<T[], T> { private final int idx; public ArrayGetter(int idx) { this.idx = idx; } @Override public T get(T[] instance) { return instance[idx]; } }
apache/servicecomb-java-chassis
1,084
demo/demo-pojo/pojo-server/src/main/java/org/apache/servicecomb/demo/pojo/server/FlowControlSchema.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.demo.pojo.server; import org.apache.servicecomb.provider.pojo.RpcSchema; @RpcSchema(schemaId = "FlowControlSchema") public class FlowControlSchema { public int foo(int num) { return num; } public int bar(int num) { return num; } }
apache/shardingsphere-elasticjob-example
1,083
elastic-job-example-lite-spring/src/main/java/com/dangdang/ddframe/job/example/SpringMain.java
/* * Copyright 1999-2015 dangdang.com. * <p> * 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. * </p> */ package com.dangdang.ddframe.job.example; import org.springframework.context.support.ClassPathXmlApplicationContext; public final class SpringMain { private static final int EMBED_ZOOKEEPER_PORT = 5181; // CHECKSTYLE:OFF public static void main(final String[] args) { // CHECKSTYLE:ON EmbedZookeeperServer.start(EMBED_ZOOKEEPER_PORT); new ClassPathXmlApplicationContext("classpath:META-INF/applicationContext.xml"); } }
apache/shardingsphere
1,106
kernel/single/core/src/main/java/org/apache/shardingsphere/single/constant/SingleOrder.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.single.constant; import lombok.AccessLevel; import lombok.NoArgsConstructor; /** * Single order. */ @NoArgsConstructor(access = AccessLevel.PRIVATE) public final class SingleOrder { /** * Single order. */ public static final int ORDER = 5; }
apache/skywalking-java
1,086
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/jvm/cpu/NoSupportedCPUAccessor.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.jvm.cpu; public class NoSupportedCPUAccessor extends CPUMetricsAccessor { public NoSupportedCPUAccessor(int cpuCoreNum) { super(cpuCoreNum); } @Override protected long getCpuTime() { return 0; } }
apache/solr
1,143
solr/api/src/java/org/apache/solr/client/api/util/ReflectWritable.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.client.api.util; /** * A marker interface used by v2 POJOs to indicate they contain annotations that can be written out * via reflection. * * <p>Used primarily by custom serialization/deserialization codepaths that don't natively recognize * (e.g.) Jackson annotations. */ public interface ReflectWritable {}
apache/stanbol
1,114
reasoners/web/src/main/java/org/apache/stanbol/reasoners/web/resources/ReasoningResult.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.stanbol.reasoners.web.resources; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.UriInfo; public interface ReasoningResult { public void setResult(Object result); public Object getResult() ; public HttpHeaders getHeaders() ; public UriInfo getUriInfo(); }
apache/stratos
1,064
components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/domain/mapping/DomainMappingRemovedEventListener.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.stratos.messaging.listener.domain.mapping; import org.apache.stratos.messaging.listener.EventListener; /** * Domain name removed event listener. */ public abstract class DomainMappingRemovedEventListener extends EventListener { }
apache/streampipes
1,096
streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/pe/IStreamPipesDataStream.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.streampipes.extensions.api.pe; import org.apache.streampipes.extensions.api.pe.config.IDataStreamConfiguration; public interface IStreamPipesDataStream extends IStreamPipesPipelineElement<IDataStreamConfiguration> { void executeStream(); boolean isExecutable(); }
apache/synapse
1,129
modules/samples/services/EJBSampleBeans/src/samples/ejb/StoreRegistry.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 samples.ejb; import javax.ejb.Remote; import samples.bean.Store; /** * The remote interface of the StoreRegistry stateless session bean: defines methods that can be * remotely invoked on the EJB. */ @Remote public interface StoreRegistry { public Store getStoreById(String storeId); }
apache/syncope
1,094
core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/AnyTemplateLiveSyncTask.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.entity.task; import org.apache.syncope.core.persistence.api.entity.AnyTemplate; public interface AnyTemplateLiveSyncTask extends AnyTemplate { LiveSyncTask getLiveSyncTask(); void setLiveSyncTask(LiveSyncTask liveSyncTask); }
apache/systemds
1,143
src/main/java/org/apache/sysds/runtime/data/Block.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.sysds.runtime.data; public interface Block { /** * Get value of matrix cell (r,c). In case of non existing values this call returns 0. * * @param r row index starting at 0 * @param c column index starting at 0 * @return value of cell at position (r,c) */ public abstract double get(int r, int c); }
apache/tapestry-5
1,097
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ClasspathResourceSymbolProvider.java
// Copyright 2009 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.ioc.internal.services; import org.apache.tapestry5.ioc.internal.util.ClasspathResource; /** * Makes a {@link org.apache.tapestry5.commons.Resource} on the classpath available as a {@link * org.apache.tapestry5.ioc.services.SymbolProvider} * * @since 5.1.0.5 */ public class ClasspathResourceSymbolProvider extends ResourceSymbolProvider { public ClasspathResourceSymbolProvider(String path) { super(new ClasspathResource(path)); } }
apache/tapestry-5
1,102
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/BeanEditDateDemo.java
// Copyright 2007 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.integration.app1.pages; import org.apache.tapestry5.annotations.SessionState; import org.apache.tapestry5.integration.app1.data.BirthdayReminder; public class BeanEditDateDemo { @SessionState private BirthdayReminder reminder; public BirthdayReminder getReminder() { return reminder; } void onActionFromClear() { reminder = null; } Object onSuccess() { return ShowBirthdayReminder.class; } }
apache/tapestry-5
1,115
tapestry-core/src/main/java/org/apache/tapestry5/internal/events/EndOfRequestListener.java
// Copyright 2008 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.internal.events; /** * Event listener interface for objects that need to know when the current request finishes. * * @see org.apache.tapestry5.internal.services.EndOfRequestEventHub */ public interface EndOfRequestListener { /** * Notified at the end of the request. This notification occurs after the response has been sent to the client, * which means that it is to late to (for example) create a new HttpSession. */ void requestDidComplete(); }
apache/tomee
1,054
arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/apache/openejb/arquillian/tests/jaxrs/webxmloverride/TheResource.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.arquillian.tests.jaxrs.webxmloverride; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; @Path("") public class TheResource { @GET @Path("touch") public String get() { return "resource"; } }
apache/tomee
1,123
examples/access-timeout-meta/src/main/java/org/superbiz/accesstimeout/api/Metatype.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.superbiz.accesstimeout.api; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Metatype @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.ANNOTATION_TYPE) public @interface Metatype { }
apache/tsfile
1,121
java/tsfile/src/main/java/org/apache/tsfile/exception/encrypt/EncryptException.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.tsfile.exception.encrypt; public class EncryptException extends RuntimeException { public EncryptException(String message) { super("Encrypt problem: " + message); } public EncryptException(String message, Throwable cause) { super("Encrypt problem: " + message, cause); } }
apache/twill
1,135
twill-api/src/main/java/org/apache/twill/api/RuntimeSpecification.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.twill.api; import java.util.Collection; /** * Specifications for runtime requirements. */ public interface RuntimeSpecification { String getName(); TwillRunnableSpecification getRunnableSpecification(); ResourceSpecification getResourceSpecification(); Collection<LocalFile> getLocalFiles(); }
apache/usergrid
1,104
stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/cursor/CursorParseException.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.corepersistence.pipeline.cursor; /** * Thrown when we can't parse a cursor */ public class CursorParseException extends RuntimeException { public CursorParseException( final String message, final Throwable cause ) { super( message, cause ); } }
apache/wicket
1,082
wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/sort/SortOrder.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.extensions.markup.html.repeater.data.sort; /** * Sort order for columns * * @author pete * */ public enum SortOrder { /** * unsorted */ NONE, /** * ascending sort order */ ASCENDING, /** * descending sort order */ DESCENDING }
apache/wicket
1,097
testing/wicket-threadtest/src/main/java/org/apache/wicket/threadtest/apps/app1/DatabaseLocator.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.threadtest.apps.app1; /** * service locator class for contacts database * * @author igor * */ public class DatabaseLocator { /** * @return contacts database */ public static ContactsDatabase getDatabase() { return TestApp1.get().getContactsDB(); } }
apache/zookeeper
1,118
zookeeper-jute/src/main/java/org/apache/jute/compiler/JInt.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.jute.compiler; /** * */ public class JInt extends JType { /** * Creates a new instance of JInt. */ public JInt() { super("int32_t", "int32_t", "int", "int", "Int", "Integer", "int", "toInt"); } public String getSignature() { return "i"; } }
google/bindiff
1,077
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/dialogs/criteriadialog/operators/AndCriterionPanel.java
// Copyright 2011-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.security.zynamics.bindiff.gui.dialogs.criteriadialog.operators; public class AndCriterionPanel extends AbstractOperatorPanel { public AndCriterionPanel() { super(); } @Override public String getBorderTitle() { return "AND Operator"; } @Override public String getInvalidInfoString() { return "AND operator needs at least two children."; } @Override public String getValidInfoString() { return "AND Operator is valid."; } }
google/bindiff
1,104
java/zylib/src/main/java/com/google/security/zynamics/zylib/general/comparators/JCheckBoxComparator.java
// Copyright 2011-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.security.zynamics.zylib.general.comparators; import java.io.Serializable; import java.util.Comparator; import javax.swing.JCheckBox; public class JCheckBoxComparator implements Comparator<JCheckBox>, Serializable { /** Used for serialization. */ private static final long serialVersionUID = -2526854370340524821L; @Override public int compare(final JCheckBox o1, final JCheckBox o2) { return Boolean.valueOf(o1.isSelected()).compareTo(Boolean.valueOf(o2.isSelected())); } }
google/binnavi
1,091
src/main/java/com/google/security/zynamics/zylib/gui/zygraph/editmode/actions/CDefaultBackgroundDraggedLeftAction.java
// Copyright 2011-2016 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.security.zynamics.zylib.gui.zygraph.editmode.actions; import com.google.security.zynamics.zylib.gui.zygraph.editmode.IStateAction; import com.google.security.zynamics.zylib.gui.zygraph.editmode.states.CBackgroundDraggedLeftState; import java.awt.event.MouseEvent; public class CDefaultBackgroundDraggedLeftAction implements IStateAction<CBackgroundDraggedLeftState> { @Override public void execute(final CBackgroundDraggedLeftState state, final MouseEvent event) { } }
google/binnavi
1,091
src/main/java/com/google/security/zynamics/zylib/gui/zygraph/editmode/actions/CDefaultBackgroundPressedLeftAction.java
// Copyright 2011-2016 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.security.zynamics.zylib.gui.zygraph.editmode.actions; import com.google.security.zynamics.zylib.gui.zygraph.editmode.IStateAction; import com.google.security.zynamics.zylib.gui.zygraph.editmode.states.CBackgroundPressedLeftState; import java.awt.event.MouseEvent; public class CDefaultBackgroundPressedLeftAction implements IStateAction<CBackgroundPressedLeftState> { @Override public void execute(final CBackgroundPressedLeftState state, final MouseEvent event) { } }
google/closure-compiler
1,124
src/com/google/javascript/jscomp/parsing/JsDocToken.java
/* * Copyright 2009 The Closure Compiler 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.javascript.jscomp.parsing; /** * JSDoc-specific tokens. * * This class is based on Rhino's Token. */ enum JsDocToken { // Tokens recycled from Rhino EOF, // end of file token - (not EOF_CHAR) EOL, // end of line LEFT_ANGLE, RIGHT_ANGLE, STRING, LEFT_SQUARE, RIGHT_SQUARE, LEFT_CURLY, RIGHT_CURLY, LEFT_PAREN, RIGHT_PAREN, COMMA, // comma operator COLON, ITER_REST, // JsDoc-only tokens ANNOTATION, PIPE, STAR, EOC, QMARK, BANG, EQUALS }
google/closure-compiler
1,138
src/com/google/javascript/jscomp/IdGenerator.java
/* * Copyright 2017 The Closure Compiler 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.javascript.jscomp; import java.io.Serializable; /** Id generator used in CrossModuleMotion. */ public class IdGenerator implements Serializable { /** * Ids for cross-module method stubbing, so that each method has * a unique id. */ private int currentId = 0; /** * Returns whether we've generated any new ids. */ boolean hasGeneratedAnyIds() { return currentId != 0; } /** Creates a new id for stubbing a method. */ public int newId() { return currentId++; } }
google/gitiles
1,151
java/com/google/gitiles/ThreadSafePrettifyParser.java
// Copyright 2015 Google 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. package com.google.gitiles; import java.util.Collections; import prettify.PrettifyParser; import prettify.parser.Prettify; public class ThreadSafePrettifyParser extends PrettifyParser { public static final ThreadSafePrettifyParser INSTANCE = new ThreadSafePrettifyParser(); private ThreadSafePrettifyParser() { // Prettify is not thread safe ... unless we do this. prettify = new Prettify() { { langHandlerRegistry = Collections.synchronizedMap(langHandlerRegistry); } }; } }
google/guava
1,153
guava/src/com/google/common/io/IgnoreJRERequirement.java
/* * Copyright 2019 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.io; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Target; /** * Disables Animal Sniffer's checking of compatibility with older versions of Java/Android. * * <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}. */ @Target({METHOD, CONSTRUCTOR, TYPE, FIELD}) @interface IgnoreJRERequirement {}
google/j2objc
1,092
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/locale/Extension.java
/* GENERATED SOURCE. DO NOT MODIFY. */ // © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html#License /* ******************************************************************************* * Copyright (C) 2009-2010, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* */ package android.icu.impl.locale; /** * @hide Only a subset of ICU is exposed in Android */ public class Extension { private char _key; protected String _value; protected Extension(char key) { _key = key; } Extension(char key, String value) { _key = key; _value = value; } public char getKey() { return _key; } public String getValue() { return _value; } public String getID() { return _key + LanguageTag.SEP + _value; } @Override public String toString() { return getID(); } }
google/j2objc
1,119
translator/src/main/java/com/google/devtools/j2objc/ast/LineComment.java
/* * 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.devtools.j2objc.ast; /** * Node type for an end of line comment. */ public class LineComment extends Comment { public LineComment() {} public LineComment(LineComment other) { super(other); } @Override public Kind getKind() { return Kind.LINE_COMMENT; } public boolean isLineComment() { return true; } @Override protected void acceptInner(TreeVisitor visitor) { visitor.visit(this); visitor.endVisit(this); } @Override public LineComment copy() { return new LineComment(this); } }
google/nomulus
1,135
core/src/main/java/google/registry/export/sheet/SheetModule.java
// Copyright 2017 The Nomulus Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package google.registry.export.sheet; import static com.google.common.base.Strings.emptyToNull; import dagger.Module; import dagger.Provides; import google.registry.request.Parameter; import jakarta.servlet.http.HttpServletRequest; import java.util.Optional; /** Dagger module for the sheet package. */ @Module public final class SheetModule { @Provides @Parameter("id") static Optional<String> provideId(HttpServletRequest req) { return Optional.ofNullable(emptyToNull(req.getParameter("id"))); } }
google/oss-fuzz
1,163
projects/apache-commons-net/Base64Fuzzer.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. // //////////////////////////////////////////////////////////////////////////////// import com.code_intelligence.jazzer.api.FuzzedDataProvider; import org.apache.commons.net.util.Base64; public class Base64Fuzzer { public static void fuzzerTestOneInput(FuzzedDataProvider data) { try{ Base64 b64 = new Base64(data.consumeInt(), data.consumeBytes(1000), data.consumeBoolean()); b64.encode(data.consumeBytes(4000)); b64.decode(data.consumeBytes(4000)); } catch (java.lang.IllegalArgumentException e) {} } }
googleapis/google-cloud-java
1,033
java-contact-center-insights/proto-google-cloud-contact-center-insights-v1/src/main/java/com/google/cloud/contactcenterinsights/v1/QueryMetricsMetadataOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.contactcenterinsights.v1; public interface QueryMetricsMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.contactcenterinsights.v1.QueryMetricsMetadata) com.google.protobuf.MessageOrBuilder {}
googlemaps/google-maps-services-java
1,133
src/main/java/com/google/maps/StaticMapsApi.java
/* * Copyright 2018 Google 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. */ package com.google.maps; import com.google.maps.model.Size; public class StaticMapsApi { private StaticMapsApi() {} /** * Create a new {@code StaticMapRequest}. * * @param context The {@code GeoApiContext} to make this request through. * @param size The size of the static map. * @return Returns a new {@code StaticMapRequest} with configured size. */ public static StaticMapsRequest newRequest(GeoApiContext context, Size size) { return new StaticMapsRequest(context).size(size); } }
hibernate/hibernate-ogm
1,099
core/src/main/java/org/hibernate/ogm/type/impl/PrimitiveByteArrayStringType.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.type.impl; import org.hibernate.MappingException; import org.hibernate.engine.spi.Mapping; import org.hibernate.ogm.type.descriptor.impl.StringMappedGridTypeDescriptor; import org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor; /** * Persist a {@link byte[]} as a {@link String}. * * @author Davide D'Alto */ public class PrimitiveByteArrayStringType extends AbstractGenericBasicType<byte[]> { public static final PrimitiveByteArrayStringType INSTANCE = new PrimitiveByteArrayStringType(); public PrimitiveByteArrayStringType() { super( StringMappedGridTypeDescriptor.INSTANCE, PrimitiveByteArrayTypeDescriptor.INSTANCE ); } @Override public String getName() { return "byte_array_as_string"; } @Override public int getColumnSpan(Mapping mapping) throws MappingException { return 1; } }
hibernate/hibernate-orm
1,029
hibernate-envers/src/test/java/org/hibernate/envers/test/integration/readwriteexpression/Staff.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.envers.test.integration.readwriteexpression; import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Table; import org.hibernate.annotations.ColumnTransformer; import org.hibernate.envers.Audited; @Entity @Table(name = "t_staff") public class Staff { public Staff() { } public Staff(double sizeInInches, Integer id) { this.sizeInInches = sizeInInches; this.id = id; } @Id public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } private Integer id; @Audited @Column(name = "size_in_cm") @ColumnTransformer( forColumn = "size_in_cm", read = "size_in_cm / 2.54E0", write = "? * 2.54E0") public double getSizeInInches() { return sizeInInches; } public void setSizeInInches(double sizeInInches) { this.sizeInInches = sizeInInches; } private double sizeInInches; }
hibernate/hibernate-orm
1,043
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/graphs/CompanyFetchProfile.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.jpa.graphs; import org.hibernate.annotations.FetchMode; import org.hibernate.annotations.FetchProfile; import jakarta.persistence.*; import java.util.HashSet; import java.util.Set; /** * @author Nathan Xu */ @Entity @FetchProfile( name = "company.location", fetchOverrides = { @FetchProfile.FetchOverride( entity = CompanyFetchProfile.class, association = "location", mode = FetchMode.JOIN ) } ) public class CompanyFetchProfile { @Id @GeneratedValue public long id; @OneToMany public Set<Employee> employees = new HashSet<Employee>(); @OneToOne(fetch = FetchType.LAZY) public Location location; @ElementCollection public Set<Market> markets = new HashSet<Market>(); @ElementCollection(fetch = FetchType.EAGER) @JoinTable(name= "companyfp_phonenos") public Set<String> phoneNumbers = new HashSet<String>(); public Location getLocation() { return location; } }
hibernate/hibernate-orm
1,051
hibernate-core/src/main/java/org/hibernate/boot/jaxb/mapping/spi/db/JaxbColumnCommon.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.boot.jaxb.mapping.spi.db; import java.util.Collections; import java.util.List; import org.hibernate.boot.jaxb.mapping.spi.JaxbCheckConstraintImpl; /** * Composition of the aspects of column definition most commonly exposed in XSD "column types" * * @author Steve Ebersole */ public interface JaxbColumnCommon extends JaxbColumn, JaxbColumnMutable, JaxbCheckable, JaxbColumnNullable, JaxbColumnUniqueable, JaxbColumnDefinable, JaxbCommentable { @Override default String getTable() { return null; } @Override default Boolean isNullable() { return null; } @Override default Boolean isInsertable() { return null; } @Override default Boolean isUpdatable() { return null; } @Override default String getComment() { return null; } @Override default Boolean isUnique() { return null; } @Override default List<JaxbCheckConstraintImpl> getCheckConstraints() { return Collections.emptyList(); } }
hibernate/hibernate-orm
1,066
hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/VersionJpaAnnotation.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.boot.models.annotations.internal; import java.lang.annotation.Annotation; import java.util.Map; import org.hibernate.models.spi.ModelsContext; import jakarta.persistence.Version; @SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" }) @jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor") public class VersionJpaAnnotation implements Version { /** * Used in creating dynamic annotation instances (e.g. from XML) */ public VersionJpaAnnotation(ModelsContext modelContext) { } /** * Used in creating annotation instances from JDK variant */ public VersionJpaAnnotation(Version annotation, ModelsContext modelContext) { } /** * Used in creating annotation instances from Jandex variant */ public VersionJpaAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) { } @Override public Class<? extends Annotation> annotationType() { return Version.class; } }
hibernate/hibernate-orm
1,068
hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/TenantIdAnnotation.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.boot.models.annotations.internal; import java.lang.annotation.Annotation; import java.util.Map; import org.hibernate.annotations.TenantId; import org.hibernate.models.spi.ModelsContext; @SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" }) @jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor") public class TenantIdAnnotation implements TenantId { /** * Used in creating dynamic annotation instances (e.g. from XML) */ public TenantIdAnnotation(ModelsContext modelContext) { } /** * Used in creating annotation instances from JDK variant */ public TenantIdAnnotation(TenantId annotation, ModelsContext modelContext) { } /** * Used in creating annotation instances from Jandex variant */ public TenantIdAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) { } @Override public Class<? extends Annotation> annotationType() { return TenantId.class; } }
hibernate/hibernate-orm
1,086
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/joinformula/ParentEntity.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.mapping.joinformula; import org.hibernate.annotations.JoinColumnOrFormula; import org.hibernate.annotations.JoinFormula; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; import jakarta.persistence.OneToOne; @Entity public class ParentEntity { @Id private Long id; @OneToOne(targetEntity = ChildEntity.class, optional = false) @JoinColumnOrFormula(column = @JoinColumn(name = "ID", referencedColumnName = "PARENT_ID", insertable = false, updatable = false)) @JoinColumnOrFormula(formula = @JoinFormula(referencedColumnName = "NAME", value = "'Tom'")) private ChildEntity tom; @OneToOne(targetEntity = ChildEntity.class, optional = false) @JoinColumnOrFormula(column = @JoinColumn(name = "ID", referencedColumnName = "PARENT_ID", insertable = false, updatable = false)) @JoinColumnOrFormula(formula = @JoinFormula(referencedColumnName = "NAME", value = "'Ben'")) private ChildEntity ben; }
hibernate/hibernate-search
1,035
backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/types/dsl/provider/impl/Elasticsearch814IndexFieldTypeFactoryProvider.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.backend.elasticsearch.types.dsl.provider.impl; import org.hibernate.search.backend.elasticsearch.types.mapping.impl.Elasticsearch814VectorFieldTypeMappingContributor; import org.hibernate.search.backend.elasticsearch.types.mapping.impl.ElasticsearchVectorFieldTypeMappingContributor; import com.google.gson.Gson; /** * The index field type factory provider for ES8.14+. */ public class Elasticsearch814IndexFieldTypeFactoryProvider extends AbstractIndexFieldTypeFactoryProvider { private final Elasticsearch814VectorFieldTypeMappingContributor vectorFieldTypeMappingContributor = new Elasticsearch814VectorFieldTypeMappingContributor(); public Elasticsearch814IndexFieldTypeFactoryProvider(Gson userFacingGson) { super( userFacingGson ); } @Override protected ElasticsearchVectorFieldTypeMappingContributor vectorFieldTypeMappingContributor() { return vectorFieldTypeMappingContributor; } }
hibernate/hibernate-search
1,050
integrationtest/v5migrationhelper/orm/src/test/java/org/hibernate/search/test/embedded/nested/Product.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.test.embedded.nested; import java.util.ArrayList; import java.util.List; import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; import jakarta.persistence.FetchType; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.OneToMany; import org.hibernate.search.annotations.Indexed; import org.hibernate.search.annotations.IndexedEmbedded; /** * @author Hardy Ferentschik */ @Entity @Indexed public class Product { @Id @GeneratedValue private long id; @OneToMany(mappedBy = "product", fetch = FetchType.EAGER, cascade = CascadeType.ALL) @IndexedEmbedded private List<Attribute> attributes; public Product() { attributes = new ArrayList<Attribute>(); } public long getId() { return id; } public List<Attribute> getAttributes() { return attributes; } public void setAttribute(Attribute attribute) { attributes.add( attribute ); } }
hibernate/hibernate-validator
1,068
documentation/src/test/java/org/hibernate/validator/referenceguide/chapter06/constraintvalidatorshareddata/ZipCode.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.validator.referenceguide.chapter06.constraintvalidatorshareddata; import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE_USE; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; import jakarta.validation.Constraint; import jakarta.validation.Payload; @Target({ METHOD, FIELD, ANNOTATION_TYPE, TYPE_USE }) @Retention(RUNTIME) @Constraint(validatedBy = ZipCodeValidator.class) @Documented public @interface ZipCode { String countryCode(); String message() default "{org.hibernate.validator.referenceguide.chapter06.constraintvalidatorshareddata.ZipCode.message}"; Class<?>[] groups() default { }; Class<? extends Payload>[] payload() default { }; }
hibernate/hibernate-validator
1,089
engine/src/main/java/org/hibernate/validator/internal/engine/messageinterpolation/parser/ParserState.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.validator.internal.engine.messageinterpolation.parser; /** * Interface defining the different methods a parser state has to respond to. It is up to the implementing state * to decide how to handle the different life cycle and callback methods * * @author Hardy Ferentschik */ public interface ParserState { void terminate(TokenCollector tokenCollector) throws MessageDescriptorFormatException; void handleNonMetaCharacter(char character, TokenCollector tokenCollector) throws MessageDescriptorFormatException; void handleBeginTerm(char character, TokenCollector tokenCollector) throws MessageDescriptorFormatException; void handleEndTerm(char character, TokenCollector tokenCollector) throws MessageDescriptorFormatException; void handleEscapeCharacter(char character, TokenCollector tokenCollector) throws MessageDescriptorFormatException; void handleELDesignator(char character, TokenCollector tokenCollector) throws MessageDescriptorFormatException; }
openjdk/jdk8
1,139
hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/cdbg/FloatType.java
/* * Copyright (c) 2001, 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 sun.jvm.hotspot.debugger.cdbg; public interface FloatType extends Type { }
openjdk/jdk8
1,142
langtools/test/com/sun/javadoc/testSuperclassInSerialForm/pkg/SubClass.java
/* * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package pkg; public class SubClass extends SuperClass implements java.io.Serializable {}
openjdk/jdk8
1,143
langtools/test/tools/javac/diags/examples/IntfAnnotationMemberClash.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.intf.annotation.member.clash @interface X { String toString(); }
openjdk/jdk8
1,151
langtools/test/tools/javac/diags/examples/MissingMethodBody.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.missing.meth.body.or.decl.abstract class MissingMethodBody { void m(); }
openjdk/jdk8
1,153
langtools/test/tools/javac/diags/examples/ArrayDimMissing.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.array.dimension.missing class ArrayDimMissing { int[] array = new int[]; }
openjdk/jdk8
1,161
jdk/test/java/lang/ClassLoader/deadlock/SupBob.java
/* * Copyright (c) 2009, 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 comSA; public class SupBob { static { System.out.println("comSA.SupBob loaded"); } }
openjdk/jdk8
1,161
langtools/test/tools/javac/lambda/funcInterfaces/NonSAM2.java
/* * @test /nodynamiccopyright/ * @bug 8003280 * @summary Add lambda tests * This test is for identifying a non-SAM type: Having more than one methods due to inheritance, and none of them has a subsignature of all other methods * @compile/fail/ref=NonSAM2.out -XDrawDiagnostics NonSAM2.java Helper.java */ import java.util.List; interface Foo1 { int getAge(String s);} interface Bar1 { Integer getAge(String s);} interface Foo1Bar1 extends Foo1, Bar1 {} //types Bar1 and Foo1 are incompatible; both define getAge(String), but with unrelated return types interface AC extends A, C {} //name clash: getOldest(List<?>) in C and getOldest(List<Number>) in A have the same erasure, yet neither overrides the other interface ABC extends A, B, C {} //ok - raw override interface AD extends A, D {} //name clash: getOldest(List<Integer>) in D and getOldest(List<Number>) in A have the same erasure, yet neither overrides the other interface Foo2<T> { void m(T arg);} interface Bar2<S> { void m(S arg);} interface Foo2Bar2<T1, T2> extends Foo2<T1>, Bar2<T2> {} //name clash: m(S) in Bar and m(T) in Foo have the same erasure, yet neither overrides the other
openjdk/jdk8
1,162
langtools/test/tools/javac/multicatch/model/Check.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. */ /** * Annotation used by ModelChecker to mark the class whose model is to be checked */ @interface Check {}
openjdk/jtreg
1,179
test/rerun/std/JUnitTest.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. */ /* @test * @run junit JUnitTest */ import org.junit.*; public class JUnitTest { @Test public void test() { } }
openjdk/jtreg
1,180
test/jtrContentTest/Test.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. */ /* * @test */ public class Test { public static void main(String... args) { System.out.println("hello!"); } }
openjdk/skara
1,158
jcheck/src/main/java/org/openjdk/skara/jcheck/Check.java
/* * Copyright (c) 2019, 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.jcheck; public interface Check { String name(); String description(); }
oracle/coherence
1,091
prj/coherence-core/src/main/java/com/tangosol/coherence/config/builder/DefaultBuilderCustomization.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.coherence.config.builder; /** * The {@link DefaultBuilderCustomization} class is the default implementation * of {@link BuilderCustomization}. * * @author pfm 2012.01.06 * @since Coherence 12.1.2 */ public class DefaultBuilderCustomization<T> implements BuilderCustomization<T> { // ----- BuilderCustomization interface --------------------------------- /** * {@inheritDoc} */ @Override public ParameterizedBuilder<T> getCustomBuilder() { return m_bldr; } /** * {@inheritDoc} */ public void setCustomBuilder(ParameterizedBuilder<T> bldr) { m_bldr = bldr; } // ----- data members --------------------------------------------------- /** * The {@link ParameterizedBuilder} used to build the custom instance. */ private ParameterizedBuilder<T> m_bldr; }
oracle/coherence
1,109
prj/coherence-docker/src/test/java/com/oracle/coherence/docker/TestProcessor.java
/* * Copyright (c) 2000, 2022, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * https://oss.oracle.com/licenses/upl. */ package com.oracle.coherence.docker; import com.oracle.coherence.common.base.Logger; import com.tangosol.io.ExternalizableLite; import com.tangosol.util.InvocableMap; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; /** * A test EntryProcessor to verify the classpath. * * @param <K> the type of cache entry key * @param <V> the type of cache entry value * * @author Jonathan Knight 2020.06.30 */ public class TestProcessor<K, V> implements InvocableMap.EntryProcessor<K, V, Boolean>, ExternalizableLite { @Override public Boolean process(InvocableMap.Entry<K, V> entry) { Logger.info("Executing " + getClass()); return true; } @Override public void readExternal(DataInput in) throws IOException { } @Override public void writeExternal(DataOutput out) throws IOException { } }
oracle/coherence
1,113
prj/coherence-core/src/main/java/com/tangosol/run/component/IntegrationException.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.run.component; /** * The IntegrationException exception is thrown when a process of integration * cannot be completed normally. This is a severe exception that usually * indicates a non-recoverable (quite likely environment configuration) error * * @version 1.00, 08/24/98 * @author Gene Gleyzer */ public class IntegrationException extends RuntimeException { /** * Constructs a IntegrationException with no detail message. * A detail message is a String that describes this particular exception. */ public IntegrationException() { super(); } /** * Constructs a IntegrationException with the specified detail message. * A detail message is a String that describes this particular exception. * * @param s the String that contains a detailed message */ public IntegrationException(String s) { super(s); } }
oracle/coherence
1,114
prj/coherence-core/src/main/java/com/tangosol/dev/assembler/BootstrapMethodConstant.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.dev.assembler; /** * BootstrapMethodConstant is a convenience subclass of {@link MethodConstant} * allowing the omission of the well known bootstrap method signature. * <p> * Bootstrap methods are permitted to have wider typed arguments or even be a * variadic method however BootstrapMethodConstant assumes narrower types. * * @author hr 2012.08.06 */ public class BootstrapMethodConstant extends MethodConstant { // ----- constructors --------------------------------------------------- /** * Constructs a MethodConstant with the common type required by an * invokedynamic bootstrap method. * * @param sClass * @param sName */ public BootstrapMethodConstant(String sClass, String sName) { super(sClass, sName, "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"); } }
apache/commons-fileupload
1,105
commons-fileupload2-core/src/test/java/org/apache/commons/fileupload2/core/Constants.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.fileupload2.core; /** * Constants used for testing. */ public final class Constants { /** * The content type used in several tests. */ public static final String CONTENT_TYPE = "multipart/form-data; boundary=---1234"; private Constants() { } }
apache/commons-lang
1,144
src/main/java/org/apache/commons/lang3/mutable/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 * * 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. */ /** * Provides typed mutable wrappers to primitive values and Object. * These wrappers are similar to the wrappers provided by the Java API, but allow the wrapped value to be changed without needing to create a separate wrapper object. * These classes are not thread-safe. * * @since 2.1 */ package org.apache.commons.lang3.mutable;
apache/cxf
1,114
rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/array/FlatArrayServiceInterface.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.aegis.type.array; public interface FlatArrayServiceInterface { String[] getStringArrayValue(); void submitStringArray(String[] array); void takeBeanWithFlatArray(BeanWithFlatArray bwfa); BeanWithFlatCollection echoBeanWithFlatCollection(BeanWithFlatCollection c); }
apache/cxf
1,117
systests/cdi/base/src/main/java/org/apache/cxf/systests/cdi/base/BookStoreAuthenticator.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.systests.cdi.base; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Named; @Named @ApplicationScoped public class BookStoreAuthenticator { public BookStoreAuthenticator() { } public boolean authenticated() { return true; } }
apache/cxf
1,120
rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/IdTokenProvider.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.rs.security.oidc.idp; import java.util.List; import org.apache.cxf.rs.security.oauth2.common.UserSubject; import org.apache.cxf.rs.security.oidc.common.IdToken; public interface IdTokenProvider { IdToken getIdToken(String clientId, UserSubject authenticatedUser, List<String> scopes); }
apache/cxf
1,130
tools/common/src/main/java/org/apache/cxf/tools/util/OutputStreamCreator.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.util; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.nio.file.Files; /** * */ public class OutputStreamCreator { public OutputStream createOutputStream(File file) throws IOException { return Files.newOutputStream(file.toPath()); } }
apache/cxf
1,139
core/src/main/java/org/apache/cxf/common/spi/NamespaceClassCreator.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.common.spi; import java.util.Map; /** * SPI interface to implement the proxy defining logic. * It enables to switch from unsafe to classloader logic for instance for java >= 9. */ public interface NamespaceClassCreator { Class<?> createNamespaceWrapperClass(Class<?> mcls, Map<String, String> map); }
apache/deltaspike
1,109
deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/exclude/ProdDbBean.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.exclude; import org.apache.deltaspike.core.api.exclude.Exclude; /** * Class which gets excluded if there is a configured value for the key called 'db' and * the value is not 'prodDB' */ @Exclude(onExpression = "db!=prodDB;db==*") public class ProdDbBean { }
apache/directory-kerby
1,099
kerby-kerb/kerb-kdc-test/src/test/java/org/apache/kerby/kerberos/kerb/server/TicketCacheLoginTest.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.kerby.kerberos.kerb.server; import org.junit.jupiter.api.Test; public class TicketCacheLoginTest extends LoginTestBase { @Test public void testLogin() throws Exception { checkSubject(super.loginClientUsingTicketCache()); } }
apache/distributedlog
1,101
distributedlog-common/src/main/java/org/apache/distributedlog/common/util/ReferenceCounted.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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * 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.distributedlog.common.util; /** * An interface for indicating an object is reference counted. */ public interface ReferenceCounted { /** * Retain the reference. */ void retain(); /** * Release the reference. */ void release(); }
apache/distributedlog
1,114
distributedlog-common/src/main/java/org/apache/distributedlog/common/util/Sizable.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.distributedlog.common.util; /** * The {@code Sizable} interface is to provide the capability of calculating size * of any objects. */ public interface Sizable { /** * Calculate the size for this instance. * * @return size of the instance. */ long size(); }
apache/dolphinscheduler
1,078
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/executor/PhysicalTaskExecutorRepository.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.server.worker.executor; import org.apache.dolphinscheduler.task.executor.TaskExecutorRepository; import org.springframework.stereotype.Component; @Component public class PhysicalTaskExecutorRepository extends TaskExecutorRepository { }
apache/doris-manager
1,101
manager/dm-server/src/main/java/org/apache/doris/stack/model/request/control/DeployConfigItem.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.model.request.control; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor public class DeployConfigItem { private String key; private String value; private String desc; }