repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/seatunnel
1,138
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/nlpmodel/embedding/remote/Model.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seatunnel.transform.nlpmodel.embedding.remote; import java.io.Closeable; import java.io.IOException; import java.nio.ByteBuffer; import java.util.List; public interface Model extends Closeable { List<ByteBuffer> vectorization(Object[] fields) throws IOException; Integer dimension() throws IOException; }
apache/servicecomb-pack
1,143
alpha/alpha-core/src/main/java/org/apache/servicecomb/pack/alpha/core/CommandRepository.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.pack.alpha.core; import java.util.List; public interface CommandRepository { void saveCompensationCommands(String globalTxId); void markCommandAsDone(String globalTxId, String localTxId); List<Command> findUncompletedCommands(String globalTxId); List<Command> findFirstCommandToCompensate(); }
apache/shardingsphere
1,102
parser/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/statement/type/ral/queryable/show/ShowComputeNodeInfoStatement.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shardingsphere.distsql.statement.type.ral.queryable.show; import org.apache.shardingsphere.distsql.statement.type.ral.queryable.QueryableRALStatement; /** * Show compute node info statement. */ public final class ShowComputeNodeInfoStatement extends QueryableRALStatement { }
apache/shardingsphere
1,102
parser/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/statement/type/ral/queryable/show/ShowComputeNodeModeStatement.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shardingsphere.distsql.statement.type.ral.queryable.show; import org.apache.shardingsphere.distsql.statement.type.ral.queryable.QueryableRALStatement; /** * Show compute node mode statement. */ public final class ShowComputeNodeModeStatement extends QueryableRALStatement { }
apache/shardingsphere
1,135
test/it/parser/src/test/java/org/apache/shardingsphere/test/it/sql/parser/doris/InternalDorisParserIT.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shardingsphere.test.it.sql.parser.doris; import org.apache.shardingsphere.test.it.sql.parser.internal.InternalSQLParserIT; import org.apache.shardingsphere.test.it.sql.parser.internal.InternalSQLParserITSettings; @InternalSQLParserITSettings("Doris") class InternalDorisParserIT extends InternalSQLParserIT { }
apache/shardingsphere
1,135
test/it/parser/src/test/java/org/apache/shardingsphere/test/it/sql/parser/sql92/InternalSQL92ParserIT.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shardingsphere.test.it.sql.parser.sql92; import org.apache.shardingsphere.test.it.sql.parser.internal.InternalSQLParserIT; import org.apache.shardingsphere.test.it.sql.parser.internal.InternalSQLParserITSettings; @InternalSQLParserITSettings("SQL92") class InternalSQL92ParserIT extends InternalSQLParserIT { }
apache/sirona
1,183
api/src/main/java/org/apache/sirona/stopwatches/StopWatch.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.sirona.stopwatches; /** * Instrumentation tool to compute resource consumption of some code fragment execution. * <p/> * StopWatch implementation is supposed not to be thread-safe and to be a one-shot tool. Don't * share it beetween threads, don't try to reuse it. * * */ public interface StopWatch { long getElapsedTime(); StopWatch stop(); }
apache/sis
1,171
endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/Record.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.sis.pending.jdk; /** * Placeholder for the {@code java.lang.Record} class introduced in Java 16. * This is used for making transition easier when SIS will be ready to upgrade to Java 17. * * @author Martin Desruisseaux (Geomatys) */ public abstract class Record { /** * Creates a new record. */ protected Record() { } }
apache/skywalking-java
1,119
apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/logging/core/PatternLogResolverTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.apm.agent.core.logging.core; import org.junit.Assert; import org.junit.Test; public class PatternLogResolverTest { @Test public void testGetLogger() { Assert.assertTrue(new PatternLogResolver().getLogger(PatternLoggerTest.class) instanceof PatternLogger); } }
apache/skywalking
1,134
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/remote/client/RemoteClient.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.core.remote.client; import org.apache.skywalking.oap.server.core.remote.data.StreamData; public interface RemoteClient extends Comparable<RemoteClient> { Address getAddress(); void connect(); void close(); void push(String nextWorkerName, StreamData streamData); }
apache/stanbol
1,138
ontologymanager/registry/src/main/java/org/apache/stanbol/ontologymanager/registry/api/model/Registry.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.stanbol.ontologymanager.registry.api.model; /** * An ontology registry can reference zero or more ontology libraries. * * @author alexdma */ public interface Registry extends RegistryItem { /** * The type of this registry item is {@link Type#REGISTRY}. */ final Type type = Type.REGISTRY; }
apache/storm
1,182
storm-server/src/main/java/org/apache/storm/ServerConstants.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version * 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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; public class ServerConstants { public static final String NUMA_MEMORY_IN_MB = "numa.memory.mb"; public static final String NUMA_CORES = "numa.cores"; public static final String NUMA_PORTS = "numa.ports"; public static final String NUMA_GENERIC_RESOURCES_MAP = "numa.generic.resources.map"; public static final String NUMA_ID_SEPARATOR = "-numa-"; }
apache/streampipes
1,137
streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/connect/IPullAdapter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.extensions.api.connect; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; public interface IPullAdapter { void pullData() throws ExecutionException, RuntimeException, InterruptedException, TimeoutException; IPollingSettings getPollingInterval(); }
apache/tajo
1,167
tajo-core/src/main/java/org/apache/tajo/engine/function/annotation/ParamTypes.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.engine.function.annotation; import org.apache.tajo.common.TajoDataTypes.Type; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @Retention(RetentionPolicy.RUNTIME) public @interface ParamTypes { Type[] paramTypes() default { Type.NULL_TYPE }; ParamOptionTypes[] paramOptionTypes() default {}; }
apache/tapestry-5
1,133
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormFieldFocusDemo.java
// Copyright (c) 2011. The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.integration.app1.pages; import org.apache.tapestry5.Field; import org.apache.tapestry5.annotations.InjectComponent; import org.apache.tapestry5.annotations.Property; public class FormFieldFocusDemo { @InjectComponent @Property private Field gainFocus; @Property private String requiredValue; @Property private String gainFocusValue; void beginRender() { requiredValue = "I'm required"; gainFocusValue = "But I got the focus!"; } }
apache/tomcat
1,204
java/org/apache/el/parser/AstFalse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Generated By:JJTree: Do not edit this line. AstFalse.java */ package org.apache.el.parser; import jakarta.el.ELException; import org.apache.el.lang.EvaluationContext; public final class AstFalse extends BooleanNode { public AstFalse(int id) { super(id); } @Override public Object getValue(EvaluationContext ctx) throws ELException { return Boolean.FALSE; } }
apache/tomee
1,109
arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/ear/CodecBean.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.arquillian.tests.ear; import org.apache.commons.codec.binary.Base64; import jakarta.ejb.Singleton; @Singleton public class CodecBean { public String test() { return Base64.class.getProtectionDomain().getCodeSource().getLocation().toExternalForm(); } }
apache/tomee
1,170
container/openejb-jee/src/main/java/org/apache/openejb/jee/StringAdapter.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.jee; /** * @version $Rev$ $Date$ */ public class StringAdapter extends jakarta.xml.bind.annotation.adapters.XmlAdapter<java.lang.String, java.lang.String> { public String unmarshal(final String s) throws Exception { return s; } public String marshal(final String s) throws Exception { return s; } }
apache/uniffle
1,167
common/src/main/java/org/apache/uniffle/common/netty/DecodeException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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; import org.apache.uniffle.common.exception.RssException; public class DecodeException extends RssException { public DecodeException(String message) { super(message); } public DecodeException(Throwable e) { super(e); } public DecodeException(String message, Throwable e) { super(message, e); } }
apache/uniffle
1,167
common/src/main/java/org/apache/uniffle/common/netty/EncodeException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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; import org.apache.uniffle.common.exception.RssException; public class EncodeException extends RssException { public EncodeException(String message) { super(message); } public EncodeException(Throwable e) { super(e); } public EncodeException(String message, Throwable e) { super(message, e); } }
apache/wicket
1,157
wicket-examples/src/main/java/org/apache/wicket/examples/cdi/Counter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.examples.cdi; import java.io.Serializable; import java.util.concurrent.atomic.AtomicInteger; public abstract class Counter implements Serializable { private final AtomicInteger counter = new AtomicInteger(); public int getCount() { return counter.get(); } public void increment() { counter.incrementAndGet(); } }
apache/zeppelin
1,160
zeppelin-interpreter/src/main/java/org/apache/zeppelin/dep/RepositoryException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.zeppelin.dep; /** * Exception thrown when there are issues with Repository configuration or operations. */ public class RepositoryException extends RuntimeException { public RepositoryException(String message) { super(message); } public RepositoryException(String message, Throwable cause) { super(message, cause); } }
apache/zeppelin
1,160
zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/ParagraphJobListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.zeppelin.notebook; import org.apache.zeppelin.scheduler.JobListener; /** * Listener for Paragraph Job. */ public interface ParagraphJobListener extends JobListener { //TODO(savalek) Temporary solution. Need to refactor cron to be able to notify frontend directly. void noteRunningStatusChange(String noteId, boolean newStatus); }
apache/zookeeper
1,167
zookeeper-server/src/test/java/org/apache/zookeeper/DummyWatcher.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.zookeeper; /** * A dummy implementation of {@link Watcher}. Used in tests. */ public class DummyWatcher implements Watcher { public static final DummyWatcher INSTANCE = new DummyWatcher(); @Override public void process(WatchedEvent event) { // no op } private DummyWatcher() { // singleton } }
google/binnavi
1,117
src/main/java/com/google/security/zynamics/binnavi/Gui/Debug/MemoryPanel/Implementations/CExpressionEvaluationException.java
// Copyright 2011-2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.binnavi.Gui.Debug.MemoryPanel.Implementations; /** * Exception class used to signal operand expressions that could not be evaluated. */ public class CExpressionEvaluationException extends Exception { /** * Used for serialization. */ private static final long serialVersionUID = 5233101270436158623L; /** * Creates a new exception object. * * @param msg Describes the exception. */ public CExpressionEvaluationException(final String msg) { super(msg); } }
google/binnavi
1,144
src/main/java/com/google/security/zynamics/binnavi/Gui/CodeBookmarks/CCodeBookmarkExtensionCreator.java
// Copyright 2011-2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.binnavi.Gui.CodeBookmarks; import com.google.security.zynamics.binnavi.Gui.GraphWindows.Extensions.IGraphPanelExtension; import com.google.security.zynamics.binnavi.Gui.GraphWindows.Extensions.IGraphPanelExtensionCreator; /** * Creates the extension objects that add the code bookmark menu to the context menu of code nodes. */ public final class CCodeBookmarkExtensionCreator implements IGraphPanelExtensionCreator { @Override public IGraphPanelExtension create() { return new CCodeBookmarkPanel(); } }
google/caliper
1,157
caliper-runner/src/main/java/com/google/caliper/runner/server/ServerModule.java
/* * Copyright (C) 2013 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.caliper.runner.server; import com.google.common.util.concurrent.Service; import dagger.Binds; import dagger.Module; import dagger.Provides; import dagger.multibindings.IntoSet; /** Configures the {@link ServerSocketService}. */ @Module public abstract class ServerModule { private ServerModule() {} @Binds @IntoSet abstract Service bindServerSocketService(ServerSocketService impl); @Provides @LocalPort static int providePortNumber(ServerSocketService serverSocketService) { return serverSocketService.getPort(); } }
google/cel-java
1,176
common/src/main/java/dev/cel/common/values/OpaqueValue.java
// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // 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 dev.cel.common.values; import com.google.auto.value.AutoValue; import dev.cel.common.types.OpaqueType; /** OpaqueValue is the value representation of OpaqueType. */ @AutoValue @AutoValue.CopyAnnotations @SuppressWarnings("Immutable") // Java Object is mutable. public abstract class OpaqueValue extends CelValue { @Override public boolean isZeroValue() { return false; } @Override public abstract OpaqueType celType(); public static OpaqueValue create(String name, Object value) { return new AutoValue_OpaqueValue(value, OpaqueType.create(name)); } }
google/guava
1,168
guava-testlib/src/com/google/common/collect/testing/TestMapGenerator.java
/* * Copyright (C) 2008 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.collect.testing; import com.google.common.annotations.GwtCompatible; import java.util.Map; import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.Nullable; /** * Creates maps, containing sample elements, to be tested. * * @author George van den Driessche */ @GwtCompatible @NullMarked public interface TestMapGenerator<K extends @Nullable Object, V extends @Nullable Object> extends TestContainerGenerator<Map<K, V>, Map.Entry<K, V>> { K[] createKeyArray(int length); V[] createValueArray(int length); }
google/hover
1,174
hover/src/main/java/io/mattcarroll/hover/PositionDock.java
/* * Copyright 2016 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *    http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.mattcarroll.hover; import android.graphics.Point; import android.support.annotation.NonNull; /** * {@link Dock} that has a static position as defined by a provided {@link Point}. A * {@code PositionDock} never changes its position after construction. */ class PositionDock extends Dock { private static final String TAG = "SideDock"; private Point mPosition; PositionDock(@NonNull Point position) { mPosition = position; } @NonNull @Override public Point position() { return mPosition; } }
google/oss-fuzz
1,189
projects/apache-commons-compress/CompressorZFuzzer.java
// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //////////////////////////////////////////////////////////////////////////////// import org.apache.commons.compress.compressors.z.ZCompressorInputStream; import java.io.ByteArrayInputStream; import java.io.IOException; public class CompressorZFuzzer extends BaseTests { public static void fuzzerTestOneInput(byte[] data) { try { // Setting limit to avoid out of memory errors fuzzCompressorInputStream(new ZCompressorInputStream(new ByteArrayInputStream(data), 1024*1024)); } catch (IllegalArgumentException | IOException ignored) { } } }
google/tsunami-security-scanner-plugins
1,061
google/detectors/rce/consul/src/main/java/com/google/tsunami/plugins/detectors/rce/consul/ConsulEnableScriptChecksCommandExecutionDetectorBootstrapModule.java
/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.tsunami.plugins.detectors.rce.consul; import com.google.tsunami.plugin.PluginBootstrapModule; /** * Guice module that bootstraps the {@link * ConsulEnableScriptChecksCommandExecutionDetector}. */ public final class ConsulEnableScriptChecksCommandExecutionDetectorBootstrapModule extends PluginBootstrapModule { @Override protected void configurePlugin() { registerPlugin(ConsulEnableScriptChecksCommandExecutionDetector.class); } }
googleapis/google-cloud-java
1,051
java-shopping-merchant-datasources/proto-google-shopping-merchant-datasources-v1beta/src/main/java/com/google/shopping/merchant/datasources/v1beta/MerchantReviewDataSourceOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/shopping/merchant/datasources/v1beta/datasourcetypes.proto // Protobuf Java Version: 3.25.8 package com.google.shopping.merchant.datasources.v1beta; public interface MerchantReviewDataSourceOrBuilder extends // @@protoc_insertion_point(interface_extends:google.shopping.merchant.datasources.v1beta.MerchantReviewDataSource) com.google.protobuf.MessageOrBuilder {}
googlearchive/gwt-google-apis
1,154
maps/maps/src/com/google/gwt/maps/client/overlay/GeoXmlLoadCallback.java
/* * Copyright 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.gwt.maps.client.overlay; /** * Callback used by the load() factory method of GeoXmlOverlay. */ public abstract class GeoXmlLoadCallback { /** * The call to create a new overlay failed. * @param url The URL that was requested */ public abstract void onFailure(String url, Throwable caught); /** * The call to create the object succeeded. * @param url The URL that was requested * @param overlay a newly constructed GeoXmlOverlay object. */ public abstract void onSuccess(String url, GeoXmlOverlay overlay); }
googleworkspace/java-samples
1,167
drive/snippets/drive_v3/src/test/java/TestUploadToFolder.java
/* * Copyright 2022 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 static org.junit.Assert.assertTrue; import com.google.api.services.drive.model.File; import java.io.IOException; import java.security.GeneralSecurityException; import org.junit.Test; public class TestUploadToFolder extends BaseTest { @Test public void uploadToFolder() throws IOException, GeneralSecurityException { String folderId = CreateFolder.createFolder(); File file = UploadToFolder.uploadToFolder(folderId); assertTrue(file.getParents().contains(folderId)); deleteFileOnCleanup(file.getId()); deleteFileOnCleanup(folderId); } }
hibernate/hibernate-orm
1,060
hibernate-core/src/test/java/org/hibernate/orm/test/event/collection/association/bidirectional/onetomany/BidirectionalOneToManySetCollectionEventTest.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.event.collection.association.bidirectional.onetomany; import java.util.Collection; import java.util.HashSet; import org.hibernate.orm.test.event.collection.Child; import org.hibernate.orm.test.event.collection.ParentWithCollection; import org.hibernate.orm.test.event.collection.association.AbstractAssociationCollectionEventTest; /** * @author Gail Badner */ public class BidirectionalOneToManySetCollectionEventTest extends AbstractAssociationCollectionEventTest { @Override public String[] getMappings() { return new String[] { "event/collection/association/bidirectional/onetomany/BidirectionalOneToManySetMapping.hbm.xml" }; } @Override public ParentWithCollection createParent(String name) { return new ParentWithBidirectionalOneToMany( name ); } @Override public Collection createCollection() { return new HashSet(); } public Child createChild(String name) { return new ChildWithManyToOne( name ); } }
hibernate/hibernate-orm
1,073
hibernate-core/src/test/java/org/hibernate/orm/test/any/annotations/CharProperty.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.any.annotations; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.Table; import jakarta.persistence.Column; @Entity @Table( name = "char_property" ) public class CharProperty implements Property { private Integer id; private String name; private Character value; public CharProperty() { super(); } public CharProperty(String name, Character value) { super(); this.name = name; this.value = value; } public String asString() { return Character.toString( value ); } public String getName() { return name; } @Id @GeneratedValue public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Column(name = "`value`") public Character getValue() { return value; } public void setValue(Character value) { this.value = value; } public void setName(String name) { this.name = name; } }
hibernate/hibernate-orm
1,084
hibernate-core/src/test/java/org/hibernate/orm/test/cdi/general/hibernatesearch/TheAlternativeNamedDependentBeanImpl.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.cdi.general.hibernatesearch; import jakarta.annotation.PostConstruct; import jakarta.annotation.PreDestroy; import jakarta.enterprise.context.Dependent; import jakarta.inject.Named; /** * @author Yoann Rodiere */ @Dependent @Named(TheAlternativeNamedDependentBeanImpl.NAME) public class TheAlternativeNamedDependentBeanImpl implements TheNamedDependentBean { public static final String NAME = "TheAlternativeNamedDependentBeanImpl_name"; @jakarta.inject.Inject private TheNestedDependentBean nestedDependentBean; public TheAlternativeNamedDependentBeanImpl() { Monitor.theAlternativeNamedDependentBean().instantiated(); } @Override public void ensureInitialized() { nestedDependentBean.ensureInitialized(); } @PostConstruct public void postConstruct() { Monitor.theAlternativeNamedDependentBean().postConstructCalled(); } @PreDestroy public void preDestroy() { Monitor.theAlternativeNamedDependentBean().preDestroyCalled(); } }
hibernate/hibernate-orm
1,087
hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/reventity/trackmodifiedentities/AnnotatedTrackingEntitiesTest.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.envers.integration.reventity.trackmodifiedentities; import java.util.Map; import org.hibernate.envers.ModifiedEntityNames; import org.hibernate.envers.configuration.EnversSettings; import org.hibernate.orm.test.envers.entities.reventity.trackmodifiedentities.AnnotatedTrackingRevisionEntity; import org.hibernate.internal.util.collections.ArrayHelper; /** * Tests proper behavior of revision entity that utilizes {@link ModifiedEntityNames} annotation. * * @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com) */ public class AnnotatedTrackingEntitiesTest extends DefaultTrackingEntitiesTest { @Override protected Class<?>[] getAnnotatedClasses() { return ArrayHelper.join( super.getAnnotatedClasses(), AnnotatedTrackingRevisionEntity.class ); } @Override public void addConfigOptions(Map configuration) { super.addConfigOptions( configuration ); configuration.put( EnversSettings.TRACK_ENTITIES_CHANGED_IN_REVISION, "false" ); } }
hibernate/hibernate-orm
1,099
hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/PostPersistJpaAnnotation.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.boot.models.annotations.internal; import java.lang.annotation.Annotation; import java.util.Map; import org.hibernate.models.spi.ModelsContext; import jakarta.persistence.PostPersist; @SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" }) @jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor") public class PostPersistJpaAnnotation implements PostPersist { /** * Used in creating dynamic annotation instances (e.g. from XML) */ public PostPersistJpaAnnotation(ModelsContext modelContext) { } /** * Used in creating annotation instances from JDK variant */ public PostPersistJpaAnnotation(PostPersist annotation, ModelsContext modelContext) { } /** * Used in creating annotation instances from Jandex variant */ public PostPersistJpaAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) { } @Override public Class<? extends Annotation> annotationType() { return PostPersist.class; } }
hibernate/hibernate-orm
1,129
hibernate-core/src/main/java/org/hibernate/exception/spi/SQLExceptionConversionDelegate.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.exception.spi; import java.sql.SQLException; import org.hibernate.JDBCException; import org.checkerframework.checker.nullness.qual.Nullable; /** * Allow a {@link SQLExceptionConverter} to work by chaining together * multiple delegates. The main difference between a delegate and a * full-fledged converter is that a delegate may return {@code null}. * * @author Steve Ebersole */ @FunctionalInterface public interface SQLExceptionConversionDelegate { /** * Convert the given {@link SQLException} to a subtype of * {@link JDBCException}, if possible. * * @param sqlException The {@code SQLException} to be converted * @param message An optional error message * @param sql The SQL statement that resulted in the exception * * @return The resulting {@code JDBCException}, or {@code null} * if this delegate does not know how to interpret the * given {@link SQLException}. */ @Nullable JDBCException convert(SQLException sqlException, String message, String sql); }
hibernate/hibernate-search
1,059
integrationtest/v5migrationhelper/engine/src/test/java/org/hibernate/search/test/engine/numeric/Position.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.test.engine.numeric; import org.hibernate.search.annotations.DocumentId; import org.hibernate.search.annotations.Field; import org.hibernate.search.annotations.Indexed; import org.hibernate.search.annotations.Store; /** * @author Gunnar Morling */ @Indexed class Position { @DocumentId private byte id; @Field(store = Store.YES) private double latitude; @Field(store = Store.YES) private Double longitude; Position() { } public Position(byte id, double latitude, Double longitude) { this.id = id; this.latitude = latitude; this.longitude = longitude; } public byte getId() { return id; } public void setId(byte id) { this.id = id; } public double getLatitude() { return latitude; } public void setLatitude(double latitude) { this.latitude = latitude; } public Double getLongitude() { return longitude; } public void setLongitude(Double longitude) { this.longitude = longitude; } }
openjdk/jdk8
1,180
jdk/test/sun/security/provider/PolicyFile/getinstance/OneArgPermission.java
/* * Copyright (c) 2001, 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 OneArgPermission extends java.security.BasicPermission { public OneArgPermission(String arg) { super(arg); } }
openjdk/jdk8
1,188
hotspot/test/compiler/jsr292/methodHandleExceptions/p/Dok.java
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. * */ package p; /** * Test class -- implements I, extends E, both define m, so all should be well. */ public class Dok extends p.E { }
openjdk/jdk8
1,189
langtools/test/tools/javac/diags/examples/UnsupportedFpLit.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.unsupported.fp.lit // options: -source 1.4 -Xlint:-options class UnsupportedFpLit { float f = 0xCafe.BabeP1; }
openjdk/jdk8
1,192
langtools/test/tools/javac/diags/examples/MissingSVUID.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.warn.missing.SVUID // options: -Xlint:serial import java.io.Serializable; class MissingSVUID implements Serializable { }
openjdk/jdk8
1,193
jdk/test/sun/rmi/transport/tcp/blockAccept/TestIface.java
/* * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ import java.rmi.*; public interface TestIface extends Remote { public String testCall(String ign) throws RemoteException; }
openjdk/jdk8
1,195
langtools/test/tools/javac/diags/examples/Location1.java
/* * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.cant.resolve.location // key: compiler.misc.location.1 class Location1 { Object o = null; { Object o2 = o.v; } }
openjdk/jdk8
1,198
langtools/test/com/sun/javadoc/testBaseClass/Bar.java
/* * Copyright (c) 1999, 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. */ import baz.*; /** First line of comments for Bar * Second line of comments for Bar */ public class Bar extends Foo { } // end class Bar
openjdk/jtreg
1,216
test/modules/JavaBaseTest.java
/* * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * @test * @modules java.base */ public class JavaBaseTest { public static void main(String... args) { System.out.println("JavaBaseTest"); } }
apache/directory-fortress-core
1,157
src/main/java/org/apache/directory/fortress/core/util/Testable.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.directory.fortress.core.util; import org.apache.tools.ant.Task; /** * Interface is extended by custom Ant tasks that require JUnit validation. * * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> */ public interface Testable { void execute( Task task ); }
apache/directory-kerby
1,140
kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/message/AdminReq.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.kerberos.kerb.admin.message; /** * Use to construct Admin message. * Probably two kinds of request. * add principal -- AdReq * change password? -- chReq */ public class AdminReq extends AdminMessage { public AdminReq(AdminMessageType messageType) { super(messageType); } }
apache/directory-kerby
1,155
kerby-common/kerby-asn1/src/main/java/org/apache/kerby/asn1/parse/Asn1Item.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.asn1.parse; import java.nio.ByteBuffer; public class Asn1Item extends Asn1ParseResult { public Asn1Item(Asn1Header header, int bodyStart, ByteBuffer buffer) { super(header, bodyStart, buffer); } @Override public String toString() { return simpleInfo(); } }
apache/directory-server
1,157
protocol-ntp/src/main/java/org/apache/directory/server/ntp/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 the entry point to instances of the * {@link org.apache.directory.server.ntp.NtpServer}, * as well as support for configuration and the root * of the exception hierarchy. * * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> */ package org.apache.directory.server.ntp;
apache/directory-studio
1,105
tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/ConnectionFromServerDialogBot.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.directory.studio.test.integration.ui.bots; public class ConnectionFromServerDialogBot extends DialogBot { private static final String TITLE = "Connection created"; public ConnectionFromServerDialogBot() { super( TITLE ); } }
apache/distributedlog
1,141
distributedlog-proxy-server/src/main/java/org/apache/distributedlog/service/FatalErrorHandler.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.distributedlog.service; /** * Implement handling for an unrecoverable error. */ public interface FatalErrorHandler { /** * This method is invoked when an unrecoverable error has occurred * and no progress can be made. It should implement a shutdown routine. */ void notifyFatalError(); }
apache/dolphinscheduler
1,116
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/exceptions/TaskPauseException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server.master.engine.exceptions; public class TaskPauseException extends RuntimeException { public TaskPauseException(String message) { super(message); } public TaskPauseException(String message, Throwable cause) { super(message, cause); } }
apache/druid
1,167
processing/src/main/java/org/apache/druid/indexer/TaskState.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.druid.indexer; public enum TaskState { RUNNING, SUCCESS, FAILED; public boolean isRunnable() { return this == RUNNING; } public boolean isComplete() { return this != RUNNING; } public boolean isSuccess() { return this == SUCCESS; } public boolean isFailure() { return this == FAILED; } }
apache/dubbo
1,136
dubbo-common/src/test/java/org/apache/dubbo/common/extension/duplicated/impl/DuplicatedWithoutOverriddenExt1.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.common.extension.duplicated.impl; import org.apache.dubbo.common.extension.duplicated.DuplicatedWithoutOverriddenExt; public class DuplicatedWithoutOverriddenExt1 implements DuplicatedWithoutOverriddenExt { @Override public String echo() { return "DuplicatedWithoutOverriddenExt1"; } }
apache/dubbo
1,136
dubbo-common/src/test/java/org/apache/dubbo/common/extension/duplicated/impl/DuplicatedWithoutOverriddenExt2.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.common.extension.duplicated.impl; import org.apache.dubbo.common.extension.duplicated.DuplicatedWithoutOverriddenExt; public class DuplicatedWithoutOverriddenExt2 implements DuplicatedWithoutOverriddenExt { @Override public String echo() { return "DuplicatedWithoutOverriddenExt2"; } }
apache/dubbo
1,142
dubbo-metrics/dubbo-metrics-event/src/main/java/org/apache/dubbo/metrics/listener/MetricsListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.metrics.listener; import org.apache.dubbo.metrics.event.MetricsEvent; /** * Metrics Listener. */ public interface MetricsListener<E extends MetricsEvent> { boolean isSupport(MetricsEvent event); /** * notify event. * * @param event BaseMetricsEvent */ void onEvent(E event); }
apache/dubbo
1,158
dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/NoSuchPropertyException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.common.bytecode; /** * NoSuchPropertyException. */ public class NoSuchPropertyException extends RuntimeException { private static final long serialVersionUID = -2725364246023268766L; public NoSuchPropertyException() { super(); } public NoSuchPropertyException(String msg) { super(msg); } }
apache/dubbo
1,164
dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext8_add/AddExt3.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.common.extension.ext8_add; import org.apache.dubbo.common.URL; import org.apache.dubbo.common.extension.Adaptive; import org.apache.dubbo.common.extension.SPI; /** * show add extension pragmatically. use for test replaceAdaptive success */ @SPI("impl1") public interface AddExt3 { @Adaptive String echo(URL url, String s); }
apache/eagle
1,136
eagle-core/eagle-app/eagle-app-streamproxy/src/main/java/org/apache/eagle/app/proxy/stream/StreamProxyProducer.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.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.app.proxy.stream; import org.apache.eagle.app.messaging.StreamRecord; import java.io.Closeable; import java.io.IOException; import java.util.List; import java.util.concurrent.Future; public interface StreamProxyProducer extends Closeable { void send(List<StreamRecord> events) throws IOException; }
apache/eventmesh
1,129
eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/dingtalk/SinkConnectorConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eventmesh.common.config.connector.dingtalk; import lombok.Data; @Data public class SinkConnectorConfig { private String connectorName; private String appKey; private String appSecret; private String openConversationId; private String robotCode; private String coolAppCode; }
apache/falcon
1,160
common-types/src/main/java/org/apache/falcon/extensions/ExtensionStatus.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.falcon.extensions; /** * Enum to store ExtensionStatus. */ public enum ExtensionStatus { ENABLED("enabled state"), DISABLED("disabled state"); private final String text; ExtensionStatus(final String text) { this.text = text; } @Override public String toString(){ return text; } }
apache/fineract
1,126
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromCommandJsonDeserializer.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fineract.infrastructure.core.serialization; /** * */ public interface FromCommandJsonDeserializer<T> { T commandFromCommandJson(String json); T commandFromCommandJson(Long resourceId, String json); T commandFromCommandJson(Long resourceId, String json, boolean makerCheckerApproval); }
apache/fineract
1,127
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantModuleRootFilter.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fineract.infrastructure.core.service.migration; import liquibase.changelog.IncludeAllFilter; public class TenantModuleRootFilter implements IncludeAllFilter { @Override public boolean include(String changeLogPath) { return changeLogPath.endsWith("module-changelog-master.xml"); } }
apache/fineract
1,130
fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/data/request/ProvisionEntryRequest.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fineract.accounting.provisioning.data.request; import java.io.Serial; import java.io.Serializable; public record ProvisionEntryRequest(String date, Boolean createjournalentries, String locale, String dateFormat) implements Serializable { @Serial private static final long serialVersionUID = 1L; }
apache/fineract
1,154
fineract-provider/src/test/java/org/apache/fineract/junit/system/WithSystemProperties.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fineract.junit.system; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.METHOD }) public @interface WithSystemProperties { WithSystemProperty[] value(); }
apache/flex-utilities
1,139
FlexPMD/flex-pmd-java/as3-parser-api/src/test/java/com/adobe/ac/pmd/parser/OperatorsTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 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.adobe.ac.pmd.parser; import static org.junit.Assert.assertEquals; import org.junit.Test; public class OperatorsTest { @Test public void testToString() { assertEquals( "&&", Operators.AND.toString() ); assertEquals( "and", Operators.AND_AS2.toString() ); } }
apache/flink-statefun-playground
1,077
playground-internal/statefun-playground-entrypoint/src/main/java/org/apache/flink/statefun/playground/internal/io/binders/egress/v1/PlaygroundEgressBinder.java
package org.apache.flink.statefun.playground.internal.io.binders.egress.v1; import org.apache.flink.statefun.extensions.ComponentBinder; import org.apache.flink.statefun.extensions.ComponentJsonObject; import org.apache.flink.statefun.playground.internal.io.binders.Utils; import org.apache.flink.statefun.playground.internal.io.spec.PlaygroundEgressSpec; import org.apache.flink.statefun.sdk.TypeName; import org.apache.flink.statefun.sdk.spi.StatefulFunctionModule; public class PlaygroundEgressBinder implements ComponentBinder { static final PlaygroundEgressBinder INSTANCE = new PlaygroundEgressBinder(); static final TypeName KIND_TYPE = TypeName.parseFrom("io.statefun.playground.v1/egress"); @Override public void bind( ComponentJsonObject component, StatefulFunctionModule.Binder remoteModuleBinder) { Utils.validateComponent(component, KIND_TYPE); final PlaygroundEgressSpec playgroundEgressSpec = Utils.parseJson(component.specJsonNode(), PlaygroundEgressSpec.class); remoteModuleBinder.bindEgress(playgroundEgressSpec); } }
apache/flink
1,161
flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/slots/DummySlotOwner.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.runtime.jobmanager.slots; import org.apache.flink.runtime.jobmaster.LogicalSlot; import org.apache.flink.runtime.jobmaster.SlotOwner; /** SlotOwner implementation used for testing purposes only. */ public class DummySlotOwner implements SlotOwner { @Override public void returnLogicalSlot(LogicalSlot logicalSlot) {} }
apache/geaflow
1,134
geaflow/geaflow-state/geaflow-state-api/src/main/java/org/apache/geaflow/state/query/QueryableAllGraphState.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.geaflow.state.query; import org.apache.geaflow.state.pushdown.filter.IFilter; public interface QueryableAllGraphState<K, VV, EV, R> extends QueryableGraphState<K, VV, EV, R> { /** * Query by a filter, sharing by all the keys. */ QueryableGraphState<K, VV, EV, R> by(IFilter filter); }
apache/geode
1,164
geode-core/src/main/java/org/apache/geode/internal/cache/BucketNotFoundException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package org.apache.geode.internal.cache; /** * A version of ForceReattemptException that should be used when the target bucket can't be found. * * */ public class BucketNotFoundException extends ForceReattemptException { private static final long serialVersionUID = 2898657229184289911L; public BucketNotFoundException(String message) { super(message); } }
apache/geode
1,173
geode-core/src/main/java/org/apache/geode/internal/sequencelog/io/Filter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package org.apache.geode.internal.sequencelog.io; import java.util.regex.Pattern; import org.apache.geode.internal.sequencelog.GraphType; public interface Filter { boolean accept(GraphType graphType, String name, String edgeName, String source, String dest); boolean acceptPattern(GraphType graphType, Pattern pattern, String edgeName, String source, String dest); }
apache/giraph
1,163
giraph-core/src/main/java/org/apache/giraph/types/FloatToDoubleWritableWrapper.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.giraph.types; import org.apache.hadoop.io.DoubleWritable; /** * Converts Floats to DoubleWritables */ public class FloatToDoubleWritableWrapper implements WritableWrapper<DoubleWritable, Float> { @Override public void wrap(Float javaValue, DoubleWritable writableValue) { writableValue.set(javaValue.doubleValue()); } }
apache/gobblin
1,154
gobblin-utility/src/main/java/org/apache/gobblin/util/filesystem/FileSystemSupplier.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.gobblin.util.filesystem; import java.io.IOException; import org.apache.hadoop.fs.FileSystem; /** * An interface of supplier to get FileSystem */ public interface FileSystemSupplier { /** * Function to get fileSystem * @return the new FileSystem for using */ public FileSystem getFileSystem() throws IOException; }
apache/grails-core
1,162
grails-datamapping-rx/src/main/groovy/grails/gorm/rx/proxy/ObservableProxy.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.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 grails.gorm.rx.proxy; import grails.gorm.rx.PersistentObservable; import org.grails.datastore.mapping.proxy.EntityProxy; /** * An interface for proxied objects to implement that are observable. * * @author Graeme Rocher * @since 6.0 */ public interface ObservableProxy<T> extends PersistentObservable<T>, EntityProxy<T> { }
apache/groovy
1,159
subprojects/groovy-json/src/main/java/org/apache/groovy/json/FastStringServiceFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.groovy.json; /** * Factory method to create the service. Should return null if the particular implementation * isn't suitable because of the JDK environment (e.g. JVM version) or config settings otherwise * disable the service. */ public interface FastStringServiceFactory { FastStringService getService(); }
apache/hadoop-common
1,080
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/checkpoint/CheckpointNamingService.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.mapreduce.checkpoint; /** * This class represent a naming service for checkpoints. */ public interface CheckpointNamingService { /** * Generate a new checkpoint Name * @return the checkpoint name */ public String getNewName(); }
apache/hadoop-common
1,105
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/ContainerLogsRetentionPolicy.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.yarn.logaggregation; import org.apache.hadoop.classification.InterfaceAudience.Private; @Private /** * This API is not exposed to end-users yet. */ public enum ContainerLogsRetentionPolicy { APPLICATION_MASTER_ONLY, AM_AND_FAILED_CONTAINERS_ONLY, ALL_CONTAINERS }
apache/hadoop-common
1,147
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RpcMultiplexer.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.ipc; /** * Implement this interface to make a pluggable multiplexer in the * FairCallQueue. */ public interface RpcMultiplexer { /** * Should get current index and optionally perform whatever is needed * to prepare the next index. * @return current index */ int getAndAdvanceCurrentIndex(); }
apache/hadoop
1,094
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestLocalMRNotification.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.mapred; import java.io.IOException; /** * Tests Job end notification in local mode. */ public class TestLocalMRNotification extends NotificationTestCase { public TestLocalMRNotification() throws IOException { super(HadoopTestCase.LOCAL_MR); } }
apache/hadoop
1,135
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/erasurecode/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. */ /** * Datanode side striping + erasure coding related task processing. */ @InterfaceAudience.LimitedPrivate({"HDFS"}) @InterfaceStability.Evolving package org.apache.hadoop.hdfs.server.datanode.erasurecode; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop
1,152
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/local/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. */ /** * Filesystem implementations that allow Hadoop to read directly from * the local file system. */ @InterfaceAudience.LimitedPrivate({"HDFS", "MapReduce"}) @InterfaceStability.Unstable package org.apache.hadoop.fs.local; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hama
1,172
core/src/main/java/org/apache/hama/bsp/message/queue/SynchronizedQueue.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.message.queue; import org.apache.hadoop.io.Writable; /** * Synchronized Queue interface. Can be used to implement better synchronized * datastructures. */ public interface SynchronizedQueue<T extends Writable> extends MessageQueue<T> { public abstract MessageQueue<T> getMessageQueue(); public abstract void prepareRead(); }
apache/harmony
1,126
classlib/modules/swing/src/test/api/java.injected/javax/swing/text/html/StyleSheet_ConvertAttr_BorderBottomWidthTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @author Alexey A. Ivanov */ package javax.swing.text.html; public class StyleSheet_ConvertAttr_BorderBottomWidthTest extends StyleSheet_ConvertAttr_BorderWidthTestCase { protected void setUp() throws Exception { super.setUp(); cssKey = CSS.Attribute.BORDER_BOTTOM_WIDTH; } }
apache/helix
1,171
helix-agent/src/main/java/org/apache/helix/agent/AgentStateModelFactory.java
package org.apache.helix.agent; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.helix.participant.statemachine.StateModelFactory; public class AgentStateModelFactory extends StateModelFactory<AgentStateModel> { @Override public AgentStateModel createNewStateModel(String resourceName, String partitionKey) { AgentStateModel model = new AgentStateModel(); return model; } }
apache/helix
1,175
helix-core/src/main/java/org/apache/helix/CurrentStateChangeListener.java
package org.apache.helix; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Interface to implement to respond to changes in the current state * * @deprecated * NOTE: This interface definition is moved to {@link org.apache.helix.api.listeners.CurrentStateChangeListener} */ @Deprecated public interface CurrentStateChangeListener extends org.apache.helix.api.listeners.CurrentStateChangeListener { }
apache/hive
1,129
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/DropDatabaseMessage.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.hadoop.hive.metastore.messaging; import org.apache.hadoop.hive.metastore.api.Database; public abstract class DropDatabaseMessage extends EventMessage { protected DropDatabaseMessage() { super(EventType.DROP_DATABASE); } public abstract Database getDatabaseObject() throws Exception; }
apache/hive
1,162
itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CoreBlobstoreCliDriver.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hive.cli.control; public class CoreBlobstoreCliDriver extends AbstractCoreBlobstoreCliDriver { public CoreBlobstoreCliDriver(AbstractCliConfig testCliConfig) { super(testCliConfig); } @Override public void runTest(String tname, String fname, String fpath) { super.runTestHelper(tname, fname, fpath, true); } }
apache/hop
1,167
engine/src/main/java/org/apache/hop/core/compress/ICompressionProviderFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.core.compress; import java.util.Collection; public interface ICompressionProviderFactory { ICompressionProvider createCompressionProviderInstance(String name); Collection<ICompressionProvider> getCompressionProviders(); String[] getCompressionProviderNames(); ICompressionProvider getCompressionProviderByName(String name); }
apache/hop
1,178
core/src/main/java/org/apache/hop/core/parameters/NamedParameter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.core.parameters; /** Target class for the parameter keys. */ public class NamedParameter { /** key of this parameter */ public String key; /** Description of the parameter */ public String description; /** Default value for this parameter */ public String defaultValue; /** Actual value of the parameter. */ public String value; }
apache/hop
1,186
core/src/main/java/org/apache/hop/core/plugins/ParentFirst.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.core.plugins; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Documented @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface ParentFirst { String[] patterns() default {}; }
apache/iceberg
1,179
api/src/main/java/org/apache/iceberg/util/SerializableFunction.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iceberg.util; import java.io.Serializable; import java.util.function.Function; /** * A concrete transform function that applies a transform to values of a certain type. * * @param <S> Java class of source values * @param <T> Java class of transformed values */ public interface SerializableFunction<S, T> extends Function<S, T>, Serializable {}
apache/ignite-3
1,144
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CreateSchemaCommandBuilder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ignite.internal.catalog.commands; /** * Builder for a {@link CreateSchemaCommand}. */ public interface CreateSchemaCommandBuilder extends CreateSystemSchemaCommandBuilder { /** Sets a flag indicating whether {@code IF NOT EXISTS} option was specified. */ CreateSchemaCommandBuilder ifNotExists(boolean value); }
apache/ignite-3
1,154
modules/raft/src/main/java/org/apache/ignite/raft/jraft/entity/codec/LogEntryDecoder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.entity.codec; import org.apache.ignite.raft.jraft.entity.LogEntry; /** * Log entry decoder */ public interface LogEntryDecoder { /** * Decode a log entry from byte array, return null when fail to decode. * * @param bs Bytes. * @return The entry. */ LogEntry decode(byte[] bs); }
apache/ignite-3
1,156
modules/network-api/src/main/java/org/apache/ignite/internal/network/ChannelTypeModule.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ignite.internal.network; import java.util.ServiceLoader; /** * Registrar of {@link ChannelType} for each module that should be loaded into the via the {@link ServiceLoader} and then received * via {@link ChannelTypeRegistry}. */ public interface ChannelTypeModule { void register(ChannelTypeRegistrar channelTypeRegistrar); }
apache/ignite
1,128
modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/VolatileAtomicDataStructureValue.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.ignite.internal.processors.datastructures; /** * */ public abstract class VolatileAtomicDataStructureValue extends AtomicDataStructureValue { /** */ private static final long serialVersionUID = 0L; /** * @return Grid start time. */ public abstract long gridStartTime(); }