repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/tapestry-5
1,143
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceProxyProvider.java
// Copyright 2007 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.ioc.internal; /** * Used in concert with {@link org.apache.tapestry5.ioc.internal.SerializationSupport} to convert service tokens back * into service proxies. */ public interface ServiceProxyProvider { /** * Look up the service and return its proxy. * * @param serviceId the id of the service to obtain * @return the service proxy * @throws RuntimeException if the service does not exist or does not have a proxy */ Object provideServiceProxy(String serviceId); }
apache/tapestry-5
1,158
tapestry-core/src/main/java/org/apache/tapestry5/ClientBodyElement.java
// Copyright 2010, 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; import org.apache.tapestry5.ajax.MultiZoneUpdate; /** * Extends {@link ClientElement} with the concept of a body, a Block that can be rendered to provide the content * within. The primary implementation of this is the {@link org.apache.tapestry5.corelib.components.Zone} component, which exposes its client id and body for * use with {@link MultiZoneUpdate}. * * @since 5.2.3 * @see MultiZoneUpdate#add(ClientBodyElement) */ public interface ClientBodyElement extends ClientElement { Block getBody(); }
apache/thrift
1,169
lib/java/src/main/java/org/apache/thrift/annotation/Nullable.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.thrift.annotation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * Annotation indicating a field, method return, or method parameter may be {@code null}. We package * our own annotation to avoid a mandatory third-party dependency. */ @Retention(RetentionPolicy.CLASS) public @interface Nullable {}
apache/tomcat
1,167
java/jakarta/transaction/TransactionSynchronizationRegistry.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package jakarta.transaction; public interface TransactionSynchronizationRegistry { Object getTransactionKey(); void putResource(Object key, Object value); Object getResource(Object key); void registerInterposedSynchronization(Synchronization sync); int getTransactionStatus(); void setRollbackOnly(); boolean getRollbackOnly(); }
apache/tomcat
1,170
java/org/apache/catalina/ha/session/ReplicatedSessionListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.catalina.ha.session; import java.io.Serializable; import org.apache.catalina.SessionListener; /** * This is a marker interface used to indicate an implementation of {@link SessionListener} that should be replicated * with the session across the cluster. */ public interface ReplicatedSessionListener extends SessionListener, Serializable { }
apache/tomcat80
1,161
java/org/apache/tomcat/util/net/jsse/openssl/Encryption.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tomcat.util.net.jsse.openssl; enum Encryption { AES128, AES128CCM, AES128CCM8, AES128GCM, AES256, AES256CCM, AES256CCM8, AES256GCM, CAMELLIA256, CAMELLIA128, CHACHA20POLY1305, TRIPLE_DES, DES, IDEA, eGOST2814789CNT, SEED, FZA, RC4, RC2, eNULL; }
apache/tomcat80
1,179
java/javax/annotation/sql/DataSourceDefinitions.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package javax.annotation.sql; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * @since Common Annotations 1.1 */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface DataSourceDefinitions { DataSourceDefinition[] value(); }
apache/tomcat80
1,193
java/javax/websocket/PongMessage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package javax.websocket; import java.nio.ByteBuffer; /** * Represents a WebSocket Pong message and used by message handlers to enable * applications to process the response to any Pings they send. */ public interface PongMessage { /** * Get the payload of the Pong message. * * @return The payload of the Pong message. */ ByteBuffer getApplicationData(); }
apache/tomee
1,152
container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/RpcBean.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.oejb2; import java.util.List; /** * @version $Rev$ $Date$ */ public interface RpcBean extends EnterpriseBean { List<String> getJndiName(); List<String> getLocalJndiName(); String getTssLink(); void setTssLink(String value); PatternType getTss(); void setTss(PatternType value); }
apache/unomi
1,139
graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/providers/GraphQLSubscriptionProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.unomi.graphql.providers; import graphql.annotations.processor.GraphQLAnnotations; import graphql.schema.GraphQLFieldDefinition; import java.util.Set; public interface GraphQLSubscriptionProvider extends GraphQLProvider { Set<GraphQLFieldDefinition> getSubscriptions(GraphQLAnnotations graphQLAnnotations); }
apache/usergrid
1,152
stack/core/src/main/java/org/apache/usergrid/persistence/ConnectionRef.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.usergrid.persistence; import java.util.List; /** * Connection tuple * * @author edanuff */ public interface ConnectionRef extends ConnectedEntityRef, AssociatedEntityRef { public EntityRef getSourceRefs(); public List<ConnectedEntityRef> getPairedConnections(); public ConnectedEntityRef getTargetRefs(); }
apache/wicket
1,126
wicket-core-tests/src/test/java/org/apache/wicket/markup/html/internal/headeritems/PageWithHeaderItems.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.markup.html.internal.headeritems; import org.apache.wicket.request.mapper.parameter.PageParameters; public class PageWithHeaderItems extends BasePage { private static final long serialVersionUID = 1L; public PageWithHeaderItems(final PageParameters parameters) { super(parameters); } }
apache/wicket
1,126
wicket-util/src/main/java/org/apache/wicket/util/parse/metapattern/GroupNotBoundException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.util.parse.metapattern; /** * Thrown if a group is not bound. * * @author Jonathan Locke */ public final class GroupNotBoundException extends RuntimeException { private static final long serialVersionUID = 1L; /** * Constructor. */ public GroupNotBoundException() { super(); } }
apache/wicket
1,133
wicket-examples/src/main/java/org/apache/wicket/examples/compref/AnotherPanel.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.compref; import org.apache.wicket.markup.html.panel.Panel; /** * Another sample panel component. * * @author Eelco Hillenius */ class AnotherPanel extends Panel { /** * Construct. * * @param id * component id */ public AnotherPanel(String id) { super(id); } }
apache/zeppelin
1,149
zeppelin-interpreter/src/main/java/org/apache/zeppelin/display/ui/Select.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.display.ui; /** * Html Dropdown list */ public class Select extends OptionInput<Object> { public Select() { } public Select(String name, Object defaultValue, ParamOption[] options) { this.name = name; this.displayName = name; this.defaultValue = defaultValue; this.options = options; } }
apache/zookeeper
1,149
zookeeper-server/src/main/java/org/apache/zookeeper/cli/PlainOutputFormatter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.cli; import static java.nio.charset.StandardCharsets.UTF_8; public class PlainOutputFormatter implements OutputFormatter { public static final PlainOutputFormatter INSTANCE = new PlainOutputFormatter(); @Override public String format(byte[] data) { return new String(data, UTF_8); } }
google/binnavi
1,140
src/test/java/com/google/security/zynamics/binnavi/API/debug/MockMemoryListener.java
/* Copyright 2014 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package com.google.security.zynamics.binnavi.API.debug; import com.google.security.zynamics.binnavi.API.debug.IMemoryListener; import com.google.security.zynamics.binnavi.API.debug.Memory; public final class MockMemoryListener implements IMemoryListener { public String events = ""; @Override public void changedMemory(final Memory memory, final long address, final int size) { events += String.format("changedMemory/%d/%d;", address, size); } @Override public void clearedMemory(final Memory memory) { events += "clearedMemory;"; } }
google/caliper
1,145
caliper-runner/src/main/java/com/google/caliper/runner/worker/trial/TrialExecutor.java
/* * Copyright (C) 2018 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.caliper.runner.worker.trial; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; import javax.inject.Qualifier; /** Binding annotation for the executor for running trials. */ @Retention(RUNTIME) @Target({FIELD, PARAMETER, METHOD}) @Qualifier public @interface TrialExecutor {}
google/caliper
1,146
caliper-runner/src/main/java/com/google/caliper/runner/instrument/InstrumentName.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.instrument; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; import javax.inject.Qualifier; /** Binding annotation for the name used to configure an instrument. */ @Retention(RUNTIME) @Target({FIELD, PARAMETER, METHOD}) @Qualifier @interface InstrumentName {}
google/guava
1,158
android/guava-testlib/src/com/google/common/testing/IgnoreJRERequirement.java
/* * Copyright 2019 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.testing; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Target; /** * Disables Animal Sniffer's checking of compatibility with older versions of Java/Android. * * <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}. */ @Target({METHOD, CONSTRUCTOR, TYPE, FIELD}) @interface IgnoreJRERequirement {}
google/guava
1,166
guava/src/com/google/common/util/concurrent/IgnoreJRERequirement.java
/* * Copyright 2019 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package com.google.common.util.concurrent; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Target; /** * Disables Animal Sniffer's checking of compatibility with older versions of Java/Android. * * <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}. */ @Target({METHOD, CONSTRUCTOR, TYPE, FIELD}) @interface IgnoreJRERequirement {}
google/j2cl
1,122
junit/generator/javatests/com/google/j2cl/junit/integration/async/data/TestReturnsVoidTimeoutProvided.java
/* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.j2cl.junit.integration.async.data; import com.google.j2cl.junit.async.AsyncTestRunner; import com.google.j2cl.junit.async.Timeout; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; /** Test for timeout in a non asyncTest */ @RunWith(AsyncTestRunner.class) public class TestReturnsVoidTimeoutProvided { @Timeout(200) @Before public void before() {} @Timeout(200) @After public void after() {} @Test(timeout = 200) public void test() {} }
google/j2cl
1,153
transpiler/javatests/com/google/j2cl/integration/java/jsinnerclass/Main.java
/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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 jsinnerclass; import static com.google.j2cl.integration.testing.Asserts.assertTrue; import jsinterop.annotations.JsType; public class Main { @JsType(isNative = true, namespace = "com.google.test") static class NativeType { // return new Inner(outer).getB(); static native int getB(Outer outer); } public static void main(String... args) { // Call the constructor through js assertTrue(NativeType.getB(new Outer()) == 3); // Call the constructor through java assertTrue(new Outer().new Inner().getB() == 3); } }
google/j2cl
1,158
jre/javatests/com/google/j2cl/jre/java/lang/DoubleEqualsSemanticsTest.java
/* * Copyright 2019 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.j2cl.jre.java.lang; import junit.framework.TestCase; /** Tests equals semantics for Double. */ public final class DoubleEqualsSemanticsTest extends TestCase { public void testEquals() { assertTrue(Double.valueOf(Double.NaN).equals(Double.NaN)); assertFalse(Double.valueOf(0.0d).equals(-0.0d)); // Also make sure the behavior doesn't change when Object trampoline is used. Object o; o = Double.valueOf(Double.NaN); assertTrue(o.equals(Double.NaN)); o = Double.valueOf(0.0d); assertFalse(o.equals(-0.0d)); } }
google/j2cl
1,188
jre/java/java/util/Iterator.java
/* * Copyright 2007 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 java.util; import static javaemul.internal.InternalPreconditions.checkNotNull; import java.util.function.Consumer; /** * See <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html">the official Java * API doc</a> for details. * * @param <T> element type */ public interface Iterator<T> { boolean hasNext(); T next(); default void forEachRemaining(Consumer<? super T> consumer) { checkNotNull(consumer); while (hasNext()) { consumer.accept(next()); } } default void remove() { throw new UnsupportedOperationException(); } }
google/oss-fuzz
1,198
projects/jedis/JedisURIFuzzer.java
// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //////////////////////////////////////////////////////////////////////////////// import com.code_intelligence.jazzer.api.FuzzedDataProvider; import redis.clients.jedis.Jedis; import java.net.URI; import java.net.URISyntaxException; public class JedisURIFuzzer { public static void fuzzerTestOneInput(FuzzedDataProvider data) { try{ Jedis jedis = new Jedis(new URI(data.consumeRemainingAsString())); } catch (URISyntaxException e) {} catch (java.lang.NumberFormatException e) {} catch (redis.clients.jedis.exceptions.InvalidURIException e) {} } }
google/s2-geometry-library-java
1,151
library/src/com/google/common/geometry/InputStreams.java
/* * Copyright 2018 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.common.geometry; import java.io.IOException; import java.io.InputStream; /** Utilities for handling {@link InputStream}s. */ final class InputStreams { private InputStreams() {} /** * Reads a byte from {@code input}. * * @throws IOException if {@code input.read()} throws an {@code IOException} or returns -1 (EOF). */ static byte readByte(InputStream input) throws IOException { int result = input.read(); if (result < 0) { throw new IOException("EOF"); } return (byte) (result & 0xFF); } }
googleworkspace/java-samples
1,165
sheets/snippets/src/test/java/TestPivotTable.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.assertNotNull; import com.google.api.services.sheets.v4.model.BatchUpdateSpreadsheetResponse; import java.io.IOException; import org.junit.Test; // Unit testcase for spreadsheet pivot table snippet public class TestPivotTable extends BaseTest { @Test public void testPivotTable() throws IOException { String spreadsheetId = Create.createSpreadsheet("Test Spreadsheet"); BatchUpdateSpreadsheetResponse result = PivotTables.pivotTables(spreadsheetId); assertNotNull(result); deleteFileOnCleanup(spreadsheetId); } }
hibernate/hibernate-ogm
1,104
core/src/test/java/org/hibernate/ogm/backendtck/id/GuitarPlayer.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.backendtck.id; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.TableGenerator; /** * @author Gunnar Morling */ @Entity public class GuitarPlayer { private long id; private String name; GuitarPlayer() { } public GuitarPlayer(String name) { this.name = name; } @Id @GeneratedValue(strategy = GenerationType.TABLE, generator = "guitarGen") @TableGenerator(name = "guitarGen", table = "GuitarPlayerSequence", pkColumnValue = "guitarPlayer", valueColumnName = "nextGuitarPlayerId", allocationSize = 1) public long getId() { return id; } public void setId(long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
hibernate/hibernate-orm
1,078
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/manytoone/Frame.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.annotations.manytoone; import java.io.Serializable; import java.util.Set; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; import org.hibernate.annotations.Formula; /** * @author Emmanuel Bernard */ @Entity // "frame" is reserved in postgresplus @Table(name = "FrameTable") public class Frame implements Serializable { @Id @GeneratedValue private Long id; @OneToMany( mappedBy = "frame" ) private Set<Lens> lenses; private String name; @Formula("lower(name)") private String lowerName; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Set<Lens> getLenses() { return lenses; } public void setLenses(Set<Lens> lenses) { this.lenses = lenses; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
hibernate/hibernate-orm
1,079
hibernate-core/src/main/java/org/hibernate/dialect/function/array/OracleArrayFillFunction.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.dialect.function.array; import java.util.List; import org.hibernate.metamodel.model.domain.ReturnableType; import org.hibernate.sql.ast.SqlAstTranslator; import org.hibernate.sql.ast.spi.SqlAppender; import org.hibernate.sql.ast.tree.SqlAstNode; /** * Oracle array_fill function. */ public class OracleArrayFillFunction extends AbstractArrayFillFunction { public OracleArrayFillFunction(boolean list) { super( list ); } @Override public void render( SqlAppender sqlAppender, List<? extends SqlAstNode> sqlAstArguments, ReturnableType<?> returnType, SqlAstTranslator<?> walker) { final String arrayTypeName = DdlTypeHelper.getTypeName( returnType, walker.getSessionFactory().getTypeConfiguration() ); sqlAppender.append( arrayTypeName ); sqlAppender.append( "_fill(" ); sqlAstArguments.get( 0 ).accept( walker ); sqlAppender.append( ',' ); sqlAstArguments.get( 1 ).accept( walker ); sqlAppender.append( ')' ); } }
hibernate/hibernate-search
1,048
engine/src/main/java/org/hibernate/search/engine/environment/bean/AutoCloseableBeanHolder.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.engine.environment.bean; import java.io.IOException; import java.io.UncheckedIOException; /** * A bean holder that calls {@link AutoCloseable#close()} on its instance upon being {@link #close() closed}. * @param <T> */ final class AutoCloseableBeanHolder<T extends AutoCloseable> implements BeanHolder<T> { private final T instance; AutoCloseableBeanHolder(T instance) { this.instance = instance; } @Override public String toString() { return getClass().getSimpleName() + "[" + "instance=" + instance + "]"; } @Override public T get() { return instance; } @Override public void close() { try { instance.close(); } catch (IOException e) { throw new UncheckedIOException( e.getMessage(), e ); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException( e ); } catch (Exception e) { throw new RuntimeException( e ); } } }
hibernate/hibernate-search
1,048
engine/src/main/java/org/hibernate/search/engine/spatial/ImmutableGeoPoint.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.engine.spatial; import java.util.Objects; final class ImmutableGeoPoint implements GeoPoint { private final double latitude; private final double longitude; ImmutableGeoPoint(double latitude, double longitude) { this.latitude = latitude; this.longitude = longitude; } @Override public String toString() { return "ImmutableGeoPoint[" + "latitude=" + latitude + ", longitude=" + longitude + "]"; } @Override public boolean equals(Object o) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } ImmutableGeoPoint that = (ImmutableGeoPoint) o; return that.latitude == latitude && that.longitude == longitude; } @Override public int hashCode() { return Objects.hash( latitude, longitude ); } @Override public double latitude() { return latitude; } @Override public double longitude() { return longitude; } }
hibernate2011/RosClient
1,162
app/src/main/java/com/jilk/ros/rosbridge/indication/Indicate.java
/** * Copyright (c) 2014 Jilk Systems, Inc. * * This file is part of the Java ROSBridge Client. * * The Java ROSBridge Client is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The Java ROSBridge Client 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 for more details. * * You should have received a copy of the GNU General Public License * along with the Java ROSBridge Client. If not, see http://www.gnu.org/licenses/. * */ package com.jilk.ros.rosbridge.indication; 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 Indicate { // if later we want multiple indicated fields, use an int here }
openjdk/jdk8
1,145
jaxp/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHelper.java
/* * reserved comment block * DO NOT REMOVE OR ALTER! */ /* * Copyright 2005 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 com.sun.org.apache.xerces.internal.jaxp.validation; import java.io.IOException; import javax.xml.transform.Result; import javax.xml.transform.Source; import org.xml.sax.SAXException; /** * <p>Instances of ValidatorHelper are able to validate * specific source and result types.</p> * * @author Michael Glavassevich, IBM */ interface ValidatorHelper { public void validate(Source source, Result result) throws SAXException, IOException; }
openjdk/jdk8
1,161
langtools/test/tools/javac/diags/examples/IntfAnnotationsCantHaveTypeParams.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.intf.annotation.members.cant.have.type.params @interface X { <T> String value(); }
openjdk/jdk8
1,175
langtools/test/tools/javac/diags/examples/EnumsMustBeStatic.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.enums.must.be.static class EnumsMustBeStatic { class Nested { enum E { A, B, C } } }
openjdk/jdk8
1,176
langtools/test/com/sun/javadoc/testCustomTag/TagTestClass.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. */ /** * @customTag A custom tag. * @unknownTag An unknown tag */ public class TagTestClass { public void method(){} }
openjdk/jdk8
1,185
langtools/test/com/sun/javadoc/testTaglets/Parent.java
/* * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ public class Parent { /** * This is the first sentence. This is the second sentence. */ public void method(){} }
openjdk/jtreg
1,176
test/modlibs/buildAction/patch/java.base/java/io/IOHelper.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. */ package java.io; public class IOHelper { public void run() { System.out.println(getClass().getName()); } }
openjdk/jtreg
1,202
test/share/basic/junit/CantFindSrc.java
/* * Copyright (c) 1999, 2009, 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 * @summary Error: Can't find source file: CannotFindSrc.java in directory-list: .../data/basic/junit * @run junit CannotFindSrc */
openjdk/jtreg
1,212
test/groups/d3/d32/Bad.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. */ /* * @test * @summary this is a bad test description which should never be read because * it is specifically excluded in the group file * @bad */
oracle-samples/oracle-functions-samples
1,096
samples/oci-apigw-idcs-auth-basic/src/main/java/com/example/fn/util/ResourceServerConfig.java
package com.example.fn.util; /** * Util class that contains the constants used across the function */ public final class ResourceServerConfig { private ResourceServerConfig() { // } public static final String TOKEN_PREFIX = "Basic "; public static final String CONFIG_KEY_IDCS_URL = "IDCS_URL"; public static final String CONFIG_KEY_CLIENT_ID = "CLIENT_ID"; public static final String CONFIG_KEY_CLIENT_SECRET = "CLIENT_SECRET"; public static final String CONFIG_KEY_SCOPE_AUD = "SCOPE_AUD"; public static final String DEFAULT_GRANT_TYPE = "password"; public static final String HEADER_NAME_CONTENT_TYPE = "Content-Type"; public static final String HEADER_NAME_AUTHORIZATION = "Authorization"; public static final String HEADER_VALUE_CONTENT_TYPE = "application/x-www-form-urlencoded"; public static final Integer HTTP_RESPONSE_OK = 200; public static final String TOKEN_CLAIM_KEY_EXPIRY = "exp"; public static final String TOKEN_CLAIM_KEY_SUBJECT = "sub"; public static final String TOKEN_CLAIM_KEY_SCOPE = "scope"; }
oracle/nosql
1,164
kvmain/src/main/java/oracle/kv/impl/systables/StatsLeaseDesc.java
/*- * Copyright (C) 2011, 2025 Oracle and/or its affiliates. All rights reserved. * * This file was distributed by Oracle as part of a version of Oracle NoSQL * Database made available at: * * http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html * * Please see the LICENSE file included in the top-level directory of the * appropriate version of Oracle NoSQL Database for a copy of the license and * additional information. */ package oracle.kv.impl.systables; import oracle.kv.impl.api.table.TableBuilder; /** * Base descriptor for the stats lease system tables. */ abstract public class StatsLeaseDesc extends SysTableDescriptor { /* Columns associated with lease management. */ public static final String COL_NAME_LEASE_RN = "leasingRN"; public static final String COL_NAME_LEASE_DATE = "leaseExpiry"; public static final String COL_NAME_LAST_UPDATE = "lastUpdated"; @Override protected void buildTable(TableBuilder builder) { builder.addString(COL_NAME_LEASE_RN); builder.addString(COL_NAME_LEASE_DATE); builder.addString(COL_NAME_LAST_UPDATE); } }
apache/commons-rdf
1,152
commons-rdf-jena/src/main/java/org/apache/commons/rdf/jena/JenaLiteral.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.rdf.jena; import org.apache.commons.rdf.api.Literal; import org.apache.jena.graph.Node; /** * A Jena-backed {@link Literal}. * <p> * The underlying Jena {@link Node} can be accessed from {@link #asJenaNode()}. * </p> * * @see Node#isLiteral() */ public interface JenaLiteral extends JenaRDFTerm, Literal { }
apache/cxf
1,147
tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/ValidationException.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.tools.wadlto.jaxrs; public class ValidationException extends RuntimeException { private static final long serialVersionUID = 4372513715544855298L; public ValidationException(String error) { super(error); } public ValidationException(String error, Throwable t) { super(error, t); } }
apache/cxf
1,149
rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/BeanService.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.aegis.services; public class BeanService { public SimpleBean getSimpleBean() { SimpleBean bean = new SimpleBean(); bean.setBleh("bleh"); bean.setHowdy("howdy"); return bean; } public String getSubmitBean(SimpleBean bean, String bleh) { return bean.getBleh(); } }
apache/daffodil
1,145
daffodil-core/src/main/java/org/apache/daffodil/api/metadata/SimpleElementMetadata.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.daffodil.api.metadata; import org.apache.daffodil.api.DFDLPrimType; /** * Access to metadata values exclusive to elements of simple type. */ public interface SimpleElementMetadata extends ElementMetadata { /** * Primitive Type enum usable from Java * * @return DFDLPrimType */ DFDLPrimType dfdlType(); }
apache/directory-scimple
1,118
scim-spec/scim-spec-schema/src/main/java/org/apache/directory/scim/spec/schema/AttributeContainer.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.scim.spec.schema; import java.io.Serializable; import java.util.Set; import org.apache.directory.scim.spec.schema.Schema.Attribute; public interface AttributeContainer extends Serializable { String getUrn(); Set<Attribute> getAttributes(); Attribute getAttribute(String attributeName); }
apache/drill
1,148
logical/src/main/java/org/apache/drill/common/logical/UnexpectedOperatorType.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.drill.common.logical; public class UnexpectedOperatorType extends ValidationError{ public UnexpectedOperatorType(String message){ super(message); } public UnexpectedOperatorType(Object operator, String message) { super(message + " Received node of type " + operator.getClass().getCanonicalName()); } }
apache/druid
1,138
processing/src/test/java/org/apache/druid/query/operator/PartitionSortOperatorFactoryTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.query.operator; import nl.jqno.equalsverifier.EqualsVerifier; import org.junit.Test; public class PartitionSortOperatorFactoryTest { @Test public void testEquals() { EqualsVerifier.forClass(NaiveSortOperatorFactory.class) .usingGetClass() .verify(); } }
apache/dubbo
1,106
dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/ServiceInstanceNotificationCustomizer.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.registry.client.metadata; import org.apache.dubbo.common.extension.SPI; import org.apache.dubbo.registry.client.ServiceInstance; import java.util.List; @SPI public interface ServiceInstanceNotificationCustomizer { void customize(List<ServiceInstance> serviceInstance); }
apache/dubbo
1,146
dubbo-common/src/test/java/org/apache/dubbo/common/beans/model/FooBeanWithScopeModel.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.beans.model; import org.apache.dubbo.rpc.model.ScopeModel; public class FooBeanWithScopeModel { private ScopeModel scopeModel; public FooBeanWithScopeModel(ScopeModel scopeModel) { this.scopeModel = scopeModel; } public ScopeModel getScopeModel() { return scopeModel; } }
apache/eventmesh
1,111
eventmesh-connectors/eventmesh-connector-jdbc/src/main/java/org/apache/eventmesh/connector/jdbc/table/type/Pair.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eventmesh.connector.jdbc.table.type; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor @Builder public class Pair<Left, Right> { private Left left; private Right right; }
apache/felix-dev
1,078
ipojo/runtime/composite-it/ipojo-composite-instance-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/BazService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.ipojo.runtime.core.services; import java.util.Properties; public interface BazService { boolean foo(); Properties fooProps(); Boolean getObject(); boolean getBoolean(); int getInt(); long getLong(); double getDouble(); }
apache/felix-dev
1,078
ipojo/runtime/composite-it/ipojo-composite-instance-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.ipojo.runtime.core.services; import java.util.Properties; public interface FooService { boolean foo(); Properties fooProps(); Boolean getObject(); boolean getBoolean(); int getInt(); long getLong(); double getDouble(); }
apache/felix-dev
1,078
ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.ipojo.runtime.core.services; import java.util.Properties; public interface FooService { boolean foo(); Properties fooProps(); Boolean getObject(); boolean getBoolean(); int getInt(); long getLong(); double getDouble(); }
apache/felix-dev
1,092
dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/Storage.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.dependencymanager.samples.dynamicdep.annot; import java.io.Serializable; /** * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> */ public interface Storage { Serializable get(String key); void store(String key, Serializable data); }
apache/fineract
1,127
fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountRepository.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.portfolio.shareaccounts.domain; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; public interface ShareAccountRepository extends JpaRepository<ShareAccount, Long>, JpaSpecificationExecutor<ShareAccount> { }
apache/fineract
1,127
fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductRepository.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.portfolio.shareproducts.domain; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; public interface ShareProductRepository extends JpaRepository<ShareProduct, Long>, JpaSpecificationExecutor<ShareProduct> { }
apache/fineract
1,133
fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/domain/PlatformCacheRepository.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.cache.domain; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; public interface PlatformCacheRepository extends JpaRepository<PlatformCache, Long>, JpaSpecificationExecutor<PlatformCache> { // }
apache/flink
1,153
flink-core/src/main/java/org/apache/flink/api/common/functions/util/NoOpFunction.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.api.common.functions.util; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.functions.AbstractRichFunction; /** An {@link AbstractRichFunction} that does nothing. */ @Internal public class NoOpFunction extends AbstractRichFunction { private static final long serialVersionUID = 1L; }
apache/freemarker
1,146
freemarker-core/src/main/java/freemarker/template/FalseTemplateBooleanModel.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package freemarker.template; /** * Used for the {@link TemplateBooleanModel#TRUE} singleton. */ final class FalseTemplateBooleanModel implements SerializableTemplateBooleanModel { @Override public boolean getAsBoolean() { return false; } private Object readResolve() { return FALSE; } }
apache/geaflow
1,099
geaflow/geaflow-core/geaflow-runtime/geaflow-runtime-core/src/main/java/org/apache/geaflow/runtime/core/protocol/AbstractCleanCommand.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.runtime.core.protocol; public abstract class AbstractCleanCommand extends AbstractExecutableCommand { public AbstractCleanCommand(long schedulerId, int workerId, int cycleId, long windowId) { super(schedulerId, workerId, cycleId, windowId); } }
apache/geode
1,145
geode-core/src/main/java/org/apache/geode/internal/cache/RegionEntrySynchronizationListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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; import java.util.List; import org.apache.geode.distributed.internal.membership.InternalDistributedMember; public interface RegionEntrySynchronizationListener { void afterSynchronization(InternalDistributedMember sender, InternalRegion region, List<InitialImageOperation.Entry> entriesToSynchronize); }
apache/geode
1,147
geode-core/src/main/java/org/apache/geode/alerting/internal/AlertingSessionNotifier.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.alerting.internal; import org.apache.geode.alerting.internal.api.AlertingService; public interface AlertingSessionNotifier { /** * Removes all {@code AlertingSessionListener}s that are registered. */ void clear(); void createSession(AlertingService alertingService); void startSession(); void stopSession(); }
apache/geode
1,147
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImplFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.cache.lucene.internal; import org.apache.geode.internal.cache.InternalCache; public class LuceneIndexImplFactory { public LuceneIndexImplFactory() {} public LuceneIndexImpl create(String indexName, String regionPath, InternalCache cache) { return new LuceneIndexForPartitionedRegion(indexName, regionPath, cache); } }
apache/giraph
1,155
giraph-core/src/main/java/org/apache/giraph/types/IntToLongWritableWrapper.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.LongWritable; /** * Converts Integers to LongWritables */ public class IntToLongWritableWrapper implements WritableWrapper<LongWritable, Integer> { @Override public void wrap(Integer javaValue, LongWritable writableValue) { writableValue.set(javaValue.longValue()); } }
apache/gobblin
1,147
gobblin-utility/src/main/java/org/apache/gobblin/util/filters/TarGpgPathFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.filters; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.PathFilter; /** * A {@link PathFilter} to accept encrypted tarball files. */ public class TarGpgPathFilter implements PathFilter { @Override public boolean accept(Path path) { return path.getName().endsWith(".tar.gz.gpg"); } }
apache/gobblin
1,151
gobblin-api/src/main/java/org/apache/gobblin/typedconfig/compiletime/LongRange.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.typedconfig.compiletime; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.FIELD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface LongRange { long[] value(); }
apache/groovy
1,137
subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/dsl/expression/DataSourceHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.ginq.dsl.expression; /** * Represents data source holder, e.g. from, joins, where, groupby, etc. * * @since 4.0.0 */ public interface DataSourceHolder { DataSourceExpression getDataSourceExpression(); void setDataSourceExpression(DataSourceExpression dataSourceExpression); }
apache/hadoop-common
1,061
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/api/protocolrecords/GetTaskReportRequest.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.v2.api.protocolrecords; import org.apache.hadoop.mapreduce.v2.api.records.TaskId; public interface GetTaskReportRequest { public abstract TaskId getTaskId(); public abstract void setTaskId(TaskId taskId); }
apache/hadoop-mapreduce
1,143
src/contrib/mumak/src/java/org/apache/hadoop/mapred/SimulatorClock.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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; /** * A clock class - can be mocked out for testing. */ class SimulatorClock extends Clock { long currentTime; SimulatorClock (long now) { super(); currentTime = now; } void setTime(long now) { currentTime = now; } @Override long getTime() { return currentTime; } }
apache/hadoop
1,120
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/retryReasonCategories/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * A retryReasonCategory defines methods applicable on server-response errors. */ @Private @Evolving package org.apache.hadoop.fs.azurebfs.services.retryReasonCategories; import org.apache.hadoop.classification.InterfaceAudience.Private; import org.apache.hadoop.classification.InterfaceStability.Evolving;
apache/hadoop
1,138
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFcLocalFsUtil.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.fs; import org.junit.jupiter.api.BeforeEach; /** * Test Util for localFs using FileContext API. */ public class TestFcLocalFsUtil extends FileContextUtilBase { @Override @BeforeEach public void setUp() throws Exception { fc = FileContext.getLocalFSFileContext(); super.setUp(); } }
apache/harmony
1,136
classlib/modules/auth/src/main/java/common/javax/security/auth/login/AccountExpiredException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package javax.security.auth.login; public class AccountExpiredException extends AccountException { private static final long serialVersionUID = -6064064890162661560L; public AccountExpiredException() { super(); } public AccountExpiredException(String message) { super(message); } }
apache/harmony
1,188
drlvm/src/test/regression/H4073/Test.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.harmony.drlvm.tests.regression.h4073; import junit.framework.TestCase; public class Test extends TestCase { public static void main(String args[]) { (new Test()).test(); } public void test() { assertTrue(lessThenZero(Long.MIN_VALUE)); } boolean lessThenZero(long v) { v = -v; return v < 0; } }
apache/hbase
1,148
hbase-server/src/test/java/org/apache/hadoop/hbase/client/SimpleScanResultConsumer.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hbase.client; import java.util.List; import org.apache.hadoop.hbase.client.metrics.ScanMetrics; /** * A simplistic {@link ScanResultConsumer} for use in tests. */ public interface SimpleScanResultConsumer extends ScanResultConsumer { List<Result> getAll() throws Exception; ScanMetrics getScanMetrics(); }
apache/hive
1,126
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/annotation/NoReconnect.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface NoReconnect { }
apache/hop
1,152
plugins/misc/testing/src/main/java/org/apache/hop/testing/util/IExceptionEvaluator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.testing.util; import org.apache.hop.core.exception.HopException; import org.apache.hop.pipeline.PipelineMeta; import org.apache.hop.testing.PipelineUnitTest; public interface IExceptionEvaluator { void evaluateTestException(PipelineUnitTest test, PipelineMeta pipelineMeta, Exception e) throws HopException; }
apache/hudi
1,137
hudi-utilities/src/main/java/org/apache/hudi/utilities/exception/HoodieSourceTimeoutException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.hudi.utilities.exception; import org.apache.hudi.exception.HoodieException; public class HoodieSourceTimeoutException extends HoodieException { public HoodieSourceTimeoutException(String msg, Throwable e) { super(msg, e); } public HoodieSourceTimeoutException(String msg) { super(msg); } }
apache/ignite-3
1,121
modules/replicator/src/testFixtures/java/org/apache/ignite/internal/replicator/message/PrimaryReplicaTestRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.replicator.message; import org.apache.ignite.internal.network.annotations.Transferable; /** Primary replica request for test purpose. */ @Transferable(ReplicaMessageTestGroup.PRIMARY_REPLICA_TEST_REQUEST) public interface PrimaryReplicaTestRequest extends PrimaryReplicaRequest { }
apache/ignite
1,135
modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryRowCacheCleaner.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ignite.internal.processors.query; /** * Row cache cleaner is used by page memory manager to remove updated / evicted links from rows cache. */ public interface GridQueryRowCacheCleaner { /** * Remove row by link. * * @param link Link to remove. */ public void remove(long link); }
apache/ignite
1,162
modules/core/src/main/java/org/apache/ignite/lang/IgniteProducer.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.lang; import org.apache.ignite.IgniteCheckedException; /** * Defines a producer which can throw IgniteCheckedException. * * @param <T> Type of producible value. */ @FunctionalInterface public interface IgniteProducer<T> { /** * @return Produced value. */ public T produce() throws IgniteCheckedException; }
apache/incubator-brooklyn
1,113
brooklyn-library/qa/src/test/projects/downstream-parent-test/src/main/java/com/example/HelloEntityImpl.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.example; import org.apache.brooklyn.core.entity.AbstractEntity; public class HelloEntityImpl extends AbstractEntity implements HelloEntity { @Override public void init() { super.init(); System.out.println("Hello from the init method of the HelloEntity"); } }
apache/incubator-brooklyn
1,114
brooklyn-server/core/src/main/java/org/apache/brooklyn/core/config/external/ExternalConfigSupplier.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.brooklyn.core.config.external; import com.google.common.annotations.Beta; /** * Provider of "externalised" entity configuration that is resolved at runtime. * * @since 0.8.0 */ @Beta public interface ExternalConfigSupplier { String getName(); String get(String key); }
apache/incubator-datalab
1,113
services/datalab-model/src/main/java/com/epam/datalab/dto/imagemetadata/ExploratoryEnvironmentImages.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.epam.datalab.dto.imagemetadata; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; @Data public class ExploratoryEnvironmentImages { @JsonProperty("Image family") private String imageFamily; @JsonProperty("Description") private String description; }
apache/incubator-kie-drools
1,091
drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/concurrency/StaticUtils.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.drools.compiler.integrationtests.concurrency; public class StaticUtils { public static String TOSTRING(String s) { return s == null ? "null" : s; } public static String TOSTRING(Object o) { return o == null ? "null" : o.toString(); } }
apache/incubator-kie-drools
1,120
kie-ci/kie-ci-test-jars/kie-ci-test-jar-with-dep/src/main/java/org/kie/ci/test/dep/Main.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.ci.test.dep; public class Main { public static void main(String[] args) { System.out.println("Hello world!"); } public String someCustomMethod() { return "This is a custom method!"; } @Override public String toString() { return "Main{}"; } }
apache/incubator-kie-drools
1,127
drools-model/drools-canonical-model/src/main/java/org/drools/model/functions/PredicateN.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.drools.model.functions; import java.io.Serializable; public interface PredicateN extends Serializable { boolean test(Object... objs) throws Exception; default PredicateN negate() { return a -> !test( a ); } PredicateN True = objs -> true; PredicateN False = objs -> false; }
apache/incubator-kie-drools
1,137
kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/api/dmndi/DMNDiagram.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.dmn.model.api.dmndi; import java.util.List; public interface DMNDiagram extends Diagram { Dimension getSize(); void setSize(Dimension value); List<DiagramElement> getDMNDiagramElement(); Boolean getUseAlternativeInputDataShape(); void setUseAlternativeInputDataShape(Boolean value); }
apache/incubator-kie-kogito-runtimes
1,078
api/kogito-api-incubation-processes-services/src/main/java/org/kie/kogito/incubation/processes/services/StraightThroughProcessService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.kogito.incubation.processes.services; import org.kie.kogito.incubation.common.DataContext; import org.kie.kogito.incubation.common.Id; public interface StraightThroughProcessService { DataContext evaluate(Id processId, DataContext inputContext); }
apache/incubator-kie-kogito-runtimes
1,109
quarkus/integration-tests/integration-tests-quarkus-processes/src/main/java/org/acme/WIHRegister.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.acme; import org.kie.kogito.process.impl.DefaultWorkItemHandlerConfig; import jakarta.enterprise.context.ApplicationScoped; @ApplicationScoped public class WIHRegister extends DefaultWorkItemHandlerConfig { { register("CustomTask", new CustomTaskWorkItemHandler()); } }
apache/incubator-kie-optaplanner
1,119
core/optaplanner-core-impl/src/main/java/org/optaplanner/core/config/phase/custom/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. */ @XmlSchema( namespace = SolverConfig.XML_NAMESPACE, elementFormDefault = XmlNsForm.QUALIFIED) package org.optaplanner.core.config.phase.custom; import jakarta.xml.bind.annotation.XmlNsForm; import jakarta.xml.bind.annotation.XmlSchema; import org.optaplanner.core.config.solver.SolverConfig;
apache/incubator-samoa
1,155
samoa-api/src/main/java/org/apache/samoa/streams/InstanceStream.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.samoa.streams; import org.apache.samoa.instances.Instance; import org.apache.samoa.moa.core.Example; /** * Interface representing a data stream of instances. * * @author Richard Kirkby (rkirkby@cs.waikato.ac.nz) * @version $Revision: 7 $ */ public interface InstanceStream extends ExampleStream<Example<Instance>> { }
apache/incubator-seata-samples
1,091
at-sample/spring-dubbo-seata/src/main/java/org/apache/seata/business/service/BusinessService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seata.business.service; public interface BusinessService { /** * 用户订购商品 * * @param userId 用户ID * @param commodityCode 商品编号 * @param orderCount 订购数量 */ void purchase(String userId, String commodityCode, int orderCount); }
apache/iotdb-extras
1,124
connectors/spark-tsfile/src/main/java/org/apache/iotdb/spark/tsfile/qp/exception/DNFOptimizeException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iotdb.spark.tsfile.qp.exception; /** This exception is threw whiling meeting error in */ public class DNFOptimizeException extends LogicalOptimizeException { private static final long serialVersionUID = 807384397361662482L; public DNFOptimizeException(String msg) { super(msg); } }
apache/iotdb-web-workbench
1,148
backend/src/main/java/org/apache/iotdb/admin/model/vo/IotDBUserVO.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iotdb.admin.model.vo; import lombok.Data; import java.io.Serializable; import java.util.List; @Data public class IotDBUserVO implements Serializable { private String userName; private String password; private List<PrivilegeInfo> privilegesInfo; // private List<RoleWithPrivilegesVO> roleWithPrivileges; }
apache/james-project
1,134
protocols/managesieve/src/main/java/org/apache/james/managesieve/api/commands/GetScript.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.james.managesieve.api.commands; import org.apache.james.managesieve.api.Session; /** * @see <a href=http://tools.ietf.org/html/rfc5804#section-2.9>RFC 5804 GETSCRIPT Command</a> */ public interface GetScript { String getScript(Session session, String name); }
apache/james-project
1,134
protocols/managesieve/src/main/java/org/apache/james/managesieve/api/commands/SetActive.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.james.managesieve.api.commands; import org.apache.james.managesieve.api.Session; /** * @see <a href=http://tools.ietf.org/html/rfc5804#section-2.8>RFC 5804 SETACTIVE Command</a> */ public interface SetActive { String setActive(Session session, String name); }