repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/royale-compiler
1,025
compiler-jx/src/main/java/org/apache/royale/compiler/codegen/js/royale/IJSRoyaleEmitter.java
/* * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.royale.compiler.codegen.js.royale; import org.apache.royale.compiler.codegen.js.IJSEmitter; /** * @author Erik de Bruin */ public interface IJSRoyaleEmitter extends IJSEmitter { }
apache/samza
1,059
samza-core/src/main/java/org/apache/samza/task/TaskCallbackFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.task; /** * TaskCallbackFactory creates the {@link TaskCallback} for {@link org.apache.samza.container.TaskInstance} * to process asynchronously */ public interface TaskCallbackFactory { TaskCallback createCallback(); }
apache/servicecomb-java-chassis
1,033
core/src/main/java/org/apache/servicecomb/core/invocation/InvocationCreator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.core.invocation; import java.util.concurrent.CompletableFuture; import org.apache.servicecomb.core.Invocation; public interface InvocationCreator { CompletableFuture<Invocation> createAsync(); }
apache/solr
1,062
solr/core/src/java/org/apache/solr/spelling/suggest/fst/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. */ /** * Factories for {@linkplain org.apache.lucene.search.suggest.fst FST} and {@linkplain * org.apache.lucene.search.suggest.analyzing Analyzing} based {@link * org.apache.solr.spelling.suggest.Suggester}s */ package org.apache.solr.spelling.suggest.fst;
apache/storm
1,055
storm-client/src/jvm/org/apache/storm/trident/state/snapshot/Snapshottable.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version * 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package org.apache.storm.trident.state.snapshot; import org.apache.storm.trident.state.ValueUpdater; // used by Stream#persistentAggregate public interface Snapshottable<T> extends ReadOnlySnapshottable<T> { T update(ValueUpdater updater); void set(T o); }
apache/tajo
1,055
tajo-common/src/main/java/org/apache/tajo/util/graph/UndirectedGraph.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.util.graph; import org.apache.tajo.annotation.NotNull; import java.util.Collection; public interface UndirectedGraph<V, E> extends Graph<V, E> { Collection<E> getEdges(@NotNull V v); int getDegree(@NotNull V v); }
apache/tapestry-5
1,026
tapestry-core/src/test/java/org/apache/tapestry5/internal/services/CheckFieldType.java
// Copyright 2007 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.internal.services; import java.util.Map; public class CheckFieldType { private boolean _privateField; private final Map _map = null; public boolean isPrivateField() { return _privateField; } public void setPrivateField(boolean privateField) { _privateField = privateField; } public Map getMap() { return _map; } }
apache/tomcat80
1,065
test/org/apache/tomcat/util/http/parser/TestHttpParser.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tomcat.util.http.parser; import org.junit.Assert; import org.junit.Test; public class TestHttpParser { @Test public void testTokenDel() { Assert.assertFalse("DEL is not a token", HttpParser.isToken(127)); } }
apache/tomee
1,032
itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/singleton/RmiIiopSingletonHome.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.singleton; public interface RmiIiopSingletonHome extends jakarta.ejb.EJBHome { public RmiIiopSingletonObject create() throws jakarta.ejb.CreateException, java.rmi.RemoteException; }
apache/tomee
1,032
itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/RmiIiopStatelessHome.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.stateless; public interface RmiIiopStatelessHome extends jakarta.ejb.EJBHome { public RmiIiopStatelessObject create() throws jakarta.ejb.CreateException, java.rmi.RemoteException; }
apache/tomee
1,034
itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/singleton/BasicSingletonHome.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.singleton; public interface BasicSingletonHome extends jakarta.ejb.EJBHome { public BasicSingletonObject createObject() throws jakarta.ejb.CreateException, java.rmi.RemoteException; }
apache/tomee
1,034
itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/BasicStatelessHome.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.stateless; public interface BasicStatelessHome extends jakarta.ejb.EJBHome { public BasicStatelessObject createObject() throws jakarta.ejb.CreateException, java.rmi.RemoteException; }
apache/tomee
1,049
container/openejb-loader/src/main/java/org/apache/openejb/loader/ClassPath.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.loader; import java.io.File; import java.net.URL; public interface ClassPath { ClassLoader getClassLoader(); void addJarsToPath(File dir) throws Exception; void addJarToPath(URL dir) throws Exception; }
apache/uima-uimaj
1,053
uimaj-core/src/main/java/org/apache/uima/cas/impl/SofaFSImpl.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.uima.cas.impl; import org.apache.uima.cas.SofaFS; /** * v2 backwards compatibility * * @deprecated use Sofa instead * @forRemoval 4.0.0 */ @Deprecated(since = "3.0.0") public interface SofaFSImpl extends SofaFS { }
apache/uniffle
1,050
common/src/main/java/org/apache/uniffle/common/netty/protocol/Encodable.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.uniffle.common.netty.protocol; import io.netty.buffer.ByteBuf; import org.apache.uniffle.common.netty.EncodeException; public interface Encodable { int encodedLength(); void encode(ByteBuf buf) throws EncodeException; }
apache/usergrid
1,034
stack/services/src/main/java/org/apache/usergrid/services/generic/RootCollectionService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.usergrid.services.generic; import org.apache.usergrid.services.AbstractCollectionService; public class RootCollectionService extends AbstractCollectionService { public RootCollectionService() { } }
google/auto
1,045
factory/src/test/resources/good/FactoryImplementingGenericInterfaceExtension.java
/* * Copyright 2013 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 tests; import com.google.auto.factory.AutoFactory; import com.google.auto.factory.Provided; class FactoryImplementingGenericInterfaceExtension { @AutoFactory(implementing = MyFactory.class) FactoryImplementingGenericInterfaceExtension(@Provided String s, Integer i) {} interface MyFactory extends GenericFactory<FactoryImplementingGenericInterfaceExtension, Integer> {} interface GenericFactory<T, S> { T make(S arg); } }
google/auto
1,057
factory/src/test/resources/good/FactoryExtendingAbstractClassThrows.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 tests; import com.google.auto.factory.AutoFactory; import java.io.IOException; import tests.FactoryExtendingAbstractClassThrows.AbstractFactory; @AutoFactory(extending = AbstractFactory.class) final class FactoryExtendingAbstractClassThrows { FactoryExtendingAbstractClassThrows() throws IOException, InterruptedException {} abstract static class AbstractFactory { abstract FactoryExtendingAbstractClassThrows newInstance() throws Exception; } }
google/binnavi
1,028
src/main/java/com/google/security/zynamics/zylib/gui/scripting/InitStringFactory.java
// Copyright 2011-2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.zylib.gui.scripting; public class InitStringFactory { public static String getInitString(final String string, final String consoleName, final String libPath) { if (string == null) { return ""; } if (string.startsWith("python")) { return String.format("import sys\nsys.stdout = %s\nsys.path.append('%s')\n", consoleName, libPath); } return ""; } }
google/blockly-android
1,034
blocklylib-core/src/main/java/com/google/blockly/utils/BlockLoadingException.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.blockly.utils; /** * Exception thrown when Blockly encounters an error loading blocks. */ public class BlockLoadingException extends Exception { public BlockLoadingException(String mesg) { super(mesg); } public BlockLoadingException(Throwable cause) { super(cause); } public BlockLoadingException(String mesg, Throwable cause) { super(mesg, cause); } }
google/closure-templates
1,051
java/src/com/google/template/soy/jssrc/dsl/Debugger.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 com.google.template.soy.jssrc.dsl; import java.util.stream.Stream; /** Represents a JavaScript {@code debugger;} statement. */ final class Debugger extends Statement { static final Debugger INSTANCE = new Debugger(); private Debugger() {} @Override void doFormatStatement(FormattingContext ctx) { ctx.append("debugger;").endLine(); } @Override Stream<? extends CodeChunk> childrenStream() { return Stream.empty(); } }
google/copybara
1,078
java/com/google/copybara/SkylarkContext.java
/* * Copyright (C) 2018 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.copybara; import com.google.copybara.exception.ValidationException; import net.starlark.java.eval.Dict; /** * A context object that can be enhanced with Skylark information. */ public interface SkylarkContext<T> { /** Create a copy instance with Skylark function parameters. */ T withParams(Dict<?, ?> params); /** Performs tasks after Starlark code finishes. */ void onFinish(Object result, SkylarkContext<T> context) throws ValidationException; }
google/gdata-java-client
1,041
java/src/com/google/gdata/data/introspection/IServiceDocument.java
/* Copyright (c) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.gdata.data.introspection; import java.util.List; /** * Shared service document interface. * * */ public interface IServiceDocument { /** * Returns the workspaces associated with this service. */ List<? extends IWorkspace> getWorkspaces(); /** * Add a new workspace to the service document, returning the newly created * workspace to the caller. */ IWorkspace addWorkspace(String title); }
google/graphicsfuzz
1,045
gles-worker/core/src/com/graphicsfuzz/glesworker/JobType.java
/* * Copyright 2018 The GraphicsFuzz Project Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.graphicsfuzz.glesworker; public enum JobType { COMPUTE_JOB(10), IMAGE_JOB(20); private final int value; JobType(int value) { this.value = value; } public int getValue() { return value; } public static JobType findByValue(int value) { switch(value) { case 10: return COMPUTE_JOB; case 20: return IMAGE_JOB; default: return null; } } }
google/guava
1,046
android/guava-tests/test/com/google/common/util/concurrent/RunnablesTest.java
/* * Copyright (C) 2013 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.common.util.concurrent; import com.google.common.annotations.GwtCompatible; import junit.framework.TestCase; import org.jspecify.annotations.NullUnmarked; /** * Unit tests for {@link Runnables}. * * @author Olivier Pernet */ @GwtCompatible @NullUnmarked public class RunnablesTest extends TestCase { public void testDoNothingRunnableIsSingleton() { assertSame(Runnables.doNothing(), Runnables.doNothing()); } }
google/j2cl
1,045
transpiler/javatests/com/google/j2cl/readable/java/j2ktjavac/RawTypes.java
/* * Copyright 2025 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 * * 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 j2ktjavac; import org.jspecify.annotations.NullMarked; @NullMarked public class RawTypes { class Parent<T> {} class Child<T extends Child<T>> extends Parent<T> {} <T extends Child<T>> Child<T> copy(Child<T> child) { return child; } <T extends Child<T>> Parent<T> toParent(Child<T> a) { return a; } // Repro for b/450867235. Parent returnsRaw(Child<?> parent) { return toParent(copy((Child) parent)); } }
google/j2objc
1,037
jre_emul/android/platform/libcore/support/src/test/java/tests/support/Support_Proxy_I1.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package tests.support; public interface Support_Proxy_I1 { boolean equals(Object o); int[] array(long[] f); void foo(int i, boolean b); String string(String s) throws Support_Proxy_ParentException, LinkageError; }
google/nomulus
1,058
core/src/main/java/google/registry/keyring/api/KeyringException.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.keyring.api; /** Base class for all {@link Keyring} specific unchecked exceptions. */ public class KeyringException extends RuntimeException { /** @see RuntimeException#RuntimeException(String) */ public KeyringException(String msg) { super(msg); } /** @see RuntimeException#RuntimeException(String, Throwable) */ public KeyringException(String msg, Throwable cause) { super(msg, cause); } }
google/nomulus
1,068
core/src/main/java/google/registry/whois/WhoisCommand.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 org.joda.time.DateTime; /** Represents a WHOIS command request from a client. */ public interface WhoisCommand { /** * Executes a WHOIS query and returns the resultant data. * * @return An object representing the response to the WHOIS command. * @throws WhoisException If some error occured while executing the command. */ WhoisResponse executeQuery(DateTime now) throws WhoisException; }
google/oss-fuzz
1,082
projects/reflections/FilterBuilderFuzzer.java
// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //////////////////////////////////////////////////////////////////////////////// import com.code_intelligence.jazzer.api.FuzzedDataProvider; import org.reflections.util.FilterBuilder; public class FilterBuilderFuzzer { public static void fuzzerTestOneInput(FuzzedDataProvider data) { try{ FilterBuilder.parsePackages(data.consumeRemainingAsString()); } catch (java.lang.StringIndexOutOfBoundsException e) {} catch (org.reflections.ReflectionsException e) {} } }
google/paco
1,058
Paco-Server/src/com/google/sampling/experiential/server/PMF.java
/* * Copyright 2011 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.google.sampling.experiential.server; import javax.jdo.JDOHelper; import javax.jdo.PersistenceManagerFactory; public final class PMF { private static PersistenceManagerFactory pmfInstance = null; private PMF() { } public static synchronized PersistenceManagerFactory get() { if (pmfInstance == null) { pmfInstance = JDOHelper.getPersistenceManagerFactory("transactions-optional"); } return pmfInstance; } }
google/protobuf-gradle-plugin
1,036
testProjectAndroid/src/test/java/io/grpc/helloworldexample/UnitTest.java
package io.grpc.helloworldexample; import static org.junit.Assert.fail; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) public final class UnitTest { private final HelloworldActivity activity = new HelloworldActivity(); // From src/test/proto/unittest.proto private com.example.tutorial.UnitTestMsg msg; // From src/main/proto/helloworld.proto private Helloworld.HelloRequest request; // From dependency project (testProjectLite/testProjectAndroidLibrary): src/proto/messages.proto private io.grpc.testing.Messages.SimpleRequest simpleRequest; // From lib/protos.jar private com.google.protobuf.gradle.test.External.BlobMessage blobMessage; @Test public void ensureAndroidTestProtosNotVisible() throws Exception { // we should not see the protos from src/androidTest/proto/ try { Class<?> ignored = Class.forName("com.example.tutorial.Msg"); fail(); } catch (ClassNotFoundException expected){ // noop } } }
openjdk/jdk8
1,075
jdk/test/java/rmi/server/RMIClassLoader/useGetURLs/Dummy.java
/* * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ public class Dummy { }
openjdk/jdk8
1,080
langtools/test/tools/javac/processing/6350124/Marker.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. */ public @interface Marker {}
openjdk/jdk8
1,080
langtools/test/tools/javac/processing/6413690/TestMe.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. */ public @interface TestMe {}
openjdk/jdk8
1,081
langtools/test/tools/javac/api/6440528/package-info.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 com.sun.foo.bar.baz;
openjdk/jdk8
1,085
langtools/test/com/sun/javadoc/MetaTag/p2/C2.java
/* * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package p2; public class C2 { }
openjdk/jdk8
1,085
langtools/test/tools/javac/lambda/8012557/SAM.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. */ interface SAM { String m(); }
openjdk/jdk8
1,089
jdk/test/java/util/ServiceLoader/FooService.java
/* * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ public abstract class FooService { }
oracle/coherence
1,024
prj/coherence-core/src/main/java/com/tangosol/dev/compiler/java/PostDecExpression.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.compiler.java; /** * The post-decrement (--) expression. * * @version 1.00, 10/05/98 * @author Cameron Purdy */ public class PostDecExpression extends IncExpression { // ----- construction --------------------------------------------------- /** * Construct a PostDecExpression. * * @param operator the operator token * @param expr the sub-expression */ public PostDecExpression(Token operator, Expression expr) { super(operator, expr); // expression is first, operator is last setStartToken(expr.getStartToken()); setEndToken(operator); } // ----- data members --------------------------------------------------- /** * The class name. */ private static final String CLASS = "PostDecExpression"; }
oracle/coherence
1,024
prj/coherence-core/src/main/java/com/tangosol/dev/compiler/java/PostIncExpression.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.compiler.java; /** * The post-increment (++) expression. * * @version 1.00, 10/05/98 * @author Cameron Purdy */ public class PostIncExpression extends IncExpression { // ----- construction --------------------------------------------------- /** * Construct a PostIncExpression. * * @param operator the operator token * @param expr the sub-expression */ public PostIncExpression(Token operator, Expression expr) { super(operator, expr); // expression is first, operator is last setStartToken(expr.getStartToken()); setEndToken(operator); } // ----- data members --------------------------------------------------- /** * The class name. */ private static final String CLASS = "PostIncExpression"; }
apache/ctakes
1,037
ctakes-preprocessor/src/main/java/org/apache/ctakes/preprocessor/SegmentMetaData.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.ctakes.preprocessor; import java.util.List; /** * MetaData about a segment. * @author Mayo Clinic */ public class SegmentMetaData { public IntegerRange span; public String id; public List textSpans; }
apache/curator
1,044
curator-x-discovery/src/main/java/org/apache/curator/x/discovery/ServiceType.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.curator.x.discovery; public enum ServiceType { DYNAMIC, STATIC, PERMANENT, DYNAMIC_SEQUENTIAL; public boolean isDynamic() { return this == DYNAMIC || this == DYNAMIC_SEQUENTIAL; } }
apache/cxf
1,031
tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSProfile.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.wsdlto.frontend.jaxws; import org.apache.cxf.tools.wsdlto.core.FrontEndProfile; //import org.apache.cxf.tools.wsdlto.core.FrontEndGenerator; public class JAXWSProfile extends FrontEndProfile { }
apache/cxf
1,035
systests/uncategorized/src/test/java/org/apache/cxf/systest/stringarray/StringArrayTestImpl.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.systest.stringarray; import org.apache.stringarray.StringListTest; public class StringArrayTestImpl implements StringListTest { public String[] stringListTest(String[] in) { return in; } }
apache/cxf
1,036
rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/resources/jaxb/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. */ @jakarta.xml.bind.annotation.XmlSchema(namespace = "http://superbooks", xmlns = { @XmlNs(prefix = "os", namespaceURI = "http://superbooks") }) package org.apache.cxf.jaxrs.resources.jaxb; import jakarta.xml.bind.annotation.XmlNs;
apache/cxf
1,060
integration/jca/src/main/java/org/apache/cxf/jca/cxf/CXFTransaction.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.jca.cxf; import jakarta.resource.ResourceException; public interface CXFTransaction { boolean isActive(); void clearThreadAssociation() throws ResourceException; void makeThreadAssociation() throws ResourceException; }
apache/daffodil
1,061
daffodil-core/src/main/java/org/apache/daffodil/api/ParseResult.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.daffodil.api; /** * Result of calling {@code DataProcessor.parse(input:org\.apache\.daffodil* DataProcessor.parse}, containing * any diagnostic information, and the final data location */ public interface ParseResult extends Result {}
apache/datasketches-java
1,060
src/main/java/org/apache/datasketches/kll/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 is for the implementations of the sketch algorithm developed by Zohar Karnin, Kevin Lang, * and Edo Liberty that is commonly referred to as the "KLL" sketch after the authors' last names. */ package org.apache.datasketches.kll;
apache/eagle
1,030
eagle-jpm/eagle-jpm-util/src/main/java/org/apache/eagle/jpm/util/resourcefetch/ha/HAURLSelector.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eagle.jpm.util.resourcefetch.ha; import java.io.IOException; public interface HAURLSelector { void checkUrl() throws IOException; boolean checkUrl(String urlString); String getSelectedUrl(); }
apache/eagle
1,031
eagle-metric/eagle-hbase-web/src/main/java/org/apache/eagle/metric/HBaseMetricWebApplicationProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eagle.metric; import org.apache.eagle.app.StaticApplicationProvider; public class HBaseMetricWebApplicationProvider extends StaticApplicationProvider { // HBaseWebApplicationProvider SPI Interface }
apache/fesod
1,043
fesod/src/test/java/org/apache/fesod/excel/multiplesheets/MultipleSheetsData.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fesod.excel.multiplesheets; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; /** * */ @Getter @Setter @EqualsAndHashCode public class MultipleSheetsData { private String title; }
apache/fesod
1,047
fesod/src/main/java/org/apache/fesod/excel/enums/CellExtraTypeEnum.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fesod.excel.enums; /** * Extra data type * * **/ public enum CellExtraTypeEnum { /** * Comment */ COMMENT, /** * Hyperlink */ HYPERLINK, /** * Merge */ MERGE }
apache/fluss
1,048
fluss-common/src/main/java/org/apache/fluss/exception/FencedLeaderEpochException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.fluss.exception; /** Exception thrown when the leader epoch is invalid. */ public class FencedLeaderEpochException extends ApiException { public FencedLeaderEpochException(String message) { super(message); } }
apache/hama
1,068
core/src/main/java/org/apache/hama/bsp/DirectiveHandler.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hama.bsp; /** * A DirectiveHandler interface. */ public interface DirectiveHandler { /** * Handle directives on demand. * * @param directive to be handled. */ void handle(Directive directive) throws DirectiveException; }
apache/harmony
1,025
drlvm/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/parser/InterimWildcardType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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 class InterimWildcardType implements InterimType { public InterimType bounds[]; public boolean boundsType; }
apache/hbase
1,029
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TReadType.java
/** * Autogenerated by Thrift Compiler (0.14.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.hadoop.hbase.thrift2.generated; @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.14.1)", date = "2025-08-16") public enum TReadType implements org.apache.thrift.TEnum { DEFAULT(1), STREAM(2), PREAD(3); private final int value; private TReadType(int value) { this.value = value; } /** * Get the integer value of this enum value, as defined in the Thrift IDL. */ public int getValue() { return value; } /** * Find a the enum type by its integer value, as defined in the Thrift IDL. * @return null if the value is not found. */ @org.apache.thrift.annotation.Nullable public static TReadType findByValue(int value) { switch (value) { case 1: return DEFAULT; case 2: return STREAM; case 3: return PREAD; default: return null; } } }
apache/hbase
1,060
hbase-http/src/main/java/org/apache/hadoop/hbase/http/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. */ /** * <p> * Copied from hadoop source code.<br> * See https://issues.apache.org/jira/browse/HADOOP-10232 to know why. * </p> */ @InterfaceStability.Unstable package org.apache.hadoop.hbase.http; import org.apache.yetus.audience.InterfaceStability;
apache/hop
1,049
plugins/engines/beam/src/main/java/org/apache/hop/beam/transforms/io/BeamOutputData.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hop.beam.transforms.io; import org.apache.hop.pipeline.transform.BaseTransformData; import org.apache.hop.pipeline.transform.ITransformData; public class BeamOutputData extends BaseTransformData implements ITransformData {}
apache/ignite-3
1,049
modules/raft/src/main/java/org/apache/ignite/raft/jraft/rpc/ActionRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.raft.jraft.rpc; /** * Common interface for {@link ReadActionRequest} and {@link WriteActionRequest}. */ public interface ActionRequest extends Message { /** * @return Group id. */ String groupId(); }
apache/incubator-kie-drools
1,035
kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/api/OrganizationUnit.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR 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.dmn.model.api; import java.util.List; public interface OrganizationUnit extends BusinessContextElement { List<DMNElementReference> getDecisionMade(); List<DMNElementReference> getDecisionOwned(); }
apache/incubator-kie-drools
1,040
kie-api/src/main/java/org/kie/api/marshalling/MarshallingConfiguration.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR 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.marshalling; public interface MarshallingConfiguration { ObjectMarshallingStrategyStore getObjectMarshallingStrategyStore(); boolean isMarshallProcessInstances(); boolean isMarshallWorkItems(); }
apache/incubator-kie-drools
1,041
kie-internal/src/main/java/org/kie/internal/utils/ClassLoaderResolver.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR 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.internal.utils; import org.kie.api.builder.KieModule; import org.kie.api.internal.utils.KieService; public interface ClassLoaderResolver extends KieService { ClassLoader getClassLoader( KieModule kmodule ); }
apache/incubator-kie-optaplanner
1,025
optaplanner-examples/src/main/java/org/optaplanner/examples/common/util/Pair.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.optaplanner.examples.common.util; public interface Pair<A, B> { static <A, B> Pair<A, B> of(A key, B value) { return new PairImpl<>(key, value); } A getKey(); B getValue(); }
apache/incubator-seata
1,045
common/src/test/java/org/apache/seata/common/loader/EnglishHello.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.common.loader; /** * The type English hello. * */ @LoadLevel(name = "EnglishHello", order = 1) public class EnglishHello implements Hello { @Override public String say() { return "hello!"; } }
apache/iotdb-web-workbench
1,037
backend/src/main/java/org/apache/iotdb/admin/model/vo/QueryDataForListVO.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iotdb.admin.model.vo; import lombok.Data; import java.util.List; @Data public class QueryDataForListVO { private Integer serverId; private Integer mode; private List<QueryMetricsVO> queryMetricsVOs; }
apache/iotdb-web-workbench
1,047
backend/src/main/java/org/apache/iotdb/admin/model/vo/PathVO.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iotdb.admin.model.vo; import lombok.Data; import java.io.Serializable; @Data public class PathVO implements Serializable { private String groupName; private String deviceName; private String timeseriesName; }
apache/iotdb
1,026
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/state/RemoveDataNodeState.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iotdb.confignode.procedure.state; public enum RemoveDataNodeState { REGION_REPLICA_CHECK, REMOVE_DATA_NODE_PREPARE, BROADCAST_DISABLE_DATA_NODE, SUBMIT_REGION_MIGRATE, STOP_DATA_NODE }
apache/jackrabbit-filevault
1,031
vault-validation/src/main/java/org/apache/jackrabbit/vault/validation/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * The FileVault validation framework API. Provides classes to execute validations on FileVault packages. */ @Version("2.1.1") package org.apache.jackrabbit.vault.validation; import org.osgi.annotation.versioning.Version;
apache/jena
1,042
jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/record/RecordException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.dboe.base.record; import org.apache.jena.dboe.DBOpEnvException; public class RecordException extends DBOpEnvException { public RecordException() {} public RecordException(String msg) { super(msg); } }
apache/kafka
1,026
clients/src/test/java/org/apache/kafka/common/security/authenticator/SaslAuthenticatorFailureNoDelayTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.security.authenticator; public class SaslAuthenticatorFailureNoDelayTest extends SaslAuthenticatorFailureDelayTest { public SaslAuthenticatorFailureNoDelayTest() { super(0); } }
apache/kafka
1,039
clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestFutureListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.consumer.internals; /** * Listener interface to hook into RequestFuture completion. */ public interface RequestFutureListener<T> { void onSuccess(T value); void onFailure(RuntimeException e); }
apache/kafka
1,062
clients/src/main/java/org/apache/kafka/common/config/types/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. */ /** * Provides custom non-primitive types of configuration properties. * <strong>This package is not a supported Kafka API; the implementation may change without warning between minor or patch releases.</strong> */ package org.apache.kafka.common.config.types;
apache/karaf
1,043
shell/console/src/main/java/org/apache/karaf/shell/console/BlueprintContainerAware.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.karaf.shell.console; import org.osgi.service.blueprint.container.BlueprintContainer; @Deprecated public interface BlueprintContainerAware { void setBlueprintContainer(BlueprintContainer blueprintContainer); }
apache/karaf
1,069
audit/src/main/java/org/apache/karaf/audit/EventLogger.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.karaf.audit; import java.io.Closeable; import java.io.Flushable; import java.io.IOException; public interface EventLogger extends Flushable, Closeable { /** * Write the event. */ void write(Event event) throws IOException; }
apache/kylin
1,034
src/common-service/src/main/java/org/apache/kylin/rest/request/ProjectConfigResetRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.rest.request; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; @Data public class ProjectConfigResetRequest { @JsonProperty("reset_item") private String resetItem; }
apache/kylin
1,061
src/core-storage/src/main/java/org/apache/kylin/storage/IStorage.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.storage; import org.apache.kylin.metadata.realization.IRealization; public interface IStorage { public IStorageQuery createQuery(IRealization realization); public <I> I adaptToBuildEngine(Class<I> engineInterface); }
apache/linkis
1,039
linkis-public-enhancements/linkis-bml-server/src/test/java/org/apache/linkis/bml/Scan.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.linkis.bml; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.mybatis.spring.annotation.MapperScan; @EnableAutoConfiguration @MapperScan("org.apache.linkis.bml") public class Scan {}
apache/logging-log4j2
1,025
log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/FilterComponentBuilder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.logging.log4j.core.config.builder.api; /** * Assembler for constructing Filter Components. * @since 2.4 */ public interface FilterComponentBuilder extends ComponentBuilder<FilterComponentBuilder> {}
apache/logging-log4j2
1,025
log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/LayoutComponentBuilder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.logging.log4j.core.config.builder.api; /** * Assembler for constructing Layout Components. * @since 2.4 */ public interface LayoutComponentBuilder extends ComponentBuilder<LayoutComponentBuilder> {}
apache/logging-log4j2
1,025
log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/ScriptComponentBuilder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.logging.log4j.core.config.builder.api; /** * Assembler for constructing Layout Components. * @since 2.5 */ public interface ScriptComponentBuilder extends ComponentBuilder<ScriptComponentBuilder> {}
apache/logging-log4j2
1,033
log4j-appserver/src/main/java/org/apache/logging/log4j/appserver/tomcat/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. */ /** * Log4j integration with Apache Tomcat 8.5 or greater. */ @Export @Version("2.20.1") package org.apache.logging.log4j.appserver.tomcat; import org.osgi.annotation.bundle.Export; import org.osgi.annotation.versioning.Version;
apache/lucene
1,032
lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/TextableQueryNode.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.queryparser.flexible.core.nodes; /** Interface for a node that has text as a {@link CharSequence} */ public interface TextableQueryNode { CharSequence getText(); void setText(CharSequence text); }
apache/manifoldcf
1,024
connectors/livelink/build-stub/src/main/java/com/opentext/api/LLUnsupportedAuthMethodException.java
/* $Id$ */ /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 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.opentext.api; /** Stub classes to get connector to build. */ public class LLUnsupportedAuthMethodException extends RuntimeException { public LLUnsupportedAuthMethodException(String text) { super(text); } }
apache/maven-javadoc-plugin
1,019
src/it/projects/output-encoding/docencoding/src/main/java/Test.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Sample class with non-ascii characters: * {non-ascii chars delimiter}french: äëïöüàèìòù, greek: αβγδεζηθ, japanese: あいうえお{non-ascii chars delimiter} * * @author Hervé Boutemy */ public class Test { }
apache/maven-plugins
1,045
maven-shade-plugin/src/it/MSHADE-105/bundle/src/main/java/test/Dummy.java
package test; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import internal.io.IOUtils; import java.io.IOException; import java.io.InputStream; public class Dummy { public static void dump(InputStream in) throws IOException { IOUtils.copy(in, System.out); } }
apache/maven-surefire
1,039
surefire-booter/src/main/java/org/apache/maven/surefire/booter/KeyValueSource.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.maven.surefire.booter; import java.util.Map; /** * A key-value source obeying the geneal constrains of java.util.Properties */ public interface KeyValueSource { void copyTo(Map<Object, Object> target); }
apache/mnemonic
1,045
mnemonic-core/src/main/java/org/apache/mnemonic/query/memory/SortOrder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.mnemonic.query.memory; public enum SortOrder { NONE(1), ASCENDING(2), DESCENDING(3); private int value; SortOrder(int val) { this.value = val; } public int getValue() { return value; } }
apache/nifi
1,034
minifi/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/command/CommandRunner.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.minifi.bootstrap.command; public interface CommandRunner { /** * Executes a command. * @param args the input arguments * @return status code */ int runCommand(String[] args); }
apache/nifi
1,034
nifi-commons/nifi-schema-utils/src/main/java/org/apache/nifi/repository/schema/RecordField.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.repository.schema; import java.util.List; public interface RecordField { String getFieldName(); FieldType getFieldType(); Repetition getRepetition(); List<RecordField> getSubFields(); }
apache/oodt
1,043
webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rdf/RDFConfigMetKeys.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.oodt.cas.product.rdf; /** * * Met keys for the {@link RDFConfig}. * * @author mattmann * @version $Revision$ * */ public interface RDFConfigMetKeys { String RDF_CONTEXT_CONF_KEY = "filemgr.rdfconf.file"; }
apache/openmeetings
1,024
openmeetings-core/src/main/java/org/apache/openmeetings/core/converter/ConversionException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License") + you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openmeetings.core.converter; public class ConversionException extends Exception { private static final long serialVersionUID = 1L; public ConversionException(String msg) { super(msg); } }
apache/opennlp
1,049
opennlp-api/src/main/java/opennlp/tools/tokenize/TokenizerEvaluationMonitor.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package opennlp.tools.tokenize; import opennlp.tools.util.eval.EvaluationMonitor; /** * A marker interface for evaluating {@link Tokenizer tokenizers}. */ public interface TokenizerEvaluationMonitor extends EvaluationMonitor<TokenSample> { }
apache/openwebbeans
1,027
webbeans-impl/src/test/java/org/apache/webbeans/test/component/binding/AnyBindingComponent.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.webbeans.test.component.binding; import jakarta.enterprise.inject.Any; import org.apache.webbeans.test.annotation.binding.ParameterBinding1; @Any @ParameterBinding1 public class AnyBindingComponent { }
apache/openwebbeans
1,027
webbeans-impl/src/test/java/org/apache/webbeans/test/decorators/generic/ExtendedDecoratedBean.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.decorators.generic; import jakarta.enterprise.context.ApplicationScoped; @ApplicationScoped public class ExtendedDecoratedBean extends DecoratedBean implements ExtendedGenericInterface { }
apache/pekko-http
1,043
http-core/src/main/java/org/apache/pekko/http/javadsl/model/headers/EntityTag.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * license agreements; and to You under the Apache License, version 2.0: * * https://www.apache.org/licenses/LICENSE-2.0 * * This file is part of the Apache Pekko project, which was derived from Akka. */ /* * Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com> */ package org.apache.pekko.http.javadsl.model.headers; public abstract class EntityTag { public abstract String tag(); public abstract boolean weak(); public static EntityTag create(String tag, boolean weak) { return new org.apache.pekko.http.scaladsl.model.headers.EntityTag(tag, weak); } public static boolean matchesRange(EntityTag eTag, EntityTagRange range, boolean weak) { return org.apache.pekko.http.scaladsl.model.headers.EntityTag.matchesRange(eTag, range, weak); } public static boolean matches(EntityTag eTag, EntityTag other, boolean weak) { return org.apache.pekko.http.scaladsl.model.headers.EntityTag.matches(eTag, other, weak); } }
apache/samza
1,065
samza-api/src/main/java/org/apache/samza/config/ConfigLoader.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.config; /** * The primary means of fetching full job {@link org.apache.samza.config.Config} on * LocalApplicationRunner and ClusterBasedJobCoordinator during start up. */ public interface ConfigLoader { Config getConfig(); }
apache/servicecomb-samples
1,025
java-chassis-integration-tests/it-common/src/main/java/org/apache/servicecomb/it/ITMain.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.it; import org.apache.servicecomb.foundation.common.utils.BeanUtils; public class ITMain { public static void main(String[] args) { new CommandReceiver(); BeanUtils.init(); } }
apache/shindig
1,046
java/gadgets/src/main/java/org/apache/shindig/gadgets/preload/PreloadModule.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.shindig.gadgets.preload; import com.google.inject.AbstractModule; /** * Guice bindings for the render package. */ public class PreloadModule extends AbstractModule { @Override protected void configure() { } }
apache/syncope
1,030
core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/content/ContentLoader.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.content; import org.apache.syncope.core.persistence.api.SyncopeCoreLoader; @FunctionalInterface public interface ContentLoader extends SyncopeCoreLoader, ContentDealer { }