repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/solr | 1,113 | solr/modules/ltr/src/java/org/apache/solr/ltr/feature/FeatureException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.solr.ltr.feature;
public class FeatureException extends RuntimeException {
private static final long serialVersionUID = 1L;
public FeatureException(String message) {
super(message);
}
public FeatureException(String message, Exception cause) {
super(message, cause);
}
}
|
apache/stormcrawler | 1,087 | core/src/test/java/org/apache/stormcrawler/helper/initialisation/ClassWithoutValidConstructor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.stormcrawler.helper.initialisation;
import org.apache.stormcrawler.helper.initialisation.base.AbstractClass;
public class ClassWithoutValidConstructor extends AbstractClass {
public ClassWithoutValidConstructor(int i) {
System.out.println(i);
}
}
|
apache/streampipes | 1,062 | streampipes-extensions-management/src/main/java/org/apache/streampipes/extensions/management/init/IDeclarersSingleton.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.streampipes.extensions.management.init;
import org.apache.streampipes.extensions.api.connect.StreamPipesAdapter;
import java.util.Optional;
public interface IDeclarersSingleton {
Optional<StreamPipesAdapter> getAdapter(String id);
}
|
apache/streampipes | 1,088 | streampipes-messaging/src/main/java/org/apache/streampipes/messaging/SpProtocolDefinition.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.streampipes.messaging;
import org.apache.streampipes.model.grounding.TransportProtocol;
public interface SpProtocolDefinition<T extends TransportProtocol> {
EventConsumer getConsumer(T transportProtocol);
EventProducer getProducer(T transportProtocol);
}
|
apache/syncope | 1,072 | core/persistence-neo4j/src/main/java/org/apache/syncope/core/persistence/neo4j/entity/Neo4jSortedRelationsihip.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.syncope.core.persistence.neo4j.entity;
import org.apache.syncope.core.persistence.api.entity.Entity;
public abstract class Neo4jSortedRelationsihip<E extends Entity> {
public abstract int getIndex();
public abstract E getEntity();
}
|
apache/syncope | 1,093 | client/idrepo/console/src/main/java/org/apache/syncope/client/console/rest/LoggerConfOp.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.syncope.client.console.rest;
import java.io.Serializable;
import java.util.List;
import org.springframework.boot.logging.LogLevel;
public interface LoggerConfOp extends Serializable {
List<LoggerConf> list();
void setLevel(String key, LogLevel level);
}
|
apache/tapestry-5 | 1,103 | tapestry-spring/src/test/java/org/example/testapp/services/UpcaseImpl.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.example.testapp.services;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.springframework.beans.factory.annotation.Autowired;
public class UpcaseImpl implements Upcase
{
private final StringTransformer transformer;
@Autowired
public UpcaseImpl(@Inject StringTransformer transformer)
{
this.transformer = transformer;
}
@Override
public String toUpperCase(String input)
{
return transformer.transform(input);
}
}
|
apache/tapestry-5 | 1,107 | tapestry-func/src/main/java/org/apache/tapestry5/func/LazyTake.java | // Copyright 2010 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.func;
class LazyTake<T> implements LazyFunction<T>
{
private final int length;
private final Flow<T> flow;
public LazyTake(int length, Flow<T> flow)
{
this.length = length;
this.flow = flow;
}
@Override
public LazyContinuation<T> next()
{
if (flow.isEmpty() || length < 1)
return null;
return new LazyContinuation<T>(new LazyFirst<T>(flow), new LazyTake<T>(length - 1, flow.rest()));
}
}
|
apache/tez | 1,110 | tez-api/src/main/java/org/apache/tez/common/annotation/ConfigurationClass.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tez.common.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
import org.apache.hadoop.classification.InterfaceAudience.Private;
@Private
@Target(ElementType.TYPE)
public @interface ConfigurationClass {
public String templateFileName();
}
|
apache/tomee | 1,111 | maven/tomee-maven-plugin/src/test/java/org/apache/openejb/maven/plugin/Url.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.maven.plugin;
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.FIELD)
public @interface Url {
}
|
apache/uima-uimaj | 1,108 | uimaj-core/src/main/java/org/apache/uima/cas/impl/ByteArrayFSImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.uima.cas.impl;
import org.apache.uima.cas.ByteArrayFS;
/**
* V2 compatibility only The non-JCas cover class for Byte Array
*
* @deprecated use ByteArray instead
* @forRemoval 4.0.0
*/
@Deprecated(since = "3.0.0")
public interface ByteArrayFSImpl extends ByteArrayFS {
}
|
apache/uima-uimaj | 1,108 | uimaj-core/src/main/java/org/apache/uima/cas/impl/LongArrayFSImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.uima.cas.impl;
import org.apache.uima.cas.LongArrayFS;
/**
* V2 compatibility only The non-JCas cover class for Long Array
*
* @deprecated use LongArray instead
* @forRemoval 4.0.0
*/
@Deprecated(since = "3.0.0")
public interface LongArrayFSImpl extends LongArrayFS {
}
|
apache/uniffle | 1,107 | storage/src/main/java/org/apache/uniffle/storage/common/ShuffleInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.uniffle.storage.common;
public class ShuffleInfo {
private String key;
private long size;
public ShuffleInfo(String key, long size) {
this.key = key;
this.size = size;
}
public String getKey() {
return key;
}
public long getSize() {
return size;
}
}
|
apache/usergrid | 1,115 | stack/core/src/main/java/org/apache/usergrid/count/CounterStore.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.count;
import java.util.Collection;
import org.apache.usergrid.count.common.Count;
/** @author zznate */
public interface CounterStore {
// TODO consider inforcing Async via Future<T> as return type
void save( Count count );
void save( Collection<Count> counts );
}
|
apache/wicket | 1,078 | wicket-core-tests/src/test/java/org/apache/wicket/markup/html/header/threelayers/MeldingPage.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.header.threelayers;
/**
* @author dashorst
*/
public class MeldingPage extends AbstractMeldingPage
{
/** For serialization. */
private static final long serialVersionUID = 1L;
/**
* Construct.
*/
public MeldingPage()
{
}
}
|
google/conscrypt | 1,101 | common/src/test/java/org/conscrypt/javax/net/ssl/SSLServerSocketFactoryTest.java | /*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.conscrypt.javax.net.ssl;
import javax.net.ssl.SSLServerSocketFactory;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@RunWith(JUnit4.class)
public class SSLServerSocketFactoryTest {
@Test
public void testDefaultConfiguration() throws Exception {
SSLConfigurationAsserts.assertSSLServerSocketFactoryDefaultConfiguration(
(SSLServerSocketFactory) SSLServerSocketFactory.getDefault());
}
}
|
google/domaintest | 1,110 | domaintest-war/src/main/java/foo/domaintest/util/Key.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 foo.domaintest.util;
/** A typesafe memcache key. */
public class Key {
/** Enum of key prefixes for memcache keys. */
public enum Type {
CONFIG,
STASH,
TOKEN
}
private final Type type;
private final String token;
public Key(Type type, String token) {
this.type = type;
this.token = token;
}
public String getTypeName() {
return type.name();
}
public String getRawKey() {
return String.format("%s:%s", getTypeName(), token);
}
}
|
google/error-prone | 1,070 | core/src/test/java/com/google/errorprone/refaster/testdata/input/TypeArgumentsMethodInvocationTemplateExample.java | /*
* Copyright 2022 The Error Prone Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.errorprone.refaster.testdata;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
/** Test data for {@code TypeArgumentsMethodInvocationTemplate}. */
public class TypeArgumentsMethodInvocationTemplateExample {
public Future<Object> example() {
ExecutorService executorService = Executors.newSingleThreadExecutor();
return executorService.submit(() -> new Object());
}
}
|
google/exposure-notifications-android | 1,063 | app/src/main/java/com/google/android/apps/exposurenotification/common/time/RealTimeModule.java | /*
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.google.android.apps.exposurenotification.common.time;
import dagger.Module;
import dagger.Provides;
import dagger.hilt.InstallIn;
import dagger.hilt.components.SingletonComponent;
/**
* Module providing a {@link Clock} for use in prod code, not in tests. Tests should use FakeClock.
*/
@Module
@InstallIn(SingletonComponent.class)
public class RealTimeModule {
@Provides
public Clock provideSystemClock() {
return new SystemClock();
}
}
|
google/graphicsfuzz | 1,079 | generator/src/main/java/com/graphicsfuzz/generator/semanticspreserving/SplitForLoopMutationFinder.java | /*
* Copyright 2018 The GraphicsFuzz Project Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.graphicsfuzz.generator.semanticspreserving;
import com.graphicsfuzz.common.ast.TranslationUnit;
import com.graphicsfuzz.common.util.IRandom;
public class SplitForLoopMutationFinder extends InjectionPointMutationFinder<SplitForLoopMutation> {
public SplitForLoopMutationFinder(TranslationUnit tu, IRandom random) {
super(tu, random, SplitForLoopMutation::suitableForSplitting,
item -> new SplitForLoopMutation(item, random));
}
}
|
google/j2cl | 1,121 | jre/java/java/util/concurrent/RejectedExecutionException.java | // CHECKSTYLE_OFF: Copyrighted to Guava Authors.
/*
* Copyright (C) 2015 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.
*/
// CHECKSTYLE_ON
package java.util.concurrent;
/** GWT emulation of RejectedExecutionException. */
public class RejectedExecutionException extends RuntimeException {
public RejectedExecutionException() {}
public RejectedExecutionException(String message) {
super(message);
}
public RejectedExecutionException(String message, Throwable cause) {
super(message, cause);
}
public RejectedExecutionException(Throwable cause) {
super(cause);
}
}
|
google/nomulus | 1,096 | core/src/main/java/google/registry/flows/exceptions/InvalidTransferPeriodValueException.java | // Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.flows.exceptions;
import google.registry.flows.EppException.ParameterValuePolicyErrorException;
/** Domain transfer period must be zero or one year when using the superuser EPP extension. */
public class InvalidTransferPeriodValueException extends ParameterValuePolicyErrorException {
public InvalidTransferPeriodValueException() {
super(
"Domain transfer period must be zero or one year when using the superuser EPP extension.");
}
}
|
google/or-tools | 1,140 | ortools/sat/samples/BoolOrSampleSat.java | // Copyright 2010-2025 Google LLC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES 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.ortools.sat.samples;
import com.google.ortools.Loader;
import com.google.ortools.sat.BoolVar;
import com.google.ortools.sat.CpModel;
import com.google.ortools.sat.Literal;
/** Code sample to demonstrates a simple Boolean constraint. */
public class BoolOrSampleSat {
public static void main(String[] args) throws Exception {
Loader.loadNativeLibraries();
CpModel model = new CpModel();
BoolVar x = model.newBoolVar("x");
BoolVar y = model.newBoolVar("y");
model.addBoolOr(new Literal[] {x, y.not()});
}
}
|
google/sagetv | 1,109 | third_party/SingularSys/java/sage/jep/function/PostfixMathCommandI.java | /*****************************************************************************
JEP - Java Math Expression Parser 2.24
December 30 2002
(c) Copyright 2002, Nathan Funk
See LICENSE.txt for license information.
*****************************************************************************/
package sage.jep.function;
import java.util.*;
import sage.jep.*;
/**
* All function classes must implement this interface to ensure that the run()
* method is implemented.
*/
public interface PostfixMathCommandI
{
/**
* Run the function on the stack. Pops the arguments from the stack, and
* pushes the result on the top of the stack.
*/
public void run(sage.Catbert.FastStack aStack) throws ParseException;
/**
* Returns the number of required parameters, or -1 if any number of
* parameters is allowed.
*/
public int getNumberOfParameters();
/**
* Sets the number of current number of parameters used in the next call
* of run(). This method is only called when the reqNumberOfParameters is
* -1.
*/
public void setCurNumberOfParameters(int n);
}
|
google/tsunami-security-scanner | 1,091 | plugin/src/main/java/com/google/tsunami/plugin/PluginExecutionException.java | /*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.tsunami.plugin;
import com.google.tsunami.common.ErrorCode;
import com.google.tsunami.common.TsunamiException;
/** Exception when executing a Tsunami plugin. */
public final class PluginExecutionException extends TsunamiException {
public PluginExecutionException(String message) {
super(ErrorCode.PLUGIN_EXECUTION_ERROR, message);
}
public PluginExecutionException(String message, Throwable cause) {
super(ErrorCode.PLUGIN_EXECUTION_ERROR, message, cause);
}
}
|
googleads/google-ads-java | 1,059 | google-ads-stubs-v19/src/main/java/com/google/ads/googleads/v19/services/GetIdentityVerificationRequestOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v19/services/identity_verification_service.proto
// Protobuf Java Version: 3.25.7
package com.google.ads.googleads.v19.services;
public interface GetIdentityVerificationRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v19.services.GetIdentityVerificationRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Required. The ID of the customer for whom we are requesting verification
* information.
* </pre>
*
* <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The customerId.
*/
java.lang.String getCustomerId();
/**
* <pre>
* Required. The ID of the customer for whom we are requesting verification
* information.
* </pre>
*
* <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The bytes for customerId.
*/
com.google.protobuf.ByteString
getCustomerIdBytes();
}
|
googleads/google-ads-java | 1,059 | google-ads-stubs-v20/src/main/java/com/google/ads/googleads/v20/services/GetIdentityVerificationRequestOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v20/services/identity_verification_service.proto
// Protobuf Java Version: 3.25.7
package com.google.ads.googleads.v20.services;
public interface GetIdentityVerificationRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v20.services.GetIdentityVerificationRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Required. The ID of the customer for whom we are requesting verification
* information.
* </pre>
*
* <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The customerId.
*/
java.lang.String getCustomerId();
/**
* <pre>
* Required. The ID of the customer for whom we are requesting verification
* information.
* </pre>
*
* <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The bytes for customerId.
*/
com.google.protobuf.ByteString
getCustomerIdBytes();
}
|
googleads/google-ads-java | 1,059 | google-ads-stubs-v21/src/main/java/com/google/ads/googleads/v21/services/GetIdentityVerificationRequestOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v21/services/identity_verification_service.proto
// Protobuf Java Version: 3.25.7
package com.google.ads.googleads.v21.services;
public interface GetIdentityVerificationRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v21.services.GetIdentityVerificationRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Required. The ID of the customer for whom we are requesting verification
* information.
* </pre>
*
* <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The customerId.
*/
java.lang.String getCustomerId();
/**
* <pre>
* Required. The ID of the customer for whom we are requesting verification
* information.
* </pre>
*
* <code>string customer_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
* @return The bytes for customerId.
*/
com.google.protobuf.ByteString
getCustomerIdBytes();
}
|
googleapis/google-cloud-java | 1,025 | java-texttospeech/proto-google-cloud-texttospeech-v1beta1/src/main/java/com/google/cloud/texttospeech/v1beta1/SynthesizeLongAudioResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.texttospeech.v1beta1;
public interface SynthesizeLongAudioResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.texttospeech.v1beta1.SynthesizeLongAudioResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,028 | java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/UpgradeNotebookRuntimeResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/aiplatform/v1beta1/notebook_service.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.aiplatform.v1beta1;
public interface UpgradeNotebookRuntimeResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.UpgradeNotebookRuntimeResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,029 | java-datastream/proto-google-cloud-datastream-v1alpha1/src/main/java/com/google/cloud/datastream/v1alpha1/StaticServiceIpConnectivityOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/datastream/v1alpha1/datastream_resources.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.datastream.v1alpha1;
public interface StaticServiceIpConnectivityOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.datastream.v1alpha1.StaticServiceIpConnectivity)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,057 | java-visionai/proto-google-cloud-visionai-v1/src/main/java/com/google/cloud/visionai/v1/BoolValueOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/visionai/v1/warehouse.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.visionai.v1;
public interface BoolValueOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.BoolValue)
com.google.protobuf.MessageOrBuilder {
/**
* <code>bool value = 1;</code>
*
* @return The value.
*/
boolean getValue();
}
|
googleapis/google-http-java-client | 1,073 | google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonGeneratorTest.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.api.client.json.gson;
import com.google.api.client.json.JsonGenerator;
import com.google.api.client.test.json.AbstractJsonGeneratorTest;
import java.io.IOException;
import java.io.Writer;
public class GsonGeneratorTest extends AbstractJsonGeneratorTest {
private static final GsonFactory FACTORY = new GsonFactory();
@Override
protected JsonGenerator newGenerator(Writer writer) throws IOException {
return FACTORY.createJsonGenerator(writer);
}
}
|
googlearchive/gwt-google-apis | 1,091 | search/search/src/com/google/gwt/search/client/ImageTypeValue.java | /*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.gwt.search.client;
import com.google.gwt.search.jsio.client.JSOpaque;
/**
* Used with {@link ImageSearch#setImageType(ImageTypeValue)} to control the
* types of results displayed.
*/
public enum ImageTypeValue {
/**
* Restrict to images with faces in them;
*/
FACES("FACES");
private final JSOpaque value;
private ImageTypeValue(String type) {
value = new JSOpaque("$wnd.GSearch.IMAGETYPE_" + type);
}
JSOpaque getValue() {
return value;
}
}
|
googlearchive/gwt-google-apis | 1,096 | search/search/src/com/google/gwt/search/client/impl/GdrawOptions.java | /*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.gwt.search.client.impl;
import com.google.gwt.search.jsio.client.Constructor;
import com.google.gwt.search.jsio.client.JSOpaque;
import com.google.gwt.search.jsio.client.JSWrapper;
import com.google.gwt.user.client.Element;
/**
* Wrapper around a GdrawOptions object.
*/
@Constructor("$wnd.GdrawOptions")
public interface GdrawOptions extends JSWrapper<GdrawOptions> {
void setDrawMode(JSOpaque mode);
void setInput(Element e);
void setSearchFormRoot(Element element);
}
|
hibernate/hibernate-orm | 1,036 | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/query/Identity.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.annotations.query;
import java.io.Serializable;
/**
* @author Emmanuel Bernard
*/
public class Identity implements Serializable {
private String firstname;
private String lastname;
public String getFirstname() {
return firstname;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
public String getLastname() {
return lastname;
}
public void setLastname(String lastname) {
this.lastname = lastname;
}
public boolean equals(Object o) {
if ( this == o ) return true;
if ( o == null || getClass() != o.getClass() ) return false;
final Identity identity = (Identity) o;
if ( !firstname.equals( identity.firstname ) ) return false;
if ( !lastname.equals( identity.lastname ) ) return false;
return true;
}
public int hashCode() {
int result;
result = firstname.hashCode();
result = 29 * result + lastname.hashCode();
return result;
}
}
|
hibernate/hibernate-orm | 1,057 | hibernate-core/src/main/java/org/hibernate/boot/model/source/spi/ForeignKeyContributingSource.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.model.source.spi;
/**
* Additional contract for things which describe foreign keys.
*
* @author Steve Ebersole
*/
public interface ForeignKeyContributingSource {
/**
* Retrieve the name of the foreign key as supplied by the user, or {@code null} if the user supplied none.
*
* @return The user supplied foreign key name.
*/
String getExplicitForeignKeyName();
/**
* Primarily exists to support JPA's {@code @ForeignKey(NO_CONSTRAINT)}.
*
* @return {@code true} if the FK constraint should be created, {@code false} if not.
*/
boolean createForeignKeyConstraint();
/**
* Is "cascade delete" enabled for the foreign key? In other words, if a record in the parent (referenced)
* table is deleted, should the corresponding records in the child table automatically be deleted?
*
* @return {@code true}, if the cascade delete is enabled; {@code false}, otherwise.
*/
boolean isCascadeDeleteEnabled();
}
|
hibernate/hibernate-orm | 1,058 | hibernate-core/src/main/java/org/hibernate/cache/spi/entry/StructuredCollectionCacheEntry.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.cache.spi.entry;
import java.io.Serializable;
import java.util.Arrays;
import java.util.List;
import org.hibernate.engine.spi.SessionFactoryImplementor;
/**
* Structured CacheEntry format for persistent collections (other than Maps, see {@link StructuredMapCacheEntry}).
*
* @author Gavin King
*/
public class StructuredCollectionCacheEntry implements CacheEntryStructure {
/**
* Access to the singleton reference.
*/
public static final StructuredCollectionCacheEntry INSTANCE = new StructuredCollectionCacheEntry();
@Override
public Object structure(Object item) {
final var entry = (CollectionCacheEntry) item;
return Arrays.asList( entry.getState() );
}
@Override
public Object destructure(Object structured, SessionFactoryImplementor factory) {
final var list = (List<?>) structured;
return new CollectionCacheEntry( list.toArray( Serializable[]::new ) );
}
private StructuredCollectionCacheEntry() {
}
}
|
hibernate/hibernate-search | 1,026 | documentation/src/test/java/org/hibernate/search/documentation/mapper/orm/binding/identifierbridge/compatible/Book.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.documentation.mapper.orm.binding.identifierbridge.compatible;
import jakarta.persistence.EmbeddedId;
import jakarta.persistence.Entity;
import org.hibernate.search.mapper.pojo.bridge.mapping.annotation.IdentifierBridgeRef;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.DocumentId;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed;
@Entity
@Indexed
public class Book {
@EmbeddedId
@DocumentId(
identifierBridge = @IdentifierBridgeRef(type = BookOrMagazineIdBridge.class)
)
private BookOrMagazineId id = new BookOrMagazineId();
@FullTextField(analyzer = "english")
private String title;
public BookOrMagazineId getId() {
return id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}
|
hibernate/hibernate-search | 1,026 | util/internal/integrationtest/v5migrationhelper/src/test/java/org/hibernate/search/testsupport/textbuilder/TextProductionTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.testsupport.textbuilder;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test;
/**
* Tests WordDictionary and WordInventor,
* these are test utilities not part of the Search distribution;
* the test exists to spot if the text they produce is unchanged, so
* that other tests can rely on working test utilities.
*
* @see WordDictionary
* @see SentenceInventor
*
* @author Sanne Grinovero
*/
class TextProductionTest {
@Test
void testSomeWordsGetBuilt() {
SentenceInventor wi = new SentenceInventor( 7L, 200 );
String randomPeriod = wi.nextPeriod();
// randomPeriod will be some random sentence like "Qoswo, orrmi ag ybwp bbtb kw qgtqaon lyhk nbv: qrqm flyui hyshm jmpqyb qmolml fjxw gnumocv Twwg."
// but exact string contents depends on environment
assertThat( randomPeriod ).isNotNull();
assertThat( randomPeriod ).isNotEmpty();
}
}
|
openjdk/jdk8 | 1,113 | langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/package-info.java | /*
* Copyright (c) 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 package 1.
*
* @since JDK1.0
*/
package pkg1;
|
openjdk/jdk8 | 1,127 | langtools/test/com/sun/javadoc/testEnclosingClass/pkg/MyClass.java | /*
* Copyright (c) 2004, 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 pkg;
public class MyClass {
public interface MyInterface {}
}
|
openjdk/jdk8 | 1,127 | langtools/test/tools/javadoc/annotations/shortcuts/pkg1/Array.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg1;
public @interface Array {
double[] favoriteNumbers();
}
|
openjdk/jdk8 | 1,131 | langtools/test/tools/javac/generics/compat/OverrideBridge3.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
class OverrideBridge3 {
static class C extends OverrideBridge2.B {
}
}
|
openjdk/jdk8 | 1,137 | hotspot/test/runtime/Metaspace/classes/test/Empty.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package test;
public class Empty {
public String toString() { return "nothing"; }
}
|
openjdk/jtreg | 1,151 | test/problemList/ExcludeOsNameAll.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
*/
public class ExcludeOsNameAll {
public static void main(String[] args) { }
}
|
openjdk/jtreg | 1,151 | test/problemList/ExcludeOsNameRev.java | /*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
*/
public class ExcludeOsNameRev {
public static void main(String[] args) { }
}
|
oracle-samples/oracle-db-examples | 1,091 | java/AoJ/test/com/oracle/adbaoverjdbc/test/DataSourceFactoryTest2.java | /*
* Copyright (c) 2018 Oracle and/or its affiliates. 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.oracle.adbaoverjdbc.test;
import jdk.incubator.sql2.DataSourceFactory;
import org.junit.Test;
import static org.junit.Assert.*;
public class DataSourceFactoryTest2 {
/**
* Verify that when DataSourceFactory name is null then it throws an
* exception.
*/
@Test (expected = IllegalArgumentException.class)
public void nullDataSourceFactory() {
DataSourceFactory.newFactory(null);
fail("Exception expected");
}
}
|
oracle/coherence | 1,101 | prj/coherence-testing-data/src/main/java/data/pof/BadPersonLite.java | /*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package data.pof;
import java.io.IOException;
import java.util.Date;
import com.tangosol.io.pof.PofReader;
import com.tangosol.io.pof.PofWriter;
import com.tangosol.io.pof.PortableObject;
public class BadPersonLite
extends PersonLite
implements PortableObject
{
public BadPersonLite()
{
}
public BadPersonLite(String sName, Date dtDOB)
{
super(sName, dtDOB);
}
public void readExternal(PofReader reader)
throws IOException
{
m_dtDOB = reader.readDate(2);
m_sName = reader.readString(0);
}
public void writeExternal(PofWriter writer)
throws IOException
{
writer.writeString(0, m_sName);
writer.writeObject(1, null);
writer.writeDateTime(2, m_dtDOB);
writer.writeObject(3, null);
writer.writeObjectArray(4, null, null);
}
} |
oracle/nosql | 1,112 | kvmain/src/main/java/oracle/kv/impl/async/exception/ContextException.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.async.exception;
import oracle.kv.impl.async.DialogContext;
/**
* This exception is thrown when error occurs while calling {@link
* DialogContext#read} and {@link DialogContext#write}.
*/
public abstract class ContextException extends RuntimeException
implements GetUserException {
private static final long serialVersionUID = 1L;
/**
* Constructs the exception.
*
* @param message the message of the exception
* @param cause the cause of the exception
*/
protected ContextException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/commons-jcs | 1,075 | commons-jcs3-sandbox/commons-jcs3-yajcache/src/main/java/org/apache/commons/jcs/yajcache/lang/ref/IKey.java | package org.apache.commons.jcs.yajcache.lang.ref;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.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.
*/
import org.apache.commons.jcs.yajcache.lang.annotation.*;
/**
* Interface for accessing a key.
*/
@CopyRightApache
public interface IKey<K> {
/** Returns the key. */
@NonNullable @Immutable K getKey();
}
|
apache/commons-rdf | 1,098 | commons-rdf-simple/src/test/java/org/apache/commons/rdf/simple/SimpleRDFTest.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.simple;
import org.apache.commons.rdf.api.AbstractRDFTest;
import org.apache.commons.rdf.api.RDF;
/**
* Simple RDF Test
*/
class SimpleRDFTest extends AbstractRDFTest {
@Override
public RDF createFactory() {
return new SimpleRDF();
}
}
|
apache/couchdb | 1,104 | nouveau/src/main/java/org/apache/couchdb/nouveau/core/StaleIndexException.java | //
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.couchdb.nouveau.core;
import jakarta.ws.rs.WebApplicationException;
import jakarta.ws.rs.core.Response.Status;
public final class StaleIndexException extends WebApplicationException {
public StaleIndexException(final boolean purge, final long minSeq, final long actualSeq) {
super(
String.format(
"index is stale (%s seq needs to be at least %d but is %d)",
purge ? "purge" : "index", minSeq, actualSeq),
Status.CONFLICT);
}
}
|
apache/ctakes | 1,081 | ctakes-core/src/main/java/org/apache/ctakes/core/util/collection/CollectionCreatorFactory.java | package org.apache.ctakes.core.util.collection;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* @author SPF , chip-nlp
* @version %I%
* @since 9/23/2014
*/
final public class CollectionCreatorFactory {
private CollectionCreatorFactory() {
}
static public <V> CollectionCreator<V, Set<V>> createSetCreator() {
return new CollectionCreator<V, Set<V>>() {
@Override
public Set<V> createCollection() {
return new HashSet<>();
}
@Override
public Set<V> createCollection( final int size ) {
return new HashSet<>( size );
}
};
}
static public <V> CollectionCreator<V, List<V>> createListCreator() {
return new CollectionCreator<V, List<V>>() {
@Override
public List<V> createCollection() {
return new ArrayList<>();
}
@Override
public List<V> createCollection( final int size ) {
return new ArrayList<>( size );
}
};
}
}
|
apache/curator | 1,081 | curator-framework/src/main/java/org/apache/curator/framework/api/transaction/CuratorTransactionBridge.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.curator.framework.api.transaction;
public interface CuratorTransactionBridge {
/**
* Syntactic sugar to make the fluent interface more readable
*
* @return transaction continuation
*/
public CuratorTransactionFinal and();
}
|
apache/cxf | 1,088 | rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweKeyProperties.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.rs.security.jose.jwe;
import org.apache.cxf.rs.security.jose.jwa.ContentAlgorithm;
import org.apache.cxf.rs.security.jose.jwa.KeyAlgorithm;
public interface JweKeyProperties {
KeyAlgorithm getKeyAlgorithm();
ContentAlgorithm getContentAlgorithm();
}
|
apache/cxf | 1,104 | systests/ldap/src/test/java/org/apache/cxf/systest/ldap/jaxrs/UserNotFoundFault.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.systest.ldap.jaxrs;
import jakarta.xml.ws.WebFault;
@WebFault
public class UserNotFoundFault extends Exception {
private static final long serialVersionUID = 4833573020359208072L;
public UserNotFoundFault(String errorMessage) {
super(errorMessage);
}
}
|
apache/datafu | 1,118 | datafu-hourglass/src/main/java/datafu/hourglass/mapreduce/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.
*/
/**
* Implementations of mappers, combiners, and reducers used by incremental jobs.
* These are used internally by {@link datafu.hourglass.jobs.AbstractPartitionPreservingIncrementalJob}
* and {@link datafu.hourglass.jobs.AbstractPartitionCollapsingIncrementalJob}.
*/
package datafu.hourglass.mapreduce; |
apache/directory-kerby | 1,077 | kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/message/AddPrincipalRep.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.kerby.kerberos.kerb.admin.message;
/**
* Add principal reply, to general admin message
*/
public class AddPrincipalRep extends AdminRep {
public AddPrincipalRep() {
super(AdminMessageType.ADD_PRINCIPAL_REP);
}
}
|
apache/directory-kerby | 1,077 | kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/message/AddPrincipalReq.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.kerby.kerberos.kerb.admin.message;
/**
* Add principal request, to general admin message
*/
public class AddPrincipalReq extends AdminReq {
public AddPrincipalReq() {
super(AdminMessageType.ADD_PRINCIPAL_REQ);
}
}
|
apache/doris-flink-connector | 1,079 | flink-doris-connector/src/main/java/org/apache/doris/flink/exception/CreateTableException.java | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.doris.flink.exception;
/** Create Table exception. */
public class CreateTableException extends RuntimeException {
public CreateTableException() {
super();
}
public CreateTableException(String message) {
super(message);
}
}
|
apache/doris-manager | 1,081 | manager/general/src/main/java/org/apache/doris/stack/model/response/config/PasswordComplexity.java | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.doris.stack.model.response.config;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PasswordComplexity {
private int total = 6;
private int digit = 1;
}
|
apache/drill | 1,112 | exec/jdbc/src/test/java/org/apache/drill/jdbc/CachingConnectionFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.jdbc;
import java.sql.SQLException;
/**
* A connection factory that caches connections.
*/
public interface CachingConnectionFactory extends ConnectionFactory {
/**
* Closes all open connections in this factory's cache.
*/
void closeConnections() throws SQLException;
}
|
apache/dubbo | 1,069 | dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/exception/HttpOverPayloadException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.remoting.http12.exception;
public class HttpOverPayloadException extends HttpStatusException {
private static final long serialVersionUID = 1L;
public HttpOverPayloadException(String message) {
super(500, message);
}
}
|
apache/dubbo | 1,085 | dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/protoc/command/ProtocCommandArgsBuilder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.maven.plugin.protoc.command;
import org.apache.dubbo.maven.plugin.protoc.ProtocMetaData;
import java.util.List;
public interface ProtocCommandArgsBuilder {
List<String> buildProtocCommandArgs(ProtocMetaData protocMetaData) throws RuntimeException;
}
|
apache/dubbo | 1,094 | dubbo-plugin/dubbo-native/src/main/java/org/apache/dubbo/aot/api/ResourceDescriberRegistrar.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.aot.api;
import org.apache.dubbo.common.extension.SPI;
import java.util.List;
@SPI
public interface ResourceDescriberRegistrar {
List<ResourcePatternDescriber> getResourcePatternDescribers();
List<ResourceBundleDescriber> getResourceBundleDescribers();
}
|
apache/eventmesh | 1,039 | eventmesh-protocol-plugin/eventmesh-protocol-meshmessage/src/main/java/org/apache/eventmesh/protocol/meshmessage/MeshMessageProtocolConstant.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.protocol.meshmessage;
public enum MeshMessageProtocolConstant {
;
public static final String PROTOCOL_NAME = "eventmeshmessage";
public static final String PROTOCOL_KEY_CONTENT = "content";
}
|
apache/felix-dev | 1,062 | ipojo/runtime/core-it/ipojo-core-factory-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/NoInstances.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.components;
import org.apache.felix.ipojo.annotations.Component;
import org.apache.felix.ipojo.runtime.core.services.NoService;
@Component(name="NoInstances")
public class NoInstances implements NoService {
}
|
apache/felix-dev | 1,103 | ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/util/Reflection.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.util;
/**
* Class containing utility method helping reflection
*/
public class Reflection {
public static <T> Fields<T> fields() {
return new Fields<T>();
}
public static <T> Methods<T> methods() {
return new Methods<T>();
}
}
|
apache/fineract | 1,058 | fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/contentrepository/ContentPathSanitizer.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.documentmanagement.contentrepository;
import java.io.BufferedInputStream;
public interface ContentPathSanitizer {
String sanitize(String path);
String sanitize(String path, BufferedInputStream is);
}
|
apache/fineract | 1,060 | fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanRescheduledDueAdjustScheduleEvent.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.test.messaging.event.loan;
public class LoanRescheduledDueAdjustScheduleEvent extends AbstractLoanEvent {
@Override
public String getEventName() {
return "LoanRescheduledDueAdjustScheduleBusinessEvent";
}
}
|
apache/fineract | 1,071 | fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/exception/EscapeSqlLiteralException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.security.exception;
import java.sql.SQLException;
public class EscapeSqlLiteralException extends RuntimeException {
public EscapeSqlLiteralException(String message, SQLException e) {
super(message, e);
}
}
|
apache/flink | 1,083 | flink-table/flink-table-code-splitter/src/test/resources/block/code/TestIfStatementRewrite.java | public class TestIfStatementRewrite {
public void myFun1(int[] a, int[] b) throws RuntimeException {
if (a[0] == 0) {
a[0] = 1;
if (a[1] == 0) {
a[1] = 1;
if (a[2] == 0) {
a[2] = 1;
} else {
a[2] = b[2];
}
} else {
a[1] = b[1];
a[2] = b[2];
}
} else {
a[0] = b[0];
a[1] = b[1];
a[2] = b[2];
}
}
public void myFun2(int[] a, int[] b) throws RuntimeException {
if (a[0] == 0) {
a[0] = 1;
if (a[1] == 0) {
a[1] = 1;
if (a[2] == 0) {
a[2] = 1;
} else {
a[2] = b[2];
}
} else {
a[1] = b[1];
a[2] = b[2];
return;
}
} else {
a[0] = b[0];
a[1] = b[1];
a[2] = b[2];
}
}
}
|
apache/flink | 1,089 | flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/generated/Projection.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.table.runtime.generated;
import org.apache.flink.table.data.RowData;
/** Interface for code generated projection, which will map a RowData to another one. */
public interface Projection<IN extends RowData, OUT extends RowData> {
OUT apply(IN row);
}
|
apache/ftpserver | 1,101 | core/src/test/java/org/apache/ftpserver/ssl/ImplicitSecurityTestTemplate.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ftpserver.ssl;
/**
*
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*
*/
public abstract class ImplicitSecurityTestTemplate extends
ExplicitSecurityTestTemplate {
@Override
protected boolean useImplicit() {
return true;
}
}
|
apache/geaflow | 1,048 | geaflow/geaflow-core/geaflow-engine/geaflow-highavailability/src/main/java/org/apache/geaflow/ha/leaderelection/ILeaderElectionDriver.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.ha.leaderelection;
import org.apache.geaflow.common.config.Configuration;
public interface ILeaderElectionDriver {
void open(ILeaderContender contender, Configuration configuration);
void close();
}
|
apache/giraph | 1,092 | giraph-debugger/src/main/java/org/apache/giraph/debugger/examples/bipartitematching/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.
*/
/**
* Example Giraph programs that (incorrectly) implement the Maxmimal Bipartite
* Matching algorithm mentioned in the original Pregel paper for demonstrating
* Graft's capture-visualize-reproduce functionalities.
*/
package org.apache.giraph.debugger.examples.bipartitematching;
|
apache/gobblin | 1,089 | gobblin-temporal/src/main/java/org/apache/gobblin/temporal/workflows/helloworld/FormatActivity.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.temporal.workflows.helloworld;
import io.temporal.activity.ActivityInterface;
@ActivityInterface
public interface FormatActivity {
// Define your activity methods which can be called during workflow execution
String composeGreeting(String name);
}
|
apache/groovy | 1,090 | subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/GroovyDocParserI.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.codehaus.groovy.tools.groovydoc;
import org.codehaus.groovy.groovydoc.GroovyClassDoc;
import java.util.Map;
public interface GroovyDocParserI {
Map<String, GroovyClassDoc> getClassDocsFromSingleSource(String packagePath, String file, String src);
}
|
apache/groovy | 1,117 | subprojects/groovy-sql/src/main/java/groovy/sql/InParameter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package groovy.sql;
/**
* A typed parameter to pass to a query
*/
public interface InParameter {
/**
* The JDBC data type.
* @return the type
*/
int getType();
/**
* The object holding the data value.
* @return the value
*/
Object getValue();
} |
apache/hadoop-common | 1,078 | hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/ACCESS3Request.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.nfs.nfs3.request;
import java.io.IOException;
import org.apache.hadoop.oncrpc.XDR;
/**
* ACCESS3 Request
*/
public class ACCESS3Request extends RequestWithHandle {
public ACCESS3Request(XDR xdr) throws IOException {
super(xdr);
}
}
|
apache/hadoop-common | 1,084 | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/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.
*/
/**
* General helpers for implementing source and sinks
*/
@InterfaceAudience.Public
@InterfaceStability.Evolving
package org.apache.hadoop.metrics2.util;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
|
apache/hive | 1,088 | standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/TableType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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;
/**
* Typesafe enum for types of tables described by the metastore.
*/
public enum TableType {
MANAGED_TABLE,
EXTERNAL_TABLE,
VIRTUAL_VIEW,
// @deprecated
// INDEX_TABLE enum is deprecated
INDEX_TABLE,
MATERIALIZED_VIEW
}
|
apache/hive | 1,094 | ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/hashtable/VectorMapJoinBytesHashTable.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hive.ql.exec.vector.mapjoin.hashtable;
/*
* Interface for a vector map join hash table (which could be a hash map, hash multi-set, or
* hash set) for a single byte array key.
*/
public interface VectorMapJoinBytesHashTable extends VectorMapJoinHashTable {
} |
apache/hive | 1,122 | ql/src/java/org/apache/hadoop/hive/ql/parse/rewrite/RewriterFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hive.ql.parse.rewrite;
import org.apache.hadoop.hive.ql.metadata.Table;
import org.apache.hadoop.hive.ql.parse.SemanticException;
public interface RewriterFactory<T> {
Rewriter<T> createRewriter(Table table, String targetTableFullName, String subQueryAlias) throws SemanticException;
}
|
apache/ignite-3 | 1,094 | modules/spring/spring-data-ignite/src/test/java/org/apache/ignite/data/TestApplication.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.data;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories;
/**
* Test Application.
*/
@EnableJdbcRepositories
@SpringBootApplication
public class TestApplication {
}
|
apache/ignite-extensions | 1,073 | modules/ml-ext/ml/src/main/java/org/apache/ignite/ml/math/functions/IgniteIntDoubleToDoubleBiFunction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.ml.math.functions;
import java.io.Serializable;
/** BiFunction (int, double) -> double. */
@FunctionalInterface
public interface IgniteIntDoubleToDoubleBiFunction extends Serializable {
/** */
public double apply(int x, double d);
}
|
apache/ignite | 1,090 | modules/core/src/main/java/org/apache/ignite/internal/management/baseline/BaselineSetCommandArg.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.management.baseline;
import org.apache.ignite.internal.management.api.CliConfirmArgument;
/** */
@CliConfirmArgument
public class BaselineSetCommandArg extends BaselineAddCommandArg {
/** */
private static final long serialVersionUID = 0;
}
|
apache/ignite | 1,094 | modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetTxBenchmark.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.yardstick.cache;
import org.apache.ignite.IgniteCache;
/**
*
*/
public class IgniteGetTxBenchmark extends IgniteGetBenchmark {
/** {@inheritDoc} */
@Override protected IgniteCache<Integer, Object> cache() {
return ignite().cache("tx");
}
}
|
apache/incubator-heron | 1,100 | storm-compatibility/v0.10.2/src/java/org/apache/storm/spout/MultiScheme.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.storm.spout;
import java.io.Serializable;
import java.nio.ByteBuffer;
import java.util.List;
import org.apache.storm.tuple.Fields;
public interface MultiScheme extends Serializable {
Iterable<List<Object>> deserialize(ByteBuffer ser);
Fields getOutputFields();
}
|
apache/incubator-hugegraph-computer | 1,061 | computer/computer-test/src/main/java/org/apache/hugegraph/computer/core/allocator/AllocatorTestSuite.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package org.apache.hugegraph.computer.core.allocator;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
RecyclersTest.class,
DefaultAllocatorTest.class
})
public class AllocatorTestSuite {
}
|
apache/incubator-hugegraph | 1,075 | hugegraph-store/hg-store-client/src/main/java/org/apache/hugegraph/store/client/HgPrivate.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hugegraph.store.client;
/**
* created on 2021/10/26
*/
public class HgPrivate {
private final static HgPrivate instance = new HgPrivate();
private HgPrivate() {
}
static HgPrivate getInstance() {
return instance;
}
}
|
apache/incubator-kie-drools | 1,092 | kie-pmml-trusty/kie-pmml-api/src/main/java/org/kie/pmml/api/enums/PMML_STEP.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.pmml.api.enums;
/**
* Values common to all models, i.e. to overall execution
* This should not contain any reference to a specific implementation, to keep modules decoupling
*/
public enum PMML_STEP {
START,
PRE_EVALUATION,
POST_EVALUATION,
END
}
|
apache/incubator-kie-drools | 1,103 | drools-traits/src/main/java/org/drools/traits/core/metadata/Shed.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.traits.core.metadata;
import org.drools.traits.core.factmodel.AbstractTraitFactory;
public interface Shed<K,T> extends WorkingMemoryTask<T> {
public K getCore();
public Class<T> getTrait();
public Shed<K,T> setTraitFactory( AbstractTraitFactory factory );
}
|
apache/incubator-kie-drools | 1,112 | drools-base/src/main/java/org/drools/base/phreak/Reactive.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.base.phreak;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.TYPE)
public @interface Reactive {
}
|
apache/incubator-kie-optaplanner | 1,059 | optaplanner-examples/src/main/java/org/optaplanner/examples/meetingscheduling/domain/RequiredAttendance.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.optaplanner.examples.meetingscheduling.domain;
public class RequiredAttendance extends Attendance {
public RequiredAttendance() {
}
public RequiredAttendance(long id, Meeting meeting) {
super(id, meeting);
}
}
|
apache/incubator-livy | 1,114 | test-lib/src/main/java/org/apache/livy/test/jobs/Failure.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.livy.test.jobs;
import org.apache.livy.Job;
import org.apache.livy.JobContext;
public class Failure implements Job<Void> {
@Override
public Void call(JobContext jc) {
throw new JobFailureException();
}
public static class JobFailureException extends RuntimeException {
}
}
|
apache/inlong | 1,076 | inlong-tubemq/tubemq-manager/src/main/java/org/apache/inlong/tubemq/manager/controller/node/dto/MasterDto.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.inlong.tubemq.manager.controller.node.dto;
import lombok.Data;
@Data
public class MasterDto {
private Long clusterId;
private String token;
private String ip;
private Integer port;
private Integer webPort;
private boolean standBy;
}
|
apache/iotdb-web-workbench | 1,097 | backend/src/main/java/org/apache/iotdb/admin/model/vo/MeasuremtnInfoVO.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 MeasuremtnInfoVO implements Serializable {
private List<MeasurementVO> measurementVOList;
private Integer totalCount;
private Integer totalPage;
}
|
apache/iotdb | 1,076 | iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/DataSourceOperator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iotdb.db.queryengine.execution.operator.source;
import org.apache.iotdb.db.storageengine.dataregion.read.IQueryDataSource;
public interface DataSourceOperator extends SourceOperator {
void initQueryDataSource(IQueryDataSource dataSource);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.