repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/iotdb
1,093
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/processor/twostage/state/State.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.pipe.processor.twostage.state; import java.io.IOException; import java.io.OutputStream; import java.nio.ByteBuffer; public interface State { void serialize(OutputStream outputStream) throws IOException; void deserialize(ByteBuffer byteBuffer); }
apache/jena
1,106
jena-tdb2/src/test/java/org/apache/jena/tdb2/store/tupletable/TS_TupleTable.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.tdb2.store.tupletable; import org.junit.platform.suite.api.SelectClasses; import org.junit.platform.suite.api.Suite; @Suite @SelectClasses({ TestTupleIndexRecord.class, TestTupleIndexRecordDirect.class, TestTupleTable.class } ) public class TS_TupleTable { }
apache/jena
1,119
jena-tdb2/src/test/java/org/apache/jena/tdb2/setup/TS_TDBSetup.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.tdb2.setup; import org.junit.platform.suite.api.SelectClasses; import org.junit.platform.suite.api.Suite; @Suite @SelectClasses({ TestStoreParams.class , TestStoreParamsChoose.class , TestStoreParamsCreate.class , TestReorderSetup.class }) public class TS_TDBSetup { }
apache/jena
1,124
jena-arq/src/test/java/org/apache/jena/atlas/json/TS_JSON.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.json; import org.junit.platform.suite.api.SelectClasses; import org.junit.platform.suite.api.Suite; @Suite @SelectClasses({ TestJson.class , TestJsonExt.class , TestJsonWriter.class , TestJsonBuilder.class , TestJsonAPI.class }) public class TS_JSON {}
apache/juneau
1,107
juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/matcher/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. * ***************************************************************************************************************************/ /** * Predefined Matchers */ package org.apache.juneau.rest.matcher;
apache/kafka
1,109
clients/src/main/java/org/apache/kafka/common/errors/AuthorizationException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kafka.common.errors; public class AuthorizationException extends InvalidConfigurationException { public AuthorizationException(String message) { super(message); } public AuthorizationException(String message, Throwable cause) { super(message, cause); } }
apache/kafka
1,122
clients/src/main/java/org/apache/kafka/common/config/Config.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kafka.common.config; import java.util.List; public class Config { private final List<ConfigValue> configValues; public Config(List<ConfigValue> configValues) { this.configValues = configValues; } public List<ConfigValue> configValues() { return configValues; } }
apache/maven-archetype
1,088
archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeGenerationResult.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.archetype; /** @author Jason van Zyl */ public class ArchetypeGenerationResult { private Exception cause; public Exception getCause() { return cause; } public void setCause(Exception cause) { this.cause = cause; } }
apache/maven-resolver
1,052
maven-resolver-transport-jdk-parent/maven-resolver-transport-jdk-8/src/main/java/org/eclipse/aether/transport/jdk/package-info.java
// CHECKSTYLE_OFF: RegexpHeader /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Support for downloads/uploads via the HTTP and HTTPS protocols. The implementation is backed by * Java 11 {@link java.net.http.HttpClient}. * * @since 2.0.0 */ package org.eclipse.aether.transport.jdk;
apache/maven
1,107
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/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. */ /** * Implementation of the Maven Upgrade tool ({@code mvnup}). * * <p>This package contains the implementation classes for the Maven upgrade tool, * providing functionality for upgrading Maven projects and dependencies.</p> * * @since 4.0.0 */ package org.apache.maven.cling.invoker.mvnup;
apache/metron
1,076
metron-platform/metron-writer/metron-writer-storm/src/main/java/org/apache/metron/writer/hdfs/SyncPolicyCreator.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.metron.writer.hdfs; import org.apache.metron.common.configuration.writer.WriterConfiguration; import org.apache.storm.hdfs.bolt.sync.SyncPolicy; public interface SyncPolicyCreator { SyncPolicy create(String sensor, WriterConfiguration config); }
apache/metron
1,077
metron-platform/metron-data-management/src/main/java/org/apache/metron/dataloads/bulk/StartDateException.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.metron.dataloads.bulk; public class StartDateException extends Exception { public StartDateException(String message){ super(message); } public StartDateException(String message, Throwable t){ super(message,t); } }
apache/mina-sshd
1,102
sshd-core/src/main/java/org/apache/sshd/client/session/ClientSessionHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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> */ @FunctionalInterface public interface ClientSessionHolder { /** * @return The underlying {@link ClientSession} used */ ClientSession getClientSession(); }
apache/mina-sshd
1,102
sshd-core/src/main/java/org/apache/sshd/server/session/ServerSessionHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.server.session; /** * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> */ @FunctionalInterface public interface ServerSessionHolder { /** * @return The underlying {@link ServerSession} used */ ServerSession getServerSession(); }
apache/myfaces
1,098
impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletConverterTag.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.myfaces.config.element.facelets; import java.io.Serializable; /** * */ public abstract class FaceletConverterTag extends FaceletTagDefinition implements Serializable { public abstract String getConverterId(); public abstract String getHandlerClass(); }
apache/myfaces
1,098
impl/src/main/java/org/apache/myfaces/config/element/facelets/FaceletValidatorTag.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.myfaces.config.element.facelets; import java.io.Serializable; /** * */ public abstract class FaceletValidatorTag extends FaceletTagDefinition implements Serializable { public abstract String getValidatorId(); public abstract String getHandlerClass(); }
apache/nifi
1,056
minifi/minifi-toolkit/minifi-toolkit-configuration/src/main/java/org/apache/nifi/minifi/toolkit/configuration/PathInputStreamFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.InputStream; @FunctionalInterface public interface PathInputStreamFactory { InputStream create(String path) throws FileNotFoundException; }
apache/olingo-odata4
1,088
lib/server-api/src/main/java/org/apache/olingo/server/api/serializer/SerializerResult.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.server.api.serializer; import java.io.InputStream; /** * Result type for {@link ODataSerializer} methods */ public interface SerializerResult { /** * Returns the serialized content * @return serialized content */ InputStream getContent(); }
apache/ozhera
1,058
trace-etl/trace-etl-extensions/trace-etl-kafka-extension/src/main/java/org/apache/ozhera/trace/etl/extension/kafka/VpcType.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.ozhera.trace.etl.extension.kafka; public class VpcType { public static final String VPC_9002 = "vpc-9002"; public static final String VPC_SSL_9003 = "vpc-ssl-9003"; public static final String VPC_9004 = "vpc-9004"; }
apache/ozhera
1,090
ozhera-monitor/ozhera-monitor-service/src/main/java/org/apache/ozhera/monitor/bo/UserInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.ozhera.monitor.bo; import lombok.Data; import lombok.ToString; @Data @ToString public class UserInfo { private long id; private String name; private String cname; private String email; private Integer type; private String showAccount; }
apache/pig
1,129
src/org/apache/pig/scripting/groovy/OutputSchemaFunction.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.pig.scripting.groovy; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface OutputSchemaFunction { String value(); }
apache/plc4x
1,106
plc4j/drivers/opcua/src/test/java/org/apache/plc4x/java/opcua/OpcuaDriverIT.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.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.opcua; import org.apache.plc4x.test.driver.DriverTestsuiteRunner; import org.junit.jupiter.api.Disabled; public class OpcuaDriverIT extends DriverTestsuiteRunner { public OpcuaDriverIT() { super("/protocols/opcua/DriverTestsuite.xml", false); } }
apache/poi
1,135
poi/src/main/java/org/apache/poi/poifs/dev/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. ==================================================================== */ /** * DEV package serves two purposes. * * <ol> * <li>Examples for how to use POIFS</li> * <li>tools for developing and validating POIFS</li> * </ol> */ package org.apache.poi.poifs.dev;
apache/polaris
1,098
persistence/nosql/idgen/spi/src/main/java/org/apache/polaris/ids/spi/IdGeneratorSource.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.ids.spi; /** Provides values for ID generators, usually provided by {@code NodeLease} implementations. */ public interface IdGeneratorSource { /** Returns the node ID if the node is active/valid or {@code -1}. */ int nodeId(); long currentTimeMillis(); }
apache/rocketmq-clients
1,096
java/client/src/main/java/org/apache/rocketmq/client/java/hook/Attribute.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.rocketmq.client.java.hook; public class Attribute<T> { private final T t; private Attribute(T t) { this.t = t; } public static <T> Attribute<T> create(T t) { return new Attribute<>(t); } public T get() { return t; } }
apache/rocketmq-streams
1,089
core/src/main/java/org/apache/rocketmq/streams/core/serialization/KeyValueDeserializer.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.streams.core.serialization; import org.apache.rocketmq.streams.core.util.Pair; public interface KeyValueDeserializer<K, V> { default void configure(Object... args) throws Throwable { } Pair<K, V> deserialize(byte[] source) throws Throwable; }
apache/rocketmq
1,098
common/src/main/java/org/apache/rocketmq/common/config/ConfigManagerVersion.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.common.config; public enum ConfigManagerVersion { V1("v1"), V2("v2"), ; private final String version; ConfigManagerVersion(String version) { this.version = version; } public String getVersion() { return version; } }
apache/servicecomb-fence
1,078
common/common-authentication-client/src/main/java/org/apache/servicecomb/fence/resource/AuthFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.fence.resource; import org.apache.servicecomb.core.Invocation; import org.apache.servicecomb.swagger.invocation.exception.InvocationException; public interface AuthFilter { void doFilter(Invocation invocation) throws InvocationException; }
apache/sis
1,097
optional/src/org.apache.sis.storage.gdal/main/org/apache/sis/storage/panama/Resources_en.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.sis.storage.panama; /** * Resource in English language. */ public class Resources_en extends Resources { /** * Constructs a new resource bundle loading data from * the resource file of the same name as this class. */ public Resources_en() { } }
apache/skywalking-java
1,059
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/jvm/memorypool/MemoryPoolMetricsAccessor.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.apm.agent.core.jvm.memorypool; import java.util.List; import org.apache.skywalking.apm.network.language.agent.v3.MemoryPool; public interface MemoryPoolMetricsAccessor { List<MemoryPool> getMemoryPoolMetricsList(); }
apache/skywalking
1,035
oap-server/server-cluster-plugin/cluster-zookeeper-plugin/src/main/java/org/apache/skywalking/oap/server/cluster/plugin/zookeeper/NodeNameBuilder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.cluster.plugin.zookeeper; public class NodeNameBuilder { public static String build(String moduleName, String providerName) { return moduleName + "/" + providerName; } }
apache/spark-kubernetes-operator
1,087
spark-operator-api/src/main/java/org/apache/spark/k8s/operator/SparkClusterList.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.spark.k8s.operator; import io.fabric8.kubernetes.api.model.DefaultKubernetesResourceList; import lombok.NoArgsConstructor; /** List of SparkClusters. */ @NoArgsConstructor public class SparkClusterList extends DefaultKubernetesResourceList<SparkCluster> {}
apache/stanbol
1,082
reasoners/servicesapi/src/main/java/org/apache/stanbol/reasoners/servicesapi/UnsupportedTaskException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.stanbol.reasoners.servicesapi; /** * Exception to be thrown when an unsupported task is requested */ public class UnsupportedTaskException extends Exception { /** * */ private static final long serialVersionUID = -6246522626993878566L; }
apache/storm
1,108
storm-client/src/jvm/org/apache/storm/streams/operations/mappers/TupleValueMapper.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version * 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.streams.operations.mappers; import org.apache.storm.streams.operations.Function; import org.apache.storm.tuple.Tuple; /** * A generic interface for mapping a {@link Tuple} to typed values. * * @param <T> the result type */ public interface TupleValueMapper<T> extends Function<Tuple, T> { }
apache/storm
1,124
storm-client/src/jvm/org/apache/storm/trident/operation/Aggregator.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version * 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.operation; import org.apache.storm.trident.tuple.TridentTuple; public interface Aggregator<T> extends Operation { T init(Object batchId, TridentCollector collector); void aggregate(T val, TridentTuple tuple, TridentCollector collector); void complete(T val, TridentCollector collector); }
apache/streampipes
1,092
streampipes-model/src/main/java/org/apache/streampipes/model/configuration/LocationConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.model.configuration; import org.apache.streampipes.model.shared.annotation.TsModel; @TsModel public record LocationConfig(boolean locationEnabled, String tileServerUrl, String attributionText) {}
apache/struts
1,101
plugins/rest/src/main/java/org/apache/struts2/rest/handler/xstream/XStreamProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.rest.handler.xstream; import com.thoughtworks.xstream.XStream; /** * An interface to be implemented by an action to create/provide an instance * of XStream - it allows customisation per action */ public interface XStreamProvider { XStream createXStream(); }
apache/submarine
1,085
submarine-server/server-core/src/main/java/org/apache/submarine/server/websocket/WebSocketListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.submarine.server.websocket; /** * WebSocket listener. */ public interface WebSocketListener { void onClose(WebSocketHandler socket, int code, String message); void onOpen(WebSocketHandler socket); void onMessage(WebSocketHandler socket, String message); }
apache/tapestry-5
1,080
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/BeanEditCalendarDemo.java
// Copyright 2009 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.integration.app1.pages; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.annotations.SessionState; import org.apache.tapestry5.integration.app1.data.CalendarHolder; public class BeanEditCalendarDemo { @SessionState @Property private CalendarHolder holder; void onActionFromClear() { holder = null; } Object onSuccess() { return ShowCalendarHolder.class; } }
apache/tapestry-5
1,113
plastic/src/main/java/org/apache/tapestry5/plastic/ComputedValue.java
// Copyright 2011 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.plastic; /** * Provides an indirect, or computed, value. This is used for certain * kinds of injection, where the exact value to be injected must be computed * for each <em>instance</em> being instantiated, rather than for the * class as a whole. * * @see PlasticField#injectComputed(ComputedValue) */ public interface ComputedValue<T> { /** * Computes or otherwise provides the value, given the instance's context. */ T get(InstanceContext context); }
apache/tomee
1,042
arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/core/ejb/ejbjar/FirstBean.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.arquillian.tests.core.ejb.ejbjar; import jakarta.ejb.Stateless; @Stateless public class FirstBean implements Bean { @Override public String getName() { return FirstBean.class.getName(); } }
apache/tomee
1,087
itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp/ComplexCmpTestClient.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.test.entity.cmp; public abstract class ComplexCmpTestClient extends CmpTestClient { protected ComplexCmpHome ejbHome; protected ComplexCmpObject ejbObject; public ComplexCmpTestClient(final String name) { super(name); } }
apache/tomee
1,103
container/openejb-core/src/main/java/org/apache/openejb/config/sys/MapFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.config.sys; import java.util.Map; import java.util.Properties; public final class MapFactory { private Properties props = new Properties(); public Map<?, ?> create() { return props; } public Properties getProps() { return props; } }
apache/unomi
1,111
rest/src/main/java/org/apache/unomi/rest/models/EventCollectorResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.unomi.rest.models; import java.io.Serializable; public class EventCollectorResponse implements Serializable { private int updated; public EventCollectorResponse(int updated) { this.updated = updated; } public int getUpdated() { return updated; } }
apache/xmlgraphics-batik
1,082
batik-svgbrowser/src/main/java/org/apache/batik/apps/svgbrowser/DOMDocumentTreeController.java
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.batik.apps.svgbrowser; /** * Provides the information to control the DOMDocumentTree behaviour. */ public interface DOMDocumentTreeController { /** * Returns whether the DOMDocumentTree supports drag-and-drop. */ boolean isDNDSupported(); }
apache/xmlgraphics-fop
1,113
fop-events/src/main/java/org/apache/fop/events/EventProducer.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* $Id$ */ package org.apache.fop.events; /** * This is a marker interface which all event producer interfaces need to extend. These interfaces * must agree to the following convention: * * The first parameter of each method must be: <code>Object source</code> */ public interface EventProducer { }
google-ai-edge/LiteRT
1,108
tflite/java/src/test/java/org/tensorflow/lite/InterpreterTestHelper.java
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ package org.tensorflow.lite; /** Utility for interacting with Interpreter in delegate tests. */ public abstract class InterpreterTestHelper { /** * Returns the number of nodes in the execution plan that are invoked per inference. * * <p>WARNING: This is an experimental API and subject to change. */ public static int executionPlanLength(Interpreter interpreter) { return interpreter.getExecutionPlanLength(); } }
google/auto
1,108
value/src/main/java/com/google/auto/value/processor/AbortProcessingException.java
/* * Copyright 2014 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.auto.value.processor; /** * Exception thrown when annotation processing should be aborted for the current class. Processing * can continue on other classes. Throwing this exception does not cause a compiler error, so either * one should explicitly be emitted or it should be clear that the compiler will be producing its * own error for other reasons. * * @author emcmanus@google.com (Éamonn McManus) */ @SuppressWarnings("serial") class AbortProcessingException extends RuntimeException {}
google/bindiff
1,070
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/zygraph/editmode/actions/CDefaultEdgeLabelHoverAction.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.editmode.actions; import com.google.security.zynamics.zylib.gui.zygraph.editmode.IStateAction; import com.google.security.zynamics.zylib.yfileswrap.gui.zygraph.editmode.states.CEdgeLabelHoverState; import java.awt.event.MouseEvent; public class CDefaultEdgeLabelHoverAction implements IStateAction<CEdgeLabelHoverState> { @Override public void execute(final CEdgeLabelHoverState state, final MouseEvent event) {} }
google/bindiff
1,094
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/tabpanels/TabPanel.java
// Copyright 2011-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.bindiff.gui.tabpanels; import java.awt.BorderLayout; import java.awt.Color; import javax.swing.Icon; import javax.swing.JMenuBar; import javax.swing.JPanel; import javax.swing.border.LineBorder; public abstract class TabPanel extends JPanel { public TabPanel() { super(new BorderLayout()); setBorder(new LineBorder(Color.GRAY)); } public abstract Icon getIcon(); public abstract JMenuBar getMenuBar(); public abstract String getTitle(); }
google/error-prone
1,114
core/src/main/java/com/google/errorprone/refaster/UIdent.java
/* * Copyright 2013 The Error Prone Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.errorprone.refaster; import com.sun.source.tree.IdentifierTree; import com.sun.source.tree.TreeVisitor; /** * Abstract supertype for {@link UTree} identifiers. * * @author lowasser@google.com (Louis Wasserman) */ abstract class UIdent extends UExpression implements IdentifierTree { @Override public <R, D> R accept(TreeVisitor<R, D> visitor, D data) { return visitor.visitIdentifier(this, data); } @Override public Kind getKind() { return Kind.IDENTIFIER; } }
google/santa-tracker-android
1,057
doodles-lib/src/main/java/com/google/android/apps/santatracker/doodles/shared/sound/DoodleMediaPlayer.java
/* * Copyright 2019. Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.android.apps.santatracker.doodles.shared.sound; import android.media.MediaPlayer; /** A wrapper around MediaPlayer so that we can extend its behavior. */ public interface DoodleMediaPlayer { void start(); boolean isPlaying(); void pause(); MediaPlayer getMediaPlayer(); void setNextMediaPlayer(MediaPlayer mediaPlayer); void setVolume(float volume); void mute(); void unmute(); void release(); }
google/truth
1,105
core/src/test/java/com/google/common/truth/StackTraceCleanerJUnit3Test.java
/* * Copyright (c) 2017 Google, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.common.truth; import static com.google.common.truth.Truth.assertThat; import junit.framework.TestCase; /** * JUnit3 tests for {@link StackTraceCleaner}. * * <p>The "main" tests are in {@link StackTraceCleanerTest}. */ public class StackTraceCleanerJUnit3Test extends TestCase { public void testSimple() { try { assertThat(0).isEqualTo(1); throw new Error(); } catch (AssertionError failure) { assertThat(failure.getStackTrace()).hasLength(1); } } }
googleads/google-ads-java
1,067
google-ads-stubs-v19/src/main/java/com/google/ads/googleads/v19/common/CustomAffinityInfoOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v19/common/criteria.proto // Protobuf Java Version: 3.25.7 package com.google.ads.googleads.v19.common; public interface CustomAffinityInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v19.common.CustomAffinityInfo) com.google.protobuf.MessageOrBuilder { /** * <pre> * The CustomInterest resource name. * </pre> * * <code>optional string custom_affinity = 2;</code> * @return Whether the customAffinity field is set. */ boolean hasCustomAffinity(); /** * <pre> * The CustomInterest resource name. * </pre> * * <code>optional string custom_affinity = 2;</code> * @return The customAffinity. */ java.lang.String getCustomAffinity(); /** * <pre> * The CustomInterest resource name. * </pre> * * <code>optional string custom_affinity = 2;</code> * @return The bytes for customAffinity. */ com.google.protobuf.ByteString getCustomAffinityBytes(); }
googleads/google-ads-java
1,067
google-ads-stubs-v20/src/main/java/com/google/ads/googleads/v20/common/CustomAffinityInfoOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v20/common/criteria.proto // Protobuf Java Version: 3.25.7 package com.google.ads.googleads.v20.common; public interface CustomAffinityInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v20.common.CustomAffinityInfo) com.google.protobuf.MessageOrBuilder { /** * <pre> * The CustomInterest resource name. * </pre> * * <code>optional string custom_affinity = 2;</code> * @return Whether the customAffinity field is set. */ boolean hasCustomAffinity(); /** * <pre> * The CustomInterest resource name. * </pre> * * <code>optional string custom_affinity = 2;</code> * @return The customAffinity. */ java.lang.String getCustomAffinity(); /** * <pre> * The CustomInterest resource name. * </pre> * * <code>optional string custom_affinity = 2;</code> * @return The bytes for customAffinity. */ com.google.protobuf.ByteString getCustomAffinityBytes(); }
googleads/google-ads-java
1,067
google-ads-stubs-v21/src/main/java/com/google/ads/googleads/v21/common/CustomAffinityInfoOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v21/common/criteria.proto // Protobuf Java Version: 3.25.7 package com.google.ads.googleads.v21.common; public interface CustomAffinityInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v21.common.CustomAffinityInfo) com.google.protobuf.MessageOrBuilder { /** * <pre> * The CustomInterest resource name. * </pre> * * <code>optional string custom_affinity = 2;</code> * @return Whether the customAffinity field is set. */ boolean hasCustomAffinity(); /** * <pre> * The CustomInterest resource name. * </pre> * * <code>optional string custom_affinity = 2;</code> * @return The customAffinity. */ java.lang.String getCustomAffinity(); /** * <pre> * The CustomInterest resource name. * </pre> * * <code>optional string custom_affinity = 2;</code> * @return The bytes for customAffinity. */ com.google.protobuf.ByteString getCustomAffinityBytes(); }
googleads/google-ads-java
1,076
google-ads-stubs-v19/src/main/java/com/google/ads/googleads/v19/common/YearMonthOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v19/common/dates.proto // Protobuf Java Version: 3.25.7 package com.google.ads.googleads.v19.common; public interface YearMonthOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v19.common.YearMonth) com.google.protobuf.MessageOrBuilder { /** * <pre> * The year (for example, 2020). * </pre> * * <code>int64 year = 1;</code> * @return The year. */ long getYear(); /** * <pre> * The month of the year. (for example, FEBRUARY). * </pre> * * <code>.google.ads.googleads.v19.enums.MonthOfYearEnum.MonthOfYear month = 2;</code> * @return The enum numeric value on the wire for month. */ int getMonthValue(); /** * <pre> * The month of the year. (for example, FEBRUARY). * </pre> * * <code>.google.ads.googleads.v19.enums.MonthOfYearEnum.MonthOfYear month = 2;</code> * @return The month. */ com.google.ads.googleads.v19.enums.MonthOfYearEnum.MonthOfYear getMonth(); }
googleads/google-ads-java
1,076
google-ads-stubs-v20/src/main/java/com/google/ads/googleads/v20/common/YearMonthOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v20/common/dates.proto // Protobuf Java Version: 3.25.7 package com.google.ads.googleads.v20.common; public interface YearMonthOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v20.common.YearMonth) com.google.protobuf.MessageOrBuilder { /** * <pre> * The year (for example, 2020). * </pre> * * <code>int64 year = 1;</code> * @return The year. */ long getYear(); /** * <pre> * The month of the year. (for example, FEBRUARY). * </pre> * * <code>.google.ads.googleads.v20.enums.MonthOfYearEnum.MonthOfYear month = 2;</code> * @return The enum numeric value on the wire for month. */ int getMonthValue(); /** * <pre> * The month of the year. (for example, FEBRUARY). * </pre> * * <code>.google.ads.googleads.v20.enums.MonthOfYearEnum.MonthOfYear month = 2;</code> * @return The month. */ com.google.ads.googleads.v20.enums.MonthOfYearEnum.MonthOfYear getMonth(); }
googleads/google-ads-java
1,076
google-ads-stubs-v21/src/main/java/com/google/ads/googleads/v21/common/YearMonthOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v21/common/dates.proto // Protobuf Java Version: 3.25.7 package com.google.ads.googleads.v21.common; public interface YearMonthOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v21.common.YearMonth) com.google.protobuf.MessageOrBuilder { /** * <pre> * The year (for example, 2020). * </pre> * * <code>int64 year = 1;</code> * @return The year. */ long getYear(); /** * <pre> * The month of the year. (for example, FEBRUARY). * </pre> * * <code>.google.ads.googleads.v21.enums.MonthOfYearEnum.MonthOfYear month = 2;</code> * @return The enum numeric value on the wire for month. */ int getMonthValue(); /** * <pre> * The month of the year. (for example, FEBRUARY). * </pre> * * <code>.google.ads.googleads.v21.enums.MonthOfYearEnum.MonthOfYear month = 2;</code> * @return The month. */ com.google.ads.googleads.v21.enums.MonthOfYearEnum.MonthOfYear getMonth(); }
googleapis/google-cloud-java
1,029
java-contentwarehouse/proto-google-cloud-contentwarehouse-v1/src/main/java/com/google/cloud/contentwarehouse/v1/CreateDocumentMetadataOrBuilder.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/contentwarehouse/v1/async_document_service_request.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.contentwarehouse.v1; public interface CreateDocumentMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.contentwarehouse.v1.CreateDocumentMetadata) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,029
java-contentwarehouse/proto-google-cloud-contentwarehouse-v1/src/main/java/com/google/cloud/contentwarehouse/v1/UpdateDocumentMetadataOrBuilder.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/contentwarehouse/v1/async_document_service_request.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.contentwarehouse.v1; public interface UpdateDocumentMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.contentwarehouse.v1.UpdateDocumentMetadata) com.google.protobuf.MessageOrBuilder {}
googleapis/sdk-platform-java
1,054
java-shared-dependencies/dependency-analyzer/src/test/java/com/google/cloud/model/LicenseTest.java
package com.google.cloud.model; import static org.junit.Assert.assertEquals; import org.junit.Test; public class LicenseTest { @Test public void testToLicenseSucceeds() { String license = "Apache-2.0"; assertEquals(License.APACHE_2_0, License.toLicense(license)); } @Test public void testToLicenseReturnsNonRecognizedLicense() { String license = "Non-existent-license"; assertEquals(License.NOT_RECOGNIZED, License.toLicense(license)); } @Test public void testToStringOfACompliantLicense() { String license = "Apache-2.0"; assertEquals("Apache-2.0 (Google-compliant)", License.toLicense(license).toString()); } @Test public void testToStringOfANonCompliantLicense() { String license = "BCL"; assertEquals("BCL (Not Google-compliant!)", License.toLicense(license).toString()); } @Test public void testToStringOfANotRecognizedLicense() { String license = "Non-existent-license"; assertEquals("Not-Recognized (Not Google-compliant!)", License.toLicense(license).toString()); } }
googlearchive/caja
1,127
tests/com/google/caja/plugin/CatalogTestCase.java
// Copyright (C) 2013 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.caja.plugin; import org.junit.runner.RunWith; /** * Test case which runs browser tests listed in a catalog JSON file. * * @author kpreid@switchb.org * */ @RunWith(value = CatalogRunner.class) public abstract class CatalogTestCase extends BrowserTestCase { protected BrowserTestCatalog.Entry entry; void setCatalogEntry(BrowserTestCatalog.Entry entry) { this.entry = entry; } public void runTest() throws Exception { runBrowserTest(entry.getLabel(), entry.mayFail(), entry.getURL()); } }
googlearchive/gwt-google-apis
1,097
gadgets/gadgets/src/com/google/gwt/gadgets/client/NeedsSetTitle.java
/* * Copyright 2008 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.gadgets.client; import com.google.gwt.gadgets.client.GadgetFeature.FeatureName; /** * Indicates that a Gadget needs to be able to set its own title. */ @FeatureName("settitle") public interface NeedsSetTitle { /** * Entry point that gets called back to handle set title feature * initialization. * * @param feature an instance of the feature to use to invoke feature specific * methods. */ void initializeFeature(SetTitleFeature feature); }
hibernate/hibernate-ogm
1,067
mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/type/impl/ObjectIdGridType.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.datastore.mongodb.type.impl; import org.bson.types.ObjectId; import org.hibernate.MappingException; import org.hibernate.engine.spi.Mapping; import org.hibernate.ogm.type.descriptor.impl.PassThroughGridTypeDescriptor; import org.hibernate.ogm.type.impl.AbstractGenericBasicType; /** * Persists {@link ObjectId}s as is in MongoDB. * * @author Gunnar Morling * */ public class ObjectIdGridType extends AbstractGenericBasicType<ObjectId> { public static final ObjectIdGridType INSTANCE = new ObjectIdGridType(); public ObjectIdGridType() { super( PassThroughGridTypeDescriptor.INSTANCE, ObjectIdTypeDescriptor.INSTANCE ); } @Override public String getName() { return "objectid"; } @Override public int getColumnSpan(Mapping mapping) throws MappingException { return 1; } }
hibernate/hibernate-orm
1,027
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/factory/puUtil/LegacyEntityPk.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.jpa.factory.puUtil; import java.io.Serializable; public class LegacyEntityPk implements Serializable { private int primitivePk1; private int primitivePk2; public LegacyEntityPk() { } public int getPrimitivePk1() { return primitivePk1; } public void setPrimitivePk1(int primitivePk1) { this.primitivePk1 = primitivePk1; } public int getPrimitivePk2() { return primitivePk2; } public void setPrimitivePk2(int primitivePk2) { this.primitivePk2 = primitivePk2; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; LegacyEntityPk that = (LegacyEntityPk) o; if (primitivePk1 != that.primitivePk1) return false; return primitivePk2 == that.primitivePk2; } @Override public int hashCode() { int result = primitivePk1; result = 31 * result + primitivePk2; return result; } }
hibernate/hibernate-orm
1,029
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytoonewithformula/ManufacturerId.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.annotations.manytoonewithformula; import java.io.Serializable; import jakarta.persistence.Column; import jakarta.persistence.Embeddable; @Embeddable public class ManufacturerId implements Serializable { private static final long serialVersionUID = 1L; private Integer companyCode; private Integer manufacturerCode; public ManufacturerId(Integer companyCode, Integer manufacturerCode) { this.companyCode = companyCode; this.manufacturerCode = manufacturerCode; } public ManufacturerId() { } @Column(name = "MFG_COMPANY_CODE") public Integer getCompanyCode() { return companyCode; } public void setCompanyCode(Integer companyCode) { this.companyCode = companyCode; } @Column(name = "MFG_CODE") public Integer getManufacturerCode() { return manufacturerCode; } public void setManufacturerCode(Integer manufacturerCode) { this.manufacturerCode = manufacturerCode; } }
hibernate/hibernate-orm
1,037
hibernate-core/src/main/java/org/hibernate/boot/jaxb/internal/ContextProvidingValidationEventHandler.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.boot.jaxb.internal; import jakarta.xml.bind.ValidationEvent; import jakarta.xml.bind.ValidationEventHandler; import jakarta.xml.bind.ValidationEventLocator; /** * ValidationEventHandler implementation providing easier access to where (line/column) an error occurred. * * @author Steve Ebersole */ public class ContextProvidingValidationEventHandler implements ValidationEventHandler { private int lineNumber; private int columnNumber; private String message; @Override public boolean handleEvent(ValidationEvent validationEvent) { ValidationEventLocator locator = validationEvent.getLocator(); lineNumber = locator.getLineNumber(); columnNumber = locator.getColumnNumber(); message = validationEvent.getMessage(); return false; } public int getLineNumber() { return lineNumber; } public int getColumnNumber() { return columnNumber; } public String getMessage() { return message; } }
hibernate/hibernate-search
1,030
lucene-next/backend/lucene/src/main/java/org/hibernate/search/backend/lucene/lowlevel/query/impl/FuzzyQueryBuilder.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.backend.lucene.lowlevel.query.impl; import static org.apache.lucene.search.BoostAttribute.DEFAULT_BOOST; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.index.Term; import org.apache.lucene.search.BoostQuery; import org.apache.lucene.search.FuzzyQuery; import org.apache.lucene.search.Query; import org.apache.lucene.util.QueryBuilder; public final class FuzzyQueryBuilder extends QueryBuilder { private final int maxEditDistance; private final int prefixLength; public FuzzyQueryBuilder(Analyzer analyzer, int maxEditDistance, int prefixLength) { super( analyzer ); this.maxEditDistance = maxEditDistance; this.prefixLength = prefixLength; } @Override protected Query newTermQuery(Term term, float boost) { Query q = new FuzzyQuery( term, maxEditDistance, prefixLength ); if ( boost == DEFAULT_BOOST ) { return q; } return new BoostQuery( q, boost ); } }
hibernate/hibernate-search
1,057
engine/src/main/java/org/hibernate/search/engine/search/predicate/dsl/impl/QueryStringPredicateFieldStepImpl.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.engine.search.predicate.dsl.impl; import java.util.Arrays; import org.hibernate.search.engine.search.predicate.dsl.QueryStringPredicateFieldMoreStep; import org.hibernate.search.engine.search.predicate.dsl.QueryStringPredicateFieldStep; import org.hibernate.search.engine.search.predicate.dsl.spi.SearchPredicateDslContext; public final class QueryStringPredicateFieldStepImpl<SR> implements QueryStringPredicateFieldStep<SR, QueryStringPredicateFieldMoreStep<SR, ?, ?>> { private final QueryStringPredicateFieldMoreStepImpl.CommonState commonState; public QueryStringPredicateFieldStepImpl(SearchPredicateDslContext<?> dslContext) { this.commonState = new QueryStringPredicateFieldMoreStepImpl.CommonState( dslContext ); } @Override public QueryStringPredicateFieldMoreStep<SR, ?, ?> fields(String... fieldPaths) { return new QueryStringPredicateFieldMoreStepImpl<>( commonState, Arrays.asList( fieldPaths ) ); } }
hibernate/hibernate-search
1,058
v5migrationhelper/engine/src/main/java/org/hibernate/search/query/facet/Facet.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.query.facet; import org.hibernate.search.query.dsl.FacetContext; /** * A single facet (field value and count). * * @author Hardy Ferentschik * @deprecated See the deprecation note on {@link FacetContext}. */ @Deprecated public interface Facet { /** * @return the faceting name this {@code Facet} belongs to. * * @see FacetingRequest#getFacetingName() */ String getFacetingName(); /** * Return the {@code Document} field name this facet is targeting. * The field needs to be indexed with {@code Analyze.NO}. * * @return the {@code Document} field name this facet is targeting. */ String getFieldName(); /** * @return the value of this facet. In case of a discrete facet it is the actual * {@code Document} field value. In case of a range query the value is a * string representation of the range. */ String getValue(); /** * @return the facet count. */ int getCount(); }
hibernate/hibernate-search
1,072
engine/src/main/java/org/hibernate/search/engine/backend/spi/BackendStartContext.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.engine.backend.spi; import org.hibernate.search.engine.cfg.ConfigurationPropertySource; import org.hibernate.search.engine.environment.bean.BeanResolver; import org.hibernate.search.engine.environment.thread.spi.ThreadPoolProvider; import org.hibernate.search.engine.reporting.spi.ContextualFailureCollector; /** * A start context for backends. */ public interface BackendStartContext { /** * A collector of (non-fatal) failures, allowing to notify Hibernate Search * that something went wrong and bootstrap should be aborted at some point, * while still continuing the bootstrap process for some time to collect other errors * that could be relevant to users. * * @return A failure collector. */ ContextualFailureCollector failureCollector(); /** * @return A {@link BeanResolver}. */ BeanResolver beanResolver(); ConfigurationPropertySource configurationPropertySource(); ThreadPoolProvider threadPoolProvider(); }
hibernate/hibernate-shards
1,110
src/test/java/org/hibernate/shards/ShardOperationDefaultMock.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; /** * @author maxr@google.com (Max Ross) */ public class ShardOperationDefaultMock<T> implements ShardOperation<T> { public T execute(Shard shard) { throw new UnsupportedOperationException(); } public String getOperationName() { throw new UnsupportedOperationException(); } }
openjdk/jdk8
1,104
langtools/test/tools/javac/diags/examples/DeprecatedPluralAdditional/DeprecatedFilename.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. */ class DeprecatedFileName { DeprecatedClass d; }
openjdk/jdk8
1,126
jdk/src/solaris/classes/sun/java2d/x11/XSurfaceData.java
package sun.java2d.x11; import java.awt.image.*; import sun.awt.*; import sun.java2d.*; import sun.java2d.loops.*; import sun.java2d.pipe.*; public abstract class XSurfaceData extends SurfaceData { static boolean isX11SurfaceDataInitialized = false; public static boolean isX11SurfaceDataInitialized() { return isX11SurfaceDataInitialized; } public static void setX11SurfaceDataInitialized() { isX11SurfaceDataInitialized = true; } public XSurfaceData(SurfaceType surfaceType, ColorModel cm) { super(surfaceType, cm); } protected native void initOps(X11ComponentPeer peer, X11GraphicsConfig gc, int depth); protected static native long XCreateGC(long pXSData); protected static native void XResetClip(long xgc); protected static native void XSetClip(long xgc, int lox, int loy, int hix, int hiy, Region complexclip); protected native void flushNativeSurface(); protected native boolean isDrawableValid(); protected native void setInvalid(); protected static native void XSetGraphicsExposures(long xgc, boolean needExposures); }
openjdk/jdk8
1,135
langtools/test/com/sun/javadoc/testPackagePage/pkg2/C.java
/* * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package pkg2; /** * Just a dummy class in a dummy package. */ public class C {}
openjdk/jdk8
1,139
langtools/test/com/sun/javadoc/WindowTitles/p1/C1.java
/* * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package p1; import java.io.Serializable; public class C1 implements Serializable { }
openjdk/jdk8
1,139
langtools/test/tools/javac/diags/examples/Expected2.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.expected2 // options: -source 1.4 -Xlint:-options int Expected2;
openjdk/jdk8
1,139
langtools/test/tools/javac/generics/7007615/acc1/p1/D.java
/* * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package p1; public class D<T> extends C<T> { /* inherits m(T), implicit m(Object) */ }
openjdk/jdk8
1,139
langtools/test/tools/javac/generics/7007615/acc2/p2/E.java
/* * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package p2; public class E extends p1.D { /* inherits m(String) but not m(Object) */ }
oracle/coherence
1,063
prj/examples/guides/210-ssl/src/test/java/com/oracle/coherence/guides/ssl/loaders/CustomCertificateLoader.java
/* * Copyright (c) 2022 Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * https://oss.oracle.com/licenses/upl. */ package com.oracle.coherence.guides.ssl.loaders; import com.tangosol.net.ssl.AbstractCertificateLoader; import com.tangosol.net.ssl.CertificateLoader; import com.tangosol.util.Resources; import java.io.IOException; import java.io.InputStream; // #tag::test[] /** * An example implementation of a {@link CertificateLoader} which loads a certificate from a file. * * @author Tim Middleton 2022.06.16 */ public class CustomCertificateLoader extends AbstractCertificateLoader { public CustomCertificateLoader(String url) { super(url); } @Override protected InputStream getInputStream() throws IOException { try { return Resources.findInputStream(m_sName); } catch (IOException e) { throw new IOException(e); } } } // #end::test[]
oracle/coherence
1,072
prj/coherence-core/src/main/java/com/tangosol/internal/net/grpc/DefaultRemoteGrpcTopicServiceDependencies.java
/* * Copyright (c) 2000, 2025, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * https://oss.oracle.com/licenses/upl. */ package com.tangosol.internal.net.grpc; /** * A default implementation of {@link RemoteGrpcTopicServiceDependencies}. * * @author Jonathan Knight 2025.01.01 */ public class DefaultRemoteGrpcTopicServiceDependencies extends DefaultRemoteGrpcServiceDependencies implements RemoteGrpcTopicServiceDependencies { /** * Create a {@link DefaultRemoteGrpcTopicServiceDependencies}. */ public DefaultRemoteGrpcTopicServiceDependencies() { this(null); } /** * Create a {@link DefaultRemoteGrpcTopicServiceDependencies} by copying * the specified {@link RemoteGrpcTopicServiceDependencies}. * * @param deps the {@link RemoteGrpcTopicServiceDependencies} to copy */ public DefaultRemoteGrpcTopicServiceDependencies(RemoteGrpcTopicServiceDependencies deps) { super(deps); } }
oracle/coherence
1,077
prj/coherence-concurrent/src/main/java/com/oracle/coherence/concurrent/executor/internal/Leased.java
/* * Copyright (c) 2016, 2021, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.oracle.coherence.concurrent.executor.internal; import com.tangosol.util.InvocableMap; /** * A {@link Leased} object is one that supports tracking of last use and automated * cleanup upon expiry. * * @author bo * @since 21.12 */ public interface Leased { /** * Renews the lease for some period of time. */ void renew(); /** * Obtains the time the lease will expiry (in milliseconds since the epoc). * * @return the time in milliseconds since the epoc */ long getLeaseExpiryTime(); /** * A callback invoked as part of an {@link InvocableMap.EntryProcessor} to perform * custom lease expiry operations when a lease has expired. * * @return <code>true</code> if the {@link Leased} state was mutated and should * be saved, <code>false</code> otherwise */ boolean onLeaseExpiry(); }
oracle/coherence
1,089
prj/coherence-core/src/main/java/com/tangosol/dev/component/VetoableSubChangeListener.java
/* * Copyright (c) 2000, 2020, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.tangosol.dev.component; import java.util.EventListener; import java.beans.PropertyVetoException; /** * The VetoableSubChangeListener event interface provides notification of * impending (vetoable) changes to sub-traits and is also used to notify * listeners of vetoed changes ("undos"). * * This interface represents vetoable events; the change notifications * are made before the changes are made. * * @version 0.50, 07/27/98 created from SubChangeListener * @author Cameron Purdy */ public interface VetoableSubChangeListener extends EventListener { /** * Invoked before a sub-trait is modified, added, removed, or un-removed. * * @param evt a SubChangeEvent object describing the event source and * the sub trait as well as the action being taken */ void vetoableSubChange(SubChangeEvent evt) throws PropertyVetoException; }
oracle/coherence
1,097
prj/coherence-core/src/main/java/com/tangosol/dev/assembler/Ifle.java
/* * Copyright (c) 2000, 2020, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.tangosol.dev.assembler; import java.io.IOException; import java.io.DataInput; import java.io.DataOutput; /** * The IFLE op branches to the label if the top integer on the stack is less * than or equal to zero. * <p><code><pre> * JASM op : IFLE (0x9e) * JVM byte code(s): IFLE (0x9e) * Details : * </pre></code> * * @version 0.50, 06/14/98, assembler/dis-assembler * @author Cameron Purdy */ public class Ifle extends OpBranch implements Constants { // ----- constructors --------------------------------------------------- /** * Construct the op. * * @param label the label to branch to */ public Ifle(Label label) { super(IFLE, label); } // ----- data members --------------------------------------------------- /** * The name of this class. */ private static final String CLASS = "Ifle"; }
apache/commons-math
1,094
commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/genetics/Fitness.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.legacy.genetics; /** * Fitness of a chromosome. * * @since 2.0 */ public interface Fitness { /** * Compute the fitness. This is usually very time-consuming, so the value should be cached. * @return fitness */ double fitness(); }
apache/cxf
1,100
systests/tracing/src/test/java/org/apache/cxf/systest/jaxws/tracing/BookStoreService.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.systest.jaxws.tracing; import java.util.Collection; import jakarta.jws.WebService; import org.apache.cxf.systest.Book; @WebService public interface BookStoreService { Collection< Book > getBooks(); int removeBooks(); void addBooks(); void orderBooks(); }
apache/cxf
1,103
rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/spring/NamespaceHandler.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.binding.coloc.spring; import org.springframework.beans.factory.xml.NamespaceHandlerSupport; public class NamespaceHandler extends NamespaceHandlerSupport { public void init() { registerBeanDefinitionParser("enableColoc", new ColocBeanDefinitionParser()); } }
apache/cxf
1,106
rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/dto/MapDTO.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.aegis.type.java5.dto; import java.util.Map; public class MapDTO { Map<String, Integer> strings; public Map<String, Integer> getStrings() { return strings; } public void setStrings(Map<String, Integer> strings) { this.strings = strings; } }
apache/cxf
1,112
rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/StreamingResponse.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.jaxrs.ext; import java.io.IOException; import java.io.OutputStream; public interface StreamingResponse<T> { interface Writer<T> { void write(T data) throws IOException; OutputStream getEntityStream(); } void writeTo(Writer<T> writer) throws IOException; }
apache/directory-kerby
1,086
kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/kdc/EncAsRepPart.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.kerberos.kerb.type.kdc; /** EncASRepPart ::= [APPLICATION 25] EncKDCRepPart */ public class EncAsRepPart extends EncKdcRepPart { public static final int TAG = 25; public EncAsRepPart() { super(TAG); } }
apache/drill
1,127
exec/rpc/src/main/java/org/apache/drill/exec/rpc/RpcOutcome.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.drill.exec.rpc; import io.netty.buffer.ByteBuf; public interface RpcOutcome<T> { static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(RpcOutcome.class); public void set(Object value, ByteBuf buffer); public void setException(Throwable t); public Class<T> getOutcomeType(); }
apache/dubbo
1,084
dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/HttpInputMessage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.remoting.http12; import java.io.IOException; import java.io.InputStream; public interface HttpInputMessage extends AutoCloseable { InputStream getBody(); @Override default void close() throws IOException { getBody().close(); } }
apache/eagle
1,092
eagle-jpm/eagle-jpm-mr-history/src/main/java/org/apache/eagle/jpm/mr/history/parser/RecordTypes.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eagle.jpm.mr.history.parser; /** * Record types are identifiers for each line of log in history files. * A record type appears as the first token in a single line of log. */ public enum RecordTypes { Jobtracker, Job, Task, MapAttempt, ReduceAttempt, Meta }
apache/eagle
1,098
eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/DefaultJobIdPartitioner.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eagle.jpm.util; public class DefaultJobIdPartitioner implements JobIdPartitioner { @Override public int partition(int numTotalParts, String jobId) { int hash = jobId.hashCode(); hash = Math.abs(hash); return hash % numTotalParts; } }
apache/felix-dev
1,039
ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/main/java/org/apache/felix/ipojo/runtime/core/test/components/inner/C2.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.ipojo.runtime.core.test.components.inner; import org.apache.felix.ipojo.runtime.core.test.services.Call; public class C2 { private Call c1; public String authenticate() { return c1.callMe(); } }
apache/felix-dev
1,090
healthcheck/annotation/src/main/java/org/apache/felix/hc/annotation/HealthCheckService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The SF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ package org.apache.felix.hc.annotation; import org.osgi.service.component.annotations.ComponentPropertyType; @ComponentPropertyType public @interface HealthCheckService { public static final String PREFIX_ = "hc."; String name() default ""; String[] tags() default {}; }
apache/felix-dev
1,099
rootcause/src/test/java/org/apache/felix/rootcause/examples/CompWithoutService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.rootcause.examples; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; @Component( name = "CompWithoutService" ) public class CompWithoutService { @Reference Runnable dummy; }
apache/flink
1,105
flink-runtime/src/main/java/org/apache/flink/runtime/shuffle/PartitionWithMetrics.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.runtime.shuffle; import java.io.Serializable; /** Interface representing the description and metrics of a result partition. */ public interface PartitionWithMetrics extends Serializable { ShuffleMetrics getPartitionMetrics(); ShuffleDescriptor getPartition(); }
apache/geaflow
1,062
geaflow-console/app/core/model/src/main/java/org/apache/geaflow/console/core/model/metric/GeaflowMetricQueryRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.geaflow.console.core.model.metric; import java.util.List; import lombok.Getter; import lombok.Setter; @Setter @Getter public class GeaflowMetricQueryRequest { long start; long end; List<GeaflowMetricQuery> queries; }