repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/incubator-atlas
1,116
repository/src/test/java/org/apache/atlas/repository/BaseTest.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.atlas.repository; import org.apache.atlas.typesystem.types.TypeSystem; import org.testng.annotations.BeforeMethod; public abstract class BaseTest { @BeforeMethod public void setup() throws Exception { TypeSystem ts = TypeSystem.getInstance(); ts.reset(); } }
apache/incubator-datalab
1,080
services/billing-gcp/src/main/java/com/epam/datalab/billing/gcp/repository/BillingHistoryRepository.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.epam.datalab.billing.gcp.repository; import com.epam.datalab.billing.gcp.model.BillingHistory; import org.springframework.data.mongodb.repository.MongoRepository; public interface BillingHistoryRepository extends MongoRepository<BillingHistory, String> { }
apache/incubator-datalab
1,089
services/billing-gcp/src/main/java/com/epam/datalab/billing/gcp/model/BillingHistory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.epam.datalab.billing.gcp.model; import lombok.AllArgsConstructor; import lombok.Data; import org.springframework.data.annotation.Id; @Data @AllArgsConstructor public class BillingHistory { @Id private String tableName; private final long lastModified; }
apache/incubator-kie-drools
1,113
drools-core/src/main/java/org/drools/core/common/AgendaFactory.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.drools.core.common; import org.drools.core.impl.InternalRuleBase; import org.drools.core.rule.accessor.FactHandleFactory; public interface AgendaFactory { InternalAgenda createAgenda(InternalRuleBase kieBase, InternalWorkingMemory workingMemory, FactHandleFactory factHandleFactory); }
apache/incubator-kie-drools
1,118
kie-api/src/main/java/org/kie/api/runtime/ObjectFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.api.runtime; /** * ObjectFilter is used with WorkingMemories to filter out instances during Iteration */ public interface ObjectFilter { /** * @return true if the Iterator accepts, and thus returns, the current Object. Otherwise false. */ boolean accept(Object object); }
apache/incubator-retired-edgent
1,110
api/src/main/java/org/apache/edgent/function/Consumer.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.edgent.function; import java.io.Serializable; /** * Function that consumes a value. * * @param <T> Type of function argument. */ public interface Consumer<T> extends Serializable { /** * Apply the function to {@code value}. * @param value Value function is applied to. */ void accept(T value); }
apache/incubator-retired-wave
1,090
wave/src/main/java/org/waveprotocol/wave/model/document/operation/util/UpdateMap.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.waveprotocol.wave.model.document.operation.util; /** * Defines a reversible change on a map. */ public interface UpdateMap { int changeSize(); String getChangeKey(int changeIndex); String getOldValue(int changeIndex); String getNewValue(int changeIndex); }
apache/incubator-seata
1,077
integration-tx-api/src/main/java/org/apache/seata/integration/tx/api/interceptor/InvocationWrapper.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.seata.integration.tx.api.interceptor; import java.lang.reflect.Method; public interface InvocationWrapper { Method getMethod(); Object getProxy(); Object getTarget(); Object[] getArguments(); Object proceed() throws Throwable; }
apache/incubator-seata
1,094
integration/brpc/src/test/java/org/apache/seata/integration/brpc/server/EchoService.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.seata.integration.brpc.server; import com.baidu.brpc.protocol.BrpcMeta; import org.apache.seata.integration.brpc.dto.Echo; public interface EchoService { @BrpcMeta(serviceName = "echoAPI", methodName = "echo") Echo.EchoResponse echo(Echo.EchoRequest request); }
apache/incubator-seata
1,101
metrics/seata-metrics-api/src/main/java/org/apache/seata/metrics/SystemClock.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.seata.metrics; /** * Default clock implement use system * */ public class SystemClock implements Clock { public static final Clock INSTANCE = new SystemClock(); @Override public double getCurrentMilliseconds() { return System.currentTimeMillis(); } }
apache/iotdb
1,060
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/cache/schema/dualkeycache/impl/ICacheSizeComputer.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.iotdb.db.queryengine.plan.analyze.cache.schema.dualkeycache.impl; interface ICacheSizeComputer<FK, SK, V> { int computeFirstKeySize(FK firstKey); int computeSecondKeySize(SK secondKey); int computeValueSize(V value); }
apache/iotdb
1,086
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/event/pipe/SubscriptionPipeEvents.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.iotdb.db.subscription.event.pipe; public interface SubscriptionPipeEvents { void ack(); void cleanUp(final boolean force); //////////////////////////// APIs provided for metric framework //////////////////////////// int getPipeEventCount(); }
apache/iotdb
1,096
iotdb-api/udf-api/src/main/java/org/apache/iotdb/udf/api/exception/UDFTypeMismatchException.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.iotdb.udf.api.exception; public class UDFTypeMismatchException extends UDFException { public UDFTypeMismatchException(String message) { super(message); } public UDFTypeMismatchException(String message, Throwable cause) { super(message, cause); } }
apache/jackrabbit
1,098
jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ItemStateCacheFactory.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.jackrabbit.core.state; /** * An item state cache factory to construct new item state caches. */ public interface ItemStateCacheFactory { /** * Construct a new item state cache. * * @return the new cache */ ItemStateCache newItemStateCache(); }
apache/jena
1,120
jena-base/src/main/java/org/apache/jena/atlas/lib/tuple/TFunction3.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.atlas.lib.tuple; /** * A three-argument function in which all arguments are of the same type. * * @param <X> the type of all arguments * @param <Z> the type of the result of the operation */ @FunctionalInterface public interface TFunction3<X, Z> { Z apply(X x1, X x2, X x3); }
apache/juneau
1,113
juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/stats/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. * ***************************************************************************************************************************/ /** * Method exec stats utilities */ package org.apache.juneau.rest.stats;
apache/kylin
1,106
src/core-metrics/src/main/java/org/apache/kylin/common/metrics/MetricsReporter.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.kylin.common.metrics; import org.apache.kylin.common.KapConfig; public interface MetricsReporter { void init(KapConfig props); void start(KapConfig kapConfig); void startReporter(int pollingPeriodInSeconds); void stopReporter(); String getMBeanName(); }
apache/lens
1,118
lens-server/src/main/java/org/apache/lens/server/query/QueryApp.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.lens.server.query; import javax.ws.rs.ApplicationPath; import org.apache.lens.server.BaseApp; /** * The Class QueryApp. */ @ApplicationPath("/queryapi") public class QueryApp extends BaseApp { @Override protected Class getResource() { return QueryServiceResource.class; } }
apache/lens
1,126
lens-api/src/main/java/org/apache/lens/api/result/NoResultData.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.lens.api.result; import javax.xml.bind.annotation.XmlRootElement; /** * NoResultData type is to be used while creating LensAPIResult for error scenarios. * Error scenarios will not have any data related to successful execution of API. * */ @XmlRootElement public final class NoResultData { }
apache/linkis
1,052
linkis-computation-governance/linkis-manager/linkis-manager-common/src/main/java/org/apache/linkis/manager/common/entity/node/LabelNode.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.linkis.manager.common.entity.node; import org.apache.linkis.manager.label.entity.Label; import java.util.List; public interface LabelNode extends Node { List<Label<?>> getLabels(); void setLabels(List<Label<?>> labels); }
apache/linkis
1,075
linkis-public-enhancements/linkis-pes-common/src/main/java/org/apache/linkis/cs/common/entity/source/ContextID.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.linkis.cs.common.entity.source; public interface ContextID extends Source { String getContextId(); void setContextId(String contextId); default int getContextIDType() { return 0; } default void setContextIDType(int contextIDType) {} }
apache/logging-log4j2
1,087
log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/KeyStoreConfigurationException.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.logging.log4j.core.net.ssl; /** * */ public class KeyStoreConfigurationException extends StoreConfigurationException { private static final long serialVersionUID = 1L; public KeyStoreConfigurationException(final Exception e) { super(e); } }
apache/logging-log4j2
1,117
log4j-api/src/main/java/org/apache/logging/log4j/spi/CopyOnWrite.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.logging.log4j.spi; /** * Marker interface indicating that the implementing class is a copy-on-write data structure. * * @see ReadOnlyThreadContextMap#getReadOnlyContextData() * @since 2.7 * @deprecated Since 2.24.0 no class implements this. */ @Deprecated public interface CopyOnWrite {}
apache/lucene
1,114
lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/Root.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.lucene.analysis.hunspell; record Root<T extends CharSequence>(T word, int entryId) implements Comparable<Root<T>> { @Override public String toString() { return word.toString(); } @Override public int compareTo(Root<T> o) { return CharSequence.compare(word, o.word); } }
apache/lucene
1,147
lucene/classification/src/java/module-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. */ /** Classification module for Lucene */ module org.apache.lucene.classification { requires org.apache.lucene.core; requires org.apache.lucene.queries; requires org.apache.lucene.grouping; exports org.apache.lucene.classification; exports org.apache.lucene.classification.document; exports org.apache.lucene.classification.utils; }
apache/maven-build-cache-extension
1,109
src/test/java/org/apache/maven/buildcache/its/junit/Inject.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.buildcache.its.junit; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface Inject {}
apache/maven-mvnd
1,121
common/src/main/java/org/mvndaemon/mvnd/common/JavaVersion.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.mvndaemon.mvnd.common; public class JavaVersion { private static float javaSpec = 0.0f; public static float getJavaSpec() { if (javaSpec <= 0.0f) { javaSpec = Float.parseFloat(System.getProperty("java.specification.version")); } return javaSpec; } }
apache/maven-resolver
1,071
maven-resolver-transport-wagon/src/test/java/org/eclipse/aether/transport/wagon/StreamWagonTransporterTest.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.eclipse.aether.transport.wagon; import org.apache.maven.wagon.Wagon; /** */ public class StreamWagonTransporterTest extends AbstractWagonTransporterTest { @Override protected Wagon newWagon() { return new MemStreamWagon(); } }
apache/maven
1,111
api/maven-api-settings/src/main/java/org/apache/maven/api/settings/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Contains classes for managing Maven settings, including global and user-specific * configuration stored in settings.xml files. These settings control repository access, * authentication, proxies, and other Maven runtime behaviors. * * @since 4.0.0 */ package org.apache.maven.api.settings;
apache/mina-sshd
1,101
sshd-core/src/main/java/org/apache/sshd/client/session/ClientProxyConnectorHolder.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.sshd.client.session; /** * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> */ public interface ClientProxyConnectorHolder { ClientProxyConnector getClientProxyConnector(); void setClientProxyConnector(ClientProxyConnector proxyConnector); }
apache/myfaces
1,108
impl/src/main/java/org/apache/myfaces/context/ReleasableFacesContextFactory.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.context; /** * * @author Leonardo Uribe (latest modification by $Author$) * @version $Revision$ $Date$ */ public interface ReleasableFacesContextFactory { /** * Release resources that the ExternalContext is holding onto. */ public void release(); }
apache/nifi
1,059
minifi/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/PathOutputStreamFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.minifi.toolkit.configuration; import java.io.FileNotFoundException; import java.io.OutputStream; @FunctionalInterface public interface PathOutputStreamFactory { OutputStream create(String path) throws FileNotFoundException; }
apache/nifi
1,095
nifi-commons/nifi-web-client/src/main/java/org/apache/nifi/web/client/redirect/RedirectHandling.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.web.client.redirect; /** * HTTP redirect handling strategy */ public enum RedirectHandling { /** Follow HTTP location returned from an HTTP 300 series status */ FOLLOWED, /** Ignore HTTP location returned from an HTTP 300 series status */ IGNORED }
apache/oodt
1,107
filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/CatalogFactory.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.oodt.cas.filemgr.catalog; /** * @author mattmann * @version $Revision$ * * <p> * A Factory interface for creating {@link Catalog}s. * </p> * */ public interface CatalogFactory { /** * @return A new {@link Catalog} object implementation. */ Catalog createCatalog(); }
apache/openmeetings
1,100
openmeetings-db/src/main/java/org/apache/openmeetings/db/manager/ISipManager.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.db.manager; /** * this interface is required to use SipMagager from openmeetings-core */ public interface ISipManager { public static final String SIP_FIRST_NAME = "SIP Transport"; void update(String confno, String pin); void delete(String confno); }
apache/openwebbeans
1,071
webbeans-impl/src/test/java/org/apache/webbeans/test/component/binding/BindingWithNonBindingArrayTypeComponent.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.binding; import jakarta.enterprise.context.RequestScoped; import org.apache.webbeans.test.annotation.binding.NonBindingArrayType; @RequestScoped @NonBindingArrayType public class BindingWithNonBindingArrayTypeComponent { }
apache/openwebbeans
1,079
webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/NoConstructureComponent.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 org.apache.webbeans.test.component.service.ServiceImpl1; public class NoConstructureComponent { public NoConstructureComponent() { } public NoConstructureComponent(ServiceImpl1 s) { } }
apache/ozhera
1,050
ozhera-prometheus-agent/ozhera-prometheus-agent-common/src/main/java/org/apache/ozhera/prometheus/agent/param/scrapeConfig/StaticConfigs.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.prometheus.agent.param.scrapeConfig; import lombok.Data; import java.util.List; import java.util.Map; @Data public class StaticConfigs { private List<String> targets; private Map<String, String> labels; }
apache/ozone
1,111
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOFS.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.fs.ozone; import org.apache.hadoop.ozone.om.helpers.BucketLayout; import org.junit.jupiter.api.TestInstance; @TestInstance(TestInstance.Lifecycle.PER_CLASS) class TestOFS extends AbstractRootedOzoneFileSystemTest { TestOFS() { super(BucketLayout.LEGACY, false, false); } }
apache/paimon-webui
1,094
paimon-web-server/src/main/java/org/apache/paimon/web/server/mapper/CdcJobDefinitionMapper.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.server.mapper; import org.apache.paimon.web.server.data.model.CdcJobDefinition; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** CdcJobDefinition table mapper. */ public interface CdcJobDefinitionMapper extends BaseMapper<CdcJobDefinition> {}
apache/paimon
1,112
paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexerFactory.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.fileindex; import org.apache.paimon.options.Options; import org.apache.paimon.types.DataType; /** File index factory to construct {@link FileIndexer}. */ public interface FileIndexerFactory { String identifier(); FileIndexer create(DataType type, Options options); }
apache/plc4x
1,095
plc4j/drivers/modbus/src/test/java/org/apache/plc4x/java/modbus/tcp/ModbusTcpAllDatatypesIT.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.plc4x.java.modbus.tcp; import org.apache.plc4x.test.driver.DriverTestsuiteRunner; public class ModbusTcpAllDatatypesIT extends DriverTestsuiteRunner { public ModbusTcpAllDatatypesIT() { super("/protocols/modbus/tcp/Modbus-all-datatypes.xml"); } }
apache/polaris
1,089
tools/misc-types/src/main/java/org/apache/polaris/misc/types/memorysize/MemorySizeConfigConverter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.polaris.misc.types.memorysize; import org.eclipse.microprofile.config.spi.Converter; public class MemorySizeConfigConverter implements Converter<MemorySize> { @Override public MemorySize convert(String value) { return MemorySize.valueOf(value); } }
apache/polaris
1,102
runtime/service/src/main/java/org/apache/polaris/service/catalog/SupportsNotifications.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.polaris.service.catalog; import org.apache.iceberg.catalog.TableIdentifier; import org.apache.polaris.service.types.NotificationRequest; public interface SupportsNotifications { boolean sendNotification(TableIdentifier table, NotificationRequest notificationRequest); }
apache/polygene-java
1,080
libraries/rest/src/main/java/org/apache/polygene/library/rest/admin/PolygeneServerServletService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.library.rest.admin; import javax.servlet.Servlet; import org.apache.polygene.api.mixin.Mixins; /** * JAVADOC */ @Mixins( PolygeneServerServlet.class ) public interface PolygeneServerServletService extends Servlet { }
apache/qpid-broker-j
1,084
broker-core/src/main/java/org/apache/qpid/server/model/preferences/PreferenceValueFactoryService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.qpid.server.model.preferences; import java.util.Map; import org.apache.qpid.server.plugin.Pluggable; public interface PreferenceValueFactoryService extends Pluggable { PreferenceValue createInstance(Map<String, Object> preferenceValueAttributes); }
apache/reef
1,119
lang/java/reef-wake/wake/src/main/java/org/apache/reef/wake/rx/Subject.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.wake.rx; /** * A class implementing {@code Observer<InType>} and {@code StaticObservable<OutType>}. * * @param <InType> type for in * @param <OutType> type for out */ public interface Subject<InType, OutType> extends Observer<InType>, StaticObservable { // intentionally empty }
apache/rocketmq-eventbridge
1,078
domain/src/main/java/org/apache/rocketmq/eventbridge/domain/common/enums/EventRuleStatusEnum.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.rocketmq.eventbridge.domain.common.enums; public enum EventRuleStatusEnum { ENABLE(1), DISABLE(0); private int code; EventRuleStatusEnum(int code) { this.code = code; } public int getCode() { return code; } }
apache/seatunnel-web
1,081
seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/domain/response/metrics/Edge.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.app.domain.response.metrics; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor public class Edge { private Long inputVertexId; private Long targetVertexId; }
apache/seatunnel
1,044
seatunnel-connectors-v2/connector-easysearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/easysearch/serialize/index/IndexSerializer.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.easysearch.serialize.index; import org.apache.seatunnel.api.table.type.SeaTunnelRow; /** index is a variable */ public interface IndexSerializer { String serialize(SeaTunnelRow row); }
apache/servicecomb-java-chassis
1,040
swagger/swagger-generator/generator-jaxrs/src/test/java/org/apache/servicecomb/swagger/generator/jaxrs/model/BeanParamDefaultBody.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.swagger.generator.jaxrs.model; public class BeanParamDefaultBody { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } }
apache/servicecomb-java-chassis
1,065
demo/demo-pojo/pojo-server/src/main/java/org/apache/servicecomb/demo/pojo/server/invoker/InvokerEndpoint.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.demo.pojo.server.invoker; import org.apache.servicecomb.provider.pojo.RpcSchema; @RpcSchema(schemaId = "InvokerEndpoint") public class InvokerEndpoint { public ServerModel model(ServerModel request) { return request; } }
apache/sirona
1,087
server/reporting/reporting-webapp/src/main/java/org/apache/sirona/reporting/web/handler/HomeEndpoint.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.sirona.reporting.web.handler; import org.apache.sirona.reporting.web.plugin.api.Regex; import org.apache.sirona.reporting.web.plugin.api.Template; public class HomeEndpoint { @Regex public Template home() { return new Template("home.vm"); } }
apache/skywalking-java
1,062
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/RuntimeContextConfiguration.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.skywalking.apm.agent.core.conf; public class RuntimeContextConfiguration { public static String[] NEED_PROPAGATE_CONTEXT_KEY = new String[] { "SW_REQUEST", "SW_RESPONSE", "SW_WEBFLUX_REQUEST_KEY" }; }
apache/storm
1,123
storm-client/src/jvm/org/apache/storm/messaging/IConnectionCallback.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.messaging; import java.util.List; /** * A class that is called when a TaskMessage arrives. */ public interface IConnectionCallback { /** * A batch of new messages have arrived to be processed. * * @param batch the messages to be processed */ void recv(List<TaskMessage> batch); }
apache/storm
1,125
storm-client/src/jvm/org/apache/storm/trident/util/ErrorEdgeFactory.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.trident.util; import java.io.Serializable; import org.apache.storm.shade.org.jgrapht.EdgeFactory; public class ErrorEdgeFactory implements EdgeFactory, Serializable { @Override public Object createEdge(Object v, Object v1) { throw new RuntimeException("Edges should be made explicitly"); } }
apache/streampipes
1,065
streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/pe/runtime/IStreamPipesRuntimeProvider.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.runtime; import java.util.function.Supplier; public interface IStreamPipesRuntimeProvider { Supplier<IDataProcessorRuntime> getDataProcessorRuntime(); Supplier<IDataSinkRuntime> getDataSinkRuntime(); }
apache/streampipes
1,095
streampipes-sdk/src/main/java/org/apache/streampipes/sdk/helpers/Locales.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.sdk.helpers; public enum Locales { EN("en"), DE("de"); private final String filename = "strings"; private String code; Locales(String code) { this.code = code; } public String toFilename() { return this.filename + "." + code; } }
apache/struts
1,082
plugins/convention/src/test/java/org/apache/struts2/convention/actions/action/SingleActionNameAction.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.struts2.convention.actions.action; import org.apache.struts2.convention.annotation.Action; /** * <p> * This is a test action. * </p> */ public class SingleActionNameAction { @Action("action") public String run() { return null; } }
apache/syncope
1,067
client/idrepo/common-ui/src/main/java/org/apache/syncope/client/ui/commons/wizards/exception/CaptchaNotMatchingException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.client.ui.commons.wizards.exception; public class CaptchaNotMatchingException extends RuntimeException { private static final long serialVersionUID = -7735150705166393254L; public CaptchaNotMatchingException() { } }
apache/tajo
1,085
tajo-storage/tajo-storage-hdfs/src/main/java/org/apache/tajo/storage/rcfile/LazyDecompressionCallback.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.tajo.storage.rcfile; import java.io.IOException; /** * Used to call back lazy decompression process. * * @see org.apache.tajo.storage.rcfile.BytesRefWritable */ public interface LazyDecompressionCallback { byte[] decompress() throws IOException; }
apache/uniffle
1,110
client/src/main/java/org/apache/uniffle/client/record/reader/KeyValuesReader.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.uniffle.client.record.reader; import java.io.IOException; public abstract class KeyValuesReader<K, V> { public abstract boolean next() throws IOException; public abstract K getCurrentKey() throws IOException; public abstract Iterable<V> getCurrentValues() throws IOException; }
apache/wicket
1,094
wicket-examples/src/main/java/org/apache/wicket/examples/guice/service/MyService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.examples.guice.service; import com.google.inject.Singleton; /** * Implementation of IService. * * @author Alastair Maw */ @Singleton public class MyService implements IMyService { @Override public String getHelloWorldText() { return "Hello World"; } }
apache/wicket
1,123
wicket-request/src/main/java/org/apache/wicket/request/ILogData.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.request; import java.io.Serializable; /** * Base interface for log data collected by request handlers. Implementations of this interface * should be read-only beans and should provide a toString method. * * @author Emond Papegaaij */ public interface ILogData extends Serializable { }
google/bindiff
1,080
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/zygraph/settings/CProximitySettingsAdapter.java
// Copyright 2011-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.zylib.gui.zygraph.settings; public class CProximitySettingsAdapter implements IProximitySettingsListener { @Override public void changedProximityBrowsing(final boolean value) {} @Override public void changedProximityBrowsingDepth(final int children, final int parents) {} @Override public void changedProximityBrowsingFrozen(final boolean value) {} @Override public void changedProximityBrowsingPreview(final boolean value) {} }
google/binnavi
1,069
src/main/java/com/google/security/zynamics/binnavi/Gui/FilterPanel/FilterExpressions/ConcreteTree/IFilterExpression.java
// Copyright 2011-2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.binnavi.Gui.FilterPanel.FilterExpressions.ConcreteTree; /** * Interface for nodes of concrete filter expression ASTs. * * @param <T> Type of the element to be filtered. */ public interface IFilterExpression<T> { /** * Checks whether a given element passes the filter. * * @param element The element to check. * * @return True, if the element passes the filter. False, otherwise. */ boolean evaluate(T element); }
google/binnavi
1,087
src/main/java/com/google/security/zynamics/zylib/gui/zygraph/settings/CProximitySettingsAdapter.java
// Copyright 2011-2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.zylib.gui.zygraph.settings; public class CProximitySettingsAdapter implements IProximitySettingsListener { @Override public void changedProximityBrowsing(final boolean value) { } @Override public void changedProximityBrowsingDepth(final int children, final int parents) { } @Override public void changedProximityBrowsingFrozen(final boolean value) { } @Override public void changedProximityBrowsingPreview(final boolean value) { } }
google/closure-templates
1,109
java/src/com/google/template/soy/types/TypeRegistry.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 com.google.template.soy.types; import javax.annotation.Nullable; /** Repository of registered types. */ public interface TypeRegistry { /** * Looks up a simple type by name. * * @param typeName "string", "bool", "pkg.proto.Message", etc. */ @Nullable SoyType getType(String typeName); default boolean hasType(String typeName) { return getType(typeName) != null; } /** Returns the sorted set of all types in this registry. */ Iterable<String> getAllSortedTypeNames(); }
google/j2cl
1,101
benchmarking/java/com/google/j2cl/benchmarks/octane/raytrace/Light.java
/* * Copyright 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.j2cl.benchmarks.octane.raytrace; import jsinterop.annotations.JsNonNull; class Light { private final Vector position; private final Color color; Light(Vector pos, Color color) { this.position = pos; this.color = color; } @JsNonNull @Override public String toString() { return "Light [" + position.getX() + "," + position.getY() + "," + position.getZ() + "]"; } Vector getPosition() { return position; } Color getColor() { return color; } }
googleapis/google-cloud-java
1,026
java-service-usage/proto-google-cloud-service-usage-v1beta1/src/main/java/com/google/api/serviceusage/v1beta1/ImportConsumerOverridesMetadataOrBuilder.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/api/serviceusage/v1beta1/serviceusage.proto // Protobuf Java Version: 3.25.8 package com.google.api.serviceusage.v1beta1; public interface ImportConsumerOverridesMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.api.serviceusage.v1beta1.ImportConsumerOverridesMetadata) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,031
java-dialogflow/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InitializeEncryptionSpecResponseOrBuilder.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/dialogflow/v2beta1/encryption_spec.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.dialogflow.v2beta1; public interface InitializeEncryptionSpecResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.InitializeEncryptionSpecResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,033
java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/AddContextArtifactsAndExecutionsResponseOrBuilder.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/aiplatform/v1/metadata_service.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.aiplatform.v1; public interface AddContextArtifactsAndExecutionsResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.AddContextArtifactsAndExecutionsResponse) com.google.protobuf.MessageOrBuilder {}
googlearchive/gwt-google-apis
1,082
language/language/src/com/google/gwt/language/client/translation/TranslationResult.java
/* * Copyright 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.gwt.language.client.translation; import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.language.client.Error; /** * Wrapper for translation API translate-text results object. */ public class TranslationResult extends JavaScriptObject { protected TranslationResult() { } public final native Error getError() /*-{ return this.error; }-*/; public final native String getTranslatedText() /*-{ return this.translation; }-*/; }
hibernate/hibernate-orm
1,027
hibernate-core/src/test/java/org/hibernate/orm/test/legacy/C2.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.legacy; import java.util.ArrayList; import java.util.Collection; public class C2 extends B { private String address; private C1 c1; private String c2Name; private Collection c1s = new ArrayList(); /** * Returns the address. * @return String */ public String getAddress() { return address; } /** * Sets the address. * @param address The address to set */ public void setAddress(String address) { this.address = address; } /** * @return Returns the c. */ public C1 getC1() { return c1; } /** * @param c The c to set. */ public void setC1(C1 c) { this.c1 = c; } /** * @return Returns the cs. */ public Collection getC1s() { return c1s; } /** * @param cs The cs to set. */ public void setC1s(Collection cs) { this.c1s = cs; } public String getC2Name() { return c2Name; } public void setC2Name(String name) { c2Name = name; } }
hibernate/hibernate-orm
1,028
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/embeddable/strategy/usertype/embedded/merge/Child.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.mapping.embeddable.strategy.usertype.embedded.merge; import org.hibernate.annotations.CompositeType; import jakarta.persistence.AttributeOverride; import jakarta.persistence.Column; import jakarta.persistence.Embedded; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; @Entity public class Child { @Id @GeneratedValue protected Long id; @Embedded @AttributeOverride(name = "id", column = @Column(name = "value_id")) @AttributeOverride(name = "hash", column = @Column(name = "value_hash")) @CompositeType(MyCompositeValueType.class) private MyCompositeValue compositeValue = new MyCompositeValue(); public Child() { } public Child(MyCompositeValue compositeValue) { this.compositeValue = compositeValue; } public Long getId() { return id; } public MyCompositeValue getCompositeValue() { return compositeValue; } }
hibernate/hibernate-orm
1,041
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/query/Employeegroup.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.annotations.query; import java.util.ArrayList; import java.util.List; import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToMany; @Entity public class Employeegroup { @Id @GeneratedValue private Long id; @OneToMany(cascade = CascadeType.ALL, mappedBy = "employeegroup") private List<Employee> employees = new ArrayList<Employee>(); @ManyToOne private Attrset attrset; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public List<Employee> getEmployees() { return employees; } public void setEmployees(List<Employee> employees) { this.employees = employees; } public Attrset getAttrset() { return attrset; } public void setAttrset(Attrset attrset) { this.attrset = attrset; } }
hibernate/hibernate-orm
1,044
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/uuid/random3/Book.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.mapping.identifier.uuid.random3; import org.hibernate.annotations.UuidGenerator; import jakarta.persistence.Basic; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; /** * @author Steve Ebersole */ //tag::example-identifiers-generators-uuid-implicit[] @Entity public class Book { @Id @GeneratedValue(strategy = GenerationType.UUID) @UuidGenerator 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-orm
1,056
hibernate-core/src/main/java/org/hibernate/jpa/boot/internal/ServiceRegistryCloser.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.jpa.boot.internal; import org.hibernate.SessionFactory; import org.hibernate.SessionFactoryObserver; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.service.spi.ServiceRegistryImplementor; class ServiceRegistryCloser implements SessionFactoryObserver { /** * Singleton access */ public static final ServiceRegistryCloser INSTANCE = new ServiceRegistryCloser(); @Override public void sessionFactoryCreated(SessionFactory sessionFactory) { // nothing to do } @Override public void sessionFactoryClosed(SessionFactory sessionFactory) { final var factoryImplementor = (SessionFactoryImplementor) sessionFactory; final var serviceRegistry = factoryImplementor.getServiceRegistry(); serviceRegistry.destroy(); final var basicRegistry = (ServiceRegistryImplementor) serviceRegistry.getParentServiceRegistry(); if ( basicRegistry != null ) { basicRegistry.destroy(); } } }
hibernate/hibernate-orm
1,057
hibernate-vector/src/main/java/org/hibernate/vector/internal/OracleVectorJdbcType.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.vector.internal; import org.hibernate.dialect.OracleTypes; import org.hibernate.type.SqlTypes; import org.hibernate.type.descriptor.jdbc.JdbcType; /** * Specialized type mapping for generic vector {@link SqlTypes#VECTOR} SQL data type for Oracle. * <p> * This class handles generic vectors represented by an asterisk (*) in the format, * allowing for different element types within the vector. * * @author Hassan AL Meftah */ public class OracleVectorJdbcType extends OracleFloatVectorJdbcType { public OracleVectorJdbcType(JdbcType elementJdbcType, boolean isVectorSupported) { super( elementJdbcType, isVectorSupported ); } @Override public String getFriendlyName() { return "VECTOR"; } @Override public String getVectorParameters() { return "*,*"; } @Override public int getDefaultSqlTypeCode() { return SqlTypes.VECTOR; } @Override protected int getNativeTypeCode() { return OracleTypes.VECTOR; } }
hibernate/hibernate-orm
1,064
hibernate-core/src/test/java/org/hibernate/orm/test/entitygraph/parser/AbstractEntityGraphTest.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.entitygraph.parser; import jakarta.persistence.EntityManager; import org.hibernate.graph.GraphParser; import org.hibernate.graph.spi.RootGraphImplementor; import org.hibernate.orm.test.jpa.BaseEntityManagerFunctionalTestCase; public abstract class AbstractEntityGraphTest extends BaseEntityManagerFunctionalTestCase { public AbstractEntityGraphTest() { super(); } @Override protected Class<?>[] getAnnotatedClasses() { return new Class[]{ GraphParsingTestEntity.class, GraphParsingTestSubEntity.class }; } protected <T> RootGraphImplementor<T> parseGraph(Class<T> entityType, String graphString) { EntityManager entityManager = getOrCreateEntityManager(); return (RootGraphImplementor<T>) GraphParser.parse( entityType, graphString, entityManager ); } protected <T> RootGraphImplementor<GraphParsingTestEntity> parseGraph(String graphString) { return parseGraph( GraphParsingTestEntity.class, graphString ); } }
hibernate/hibernate-orm
1,102
hibernate-envers/src/main/java/org/hibernate/envers/AuditOverrides.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.envers; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * The {@code AuditingOverrides} annotation is used to override the auditing * behavior for one ore more fields (or properties) inside an embedded * component. * * @author Erik-Berndt Scheper * @see jakarta.persistence.Embedded * @see jakarta.persistence.Embeddable * @see jakarta.persistence.MappedSuperclass * @see jakarta.persistence.AssociationOverride * @see jakarta.persistence.AssociationOverrides * @see AuditJoinTable * @see AuditOverride */ @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME) public @interface AuditOverrides { /** * An array of {@link AuditOverride} values, to define the new auditing * behavior. */ AuditOverride[] value(); }
hibernate/hibernate-search
1,043
mapper/pojo-base/src/main/java/org/hibernate/search/mapper/pojo/model/models/spi/PojoSimpleModelsPropertyModel.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.mapper.pojo.model.models.spi; import java.lang.reflect.Member; import java.util.List; import org.hibernate.models.spi.MemberDetails; import org.hibernate.search.util.common.reflect.spi.ValueReadHandle; final class PojoSimpleModelsPropertyModel<T> extends AbstractPojoModelsPropertyModel<T, AbstractPojoModelsBootstrapIntrospector> { PojoSimpleModelsPropertyModel(AbstractPojoModelsBootstrapIntrospector introspector, PojoSimpleModelsRawTypeModel<?> holderTypeModel, String name, List<MemberDetails> declaredProperties, List<Member> members) { super( introspector, holderTypeModel, name, declaredProperties, members ); } @Override @SuppressWarnings("unchecked") // By construction, we know the member returns values of type T protected ValueReadHandle<T> createHandle(Member member) throws IllegalAccessException { return (ValueReadHandle<T>) introspector.createValueReadHandle( member ); } }
hibernate/hibernate-search
1,052
backend/lucene/src/main/java/org/hibernate/search/backend/lucene/lowlevel/reader/impl/IndexReaderProvider.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.backend.lucene.lowlevel.reader.impl; import java.io.IOException; import org.apache.lucene.index.DirectoryReader; public interface IndexReaderProvider { /** * Closes and drops any cached resources (index readers in particular). * <p> * Should be used when stopping the index, to clean up upon error, * or simply to force the creation of a new reader (refresh) on the next call to {@link #getOrCreate()}. */ void clear() throws IOException; /** * @return A ready-to-use index reader, with its reference count already increased. * Callers are responsible for calling {@link DirectoryReader#decRef()} when they are done with the index reader. * Callers <strong>must not</strong> call {@link DirectoryReader#close()}, * as the index reader may be shared. */ DirectoryReader getOrCreate() throws IOException; default DirectoryReader getCurrentForTests() throws IOException { return getOrCreate(); } }
hibernate/hibernate-shards
1,118
src/main/java/org/hibernate/shards/query/ShardedQuery.java
/** * Copyright (C) 2007 Google Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * This library 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 * Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ package org.hibernate.shards.query; import org.hibernate.Query; /** * ShardedQuery extends the Query interface to provide the ability to query * across shards. * * @author Maulik Shah * @see org.hibernate.Query */ public interface ShardedQuery extends Query { QueryId getQueryId(); QueryFactory getQueryFactory(); }
openjdk/apidiff
1,150
test/showDocs/demo-src/m/p/package-info.java
/* * Copyright (c) 2020, 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. */ /** * This is package {@code p}. * This is additional information. * @since 1.0 */ package p;
openjdk/jdk8
1,120
langtools/test/tools/javac/diags/examples/AlreadyDefinedStaticImport/p/E1.java
/* * Copyright (c) 2010, 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; public class E1 { public static class A { } }
openjdk/jdk8
1,120
langtools/test/tools/javac/diags/examples/AlreadyDefinedStaticImport/p/E2.java
/* * Copyright (c) 2010, 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; public class E2 { public static class A { } }
openjdk/jdk8
1,134
langtools/test/tools/javac/diags/examples/IncomparableTypes.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.incomparable.types class X { boolean b = (this == 1); }
openjdk/jdk8
1,137
langtools/test/com/sun/javadoc/testAbstractMethod/pkg/C.java
/* * Copyright (c) 2012, 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 pkg; public interface C { public default void onlyMethod() { } }
openjdk/jdk8
1,139
jdk/test/java/lang/ClassLoader/defineClass/TestClass.java
/* * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ public class TestClass { public static String foo() { return "OK"; } }
openjdk/jdk8
1,148
jdk/test/sun/rmi/rmic/covariantReturns/G5Impl.java
/* * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ import java.util.Vector; public class G5Impl implements G5 { public void m(Vector v) { } }
openjdk/jtreg
1,163
test/6527624/A/AA/GoodAA1.java
/* * Copyright (c) 2007, 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 * @key Any1 Any3 */ public class GoodAA1 { public static void main(String[] args) { } }
openjdk/jtreg
1,168
test/6527624/A/GoodA.java
/* * Copyright (c) 2007, 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 * @key Any1 Any3 A-only */ public class GoodA { public static void main(String[] args) { } }
oracle/nosql
1,121
kvmain/src/main/java/oracle/kv/impl/param/LongParameter.java
/*- * Copyright (C) 2011, 2025 Oracle and/or its affiliates. All rights reserved. * * This file was distributed by Oracle as part of a version of Oracle NoSQL * Database made available at: * * http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html * * Please see the LICENSE file included in the top-level directory of the * appropriate version of Oracle NoSQL Database for a copy of the license and * additional information. */ package oracle.kv.impl.param; public class LongParameter extends Parameter { private static final long serialVersionUID = 1L; private final long value; public LongParameter(String name, long value) { super(name); this.value = value; } public LongParameter(String name, String value) { this(name, Long.parseLong(value)); } @Override public long asLong() { return value; } @Override public String asString() { return Long.toString(value); } @Override public ParameterState.Type getType() { return ParameterState.Type.LONG; } }
apache/commons-imaging
1,116
src/main/java/org/apache/commons/imaging/formats/gif/GifImageData.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.imaging.formats.gif; final class GifImageData { final ImageDescriptor descriptor; final GraphicControlExtension gce; GifImageData(final ImageDescriptor descriptor, final GraphicControlExtension gce) { this.descriptor = descriptor; this.gce = gce; } }
apache/commons-math
1,089
commons-math-neuralnet/src/main/java/org/apache/commons/math4/neuralnet/FeatureInitializer.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.math4.neuralnet; /** * Defines how to assign the first value of a neuron's feature. * * @since 3.3 */ public interface FeatureInitializer { /** * Selects the initial value. * * @return the initial value. */ double value(); }
apache/ctakes
1,110
ctakes-core/src/main/java/org/apache/ctakes/core/util/regex/ThreadString.java
package org.apache.ctakes.core.util.regex; /** * A representation of text that can check its container thread for interruptions. * This allows a break within tight charAt(..) calling loops, which can otherwise become infinite in a corrupt find. */ final class ThreadString implements CharSequence { private final CharSequence _delegate; ThreadString( final CharSequence delegate ) { _delegate = delegate; } @Override public char charAt( final int index ) { if ( Thread.currentThread().isInterrupted() ) { throw new RuntimeException( new InterruptedException() ); } return _delegate.charAt( index ); } @Override public int length() { return _delegate.length(); } @Override public CharSequence subSequence( final int start, final int end ) { if ( Thread.currentThread().isInterrupted() ) { throw new RuntimeException( new InterruptedException() ); } return new ThreadString( _delegate.subSequence( start, end ) ); } @Override public String toString() { return _delegate.toString(); } }
apache/cxf
1,097
rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweDecryption.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.rs.security.jose.jwe; public class JweDecryption extends AbstractJweDecryption { public JweDecryption(KeyDecryptionProvider keyDecryptionAlgo, ContentDecryptionProvider cipherProps) { super(keyDecryptionAlgo, cipherProps); } }
apache/cxf
1,110
rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/ResourceIdGenerator.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.model.wadl; import org.apache.cxf.jaxrs.model.ClassResourceInfo; import org.apache.cxf.jaxrs.model.OperationResourceInfo; public interface ResourceIdGenerator { String getClassResourceId(ClassResourceInfo cri); String getMethodResourceId(OperationResourceInfo cri); }
apache/cxf
1,110
tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/fortest/Calculator.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.tools.java2ws.fortest; import jakarta.jws.WebService; @WebService public class Calculator { public int add(int a, int b) throws AddException { if (a < 0 || b < 0) { throw new AddException("No negative values please"); } return a + b; } }