repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/cxf
1,044
tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/model/XService.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.tools.validator.internal.model; import org.apache.cxf.wsdl.WSDLConstants; public final class XService extends XWsdl { public XService() { super(); setQName(WSDLConstants.QNAME_SERVICE); } }
apache/druid
1,055
server/src/main/java/org/apache/druid/server/security/AllowAllAuthorizer.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.druid.server.security; public class AllowAllAuthorizer implements Authorizer { @Override public Access authorize(AuthenticationResult authenticationResult, Resource resource, Action action) { return Access.OK; } }
apache/dubbo
1,027
dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/ServiceDiscoveryService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.registry.client; public interface ServiceDiscoveryService { void register() throws RuntimeException; void update() throws RuntimeException; void unregister() throws RuntimeException; }
apache/dubbo
1,054
dubbo-common/src/main/java/org/apache/dubbo/rpc/model/BuiltinServiceDetector.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.rpc.model; import org.apache.dubbo.common.extension.ExtensionScope; import org.apache.dubbo.common.extension.SPI; @SPI(scope = ExtensionScope.FRAMEWORK) public interface BuiltinServiceDetector { Class<?> getService(); }
apache/dubbo
1,063
dubbo-common/src/test/java/org/apache/dubbo/rpc/support/DemoService1.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.rpc.support; import org.apache.dubbo.common.stream.StreamObserver; public interface DemoService1 { StreamObserver<String> sayHello(StreamObserver<String> request); void sayHello(String msg, StreamObserver<String> request); }
apache/flink
1,024
flink-table/flink-table-common/src/main/java/org/apache/flink/table/data/columnar/vector/ByteColumnVector.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.table.data.columnar.vector; import org.apache.flink.annotation.Internal; /** Byte column vector. */ @Internal public interface ByteColumnVector extends ColumnVector { byte getByte(int i); }
apache/flink
1,024
flink-table/flink-table-common/src/main/java/org/apache/flink/table/data/columnar/vector/LongColumnVector.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.table.data.columnar.vector; import org.apache.flink.annotation.Internal; /** Long column vector. */ @Internal public interface LongColumnVector extends ColumnVector { long getLong(int i); }
apache/freemarker
1,055
freemarker-jython20/src/main/java/freemarker/ext/ant/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. */ /** * <a href="http://jakarta.apache.org/ant" target="_blank">Ant task</a> to transform XML files * with a template; a more powerful alternative is <a href="http://fmpp.sourceforge.net/" target="_blank">FMPP</a>. */ package freemarker.ext.ant;
apache/geaflow
1,028
geaflow-console/app/biz/shared/src/main/java/org/apache/geaflow/console/biz/shared/InstallManager.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.biz.shared; import org.apache.geaflow.console.biz.shared.view.InstallView; public interface InstallManager { InstallView get(); boolean install(InstallView installView); }
apache/geode
1,080
geode-junit/src/main/java/util/TestException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package util; public class TestException extends Error { public TestException(String message, Throwable cause) { super(message, cause); } public TestException(String name) { super(name); } public TestException(StringBuilder name) { super(name.toString()); } }
apache/groovy
1,036
subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/groovydoc/GroovyParameter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.codehaus.groovy.groovydoc; public interface GroovyParameter { GroovyAnnotationRef[] annotations(); String name(); GroovyType type(); String typeName(); String defaultValue(); }
apache/hadoop-common
1,027
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/compress/bzip2/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. */ @InterfaceAudience.Private @InterfaceStability.Unstable package org.apache.hadoop.io.compress.bzip2; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop-hdfs
1,058
src/test/hdfs/org/apache/hadoop/hdfs/TestFileCreationNamenodeRestart.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hdfs; public class TestFileCreationNamenodeRestart extends junit.framework.TestCase { public void testFileCreationNamenodeRestart() throws Exception { new TestFileCreation().xxxtestFileCreationNamenodeRestart(); } }
apache/hadoop
1,041
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/test/HFSTestCase.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.test; import org.junit.jupiter.api.extension.RegisterExtension; public abstract class HFSTestCase extends HTestCase { @RegisterExtension public TestHdfsHelper hdfsTestHelper = new TestHdfsHelper(); }
apache/hadoop
1,047
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/jmx/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. */ /** * This package provides access to JMX primarily through the * {@link org.apache.hadoop.jmx.JMXJsonServlet} class. */ @InterfaceAudience.Private package org.apache.hadoop.jmx; import org.apache.hadoop.classification.InterfaceAudience;
apache/harmony
1,025
drlvm/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/parser/InterimGenericArrayType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.harmony.lang.reflect.parser; /** * @author Serguei S. Zapreyev */ public final class InterimGenericArrayType implements InterimGenericType, InterimType { public InterimType nextLayer; }
apache/hbase
1,052
hbase-client/src/main/java/org/apache/hadoop/hbase/client/CompactionState.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hbase.client; import org.apache.yetus.audience.InterfaceAudience; /** * POJO representing the compaction state */ @InterfaceAudience.Public public enum CompactionState { NONE, MINOR, MAJOR, MAJOR_AND_MINOR }
apache/helix
1,054
helix-core/src/main/java/org/apache/helix/manager/zk/PathBasedZkSerializer.java
package org.apache.helix.manager.zk; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Use PathBasedZkSerializer in zookeeper-api module instead. */ @Deprecated public interface PathBasedZkSerializer extends org.apache.helix.zookeeper.zkclient.serialize.PathBasedZkSerializer { }
apache/hive
1,062
ql/src/java/org/apache/hadoop/hive/ql/io/esriJson/UnenclosedJsonInputFormat.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hive.ql.io.esriJson;// package org.apache.hadoop.hive.esri.hadoop; // Obsolete - @Deprecated in v1.2 - superseded by UnenclosedEsriJsonInputFormat // public class UnenclosedJsonInputFormat extends UnenclosedEsriJsonInputFormat {}
apache/hive
1,064
ql/src/test/org/apache/hadoop/hive/ql/exec/util/DescriptionTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hive.ql.exec.util; import org.apache.hadoop.hive.conf.HiveConf; public abstract class DescriptionTest { public final HiveConf hiveConf; public DescriptionTest ( HiveConf hiveConf) { this.hiveConf = hiveConf; } }
apache/hudi
1,030
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/versioning/DefaultInstantFileNameParser.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hudi.common.table.timeline.versioning; import org.apache.hudi.common.table.timeline.versioning.v2.InstantFileNameParserV2; public class DefaultInstantFileNameParser extends InstantFileNameParserV2 { }
apache/hudi
1,057
hudi-trino-plugin/src/main/java/io/trino/plugin/hudi/ForHudiSplitSource.java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.trino.plugin.hudi; import com.google.inject.BindingAnnotation; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.RUNTIME; @Retention(RUNTIME) @Target({FIELD, PARAMETER, METHOD}) @BindingAnnotation public @interface ForHudiSplitSource {}
apache/ignite
1,035
modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/CancellableTask.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ignite.internal.processors.query.stat; /** * Runnable task with cancel method. */ public interface CancellableTask extends Runnable { /** * Cancel task execution. */ public void cancel(); }
apache/ignite
1,038
docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/services/EchoService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ignite.examples; import org.apache.ignite.services.Service; public interface EchoService extends Service { /** * Shows how to read parameter implicitly passed to the service. */ String hello(); }
apache/ignite
1,040
modules/core/src/main/java/org/apache/ignite/configuration/CommunicationFailureResolver.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ignite.configuration; /** * Communication Failure Resolver. */ public interface CommunicationFailureResolver { /** * @param ctx Context. */ public void resolve(CommunicationFailureContext ctx); }
apache/incubator-atlas
1,026
graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasSchemaViolationException.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.atlas.repository.graphdb; /** * */ public class AtlasSchemaViolationException extends RuntimeException { public AtlasSchemaViolationException(Throwable cause) { super(cause); } }
apache/incubator-datalab
1,025
services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/Constants.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.epam.datalab.backendapi.core; public class Constants { public static final String JSON_EXTENSION = ".json"; public static final String LOG_EXTENSION = ".log"; private Constants() { } }
apache/incubator-heron
1,062
heron/api/src/java/org/apache/heron/api/spout/Scheme.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.heron.api.spout; import java.io.Serializable; import java.util.List; import org.apache.heron.api.tuple.Fields; public interface Scheme extends Serializable { List<Object> deserialize(byte[] ser); Fields getOutputFields(); }
apache/incubator-kie-drools
1,055
kie-api/src/main/java/org/kie/api/conf/KieBaseOption.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.api.conf; import org.kie.api.KieBase; /** * A markup interface for {@link KieBase} options. */ public interface KieBaseOption extends Option { String TYPE = "Base"; default String type() { return TYPE; } }
apache/incubator-retired-slider
1,032
slider-core/src/main/java/org/apache/slider/core/conf/InputPropertiesValidator.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.slider.core.conf; import org.apache.slider.core.exceptions.BadConfigException; /** * */ public interface InputPropertiesValidator { void validate(ConfTreeOperations props) throws BadConfigException; }
apache/incubator-seata
1,047
core/src/main/java/org/apache/seata/core/store/db/DataSourceProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seata.core.store.db; import javax.sql.DataSource; /** * The datasource provider */ public interface DataSourceProvider { /** * provide the datasource * @return datasource */ DataSource provide(); }
apache/incubator-tez
1,047
tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGAppMasterEvent.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tez.dag.app.dag.event; import org.apache.hadoop.yarn.event.AbstractEvent; public class DAGAppMasterEvent extends AbstractEvent<DAGAppMasterEventType> { public DAGAppMasterEvent(DAGAppMasterEventType type) { super(type); } }
apache/inlong
1,034
inlong-audit/audit-service/src/main/java/org/apache/inlong/audit/service/entities/Heartbeat.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.inlong.audit.service.entities; import lombok.AllArgsConstructor; import lombok.Data; @Data @AllArgsConstructor public class Heartbeat { private String component; private String host; private int port; }
apache/jena
1,066
jena-arq/src/main/java/org/apache/jena/sparql/expr/FunctionLabel.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.sparql.expr; import org.apache.jena.sparql.util.Symbol ; public class FunctionLabel extends Symbol { public FunctionLabel(String name) { super(name) ; } public FunctionLabel(FunctionLabel other) { super(other) ; } }
apache/jena
1,066
jena-tdb2/src/test/java/org/apache/jena/tdb2/TS_TDB2Factory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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; import org.junit.platform.suite.api.SelectClasses; import org.junit.platform.suite.api.Suite; @Suite @SelectClasses({ TestDatabaseMgr.class , TestTDBFactory.class , TestTDB2.class }) public class TS_TDB2Factory {}
apache/jena
1,069
jena-arq/src/test/java/org/apache/jena/sparql/sse/TS_SSE.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.sparql.sse; import org.junit.platform.suite.api.SelectClasses; import org.junit.platform.suite.api.Suite; @Suite @SelectClasses({ TestSSE_Basic.class , TestSSE_Forms.class , TestSSE_Builder.class }) public class TS_SSE { }
apache/jmeter
1,046
src/components/src/main/java/org/apache/jmeter/visualizers/JSR223ListenerBeanInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jmeter.visualizers; import org.apache.jmeter.util.JSR223BeanInfoSupport; public class JSR223ListenerBeanInfo extends JSR223BeanInfoSupport { public JSR223ListenerBeanInfo() { super(JSR223Listener.class); } }
apache/kafka
1,047
clients/src/main/java/org/apache/kafka/clients/admin/DescribeReplicaLogDirsOptions.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.clients.admin; import java.util.Collection; /** * Options for {@link Admin#describeReplicaLogDirs(Collection)}. */ public class DescribeReplicaLogDirsOptions extends AbstractOptions<DescribeReplicaLogDirsOptions> { }
apache/kafka
1,053
clients/src/main/java/org/apache/kafka/common/errors/UnknownTopicIdException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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 UnknownTopicIdException extends InvalidMetadataException { private static final long serialVersionUID = 1L; public UnknownTopicIdException(String message) { super(message); } }
apache/kylin
1,045
src/core-metadata/src/main/java/org/apache/kylin/source/adhocquery/IPushDownConverter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kylin.source.adhocquery; /** * convert the query to satisfy the parser of push down query engine */ public interface IPushDownConverter { String convert(String originSql, String project, String defaultSchema); }
apache/logging-log4j1
1,069
src/main/java/org/apache/log4j/jmx/MethodUnion.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.log4j.jmx; import java.lang.reflect.Method; class MethodUnion { Method readMethod; Method writeMethod; MethodUnion( Method readMethod, Method writeMethod) { this.readMethod = readMethod; this.writeMethod = writeMethod; } }
apache/lucene
1,048
lucene/core/src/test/org/apache/lucene/codecs/compressing/TestHighCompressionMode.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.lucene.codecs.compressing; public class TestHighCompressionMode extends AbstractTestCompressionMode { @Override public void setUp() throws Exception { super.setUp(); mode = CompressionMode.HIGH_COMPRESSION; } }
apache/metron
1,026
metron-contrib/metron-performance/src/main/java/org/apache/metron/performance/sampler/UnbiasedSampler.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.performance.sampler; import java.util.Random; public class UnbiasedSampler implements Sampler { @Override public int sample(Random rng, int limit) { return rng.nextInt(limit); } }
apache/openwebbeans
1,030
webbeans-impl/src/test/java/org/apache/webbeans/test/component/exception/InnerComponent.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.webbeans.test.component.exception; public class InnerComponent { /** * only static inner classes get picked up as CDI beans as per 3.1.1 */ public class InnerInnerComponent { } }
apache/ozone
1,050
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/S3SecretFunction.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.ozone.om; import java.io.IOException; /** * Functional interface for s3 secret locked actions. * @param <T> */ public interface S3SecretFunction<T> { T accept(S3SecretManager s3SecretManager) throws IOException; }
apache/paimon
1,055
paimon-common/src/main/java/org/apache/paimon/utils/FunctionWithIOException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.paimon.utils; import java.io.IOException; /** A {@link FunctionWithException} with {@link IOException}. */ @FunctionalInterface public interface FunctionWithIOException<T, R> extends FunctionWithException<T, R, IOException> {}
apache/paimon
1,071
paimon-api/src/main/java/org/apache/paimon/rest/RESTMessage.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.paimon.rest; import org.apache.paimon.shade.jackson2.com.fasterxml.jackson.annotation.JsonIgnoreProperties; /** Interface to mark both REST requests and responses. */ @JsonIgnoreProperties(ignoreUnknown = true) public interface RESTMessage {}
apache/pig
1,073
src/org/apache/pig/impl/streaming/StreamingUDFInputHandler.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.impl.streaming; import org.apache.pig.PigStreamingBase; public class StreamingUDFInputHandler extends DefaultInputHandler { public StreamingUDFInputHandler(PigStreamingBase serializer) { this.serializer = serializer; } }
apache/pulsar-manager
1,045
src/main/java/org/apache/pulsar/manager/entity/ReplicationsStatsRepository.java
/** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.pulsar.manager.entity; import com.github.pagehelper.Page; import org.springframework.stereotype.Repository; @Repository public interface ReplicationsStatsRepository { long save(ReplicationStatsEntity replicationStatsEntity); Page<ReplicationStatsEntity> findByTopicStatsId(Integer pageNum, Integer pageSize, long topicStatsId, long timestamp); void remove(long timestamp, long timeInterval); }
apache/pulsar
1,050
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/HashRangeAssignment.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pulsar.broker.service; import org.apache.pulsar.client.api.Range; /** * Hash range assignment in {@link StickyKeyConsumerSelector} implementations. */ public record HashRangeAssignment(Range range, Consumer consumer) {}
apache/ratis
1,047
ratis-common/src/main/java/org/apache/ratis/protocol/exceptions/StaleReadException.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ratis.protocol.exceptions; /** * This exception indicates the failure of a stale-read. */ public class StaleReadException extends RaftException { public StaleReadException(String message) { super(message); } }
apache/ratis
1,055
ratis-server-api/src/main/java/org/apache/ratis/server/DataStreamServer.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ratis.server; import java.io.Closeable; /** * Interface for streaming server. */ public interface DataStreamServer extends Closeable { /** * Get network interface for server. */ DataStreamServerRpc getServerRpc(); }
apache/reef
1,050
lang/java/reef-wake/wake/src/main/java/org/apache/reef/wake/rx/StaticObservable.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.reef.wake.rx; /** * Defines a "static" provider for push-based notification. * Observers are statically configured in constructing a static observable object. */ public interface StaticObservable extends Observable { }
apache/samza
1,052
samza-core/src/main/java/org/apache/samza/table/batching/CompactBatchProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.samza.table.batching; public class CompactBatchProvider<K, V, U> extends BatchProvider<K, V, U> { @Override public Batch<K, V, U> getBatch() { return new CompactBatch<>(getMaxBatchSize(), getMaxBatchDelay()); } }
apache/seatunnel
1,033
seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SupportMultiTableSinkAggregatedCommitter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seatunnel.api.sink; /** The Sink Aggregated Committer which support multi table should implement this interface */ public interface SupportMultiTableSinkAggregatedCommitter<T> extends SupportResourceShare<T> {}
apache/shardingsphere
1,033
mode/core/src/main/java/org/apache/shardingsphere/mode/exclusive/ExclusiveOperation.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shardingsphere.mode.exclusive; /** * Exclusive operation. */ public interface ExclusiveOperation { /** * Get operation name. * * @return operation name */ String getName(); }
apache/shindig
1,033
java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/ScriptConcatContentRewriterTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.shindig.gadgets.rewrite; import org.junit.Test; public class ScriptConcatContentRewriterTest { @Test public void implementIntegrationTests() throws Exception { // TODO: what the method says } }
apache/shiro
1,043
support/jakarta-ee/src/main/java/org/apache/shiro/ee/faces/tags/SecureTagHandler.java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shiro.ee.faces.tags; import org.apache.shiro.SecurityUtils; import org.apache.shiro.subject.Subject; import javax.faces.view.facelets.TagConfig; import javax.faces.view.facelets.TagHandler; /** * Base class for all TagHandlers */ public abstract class SecureTagHandler extends TagHandler { public SecureTagHandler(TagConfig config) { super(config); } protected Subject getSubject() { return SecurityUtils.getSubject(); } }
apache/sqoop
1,062
src/test/org/apache/sqoop/testcategories/thirdpartytest/OracleEeTest.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.sqoop.testcategories.thirdpartytest; /** * An Oracle EE test shall test scenarios where a Oracle Enterprise Edition database is needed, * for example because of partitioning. */ public interface OracleEeTest extends OracleTest { }
apache/streampipes
1,035
streampipes-model/src/main/java/org/apache/streampipes/model/template/PipelinePlaceholders.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.template; import java.util.List; public record PipelinePlaceholders(List<String> requiredStreamInputs, List<PipelinePlaceholderConfig> requiredConfigs) { }
apache/struts
1,024
plugins/bean-validation/src/test/java/org/apache/struts/beanvalidation/actions/ModelDrivenActionInterface.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.struts.beanvalidation.actions; import org.apache.struts2.interceptor.validation.SkipValidation; public interface ModelDrivenActionInterface { @SkipValidation String skipMeByInterface(); }
apache/synapse
1,052
modules/core/src/main/java/org/apache/synapse/config/xml/IEntrySerializer.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.synapse.config.xml; import org.apache.axiom.om.OMElement; import org.apache.synapse.config.Entry; public interface IEntrySerializer { public OMElement serializeEntry(Entry entry, OMElement parent); }
apache/syncope
1,025
core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/repo/CASSPClientAppRepoExt.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.core.persistence.jpa.dao.repo; import org.apache.syncope.core.persistence.api.entity.am.CASSPClientApp; public interface CASSPClientAppRepoExt extends ClientAppRepoExt<CASSPClientApp> { }
apache/syncope
1,032
core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/am/OIDCJWKS.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.core.persistence.api.entity.am; import org.apache.syncope.core.persistence.api.entity.Entity; public interface OIDCJWKS extends Entity { String getJson(); void setJson(String json); }
apache/syncope
1,034
core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/ConnInstanceDAO.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.core.persistence.api.dao; import org.apache.syncope.core.persistence.api.entity.ConnInstance; public interface ConnInstanceDAO extends DAO<ConnInstance> { ConnInstance authFind(String key); }
apache/tajo
1,061
tajo-common/src/main/java/org/apache/tajo/annotation/NotThreadSafe.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tajo.annotation; import java.lang.annotation.*; /** * The type to which this annotation is applied is not thread-safe. */ @Documented @Target(ElementType.TYPE) @Retention(RetentionPolicy.CLASS) public @interface NotThreadSafe { }
apache/tapestry-5
1,027
tapestry-spring/src/test/java/org/example/testapp/services/SpringStatusProviderFactory.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.example.testapp.services; import org.springframework.beans.factory.FactoryBean; public class SpringStatusProviderFactory implements FactoryBean { @Override public Object getObject() throws Exception { return null; } @Override public Class getObjectType() { return null; } @Override public boolean isSingleton() { return false; } }
apache/tika
1,068
tika-core/src/main/java/org/apache/tika/renderer/RenderingState.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tika.renderer; /** * This should be to track state for each file (embedded or otherwise). * This should be reset in the parseContext at the beginning of a parse * and then replaced at the end of the parse. */ public class RenderingState { }
apache/tomcat
1,083
java/jakarta/websocket/HandshakeResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package jakarta.websocket; import java.util.List; import java.util.Map; public interface HandshakeResponse { /** * Name of the WebSocket accept HTTP header. */ String SEC_WEBSOCKET_ACCEPT = "Sec-WebSocket-Accept"; Map<String,List<String>> getHeaders(); }
apache/tomcat80
1,078
java/org/apache/catalina/ThreadBindingListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.catalina; /** * Callback for establishing naming association when entering the application * scope. This corresponds to setting the context classloader. */ public interface ThreadBindingListener { public void bind(); public void unbind(); }
apache/tomcat80
1,081
java/javax/persistence/PersistenceProperty.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package javax.persistence; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({}) @Retention(RetentionPolicy.RUNTIME) public @interface PersistenceProperty { String name(); String value(); }
apache/tomcat80
1,090
test/org/apache/el/TesterBeanEnum.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.el; public class TesterBeanEnum { private volatile TesterEnum lastSubmitted = null; public void submit(TesterEnum testerEnum) { this.lastSubmitted = testerEnum; } public TesterEnum getLastSubmitted() { return lastSubmitted; } }
apache/tomee
1,029
container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/event/AssemblerCreated.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.assembler.classic.event; import org.apache.openejb.observer.Event; @Event public class AssemblerCreated { @Override public String toString() { return "AssemblerCreated{}"; } }
apache/tomee
1,031
container/openejb-core/src/test/java/org/apache/openejb/interceptors/MethodLevelInterceptorOnlyParent.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.interceptors; import java.util.List; public interface MethodLevelInterceptorOnlyParent extends MethodLevelInterceptorOnlyIntf<String> { public List<String> makePersistent(String entity); }
apache/tomee
1,041
container/openejb-core/src/test/java/org/apache/openejb/interceptors/FullyIntercepted.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.interceptors; import java.util.List; /** * @version $Rev$ $Date$ */ public interface FullyIntercepted { List<String> businessMethod(); List<String> methodWithDefaultInterceptorsExcluded(); }
apache/tomee
1,045
itests/openejb-itests-client/src/main/java/org/apache/openejb/test/TestServer.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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; import java.util.Properties; /** * @version $Rev$ $Date$ */ public interface TestServer { void init(Properties props); void start(); void stop(); Properties getContextEnvironment(); }
apache/tomee
1,047
examples/simple-webservice/src/main/java/org/superbiz/calculator/ws/CalculatorWs.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.superbiz.calculator.ws; import jakarta.jws.WebService; @WebService(targetNamespace = "http://superbiz.org/wsdl") public interface CalculatorWs { public int sum(int add1, int add2); public int multiply(int mul1, int mul2); }
apache/wicket
1,040
wicket-core-tests/src/test/java/org/apache/wicket/core/util/tester/apps_2/RedirectPage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.core.util.tester.apps_2; import org.apache.wicket.markup.html.WebPage; /** * * @author Juergen Donnerstag */ public class RedirectPage extends WebPage { private static final long serialVersionUID = 1L; }
apache/wicket
1,054
wicket-core-tests/src/test/java/org/apache/wicket/LoginPage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket; import org.apache.wicket.markup.html.WebPage; /** * @author jcompagner */ public class LoginPage extends WebPage { private static final long serialVersionUID = 1L; /** * Construct. */ public LoginPage() { } }
apache/xmlgraphics-batik
1,045
batik-dom/src/main/java/org/apache/batik/dom/xbl/XBLShadowTreeElement.java
/* * Copyright (c) 2005 World Wide Web Consortium, * * (Massachusetts Institute of Technology, European Research Consortium for * Informatics and Mathematics, Keio University). All Rights Reserved. This * work is distributed under the W3C(r) Software License [1] 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. * * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 * * Modifications: * * September 10, 2005 * Placed interface in org.apache.batik.dom.xbl for the time being. * Added javadocs. */ package org.apache.batik.dom.xbl; import org.w3c.dom.Element; /** * The interface for xbl:shadowTree elements. * Eventually will move to org.w3c.dom.xbl (or some such package). * * @version $Id$ */ public interface XBLShadowTreeElement extends Element { /** * Returns the Element that has an ID attribute with the given value. */ Element getElementById(String elementId); }
google/agera
1,071
agera/src/main/java/com/google/android/agera/Supplier.java
/* * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.android.agera; import android.support.annotation.NonNull; /** * A supplier of data. Semantically, this could be a factory, generator, builder, or something else * entirely. No guarantees are implied by this interface. */ public interface Supplier<T> { /** * Returns an instance of the appropriate type. The returned object may or may not be a new * instance, depending on the implementation. */ @NonNull T get(); }
google/bindiff
1,028
java/zylib/src/main/java/com/google/security/zynamics/zylib/general/comparators/HexStringComparator.java
// Copyright 2011-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.zylib.general.comparators; import com.google.security.zynamics.zylib.disassembly.CAddress; import java.util.Comparator; /** Compares two hexadecimal strings, typically memory addresses. */ public class HexStringComparator implements Comparator<String> { @Override public int compare(final String o1, final String o2) { return new CAddress(o1, 16).compareTo(new CAddress(o2, 16)); } }
google/binnavi
1,026
src/main/java/com/google/security/zynamics/binnavi/Gui/GraphWindows/Panels/IPerspectiveModelListener.java
// Copyright 2011-2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.binnavi.Gui.GraphWindows.Panels; /** * This interface can be implemented by objects that want to be notified about changes in the active * perspective. */ public interface IPerspectiveModelListener { /** * Invoked after the active perspective changed. * * @param activePerspective The new active perspective. */ void changedActivePerspective(PerspectiveType activePerspective); }
google/caliper
1,064
caliper-api/src/main/java/com/google/caliper/api/AfterRep.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.caliper.api; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; import com.google.common.annotations.Beta; import java.lang.annotation.Retention; import java.lang.annotation.Target; /** * Apply this annotation to any method without parameters to have it run after each rep of a {@link * Macrobenchmark}. */ @Retention(RUNTIME) @Target(METHOD) @Beta public @interface AfterRep {}
google/CallBuilder
1,078
java/com/google/callbuilder/CallBuilderBinary.java
/* * Copyright (C) 2015 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.callbuilder; /** * This class is only here so that we can create a {@code java_binary} target which bundles up all * the transitive dependencies needed to release as a single jar. This is a hack until Bazel * supports the same functionality with a {@code java_plugin} target, or a similar feature. */ public class CallBuilderBinary { private CallBuilderBinary() {} public static void main(String[] args) { throw new UnsupportedOperationException(); } }
google/closure-stylesheets
1,058
src/com/google/common/css/IdentitySubstitutionMap.java
/* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.common.css; import com.google.common.base.Preconditions; /** * {@link IdentitySubstitutionMap} is a trivial implementation of * {@link SubstitutionMap} that returns the key as the value for the requested * key. * * @author bolinfest@google.com (Michael Bolin) */ public class IdentitySubstitutionMap implements SubstitutionMap { @Override public String get(String key) { Preconditions.checkNotNull(key); return key; } }
google/closure-templates
1,055
java/src/com/google/template/soy/parseinfo/TemplateName.java
/* * Copyright 2021 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.template.soy.parseinfo; import com.google.auto.value.AutoValue; import com.google.errorprone.annotations.DoNotMock; import com.google.errorprone.annotations.Immutable; /** Opaque string representation of the name of a Soy template. */ @DoNotMock @AutoValue @Immutable public abstract class TemplateName { public static TemplateName of(String name) { return new AutoValue_TemplateName(name); } public abstract String name(); }
google/differential-privacy
1,043
java/main/com/google/privacy/differentialprivacy/ConfidenceInterval.java
// // Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // package com.google.privacy.differentialprivacy; import com.google.auto.value.AutoValue; /** Stores the upper and lower bounds of a confidence interval. */ @AutoValue public abstract class ConfidenceInterval { public static ConfidenceInterval create(double lowerBound, double upperBound) { return new AutoValue_ConfidenceInterval(lowerBound, upperBound); } public abstract double lowerBound(); public abstract double upperBound(); }
google/j2cl
1,077
jre/java/javaemul/internal/annotations/KtDisabled.java
/* * Copyright 2022 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 javaemul.internal.annotations; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Disables the method in Kotlin by generating empty body for void methods, or returning default * value for non-void methods. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @Documented public @interface KtDisabled {}
google/nomulus
1,061
core/src/test/java/google/registry/whois/WhoisTestData.java
// Copyright 2017 The Nomulus Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package google.registry.whois; import google.registry.testing.TestDataHelper; /** Test helper methods for the whois package. */ final class WhoisTestData { /** * Loads test data from file in {@code testdata/} directory, "fixing" newlines to have the ending * that WHOIS requires. */ static String loadFile(String filename) { return TestDataHelper.loadFile(WhoisTestData.class, filename).replaceAll("\r?\n", "\r\n"); } }
googleads/googleads-java-lib
1,028
modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/UsesAdsUtilities.java
// Copyright 2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.api.ads.common.lib.utils; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.Target; /** * Annotation for methods that represent the usage of an {@link AdsUtility}. */ @Retention(RUNTIME) @Target({ElementType.METHOD}) public @interface UsesAdsUtilities { AdsUtility[] value(); }
googlearchive/android-AppShortcuts
1,046
app/src/main/java/com/example/android/appshortcuts/Utils.java
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.android.appshortcuts; import android.content.Context; import android.os.Handler; import android.os.Looper; import android.widget.Toast; public class Utils { private Utils() { } public static void showToast(Context context, String message) { new Handler(Looper.getMainLooper()).post(() -> { Toast.makeText(context, message, Toast.LENGTH_SHORT).show(); }); } }
hibernate/hibernate-orm
1,059
hibernate-core/src/main/java/org/hibernate/metamodel/package-info.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ /** * This package defines an API for accessing the runtime metamodel describing persistent * entities in Java and their mappings to the relational database schema. * <p> * The runtime metamodel may be divided into two layers: * <ul> * <li>The {@linkplain org.hibernate.metamodel.model.domain domain metamodel}, which is * an extension of the {@linkplain jakarta.persistence.metamodel JPA metamodel} and * is used in {@linkplain org.hibernate.query query} handling. This layer contains * information about Java classes, but not about their mappings to the database. * <li>The {@linkplain org.hibernate.metamodel.mapping mapping metamodel}, which describes * the application domain model and its mapping to the database. It is distinct from * the JPA metamodel, which does not contain this O/R mapping information. * </ul> * @author Steve Ebersole */ @Incubating package org.hibernate.metamodel; import org.hibernate.Incubating;
hibernate/hibernate-tools
1,029
jbt/src/main/java/org/hibernate/tool/orm/jbt/api/wrp/ForeignKeyWrapper.java
/* * Hibernate Tools, Tooling for your Hibernate Projects * * Copyright 2024-2025 Red Hat, 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 org.hibernate.tool.orm.jbt.api.wrp; import java.util.Iterator; import java.util.List; public interface ForeignKeyWrapper extends Wrapper { TableWrapper getReferencedTable(); Iterator<ColumnWrapper> columnIterator(); boolean isReferenceToPrimaryKey(); List<ColumnWrapper> getReferencedColumns(); boolean containsColumn(ColumnWrapper column); }
openjdk/jdk8
1,081
jdk/test/java/lang/reflect/Proxy/nonPublicProxy/p/Bar.java
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package p; interface Bar { }
openjdk/jdk8
1,081
jdk/test/java/lang/reflect/Proxy/nonPublicProxy/p/Foo.java
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package p; interface Foo { }
openjdk/jdk8
1,084
langtools/test/tools/javac/processing/filer/foo/Foo.java
/* * Copyright (c) 2006, 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 foo; public class Foo{}
openjdk/jdk8
1,093
langtools/test/tools/javah/T7126832/java.java
/* * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package xx; class java { int fred; }
oracle/coherence
1,035
prj/coherence-core/src/main/java/com/tangosol/dev/assembler/Monitorenter.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 MONITORENTER simple op enters a synchronized section of code. * <p><code><pre> * JASM op : MONITORENTER (0xc2) * JVM byte code(s): MONITORENTER (0xc2) * Details : * </pre></code> * * @version 0.50, 06/12/98, assembler/dis-assembler * @author Cameron Purdy */ public class Monitorenter extends Op implements Constants { // ----- constructors --------------------------------------------------- /** * Construct the op. */ public Monitorenter() { super(MONITORENTER); } // ----- data members --------------------------------------------------- /** * The name of this class. */ private static final String CLASS = "Monitorenter"; }
apache/commons-jcs
1,041
commons-jcs3-core/src/main/java/org/apache/commons/jcs3/engine/CacheStatus.java
package org.apache.commons.jcs3.engine; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.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. */ /** * Cache statuses * <p> */ public enum CacheStatus { /** Cache alive status. */ ALIVE, /** Cache disposed status. */ DISPOSED, /** Cache in error. */ ERROR }