repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/maven
1,117
its/core-it-suite/src/test/resources/mng-8525-maven-di-plugin/src/main/java/org/apache/maven/plugins/MavenDIComponent.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.maven.plugins; import org.apache.maven.api.di.Named; import org.apache.maven.api.di.Singleton; @Named @Singleton public class MavenDIComponent { public String hello(String name) { return "Hello " + name + "! I am a component that is being used via field injection!"; } }
apache/maven
1,139
impl/maven-core/src/main/java/org/apache/maven/internal/transformation/TransformationFailedException.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.maven.internal.transformation; /** * Exception that may be thrown by the {@link org.apache.maven.artifact.Artifact#getFile()} * implementation. */ public class TransformationFailedException extends RuntimeException { public TransformationFailedException(Throwable cause) { super(cause); } }
apache/maven
1,154
compat/maven-compat/src/test/java/org/apache/maven/repository/legacy/WagonB.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.maven.repository.legacy; import javax.inject.Named; import javax.inject.Singleton; /** * Wagon for testing, for protocols <code>b1</code> and <code>b2</code> * */ @Named("b") @Singleton public class WagonB extends WagonMock { public String[] getSupportedProtocols() { return new String[] {"b1", "b2"}; } }
apache/maven
1,154
impl/maven-core/src/main/java/org/apache/maven/plugin/internal/MavenPluginValidator.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.maven.plugin.internal; import java.util.List; import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.descriptor.PluginDescriptor; /** * MavenPluginValidator */ public interface MavenPluginValidator { void validate(Artifact pluginArtifact, PluginDescriptor pluginDescriptor, List<String> errors); }
apache/metamodel
1,143
core/src/main/java/org/apache/metamodel/query/CountAggregateBuilder.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.metamodel.query; import org.apache.metamodel.util.AggregateBuilder; final class CountAggregateBuilder implements AggregateBuilder<Long> { private long counter = 0; @Override public void add(Object o) { if (o != null) { counter++; } } @Override public Long getAggregate() { return counter; } }
apache/myfaces
1,177
impl/src/main/java/org/apache/myfaces/cdi/util/DefaultLiteral.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.cdi.util; import jakarta.enterprise.inject.Default; import jakarta.enterprise.util.AnnotationLiteral; /** * Literal for the {@link jakarta.enterprise.inject.Default} annotation. */ public class DefaultLiteral extends AnnotationLiteral<Default> implements Default { private static final long serialVersionUID = -8623640277155878657L; }
apache/ofbiz-framework
1,142
framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/model/GroupOption.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.ofbiz.widget.renderer.macro.model; import java.util.List; /** * Record representing a group option in a drop-down (select) list. */ public record GroupOption(String id, String description, String widgetStyle, List<Object> options) { }
apache/olingo-odata4
1,132
lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/expression/TypeLiteral.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.olingo.server.api.uri.queryoption.expression; import org.apache.olingo.commons.api.edm.EdmType; /** * Represents a type literal expression in the expression tree */ public interface TypeLiteral extends Expression { /** * @return Type defined by the type literal */ public EdmType getType(); }
apache/olingo-odata4
1,147
lib/server-api/src/main/java/org/apache/olingo/server/api/uri/UriResourceProperty.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.olingo.server.api.uri; import org.apache.olingo.commons.api.edm.EdmProperty; /** * Used to describe an resource part which is an property (super interface) */ public interface UriResourceProperty extends UriResourcePartTyped { /** * @return Property used in the resource path */ EdmProperty getProperty(); }
apache/openmeetings
1,154
openmeetings-core/src/main/java/org/apache/openmeetings/core/notifier/INotifier.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.openmeetings.core.notifier; import org.apache.openmeetings.db.entity.calendar.Appointment; import org.apache.openmeetings.db.entity.room.Invitation; import org.apache.openmeetings.db.entity.user.User; @FunctionalInterface public interface INotifier { void notify(User u, Appointment a, Invitation inv) throws Exception; }
apache/openwebbeans-meecrowave
1,152
meecrowave-core/src/main/java/org/apache/meecrowave/api/StartListening.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.meecrowave.api; import org.apache.catalina.Context; import org.apache.catalina.Host; import org.apache.catalina.connector.Connector; public class StartListening extends ListeningBase { public StartListening(final Connector connector, final Host host, final Context context) { super(connector, host, context); } }
apache/openwebbeans
1,116
webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/AroundInvokeWithWrongReturnTypeComponent.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.webbeans.test.component.exception; import jakarta.interceptor.AroundInvoke; import jakarta.interceptor.InvocationContext; public class AroundInvokeWithWrongReturnTypeComponent { @AroundInvoke public int method2(InvocationContext ctx) throws Exception { return 0; } }
apache/ozhera
1,092
trace-etl/trace-etl-extensions/trace-etl-doris-extension/src/main/java/org/apache/ozhera/trace/etl/extension/doris/domain/HeraTraceServiceColumn.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.ozhera.trace.etl.extension.doris.domain; public class HeraTraceServiceColumn { public static final String SERVICE_NAME = "serviceName"; public static final String OPERATION_NAME = "operationName"; public static final String TIMESTAMP = "timestamp"; }
apache/ozhera
1,116
ozhera-monitor/ozhera-monitor-service/src/main/java/org/apache/ozhera/monitor/service/model/prometheus/ServiceQps.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.ozhera.monitor.service.model.prometheus; import lombok.Data; import java.io.Serializable; /** * @author zhangxiaowei6 * @date 2021/12/27 下午 */ @Data public class ServiceQps implements Serializable{ private String type; private String avgQps; private String TotalQps; }
apache/ozhera
1,116
ozhera-monitor/ozhera-monitor-service/src/main/java/org/apache/ozhera/monitor/service/model/prometheus/TeslaMetricData.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.ozhera.monitor.service.model.prometheus; import lombok.Data; import java.io.Serializable; import java.util.List; /** * @author zhangxiaowei6 */ @Data public class TeslaMetricData implements Serializable { private String resultType; private List<TeslaMetricDataSet> result; }
apache/paimon-webui
1,125
paimon-web-api/src/main/java/org/apache/paimon/web/api/action/context/factory/FlinkCdcActionContextFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.paimon.web.api.action.context.factory; import org.apache.paimon.web.api.enums.FlinkCdcSyncType; /** FlinkCdcActionContextFactory. */ public interface FlinkCdcActionContextFactory extends ActionContextFactory { String sourceType(); String targetType(); FlinkCdcSyncType cdcType(); }
apache/pulsar
1,155
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/FunctionStatusUtil.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.common.policies.data; import java.io.IOException; import org.apache.pulsar.common.util.ObjectMapperFactory; public class FunctionStatusUtil { public static FunctionStatus decode(String json) throws IOException { return ObjectMapperFactory.getMapper().reader().readValue(json, FunctionStatus.class); } }
apache/ratis
1,177
ratis-common/src/test/java/org/apache/ratis/test/tag/FlakyTest.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.ratis.test.tag; /** * Interface to mark JUnit4 test classes or methods that exhibit intermittent * issues. These are run separately from the normal tests in CI. In case of * failure they may be repeated a few times. * Usage: <code>@Category(FlakyTest.class) @Flaky("RATIS-123")</code> */ public interface FlakyTest { // category marker }
apache/reef
1,129
lang/java/reef-io/src/main/java/org/apache/reef/io/network/group/impl/config/parameters/DriverIdentifierGroupComm.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.io.network.group.impl.config.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; @NamedParameter(doc = "Identifier of the driver, used in group communication") public final class DriverIdentifierGroupComm implements Name<String> { }
apache/rocketmq-connect
1,083
connectors/rocketmq-connect-kafka-connector-adapter/src/main/java/org/apache/rocketmq/connect/kafka/connector/KafkaRocketmqSinkConnector.java
package org.apache.rocketmq.connect.kafka.connector; import io.openmessaging.KeyValue; import io.openmessaging.connector.api.component.task.Task; import io.openmessaging.connector.api.component.task.sink.SinkConnector; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.List; public class KafkaRocketmqSinkConnector extends SinkConnector { private static final Logger log = LoggerFactory.getLogger(KafkaRocketmqSinkConnector.class); private KafkaRocketmqConnector parentConnector = new KafkaRocketmqConnector(this); @Override public List<KeyValue> taskConfigs(int maxTasks) { return parentConnector.taskConfigs(maxTasks); } @Override public Class<? extends Task> taskClass() { return parentConnector.taskClass(); } @Override public void start(KeyValue config) { parentConnector.start(config); } @Override public void stop() { parentConnector.stop(); } @Override public void validate(KeyValue config) { parentConnector.validate(config); } }
apache/royale-compiler
1,154
compiler/src/main/java/org/apache/royale/compiler/fxg/flex/FlexGraphicNode.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.fxg.flex; import org.apache.royale.compiler.internal.fxg.dom.GraphicNode; /** * A Flex specific override for GraphicNode used to record whether the * FXG document includes any &lt;TextGraphic&gt; child nodes. */ public class FlexGraphicNode extends GraphicNode { public boolean hasText; }
apache/seatunnel
1,099
seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/sink/schema/SchemaDeleteColumn.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.iceberg.sink.schema; public class SchemaDeleteColumn implements ISchemaChange { private final String name; public SchemaDeleteColumn(String name) { this.name = name; } public String name() { return name; } }
apache/seatunnel
1,149
seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SupportSchemaEvolutionSink.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.api.sink; import org.apache.seatunnel.api.table.schema.SchemaChangeType; import java.util.List; public interface SupportSchemaEvolutionSink { /** * The sink connector supports schema evolution types. * * @return the supported schema change types */ List<SchemaChangeType> supports(); }
apache/seatunnel
1,151
seatunnel-api/src/main/java/org/apache/seatunnel/api/source/SupportSchemaEvolution.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.api.source; import org.apache.seatunnel.api.table.schema.SchemaChangeType; import java.util.List; public interface SupportSchemaEvolution { /** * Whether the source connector supports schema evolution. * * @return the supported schema change types */ List<SchemaChangeType> supports(); }
apache/shardingsphere-elasticjob
1,122
registry-center/api/src/main/java/org/apache/shardingsphere/elasticjob/reg/exception/RegException.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.elasticjob.reg.exception; /** * Registry center exception. */ public final class RegException extends RuntimeException { private static final long serialVersionUID = -6417179023552012152L; public RegException(final Exception cause) { super(cause); } }
apache/shardingsphere
1,104
agent/core/src/main/java/org/apache/shardingsphere/agent/core/advisor/config/yaml/entity/YamlPointcutParameterConfiguration.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.agent.core.advisor.config.yaml.entity; import lombok.Getter; import lombok.Setter; /** * YAML pointcut parameter configuration. */ @Getter @Setter public final class YamlPointcutParameterConfiguration { private int index; private String type; }
apache/shardingsphere
1,118
test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/external/loader/summary/FileSummary.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.test.it.sql.parser.external.loader.summary; import lombok.Getter; import lombok.RequiredArgsConstructor; /** * File summary. */ @RequiredArgsConstructor @Getter public final class FileSummary { private final String fileName; private final String accessURI; }
apache/shardingsphere
1,131
features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/rule/ShadowAlgorithmNameRule.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.shadow.rule; import lombok.Getter; import lombok.RequiredArgsConstructor; /** * Shadow algorithm name rule. */ @RequiredArgsConstructor @Getter public final class ShadowAlgorithmNameRule { private final String shadowColumnName; private final String shadowAlgorithmName; }
apache/shardingsphere
1,142
infra/common/src/main/java/org/apache/shardingsphere/infra/instance/ComputeNodeData.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.infra.instance; import lombok.Getter; import lombok.RequiredArgsConstructor; /** * Compute node data. */ @RequiredArgsConstructor @Getter public final class ComputeNodeData { private final String databaseName; private final String attribute; private final String version; }
apache/shenyu
1,118
shenyu-plugin/shenyu-plugin-cache/shenyu-plugin-cache-spi/src/main/java/org/apache/shenyu/plugin/cache/ICacheBuilder.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.shenyu.plugin.cache; import org.apache.shenyu.spi.SPI; /** * ICacheBuilder. */ @SPI public interface ICacheBuilder { /** * builder the cache with config. * @param cacheConfig the cache config * @return cache instance */ ICache builderCache(String cacheConfig); }
apache/shenyu
1,136
shenyu-e2e/shenyu-e2e-engine/src/main/java/org/apache/shenyu/e2e/engine/scenario/function/Checker.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.shenyu.e2e.engine.scenario.function; import org.apache.shenyu.e2e.client.gateway.GatewayClient; @FunctionalInterface public interface Checker { Checker DEFAULT = supplier -> { }; /** * check client. * @param client client */ void check(GatewayClient client); }
apache/shenyu
1,159
shenyu-common/src/main/java/org/apache/shenyu/common/concurrent/AbortPolicy.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.shenyu.common.concurrent; import java.util.Queue; /** * A handler for rejected element that throws a * {@code RejectException}. */ public class AbortPolicy<E> implements Rejector<E> { @Override public void reject(final E e, final Queue<E> queue) { throw new RejectException("no more memory can be used !"); } }
apache/shindig
1,153
java/gadgets/src/main/java/org/apache/shindig/gadgets/preload/PreloadException.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.shindig.gadgets.preload; /** * Exceptions thrown when preloading data. */ public class PreloadException extends Exception { public PreloadException(String msg) { super(msg); } public PreloadException(Throwable t) { super(t); } public PreloadException(String msg, Throwable t) { super(msg, t); } }
apache/sis
1,157
endorsed/src/org.apache.sis.feature/main/org/apache/sis/image/processing/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. */ /** * Image processing operations. * * <p><strong>Do not use!</strong></p> * * This package is for internal use by SIS only. Classes in this package * may change in incompatible ways in any future version without notice. * * @author Johann Sorel (Geomatys) * @author Martin Desruisseaux (Geomatys) */ package org.apache.sis.image.processing;
apache/skywalking
1,114
oap-server/server-query-plugin/promql-plugin/src/main/java/org/apache/skywalking/oap/query/promql/entity/LabelValuePair.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.query.promql.entity; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; @Getter @RequiredArgsConstructor @EqualsAndHashCode public class LabelValuePair { private final String labelName; private final String labelValue; }
apache/skywalking
1,136
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/type/ProcessNode.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.core.query.type; import lombok.Data; @Data public class ProcessNode { private String id; private String serviceId; private String serviceName; private String serviceInstanceId; private String serviceInstanceName; private String name; private boolean isReal; }
apache/solr
1,167
solr/core/src/test/org/apache/solr/cloud/TestExactSharedStatsCacheCloud.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.cloud; import org.apache.solr.search.stats.ExactSharedStatsCache; /** */ public class TestExactSharedStatsCacheCloud extends TestBaseStatsCacheCloud { @Override protected boolean assertSameScores() { return true; } @Override protected String getImplementationName() { return ExactSharedStatsCache.class.getName(); } }
apache/solr
1,173
solr/core/src/java/org/apache/solr/security/HttpClientBuilderPlugin.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.security; import org.apache.solr.client.solrj.impl.Http2SolrClient; /** * Plugin interface for configuring internal HttpClients. This relies on the internal HttpClient * implementation and is subject to change. * * @lucene.experimental */ public interface HttpClientBuilderPlugin { public default void setup(Http2SolrClient client) {} }
apache/storm
1,141
storm-server/src/main/java/org/apache/storm/scheduler/resource/normalization/ResourceMetrics.java
/* * Copyright 2018 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.storm.scheduler.resource.normalization; import com.codahale.metrics.Meter; import org.apache.storm.metric.StormMetricsRegistry; public class ResourceMetrics { private final Meter numNegativeResourceEvents; public ResourceMetrics(StormMetricsRegistry metricsRegistry) { numNegativeResourceEvents = metricsRegistry.registerMeter("nimbus:num-negative-resource-events"); } public Meter getNegativeResourceEventsMeter() { return numNegativeResourceEvents; } }
apache/storm
1,163
external/storm-hdfs/src/main/java/org/apache/storm/hdfs/common/NullPartitioner.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.storm.hdfs.common; import org.apache.storm.tuple.Tuple; /** * The NullPartitioner partitions every tuple to the empty string. In otherwords, no partition sub directories will * be added to the path. */ public class NullPartitioner implements Partitioner { @Override public String getPartitionPath(final Tuple tuple) { return ""; } }
apache/storm
1,176
storm-client/src/jvm/org/apache/storm/topology/base/BaseBasicBolt.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.storm.topology.base; import java.util.Map; import org.apache.storm.task.TopologyContext; import org.apache.storm.topology.IBasicBolt; public abstract class BaseBasicBolt extends BaseComponent implements IBasicBolt { @Override public void prepare(Map<String, Object> topoConf, TopologyContext context) { } @Override public void cleanup() { } }
apache/streampark-quickstart
1,110
quickstart-flink/quickstart-connector/src/main/java/org/apache/streampark/flink/quickstart/connector/bean/LogBean.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.streampark.flink.quickstart.connector.bean; import lombok.Data; import java.io.Serializable; @Data public class LogBean implements Serializable { private String platenum; private String cardType; private Long inTime; private Long outTime; private String controlid; }
apache/streampipes
1,126
streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/pe/config/IDataSinkConfiguration.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.config; import org.apache.streampipes.extensions.api.pe.IStreamPipesDataSink; import org.apache.streampipes.model.graph.DataSinkDescription; public interface IDataSinkConfiguration extends IPipelineElementConfiguration<DataSinkDescription, IStreamPipesDataSink> { }
apache/tapestry-5
1,137
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/NestedBeanEditor.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.integration.app1.pages; import org.apache.tapestry5.annotations.InjectPage; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.integration.app1.data.Person; public class NestedBeanEditor { @Property private Person parent; @InjectPage private NestedBeanDisplay display; void onPrepare() { parent = new Person(); parent.setChild(new Person()); } Object onSuccess() { return display.initialize(parent); } }
apache/tapestry-5
1,156
tapestry-core/src/main/java/org/apache/tapestry5/internal/InternalSymbols.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 org.apache.tapestry5.internal; import org.apache.tapestry5.ioc.annotations.IncompatibleChange; public class InternalSymbols { /** * Comma-separated list of pre-allocated Form component control names. Basically, this exists to * work around name collisions on the client side. Starting in 5.3, these names are * also pre-allocated as ids. * * * @since 5.2.0 */ @IncompatibleChange(release = "5.4", details = "Renamed from PRE_SELECTED_FORM_NAMES.") public static final String RESERVED_FORM_CONTROL_NAMES = "tapestry.reserved-form-control-names"; }
apache/thrift
1,168
lib/java/src/test/java/org/apache/thrift/test/fuzz/RoundtripJSONFuzzer.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.thrift.test.fuzz; import org.apache.thrift.protocol.TJSONProtocol; import org.apache.thrift.protocol.TProtocolFactory; public class RoundtripJSONFuzzer { public static void fuzzerTestOneInput(byte[] input) throws Exception { TProtocolFactory factory = new TJSONProtocol.Factory(); FuzzTestUtils.testRoundtrip(input, factory); } }
apache/tomee
1,145
itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/ejbql/QueryDataLocalHome.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.test.entity.ejbql; import jakarta.ejb.EJBLocalHome; import jakarta.ejb.FinderException; public interface QueryDataLocalHome extends EJBLocalHome { public QueryDataLocal create(int value) throws FinderException; public QueryDataLocal findByPrimaryKey(Integer primaryKey) throws FinderException; }
apache/tomee
1,158
examples/dynamic-implementation/src/main/java/org/superbiz/dynamic/SocialBean.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.dynamic; import org.apache.openejb.api.Proxy; import jakarta.ejb.Singleton; import jakarta.interceptor.Interceptors; @Singleton @Proxy(SocialHandler.class) @Interceptors(SocialInterceptor.class) public interface SocialBean { public String facebookStatus(); public String twitterStatus(); public String status(); }
apache/tomee
1,158
server/openejb-client/src/main/java/org/apache/openejb/client/RetryException.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.client; import java.io.IOException; /** * @version $Rev$ $Date$ */ public class RetryException extends IOException { private final Response response; public RetryException(final Response response) { this.response = response; } public Response getResponse() { return response; } }
apache/tomee
1,172
examples/simple-cmp2/src/main/java/org/superbiz/cmp2/Movie.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.cmp2; /** * @version $Revision$ $Date$ */ public interface Movie extends jakarta.ejb.EJBLocalObject { java.lang.Integer getId(); void setId(java.lang.Integer id); String getDirector(); void setDirector(String director); String getTitle(); void setTitle(String title); int getYear(); void setYear(int year); }
apache/trafodion
1,194
core/sqf/src/seabed/test/t284cb.java
//------------------------------------------------------------------ // // @@@ START COPYRIGHT @@@ // // 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. // // @@@ END COPYRIGHT @@@ package com.hp.traf; /** * t284cb * * callback */ public interface t284cb { /** * @param nid nid * @param pid pid * @param servers servers * @return hash (or negative error) */ public int cb(int nid, int pid, String[] servers); }
apache/wicket
1,132
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/internal/headeritems/PageWithoutHeaderItems.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.markup.html.internal.headeritems; import org.apache.wicket.request.mapper.parameter.PageParameters; public class PageWithoutHeaderItems extends BasePage { private static final long serialVersionUID = 1L; public PageWithoutHeaderItems(final PageParameters parameters) { super(parameters); } }
apache/wicket
1,141
wicket-core-tests/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/NormalPage.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.ajax.markup.html.ajaxLink; import org.apache.wicket.markup.html.WebPage; /** * Simple page used to test redirecting to a normal request from an ajax request. */ public class NormalPage extends WebPage { private static final long serialVersionUID = 1L; /** * Construct. */ public NormalPage() { } }
google/closure-compiler
1,146
src/com/google/javascript/jscomp/parsing/parser/trees/TemplateSubstitutionTree.java
/* * Copyright 2014 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.parser.trees; import com.google.javascript.jscomp.parsing.parser.util.SourceRange; /** * A production representing the expression to be evaluated and substituted * into a template literal. Eg: ${hello}. */ public class TemplateSubstitutionTree extends ParseTree { public final ParseTree expression; public TemplateSubstitutionTree(SourceRange location, ParseTree expression) { super(ParseTreeType.TEMPLATE_SUBSTITUTION, location); this.expression = expression; } }
google/crunchy
1,149
crunchy/java/src/main/java/com/google/security/crunchy/internal/algs/sign/SubtleVerifier.java
// Copyright 2017 The CrunchyCrypt Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.crunchy.algs.sign; import java.security.GeneralSecurityException; /** An interface for asymmetric cryptographic verification. */ public interface SubtleVerifier { /** * Verifies a message. * * @param message The message to be verified. * @param message The signature to be verified. * @throws GeneralSecurityException If the signature is invalid or if the underlying crypto * library returns an error. */ void verify(byte[] message, byte[] signature) throws GeneralSecurityException; }
google/j2cl
1,142
transpiler/javatests/com/google/j2cl/readable/java/autovalue/DefaultConstructorAutoValue.java
/* * Copyright 2020 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package autovalue; import com.google.auto.value.AutoValue; @AutoValue public abstract class DefaultConstructorAutoValue { DefaultConstructorAutoValue() {} public abstract boolean getBooleanField(); @AutoValue.Builder abstract static class Builder { protected Builder() {} abstract Builder setBooleanField(boolean x); public abstract DefaultConstructorAutoValue build(); } static DefaultConstructorAutoValue create() { return new AutoValue_DefaultConstructorAutoValue.Builder().setBooleanField(true).build(); } }
google/j2cl
1,153
junit/generator/javatests/com/google/j2cl/junit/integration/async/data/TestWillTimeOut.java
/* * Copyright 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.j2cl.junit.integration.async.data; import com.google.j2cl.junit.async.AsyncTestRunner; import com.google.j2cl.junit.integration.testing.async.Thenable; import com.google.j2cl.junit.integration.testing.async.Timer; import org.junit.Test; import org.junit.runner.RunWith; /** Integration test used in J2clTestRunnerTest. */ @RunWith(AsyncTestRunner.class) public class TestWillTimeOut { @Test(timeout = 50) public Thenable willTimeout() { return (onFulfilled, onRejected) -> Timer.schedule(() -> onFulfilled.execute(null), 300); } }
google/oss-fuzz
1,209
projects/feign/UriUtilsFuzzer.java
// Copyright 2023 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 feign.template.UriUtils; // Generated with https://github.com/ossf/fuzz-introspector/tree/main/tools/auto-fuzz // Heuristic name: jvm-autofuzz-heuristics-1 // Target method: [feign.template.UriUtils] public static java.lang.String // encode(java.lang.String,boolean) public class UriUtilsFuzzer { public static void fuzzerTestOneInput(FuzzedDataProvider data) { Boolean value = data.consumeBoolean(); UriUtils.encode(data.consumeRemainingAsString(), value); } }
google/protobuf-gradle-plugin
1,187
examples/exampleProject/src/main/java/Foo.java
import com.google.protobuf.MessageLite; import java.util.ArrayList; import java.util.List; public class Foo { public static List<MessageLite> getDefaultInstances() { ArrayList<MessageLite> list = new ArrayList<MessageLite>(); // from src/main/proto/test.proto list.add(ws.antonov.protobuf.test.Test.TestMessage.getDefaultInstance()); list.add(ws.antonov.protobuf.test.Test.AnotherMessage.getDefaultInstance()); list.add(ws.antonov.protobuf.test.Test.Item.getDefaultInstance()); list.add(ws.antonov.protobuf.test.Test.DataMap.getDefaultInstance()); // from src/main/proto/sample.proto (java_multiple_files == true, thus no outter class) list.add(com.example.tutorial.Msg.getDefaultInstance()); list.add(com.example.tutorial.SecondMsg.getDefaultInstance()); // from lib/protos.tar.gz/stuff.proto list.add(Stuff.Blah.getDefaultInstance()); // from ext/more.proto list.add(More.MoreMsg.getDefaultInstance()); list.add(More.Foo.getDefaultInstance()); // from ext/test1.proto list.add(Test1.Test1Msg.getDefaultInstance()); // from ext/test2.proto list.add(Test2.Test2Msg.getDefaultInstance()); return list; } }
google/tsunami-security-scanner-plugins
1,039
community/detectors/apache_http_server_cve_2021_41773/src/main/java/com/google/tsunami/plugins/detectors/cve202141773/ApacheHttpServerCVE202141773VulnDetectorBootstrapModule.java
/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.tsunami.plugins.detectors.cve202141773; import com.google.tsunami.plugin.PluginBootstrapModule; /** * A {@link PluginBootstrapModule} for {@link ApacheHttpServerCVE202141773VulnDetector}. */ public final class ApacheHttpServerCVE202141773VulnDetectorBootstrapModule extends PluginBootstrapModule { @Override protected void configurePlugin() { registerPlugin(ApacheHttpServerCVE202141773VulnDetector.class); } }
googleads/googleads-java-lib
1,130
modules/ads_lib/src/main/java/com/google/api/ads/common/lib/soap/compatability/AxisCompatible.java
// Copyright 2011, 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.api.ads.common.lib.soap.compatability; /** * Specifies that for the {@code AdsServiceClient} to be Axis compatible, it * must be able to retrieve a locator class. */ public interface AxisCompatible { /** * Gets the Axis locator class such that it can be instantiated to create * an Axis service client. * * @return the Axis locator class * @throws ClassNotFoundException if no locator class can be found */ public Class<?> getLocatorClass() throws ClassNotFoundException; }
googleapis/google-cloud-java
1,048
java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1/src/main/java/com/google/cloud/commerce/consumer/procurement/v1/AssignResponseOrBuilder.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/commerce/consumer/procurement/v1/license_management_service.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.commerce.consumer.procurement.v1; public interface AssignResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.commerce.consumer.procurement.v1.AssignResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,049
java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/java/com/google/shopping/merchant/datasources/v1beta/ProductReviewDataSourceOrBuilder.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/shopping/merchant/datasources/v1beta/datasourcetypes.proto // Protobuf Java Version: 3.25.8 package com.google.shopping.merchant.datasources.v1beta; public interface ProductReviewDataSourceOrBuilder extends // @@protoc_insertion_point(interface_extends:google.shopping.merchant.datasources.v1beta.ProductReviewDataSource) com.google.protobuf.MessageOrBuilder {}
googlearchive/android-AutofillFramework
1,137
afservice/src/main/java/com/example/android/autofill/service/model/FakeData.java
/* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.android.autofill.service.model; import com.example.android.autofill.service.data.source.local.db.Converters; public class FakeData { public Converters.StringList strictExampleSet; public String textTemplate; public String dateTemplate; public FakeData(Converters.StringList strictExampleSet, String textTemplate, String dateTemplate) { this.strictExampleSet = strictExampleSet; this.textTemplate = textTemplate; this.dateTemplate = dateTemplate; } }
hibernate/hibernate-orm
1,039
hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/inheritance/mixed/entities/ActivityId.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.envers.integration.inheritance.mixed.entities; import java.io.Serializable; import jakarta.persistence.Embeddable; @Embeddable public class ActivityId implements Serializable { private Integer id; private Integer id2; public ActivityId() { } public ActivityId(int i, int i1) { id = i; id2 = i1; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getId2() { return id2; } public void setId2(Integer id2) { this.id2 = id2; } @Override public boolean equals(Object obj) { if ( obj == null ) { return true; } if ( !(obj instanceof ActivityId) ) { return false; } ActivityId id = (ActivityId) obj; return getId().equals( id.getId() ) && getId2().equals( id.getId2() ); } @Override public int hashCode() { int result = getId().hashCode(); result = 31 * result + getId2().hashCode(); return result; } }
hibernate/hibernate-orm
1,053
hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/binding/annotations/embedded/NestedEmbeddableAttributeOverrideTest.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.bootstrap.binding.annotations.embedded; import org.hibernate.Session; import org.hibernate.testing.orm.junit.JiraKey; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.junit.Test; /** * @author Brett Meyer */ public class NestedEmbeddableAttributeOverrideTest extends BaseCoreFunctionalTestCase { @Test @JiraKey(value="HHH-8021") public void testAttributeOverride() { EmbeddableB embedB = new EmbeddableB(); embedB.setEmbedAttrB( "B" ); EmbeddableA embedA = new EmbeddableA(); embedA.setEmbedAttrA("A"); embedA.setEmbedB(embedB); EntityWithNestedEmbeddables entity = new EntityWithNestedEmbeddables(); entity.setEmbedA(embedA); Session s = openSession(); s.beginTransaction(); s.persist( entity ); s.getTransaction().commit(); s.close(); } @Override protected Class<?>[] getAnnotatedClasses() { return new Class<?>[] { EntityWithNestedEmbeddables.class }; } }
hibernate/hibernate-orm
1,077
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytoone/Lens.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.annotations.manytoone; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import org.hibernate.annotations.Formula; /** * @author Emmanuel Bernard */ @Entity public class Lens { @Id @GeneratedValue private Long id; private float focal; @Formula("(1/focal)") private float length; @ManyToOne() @JoinColumn(name="`frame_fk`", referencedColumnName = "name") private Frame frame; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public float getFocal() { return focal; } public void setFocal(float focal) { this.focal = focal; } public float getLength() { return length; } public void setLength(float length) { this.length = length; } public Frame getFrame() { return frame; } public void setFrame(Frame frame) { this.frame = frame; } }
hibernate/hibernate-orm
1,096
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/uuid/custom2/Book.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.mapping.identifier.uuid.custom2; import org.hibernate.annotations.UuidGenerator; import org.hibernate.orm.test.mapping.identifier.uuid.custom.CustomUuidValueCreator; import jakarta.persistence.Basic; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; /** * @author Steve Ebersole */ //tag::example-identifiers-generators-uuid-implicit[] @Entity public class Book { @Id @GeneratedValue @UuidGenerator(algorithm = CustomUuidValueCreator.class) private String id; @Basic private String name; //end::example-identifiers-generators-uuid-implicit[] protected Book() { // for Hibernate use } public Book(String name) { this.name = name; } public String getId() { return id; } public String getName() { return name; } public void setName(String name) { this.name = name; } //tag::example-identifiers-generators-uuid-implicit[] } //end::example-identifiers-generators-uuid-implicit[]
hibernate/hibernate-reactive
1,096
hibernate-reactive-core/src/main/java/org/hibernate/reactive/query/sqm/internal/ReactiveAggregatedNonSelectQueryPlan.java
/* Hibernate, Relational Persistence for Idiomatic Java * * SPDX-License-Identifier: Apache-2.0 * Copyright: Red Hat Inc. and Hibernate Authors */ package org.hibernate.reactive.query.sqm.internal; import java.util.concurrent.CompletionStage; import org.hibernate.query.spi.DomainQueryExecutionContext; import org.hibernate.reactive.query.sql.spi.ReactiveNonSelectQueryPlan; import static org.hibernate.reactive.util.impl.CompletionStages.total; /** * @see org.hibernate.query.sqm.internal.AggregatedNonSelectQueryPlanImpl */ public class ReactiveAggregatedNonSelectQueryPlan implements ReactiveNonSelectQueryPlan { private final ReactiveNonSelectQueryPlan[] aggregatedQueryPlans; public ReactiveAggregatedNonSelectQueryPlan(ReactiveNonSelectQueryPlan[] aggregatedQueryPlans) { this.aggregatedQueryPlans = aggregatedQueryPlans; } @Override public CompletionStage<Integer> executeReactiveUpdate(DomainQueryExecutionContext executionContext) { return total( aggregatedQueryPlans, nonSelectQueryPlan -> nonSelectQueryPlan .executeReactiveUpdate( executionContext ) ); } }
hibernate/hibernate-search
1,059
mapper/pojo-base/src/main/java/org/hibernate/search/mapper/pojo/route/DocumentRouteDescriptor.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.mapper.pojo.route; import java.io.Serializable; import java.util.Objects; public final class DocumentRouteDescriptor implements Serializable { public static DocumentRouteDescriptor of(String routingKey) { return new DocumentRouteDescriptor( routingKey ); } private final String routingKey; private DocumentRouteDescriptor(String routingKey) { this.routingKey = routingKey; } @Override public boolean equals(Object o) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } DocumentRouteDescriptor that = (DocumentRouteDescriptor) o; return Objects.equals( routingKey, that.routingKey ); } @Override public int hashCode() { return Objects.hash( routingKey ); } @Override public String toString() { return "DocumentRouteDescriptor{" + "routingKey='" + routingKey + '\'' + '}'; } public String routingKey() { return routingKey; } }
hibernate/hibernate-search
1,061
util/internal/integrationtest/common/src/main/java/org/hibernate/search/util/impl/integrationtest/common/assertion/SearchHitAssert.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.util.impl.integrationtest.common.assertion; import static org.assertj.core.api.Assertions.assertThat; import java.util.HashSet; import java.util.Set; import org.hibernate.search.engine.backend.common.DocumentReference; import org.hibernate.search.util.impl.integrationtest.common.NormalizationUtils; public class SearchHitAssert<H> { private final H actual; private String description; SearchHitAssert(H actual) { this.actual = actual; } public void isDocRefHit(String typeName, String id, String... orIds) { Set<DocumentReference> references = new HashSet<>(); references.add( NormalizationUtils.reference( typeName, id ) ); for ( String orId : orIds ) { references.add( NormalizationUtils.reference( typeName, orId ) ); } DocumentReference actualReference = NormalizationUtils.normalize( (DocumentReference) actual ); assertThat( references ) .as( description ) .contains( actualReference ); } }
hibernate/hibernate-search
1,088
lucene-next/backend/lucene/src/main/java/org/hibernate/search/backend/lucene/document/model/impl/LuceneIndexValueFieldTemplate.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.backend.lucene.document.model.impl; import org.hibernate.search.backend.lucene.types.impl.LuceneIndexValueFieldType; import org.hibernate.search.engine.common.tree.spi.TreeNodeInclusion; import org.hibernate.search.util.common.pattern.spi.SimpleGlobPattern; public class LuceneIndexValueFieldTemplate extends AbstractLuceneIndexFieldTemplate<LuceneIndexValueFieldType<?>> { public LuceneIndexValueFieldTemplate(LuceneIndexCompositeNode declaringParent, SimpleGlobPattern absolutePathGlob, LuceneIndexValueFieldType<?> type, TreeNodeInclusion inclusion, boolean multiValued) { super( declaringParent, absolutePathGlob, type, inclusion, multiValued ); } @Override protected LuceneIndexField createNode(LuceneIndexCompositeNode parent, String relativePath, LuceneIndexValueFieldType<?> type, TreeNodeInclusion inclusion, boolean multiValued) { return new LuceneIndexValueField<>( parent, relativePath, type, inclusion, multiValued, true ); } }
hibernate/hibernate-search
1,110
mapper/pojo-base/src/main/java/org/hibernate/search/mapper/pojo/mapping/impl/PojoEntityReferenceFactory.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.mapper.pojo.mapping.impl; import org.hibernate.search.engine.backend.common.spi.EntityReferenceFactory; import org.hibernate.search.engine.common.EntityReference; import org.hibernate.search.mapper.pojo.common.spi.PojoEntityReferenceFactoryDelegate; import org.hibernate.search.mapper.pojo.work.impl.PojoWorkTypeContext; final class PojoEntityReferenceFactory implements EntityReferenceFactory { public final PojoEntityReferenceFactoryDelegate delegate; private final PojoTypeManagerContainer typeManagers; PojoEntityReferenceFactory(PojoEntityReferenceFactoryDelegate delegate, PojoTypeManagerContainer typeManagers) { this.delegate = delegate; this.typeManagers = typeManagers; } @Override public EntityReference createEntityReference(String typeName, Object identifier) { PojoWorkTypeContext<?, ?> typeContext = typeManagers.byEntityName().getOrFail( typeName ); return delegate.create( typeContext.typeIdentifier(), typeContext.entityName(), identifier ); } }
openjdk/jdk8
1,176
langtools/test/com/sun/javadoc/testTagInheritence/firstSentence2/A.java
/* * Copyright (c) 2005, 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 firstSentence2; public class A { /** * First sentence. Second sentence. */ public void m() {} }
openjdk/jdk8
1,178
langtools/test/tools/javac/processing/model/element/8009367/p/R.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. */ package p; import java.lang.annotation.Repeatable; public class R { @Repeatable(RR.class) public @interface Q {} }
openjdk/jdk8
1,180
langtools/test/tools/javac/diags/examples/AlreadyDefinedClinit.java
/* * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.already.defined.in.clinit class AlreadyDefinedClinit { static { int i; int i; } }
openjdk/jdk8
1,181
langtools/test/com/sun/javadoc/testLinkTaglet/checkPkg/B.java
/* * Copyright (c) 2005, 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 checkPkg; /**6280605 * @see A */ public class B { /** * @see A#m() */ public void m2(); }
openjdk/jdk8
1,184
langtools/test/com/sun/javadoc/testDupParamWarn/pkg/Bar.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 interface Bar { /** * @param a blah. * @param b blah. */ void method(int a, int b); }
openjdk/jdk8
1,185
langtools/test/tools/javac/diags/examples/CatchWithoutTry.java
/* * Copyright (c) 2010, 2012, 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.catch.without.try class CatchWithoutTry { void m() { catch (Exception e) { } } }
openjdk/jdk8
1,186
langtools/test/com/sun/javadoc/testInlineLinkLabel/pkg/C1.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; /** * {@link pkg Here is a link to a package}.<br> * {@link pkg.C2 Here is a link to a class}. */ public class C1 {}
openjdk/jtreg
1,216
test/groups/d1/d11/SCCS/Bad.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 * @summary this is a bad test description which should never be read because * it is in a directory that should never be scanned * @bad */
oracle/coherence
1,122
prj/test/unit/coherence-tests/src/test/java/com/tangosol/config/xml/ExternalClassNamespaceHandler.java
/* * Copyright (c) 2000, 2022, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.tangosol.config.xml; import com.tangosol.config.xml.AbstractNamespaceHandler; /** * The {@link ExternalClassNamespaceHandler} is for testing the handling of external classes. * * @author dr */ public class ExternalClassNamespaceHandler extends AbstractNamespaceHandler { /** * Constructs an {@link ExternalClassNamespaceHandler} */ public ExternalClassNamespaceHandler() { registerProcessor("test", new TestElementProcessor()); registerProcessor("test", new TestAttributeProcessor()); registerElementType("test-type", TestElementProcessor.class); registerAttributeType("test-type", TestAttributeProcessor.class); registerElementType("test-simple-type", Foo.class); registerAttributeType("test-simple-type", Foo.class); } /** * A simple empty static inner class */ public static class Foo { } }
oracle/fastr
1,164
com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/ArgumentMapper.java
/* * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3 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 3 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 * 3 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 com.oracle.truffle.r.nodes.builtin; public interface ArgumentMapper<T, R> { R map(T arg); }
oracle/oci-java-sdk
1,168
bmc-common/src/test/java/com/oracle/bmc/retrier/RetriersTest.java
/** * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ package com.oracle.bmc.retrier; import java.io.IOException; import java.io.InputStream; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; /** Tests for {@link Retriers}. */ public class RetriersTest { @Mock private InputStream is; @Before public void setup() { MockitoAnnotations.initMocks(this); } @Test public void testTryResetStreamForRetry_CanReset() throws IOException { when(is.markSupported()).thenReturn(true); Retriers.tryResetStreamForRetry(is, true); verify(is).markSupported(); verify(is).reset(); verifyNoMoreInteractions(is); } }
apache/commons-jcs
1,119
commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/beans/ICacheChangeListener.java
package org.apache.commons.jcs.yajcache.beans; /* * 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. */ import org.apache.commons.jcs.yajcache.lang.annotation.*; /** * Cache change beans listener/handler. */ @CopyRightApache public interface ICacheChangeListener<V> extends java.util.EventListener { void cacheChange(@NonNullable CacheChangeEvent<V> evt); }
apache/cxf
1,149
systests/cdi/base/src/main/java/org/apache/cxf/systests/cdi/base/context/CustomContextProvider.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.context; import org.apache.cxf.jaxrs.ext.ContextProvider; import org.apache.cxf.message.Message; public class CustomContextProvider implements ContextProvider<CustomContext> { @Override public CustomContext createContext(Message message) { return new CustomContextImpl(message); } }
apache/cxf
1,159
systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/BasicDocEndpointImpl.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.systest.ws.rm; import jakarta.jws.WebMethod; import jakarta.jws.WebService; @WebService(name = "RMEndpoint", targetNamespace = "http://cxf.apache.org/wsrm", serviceName = "RMService") public class BasicDocEndpointImpl implements BasicDocEndpoint { @WebMethod public String echo(String input) { return input; } }
apache/cxf
1,161
rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/ws1/BeanD.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.inheritance.ws1; import java.io.Serializable; public class BeanD implements Serializable { private static final long serialVersionUID = -2735554744385322074L; private String propD; public String getMpropD() { return propD; } public void setMpropD(String prop) { this.propD = prop; } }
apache/cxf
1,167
rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/DefaultMethod.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.jaxrs.ext; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import jakarta.ws.rs.HttpMethod; @Target({ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) @HttpMethod("DefaultMethod") public @interface DefaultMethod { }
apache/deltaspike
1,096
deltaspike/core/impl/obsolete/src/test/java/org/apache/deltaspike/test/core/api/alternative/global/BaseInterface1AlternativeImplementation.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.alternative.global; import jakarta.enterprise.context.Dependent; import jakarta.enterprise.inject.Alternative; /** * Global alternative */ @Alternative @Dependent public class BaseInterface1AlternativeImplementation implements BaseInterface1 { }
apache/deltaspike
1,106
deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc004/TestAccessDecisionVoter.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.jsf.impl.config.view.controller.uc004; import org.apache.deltaspike.core.api.config.view.metadata.DefaultCallback; import java.util.Set; public interface TestAccessDecisionVoter { @DefaultCallback Set<String> checkPermission(String param1, String param2); }
apache/deltaspike
1,106
deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc005/TestAccessDecisionVoter.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.jsf.impl.config.view.controller.uc005; import org.apache.deltaspike.core.api.config.view.metadata.DefaultCallback; import java.util.Set; public interface TestAccessDecisionVoter { @DefaultCallback Set<String> checkPermission(String param1, String param2); }
apache/derby
1,143
java/org.apache.derby.engine/org/apache/derby/iapi/jdbc/EmbeddedConnectionPoolDataSourceInterface.java
/* Derby - Class org.apache.derby.iapi.jdbc.EmbeddedConnectionPoolDataSourceInterface 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.derby.iapi.jdbc; /** * Common interface of Derby embedded connection pooling data sources. */ public interface EmbeddedConnectionPoolDataSourceInterface extends EmbeddedDataSourceInterface, javax.sql.ConnectionPoolDataSource { }
apache/doris-flink-connector
1,133
flink-doris-connector/src/main/java/org/apache/doris/flink/connection/JdbcConnectionProvider.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.flink.connection; import java.sql.Connection; public interface JdbcConnectionProvider { /** Get existing connection or establish an new one if there is none. */ Connection getOrEstablishConnection() throws Exception; /** Close possible existing connection. */ void closeConnection(); }
apache/drill
1,175
exec/java-exec/src/main/java/org/apache/drill/exec/disk/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. */ /** * Interface for Drill's interaction with the local disk to persist data * temporarily during an operation. * * This interface is used by blocking operators that support "spilling to disk". * These operators can go beyond the limits of a single machine's memory when * performing an operation like a sort on a large dataset. */ package org.apache.drill.exec.disk;
apache/druid
1,139
multi-stage-query/src/main/java/org/apache/druid/msq/indexing/destination/MSQTerminalStageSpecFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.druid.msq.indexing.destination; import org.apache.druid.sql.calcite.planner.PlannerContext; public interface MSQTerminalStageSpecFactory { /** * Creates a {@link TerminalStageSpec} which determines the final of a query. */ TerminalStageSpec createTerminalStageSpec(PlannerContext plannerContext); }
apache/dubbo
1,147
dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/GenericDemoService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.config.spring; import org.apache.dubbo.rpc.service.GenericException; import org.apache.dubbo.rpc.service.GenericService; public class GenericDemoService implements GenericService { public Object $invoke(String method, String[] parameterTypes, Object[] args) throws GenericException { return null; } }
apache/dubbo
1,161
dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add/AddExt4.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.common.extension.ext8_add; import org.apache.dubbo.common.URL; import org.apache.dubbo.common.extension.Adaptive; import org.apache.dubbo.common.extension.SPI; /** * show add extension pragmatically. use for test replaceAdaptive fail */ @SPI("impl1") public interface AddExt4 { @Adaptive String echo(URL url, String s); }
apache/eventmesh
1,128
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/processor/TcpProcessor.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eventmesh.runtime.core.protocol.tcp.client.processor; import org.apache.eventmesh.common.protocol.tcp.Package; import io.netty.channel.ChannelHandlerContext; /** * TcpProcessor */ public interface TcpProcessor { void process(final Package pkg, final ChannelHandlerContext ctx, long startTime); }
apache/eventmesh
1,133
eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/mq/pulsar/PulsarSinkConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eventmesh.common.config.connector.mq.pulsar; import org.apache.eventmesh.common.config.connector.SinkConfig; import lombok.Data; import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) @Data public class PulsarSinkConfig extends SinkConfig { public SinkConnectorConfig connectorConfig; }