repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
google/auto | 1,103 | service/processor/src/test/resources/test/EnclosingGeneric.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 test;
import com.google.auto.service.AutoService;
/** Test for suppressing warnings about raw types on nested {@code @AutoService} classes. */
@SuppressWarnings("rawtypes")
public final class EnclosingGeneric {
/**
* This is technically a raw class reference, but should be suppressed by the
* {@code @SuppressWarnings} on the enclosing class.
*/
@AutoService(GenericService.class)
public class GenericServiceProvider<T> implements GenericService<T> {}
private EnclosingGeneric() {}
}
|
google/bindiff | 1,086 | java/zylib/src/main/java/com/google/security/zynamics/zylib/image/ImageHelper.java | // Copyright 2011-2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.zylib.image;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.image.FilteredImageSource;
import java.awt.image.ImageFilter;
import java.awt.image.ImageProducer;
public class ImageHelper {
public static Image filterImage(final Image inImage, final ImageFilter filter) {
final ImageProducer imageProducer = new FilteredImageSource(inImage.getSource(), filter);
return Toolkit.getDefaultToolkit().createImage(imageProducer);
}
}
|
google/closure-templates | 1,087 | java/src/com/google/template/soy/base/internal/IdGenerator.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.template.soy.base.internal;
/** A generator of int ids. Implementations can generate fixed ids, unique ids, or anything else. */
public interface IdGenerator {
/**
* Generates and returns an id.
*
* @return The generated id.
*/
int genId();
/**
* Clones this id generator, such that the original and new generators will generate the same list
* of ids going forward.
*
* @return A clone of this id generator.
*/
IdGenerator copy();
}
|
google/depan | 1,077 | DepanPlatformUI/prod/src/com/google/devtools/depan/platform/jobs/ProgressListener.java | /*
* Copyright 2007 The Depan 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.devtools.depan.platform.jobs;
/**
* Simple interface for a ProgressListener.
*
* @author ycoppel@google.com (Yohann Coppel)
*
*/
public interface ProgressListener {
/**
* inform the listener about the current job.
*
* @param curentJob String representing the current job
* @param n number of jobs executed
* @param total total number of jobs to execute.
*/
public void progress(String curentJob, int n, int total);
}
|
google/gdata-java-client | 1,094 | java/src/com/google/gdata/data/maps/DataConstants.java | /* Copyright (c) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.gdata.data.maps;
import com.google.gdata.util.common.xml.XmlNamespace;
/**
* Constants for the Maps Data API
*
*/
public interface DataConstants {
public static final String KML_PREFIX = "kml";
public static final String KML_URL = "http://www.opengis.net/kml/2.2";
/**
* Defines the KML namespace, which is the primary format for
* FeatureEntry content.
*/
public static final XmlNamespace KML_NAMESPACE =
new XmlNamespace(KML_PREFIX, KML_URL);
}
|
google/gdata-java-client | 1,097 | java/src/com/google/gdata/model/PathException.java | /* Copyright (c) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.gdata.model;
/**
* The PathException class defines a specialized type of {link RuntimeException}
* that is thrown as a result of various exception conditions for the
* {@link Path} class.
*
*
*/
public class PathException extends RuntimeException {
public PathException(String message) {
super(message);
}
public PathException(String message, Throwable cause) {
super(message, cause);
}
public PathException(Throwable cause) {
super(cause);
}
}
|
google/graphicsfuzz | 1,087 | util/src/main/java/com/graphicsfuzz/util/StreamGobblerBuffer.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.util;
import java.io.InputStream;
public class StreamGobblerBuffer extends StreamGobbler {
private final StringBuffer result;
public StreamGobblerBuffer(InputStream inputStream) {
super(inputStream);
this.result = new StringBuffer();
}
@Override
protected void handleLine(String line) {
result.append(line);
result.append(System.lineSeparator());
}
public StringBuffer getResult() {
return result;
}
} |
google/guava | 1,083 | android/guava-testlib/src/com/google/common/collect/testing/TestSetGenerator.java | /*
* Copyright (C) 2007 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.common.collect.testing;
import com.google.common.annotations.GwtCompatible;
import java.util.Set;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
/**
* Creates sets, containing sample elements, to be tested.
*
* @author Kevin Bourrillion
*/
@GwtCompatible
@NullMarked
public interface TestSetGenerator<E extends @Nullable Object> extends TestCollectionGenerator<E> {
@Override
Set<E> create(Object... elements);
}
|
google/guice | 1,102 | core/src/com/google/inject/binder/AnnotatedElementBuilder.java | /*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.inject.binder;
import java.lang.annotation.Annotation;
/**
* See the EDSL examples at {@link com.google.inject.Binder}.
*
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*/
public interface AnnotatedElementBuilder {
/** See the EDSL examples at {@link com.google.inject.Binder}. */
void annotatedWith(Class<? extends Annotation> annotationType);
/** See the EDSL examples at {@link com.google.inject.Binder}. */
void annotatedWith(Annotation annotation);
}
|
google/j2cl | 1,079 | benchmarking/java/com/google/j2cl/benchmarks/jre/ArrayTestObjectSetBenchmark.java | /*
* Copyright 2015 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.j2cl.benchmarks.jre;
import com.google.j2cl.benchmarking.framework.AbstractBenchmark;
/** Benchmark array set performance. */
public class ArrayTestObjectSetBenchmark extends AbstractBenchmark {
private Object[] array;
@Override
public Object run() {
var value = new Object();
for (int i = 0; i < array.length; i++) {
array[i] = value;
}
return array;
}
@Override
public void setupOneTime() {
array = new Object[1000];
}
}
|
google/j2cl | 1,118 | jre/java/java/util/function/Consumer.java | /*
* Copyright 2015 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package java.util.function;
import static javaemul.internal.InternalPreconditions.checkCriticalNotNull;
/**
* See <a href="https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html">the
* official Java API doc</a> for details.
*
* @param <T> type of the argument
*/
@FunctionalInterface
public interface Consumer<T> {
void accept(T t);
default Consumer<T> andThen(Consumer<? super T> after) {
checkCriticalNotNull(after);
return t -> {
accept(t);
after.accept(t);
};
}
}
|
google/oss-fuzz | 1,133 | projects/cbor-java/FuzzDec.java | // Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
import com.code_intelligence.jazzer.api.FuzzedDataProvider;
import java.io.*;
import co.nstant.in.cbor.CborDecoder;
import co.nstant.in.cbor.CborException;
public class FuzzDec {
public static void fuzzerTestOneInput(FuzzedDataProvider data) {
ByteArrayInputStream bais = new ByteArrayInputStream(data.consumeRemainingAsBytes());
CborDecoder decoder = new CborDecoder(bais);
try {
decoder.decode();
} catch (CborException e) {}
}
}
|
googlearchive/caja | 1,105 | tests/com/google/caja/parser/html/NodeListWrapper.java | // Copyright (C) 2010 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.caja.parser.html;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
class NodeListWrapper implements NodeList {
protected final NodeList underlying;
protected final DomMembrane membrane;
NodeListWrapper(NodeList underlying, DomMembrane membrane) {
this.underlying = underlying;
this.membrane = membrane;
}
public int getLength() {
return underlying.getLength();
}
public Node item(int arg0) {
return membrane.wrap(underlying.item(arg0), Node.class);
}
}
|
hibernate/hibernate-ogm | 1,061 | core/src/main/java/org/hibernate/ogm/id/spi/PersistentNoSqlIdentifierGenerator.java | /*
* Hibernate OGM, Domain model persistence for NoSQL datastores
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.ogm.id.spi;
import org.hibernate.id.IdentifierGenerator;
import org.hibernate.ogm.model.key.spi.IdSourceKeyMetadata;
/**
* A {@link IdentifierGenerator} based on a persistent structure in a NoSQL store, such as a table, collection or
* sequence.
*
* @author Gunnar Morling
*/
public interface PersistentNoSqlIdentifierGenerator extends IdentifierGenerator {
/**
* Returns an identifier representing the persistent structure which this generator is based upon, e.g. a table or
* sequence.
*
* @return An identifier representing the persistent structure which this generator is based upon
*/
IdSourceKeyMetadata getGeneratorKeyMetadata();
/**
* Returns the initial value of this generator.
*
* @return the initial value of this generator
*/
int getInitialValue();
}
|
hibernate/hibernate-orm | 1,040 | hibernate-core/src/test/java/org/hibernate/orm/test/jpa/emops/Competition.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.jpa.emops;
import java.util.ArrayList;
import java.util.List;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.JoinTable;
import jakarta.persistence.ManyToMany;
/**
* @author Emmanuel Bernard
*/
@Entity
public class Competition {
@Id
@GeneratedValue
private Integer id;
@ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE },
fetch = FetchType.LAZY)
@JoinTable(name="competition_competitor")
private List<Competitor> competitors = new ArrayList<Competitor>();
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public List<Competitor> getCompetitors() {
return competitors;
}
public void setCompetitors(List<Competitor> competitors) {
this.competitors = competitors;
}
}
|
hibernate/hibernate-orm | 1,045 | hibernate-core/src/main/java/org/hibernate/cache/spi/support/RegionNameQualifier.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.cache.spi.support;
import org.hibernate.boot.spi.SessionFactoryOptions;
/**
* @author Steve Ebersole
*/
public class RegionNameQualifier {
/**
* Singleton access
*/
public static final RegionNameQualifier INSTANCE = new RegionNameQualifier();
public String qualify(String regionName, SessionFactoryOptions options) {
final String prefix = options.getCacheRegionPrefix();
return prefix == null ? regionName : qualify( prefix, regionName );
}
public String qualify(String prefix, String regionName) {
return regionName.startsWith( prefix + '.' ) ? regionName : prefix + '.' + regionName;
}
public boolean isQualified(String regionName, SessionFactoryOptions options) {
return isQualified( options.getCacheRegionPrefix(), regionName );
}
public boolean isQualified(String prefix, String regionName) {
return prefix != null && regionName.startsWith( prefix );
}
private RegionNameQualifier() {
}
}
|
hibernate/hibernate-validator | 1,029 | engine/src/test/java/org/hibernate/validator/test/internal/engine/methodvalidation/crossparameter/DodgyConstraint.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.validator.test.internal.engine.methodvalidation.crossparameter;
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;
/**
* @author Hardy Ferentschik
*/
@Target({ TYPE, FIELD, METHOD, ANNOTATION_TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = { DodgyConstraintValidator.class })
@Documented
public @interface DodgyConstraint {
String message() default "{ConsistentDateParameters.message}";
Class<?>[] groups() default { };
Class<? extends Payload>[] payload() default { };
}
|
openjdk/jdk8 | 1,091 | langtools/test/tools/javac/diags/examples/ProcUseImplicit/sourcepath/p/SomeClass.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package p;
public class SomeClass { }
|
openjdk/jdk8 | 1,105 | jdk/test/java/rmi/activation/Activatable/downloadParameterClass/Foo.java | /*
* Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public class Foo implements java.io.Serializable {
}
|
openjdk/jdk8 | 1,120 | langtools/test/tools/javadoc/T4994049/FileWithTabs.java | /*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public class FileWithTabs {
\tpublic void tabbedMethod() {}
}
|
openjdk/jdk8 | 1,125 | langtools/test/tools/javac/scope/6225935/Bar.java | /*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package test;
public class Bar {
public final static int ERA = 0;
}
|
oracle/coherence | 1,076 | prj/coherence-core/src/main/java/com/tangosol/io/pof/OptionalDoubleSerializer.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.io.pof;
import java.io.IOException;
import java.util.OptionalDouble;
/**
* POF serializer for {@code java.util.OptionalDouble}.
*
* @author as 2014.10.07
*/
public class OptionalDoubleSerializer
implements PofSerializer<OptionalDouble>
{
public void serialize(PofWriter out, OptionalDouble value) throws IOException
{
boolean fPresent = value.isPresent();
out.writeBoolean(0, fPresent);
if (fPresent)
{
out.writeDouble(1, value.getAsDouble());
}
out.writeRemainder(null);
}
public OptionalDouble deserialize(PofReader in) throws IOException
{
boolean fPresent = in.readBoolean(0);
OptionalDouble value = fPresent ? OptionalDouble.of(in.readInt(1)) : OptionalDouble.empty();
in.readRemainder();
return value;
}
}
|
oracle/coherence | 1,080 | prj/coherence-core/src/main/java/com/tangosol/dev/compiler/MemberInfo.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.dev.compiler;
/**
* The MemberInfo interface represents the information about a method
* or field of a class.
*
* @version 1.00, 01/21/98
* @author Cameron Purdy
*/
public interface MemberInfo
extends Info
{
/**
* Determine the type that contains this member.
*
* @return the TypeInfo for the containing type
*/
TypeInfo getTypeInfo();
/**
* Determine if the method can be inlined by referencing a field directly
* or if the field can be inlined by replacing it with a constant.
*
* @return true if the member can be inlined
*/
boolean isInlineable();
/**
* Determine if the member must be inlined because it is being optimized
* out by the compiler context.
*
* @return true if the member is being optimized out and must NOT be
* referenced
*/
boolean isInlined();
}
|
oracle/coherence | 1,083 | prj/coherence-core/src/main/java/com/tangosol/io/pof/reflect/PofNavigator.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.io.pof.reflect;
/**
* The PofNavigator interface represents an algorithm for navigating a PofValue
* hierarchy in order to locate a contained PofValue for extraction, modification
* or removal purposes.
*
* @author as 2009.02.14
* @since Coherence 3.5
*/
public interface PofNavigator
{
/**
* Locate the {@link PofValue} identified by this PofNavigator within the
* passed PofValue. If one of the intermediate navigation values is null,
* return the null value immediately.
*
* @param valueOrigin the origin from which navigation starts
*
* @return the resulting PofValue
*
* @throws PofNavigationException if the navigation fails; for example one
* of the intermediate nodes in this path is a "terminal" PofValue
* such as {@link SimplePofValue}
*/
public PofValue navigate(PofValue valueOrigin);
}
|
oracle/nosql | 1,091 | kvmain/src/main/java/oracle/kv/impl/security/annotations/SecureInternalMethod.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.security.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Specifies that no checking should be performed by the dynamic proxy,
* as the implementation will internally check. This is functionally
* equivalent to SecureAutoMethod, but with no required roles. This is
* serves to document the intent that security checking is required.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface SecureInternalMethod {
}
|
apache/ctakes | 1,054 | ctakes-temporal/src/main/java/org/apache/ctakes/temporal/utils/TokenPreprocForWord2Vec.java | package org.apache.ctakes.temporal.utils;
import org.apache.ctakes.typesystem.type.syntax.BaseToken;
public class TokenPreprocForWord2Vec {
/**
* Determine what to print based on the token's type.
*/
public static String tokenToString(BaseToken token) {
String stringValue;
String tokenType = token.getClass().getSimpleName();
String tokenText = token.getCoveredText().toLowerCase();
switch(tokenType) {
case "ContractionToken":
stringValue = tokenText;
break;
case "NewlineToken":
stringValue = " newline ";//changed by Chen on 1/10/2019
break;
case "NumToken":
stringValue = tokenText; //"number_token"; changed by Chen on 2/21/2019
break;
case "PunctuationToken":
stringValue = tokenText;
break;
case "SymbolToken":
stringValue = tokenText;
break;
case "WordToken":
stringValue = tokenText;
break;
default:
throw new IllegalArgumentException("Invalid token type: " + tokenType);
}
return stringValue;
}
} |
apache/curator | 1,087 | curator-x-async/src/main/java/org/apache/curator/x/async/api/AsyncWatchBuilder2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.curator.x.async.api;
import org.apache.curator.framework.api.WatchableBase;
import org.apache.curator.x.async.AsyncStage;
public interface AsyncWatchBuilder2
extends WatchableBase<AsyncPathable<AsyncStage<Void>>>, AsyncPathable<AsyncStage<Void>> {}
|
apache/cxf | 1,078 | tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/model/XWsdl.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.tools.validator.internal.model;
public class XWsdl extends XNode {
public XWsdl() {
setPrefix("wsdl");
}
public void setName(final String newName) {
setAttributeName("name");
setAttributeValue(newName);
}
}
|
apache/cxf | 1,086 | rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/client/InboundSseEventListener.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.jaxrs.sse.client;
import jakarta.ws.rs.sse.InboundSseEvent;
/**
* Flow/RxJava like listener for processing SSE events
*/
interface InboundSseEventListener {
void onNext(InboundSseEvent event);
void onError(Throwable ex);
void onComplete();
}
|
apache/derby | 1,040 | plugins/eclipse/org.apache.derby.ui/src/org/apache/derby/ui/launch/SysInfoDerbyLaunchConfigurationDelegate.java | /*
Derby - Class org.apache.derby.ui.launch.SysInfoDerbyLaunchConfigurationDelegate
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package org.apache.derby.ui.launch;
import org.eclipse.jdt.launching.JavaLaunchDelegate;
public class SysInfoDerbyLaunchConfigurationDelegate extends
JavaLaunchDelegate {
}
|
apache/derby | 1,097 | java/org.apache.derby.tests/org/apache/derby/info/tsting/DerbyModule.java | /*
Derby - Class org.apache.derby.info.tsting.DerbyModule
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package org.apache.derby.info.tsting;
import org.apache.derby.shared.api.DerbyModuleAPI;
/**
* The vacuous provider class which lets
* the shared module find all Derby modules.
*/
public class DerbyModule implements DerbyModuleAPI {}
|
apache/directory-kerby | 1,059 | kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/preauth/PreauthPluginMeta.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.preauth;
import org.apache.kerby.kerberos.kerb.type.pa.PaDataType;
public interface PreauthPluginMeta {
String getName();
int getVersion();
PaDataType[] getPaTypes();
}
|
apache/dolphinscheduler | 1,034 | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/exception/LogicTaskFactoryNotFoundException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.server.master.exception;
public class LogicTaskFactoryNotFoundException extends MasterException {
public LogicTaskFactoryNotFoundException(String message) {
super(message);
}
}
|
apache/druid | 1,091 | server/src/main/java/org/apache/druid/messages/client/MessageRelayFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.messages.client;
import org.apache.druid.server.DruidNode;
/**
* Factory for creating new message relays. Used by {@link MessageRelays}.
*/
public interface MessageRelayFactory<MessageType>
{
MessageRelay<MessageType> newRelay(DruidNode druidNode);
}
|
apache/eagle | 1,059 | eagle-core/eagle-data-process/src/main/java/org/apache/eagle/dataproc/impl/storm/partition/PartitionAlgorithm.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eagle.dataproc.impl.storm.partition;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
public interface PartitionAlgorithm extends Serializable {
Map<String, Integer> partition(List<Weight> weights, int k);
}
|
apache/eagle | 1,065 | eagle-examples/eagle-app-example/src/main/java/org/apache/eagle/app/example/extensions/ExampleEntity.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eagle.app.example.extensions;
public class ExampleEntity {
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
|
apache/felix-dev | 1,025 | ipojo/runtime/core-it/ipojo-core-service-providing-test/src/main/java/org/apache/felix/ipojo/runtime/core/components/SimpleClass.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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;
public class SimpleClass {
// This class do not implement any interface, it will be exposed as SimpleClass
public String hello() {
return "Hello";
}
}
|
apache/felix-dev | 1,073 | ipojo/manipulator/manipulator/src/test/java/test/PojoWithInner.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package test;
public class PojoWithInner {
private MyInner m_result = new MyInner();
// This is a simple POJO
public boolean doSomething() {
return m_result.getInner();
}
public class MyInner {
public boolean getInner() {
return true;
}
}
}
|
apache/felix-dev | 1,075 | scr/src/test/java/org/apache/felix/scr/impl/manager/ConfigurationSupportTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.scr.impl.manager;
import junit.framework.TestCase;
public class ConfigurationSupportTest extends TestCase
{
public void testEscape()
{
assertEquals("foo \\(&\\)", RegionConfigurationSupport.escape("foo (&)"));
}
}
|
apache/felix-dev | 1,075 | scr/src/test/java/org/apache/felix/scr/integration/components/AnyServiceComponentList.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.scr.integration.components;
import java.util.List;
public class AnyServiceComponentList extends AnyServiceComponent
{
public AnyServiceComponentList(List<Object> anyServiceList)
{
super(null, anyServiceList, null);
}
}
|
apache/fineract | 1,068 | fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/InvalidJsonException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.core.exception;
/**
* A {@link RuntimeException} that is thrown in the case where invalid JSON is sent in the body of the request to the
* platform API.
*/
public class InvalidJsonException extends RuntimeException {}
|
apache/flink-benchmarks | 1,095 | src/main/java/org/apache/flink/benchmark/functions/SumReduce.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.benchmark.functions;
import org.apache.flink.api.common.functions.ReduceFunction;
public class SumReduce implements ReduceFunction<Long> {
@Override
public Long reduce(Long value1, Long value2) throws Exception {
return value1 + value2;
}
}
|
apache/flink-statefun | 1,061 | statefun-flink/statefun-flink-io/src/main/java/org/apache/flink/statefun/flink/io/spi/SinkProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.statefun.flink.io.spi;
import org.apache.flink.statefun.sdk.io.EgressSpec;
import org.apache.flink.streaming.api.functions.sink.SinkFunction;
public interface SinkProvider {
<T> SinkFunction<T> forSpec(EgressSpec<T> spec);
}
|
apache/fluss | 1,086 | fluss-common/src/main/java/org/apache/fluss/exception/IneligibleReplicaException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.fluss.exception;
/** Exception for ineligible replica. */
public class IneligibleReplicaException extends ApiException {
private static final long serialVersionUID = 1L;
public IneligibleReplicaException(String message) {
super(message);
}
}
|
apache/freemarker | 1,088 | freemarker-core/src/main/java/freemarker/core/BuiltInBannedWhenAutoEscaping.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package freemarker.core;
/**
* A string built-in whose usage is banned when auto-escaping with a markup-output format is active.
* This is just a marker; the actual checking is in {@code FTL.jj}.
*/
abstract class BuiltInBannedWhenAutoEscaping extends SpecialBuiltIn {
} |
apache/geode | 1,088 | geode-core/src/main/java/org/apache/geode/cache/query/internal/InternalQueryService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.geode.cache.query.internal;
import org.apache.geode.cache.query.QueryService;
import org.apache.geode.cache.query.security.MethodInvocationAuthorizer;
public interface InternalQueryService extends QueryService {
MethodInvocationAuthorizer getMethodInvocationAuthorizer();
}
|
apache/geode | 1,088 | geode-management/src/main/java/org/apache/geode/management/api/CommandType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*
*/
package org.apache.geode.management.api;
import org.apache.geode.annotations.Experimental;
/**
* Commands used by {@link ClusterManagementServiceTransport} which mimic HTTP verbs.
*/
@Experimental
public enum CommandType {
CREATE,
CREATE_OR_UPDATE,
READ,
LIST,
UPDATE,
DELETE
}
|
apache/geode | 1,099 | geode-junit/src/main/java/org/apache/geode/cache/query/data/Street.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.geode.cache.query.data;
import java.io.Serializable;
public class Street implements Serializable {
public String street;
public String lane;
/* Creates a new instance of Street */
public Street(String street, String lane) {
this.street = street;
this.lane = lane;
}
}
|
apache/gobblin | 1,054 | gobblin-modules/gobblin-compliance/src/main/java/org/apache/gobblin/compliance/validation/ValidatableDataset.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.compliance.validation;
import java.io.IOException;
import org.apache.gobblin.dataset.Dataset;
/**
* @author adsharma
*/
public interface ValidatableDataset extends Dataset {
void validate()
throws IOException;
}
|
apache/gobblin | 1,087 | gobblin-runtime/src/main/java/org/apache/gobblin/runtime/DefaultLimiterFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.runtime;
/**
* {@inheritDoc}
*
* @deprecated This class has been moved to {@link org.apache.gobblin.util.limiter.DefaultLimiterFactory}.
*/
@Deprecated
public class DefaultLimiterFactory extends org.apache.gobblin.util.limiter.DefaultLimiterFactory {
}
|
apache/hadoop-common | 1,066 | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/impl/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* A metrics system implementation
*/
@InterfaceAudience.Private
@InterfaceStability.Evolving
package org.apache.hadoop.metrics2.impl;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability; |
apache/harmony | 1,082 | classlib/modules/awt/src/main/java/common/java/awt/image/RasterFormatException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @author Igor V. Stolyarov
*/
package java.awt.image;
public class RasterFormatException extends RuntimeException {
private static final long serialVersionUID = 96598996116164315L;
public RasterFormatException(String s) {
super(s);
}
}
|
apache/harmony | 1,124 | drlvm/src/test/regression/H4579/test.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.harmony.drlvm.tests.regression.h4579;
import junit.framework.TestCase;
public class test extends TestCase {
public void testNeg() throws Exception {
try {
neg.test();
fail("VerifyError expected");
} catch( VerifyError e) {
}
}
} |
apache/hop | 1,068 | plugins/misc/testing/src/main/java/org/apache/hop/testing/actions/runtests/RunPipelineTestsField.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hop.testing.actions.runtests;
import lombok.Getter;
import lombok.Setter;
import org.apache.hop.metadata.api.HopMetadataProperty;
@Getter
@Setter
public class RunPipelineTestsField {
@HopMetadataProperty(key = "name")
String testName;
}
|
apache/hudi | 1,068 | hudi-client/hudi-client-common/src/main/java/org/apache/hudi/exception/HoodieCompactionException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hudi.exception;
public class HoodieCompactionException extends HoodieException {
public HoodieCompactionException(String msg) {
super(msg);
}
public HoodieCompactionException(String msg, Throwable e) {
super(msg, e);
}
}
|
apache/hudi | 1,077 | hudi-common/src/main/java/org/apache/hudi/exception/HoodieDebeziumAvroPayloadException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.hudi.exception;
import java.io.IOException;
/**
* Exception for HoodieDebeziumAvroPayload.
*/
public class HoodieDebeziumAvroPayloadException extends IOException {
public HoodieDebeziumAvroPayloadException(String msg) {
super(msg);
}
}
|
apache/incubator-brooklyn | 1,047 | brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/jms/JMSDestination.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.brooklyn.entity.messaging.jms;
import org.apache.brooklyn.api.entity.Entity;
public interface JMSDestination extends Entity {
public String getName();
public void delete();
public void destroy();
}
|
apache/incubator-hugegraph | 1,054 | hugegraph-store/hg-store-test/src/main/java/org/apache/hugegraph/store/service/BaseServerTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.service;
import org.junit.After;
import org.junit.BeforeClass;
public class BaseServerTest {
@BeforeClass
public static void init() {
}
@After
public void teardown() {
// pass
}
}
|
apache/incubator-kie-drools | 1,051 | drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/StaticMethods.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.mvel.compiler;
public class StaticMethods {
public static String getString1(final String string) {
return string;
}
public static String getString2(final String string) {
return string;
}
}
|
apache/incubator-kie-kogito-runtimes | 1,060 | addons/common/jobs/api/src/main/java/org/kie/kogito/jobs/api/JobNotFoundException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.kogito.jobs.api;
public class JobNotFoundException extends RuntimeException {
private static final long serialVersionUID = -5827356422593810436L;
public JobNotFoundException(String message) {
super(message);
}
}
|
apache/incubator-kie-kogito-runtimes | 1,077 | jbpm/jbpm-flow/src/main/java/org/jbpm/process/core/Context.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jbpm.process.core;
import java.io.Serializable;
public interface Context extends Serializable {
String getType();
long getId();
void setId(long id);
Context resolveContext(Object param);
ContextContainer getContextContainer();
}
|
apache/incubator-retired-wave | 1,084 | wave/src/main/java/org/waveprotocol/wave/model/account/Policies.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.waveprotocol.wave.model.account;
/**
* Holder for default values for roles and indexability.
*
*
*/
public class Policies {
public static final Role DEFAULT_ROLE = Role.FULL;
public static final IndexDecision DEFAULT_INDEXABILITY = IndexDecision.YES;
}
|
apache/incubator-seata-samples | 1,045 | at-sample/springboot-seata/src/main/java/org/apache/seata/service/AccountService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seata.service;
/**
* The interface Account service.
*/
public interface AccountService {
/**
* 余额扣款
*
* @param userId 用户ID
* @param money 扣款金额
*/
void debit(String userId, int money);
}
|
apache/incubator-seata | 1,074 | namingserver/src/main/java/org/apache/seata/namingserver/contants/NamingConstant.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seata.namingserver.contants;
public interface NamingConstant {
String CONSOLE_PATTERN = "^/api/.*/console/.*";
int DEFAULT_REQUEST_TIMEOUT = 5000;
int DEFAULT_CONNECTION_MAX_TOTAL = 100;
int DEFAULT_CONNECTION_MAX_PER_ROUTE = 20;
}
|
apache/incubator-seata | 1,088 | common/src/main/java/org/apache/seata/common/executor/Callback.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seata.common.executor;
/**
* The interface Callback.
*
* @param <T> the type parameter
*
*/
public interface Callback<T> {
/**
* Execute t.
*
* @return the t
* @throws Throwable the throwable
*/
T execute() throws Throwable;
}
|
apache/incubator-seata | 1,099 | compatible/src/main/java/io/seata/core/model/ResourceManager.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.seata.core.model;
import org.apache.seata.common.loader.EnhancedServiceLoader;
/**
* @see EnhancedServiceLoader.InnerEnhancedServiceLoader#findAllExtensionDefinition(ClassLoader)
*/
@Deprecated
public interface ResourceManager extends org.apache.seata.core.model.ResourceManager {}
|
apache/iotdb-web-workbench | 1,089 | backend/src/main/java/org/apache/iotdb/admin/mapper/GroupMapper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.mapper;
import org.apache.iotdb.admin.model.entity.StorageGroup;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Component;
@Component
public interface GroupMapper extends BaseMapper<StorageGroup> {}
|
apache/iotdb | 1,058 | iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/disk/strategy/DirectoryStrategyType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.storageengine.rescon.disk.strategy;
public enum DirectoryStrategyType {
SEQUENCE_STRATEGY,
MAX_DISK_USABLE_SPACE_FIRST_STRATEGY,
MIN_FOLDER_OCCUPIED_SPACE_FIRST_STRATEGY,
RANDOM_ON_DISK_USABLE_SPACE_STRATEGY,
}
|
apache/iotdb | 1,083 | iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/service/StartupCheck.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.commons.service;
import org.apache.iotdb.commons.exception.StartupException;
@FunctionalInterface
public interface StartupCheck {
/** Run some tests to check whether system is safe to be started. */
void execute() throws StartupException;
}
|
apache/jackrabbit-oak | 1,041 | oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/accesscontrol/AccessControlImporterWorkspaceTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jackrabbit.oak.security.authorization.accesscontrol;
public class AccessControlImporterWorkspaceTest extends AccessControlImporterAbortTest{
@Override
boolean isWorkspaceImport() {
return true;
}
} |
apache/jackrabbit-oak | 1,073 | oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/ContextAwareCallback.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.jackrabbit.oak.plugins.index;
/**
* Extension to IndexUpdateCallback which also provides access to
* {@link IndexingContext}
*/
public interface ContextAwareCallback extends IndexUpdateCallback {
IndexingContext getIndexingContext();
}
|
apache/jena | 1,110 | jena-arq/src/main/java/org/apache/jena/rdfs/engine/Match.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.rdfs.engine;
import java.util.stream.Stream;
/**
* Match by S/P/O where {@code X} is the RDF term representation (Node, NodeId) and
* {@code T} is the tuple (triple, quad, tuple) representation.
*/
public interface Match<X, T> {
public Stream<T> match(X s, X p, X o);
}
|
apache/johnzon | 1,069 | johnzon-jsonb/src/test/java/org/apache/johnzon/jsonb/model/nillable/notnillable/StringHolder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.johnzon.jsonb.model.nillable.notnillable;
public class StringHolder {
private String string;
public String getString() {
return string;
}
public void setString(final String string) {
this.string = string;
}
}
|
apache/kafka | 1,073 | clients/src/test/java/org/apache/kafka/common/security/ssl/CommonNameLoggingSslEngineFactoryTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kafka.common.security.ssl;
public class CommonNameLoggingSslEngineFactoryTest extends DefaultSslEngineFactoryTest {
@Override
protected DefaultSslEngineFactory sslEngineFactory() {
return new CommonNameLoggingSslEngineFactory();
}
}
|
apache/karaf | 1,098 | shell/core/src/main/java/org/apache/karaf/shell/api/console/Parser.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.karaf.shell.api.console;
/**
* A <code>Parser</code> is used by the console to parse a command line.
*/
public interface Parser {
CommandLine parse(Session session, String command, int cursor);
String preprocess(Session session, CommandLine commandLine);
}
|
apache/linkis | 1,035 | linkis-public-enhancements/linkis-pes-publicservice/src/main/java/org/apache/linkis/errorcode/server/service/LinkisErrorCodeService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.linkis.errorcode.server.service;
import org.apache.linkis.errorcode.common.LinkisErrorCode;
import java.util.List;
public interface LinkisErrorCodeService {
public List<LinkisErrorCode> getAllErrorCodes();
}
|
apache/logging-log4j2 | 1,062 | log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/validation/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache license, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the license for the specific language governing permissions and
* limitations under the license.
*/
/**
* Constraint validators for plugin factory methods.
*
* @since 2.1
*/
@Export
@Version("2.20.1")
package org.apache.logging.log4j.core.config.plugins.validation;
import org.osgi.annotation.bundle.Export;
import org.osgi.annotation.versioning.Version;
|
apache/logging-log4j2 | 1,070 | log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/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.
*/
/**
* Configuration Builder API for programmatically configuring Log4j.
*
* @since 2.4
*/
@Export
@Version("2.25.0")
package org.apache.logging.log4j.core.config.builder.api;
import org.osgi.annotation.bundle.Export;
import org.osgi.annotation.versioning.Version;
|
apache/lucene | 1,095 | lucene/sandbox/src/java/org/apache/lucene/sandbox/facet/plain/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Provides plain faceting capabilities, as opposed to {@link
* org.apache.lucene.sandbox.facet.cutters cutters} and {@link
* org.apache.lucene.sandbox.facet.recorders recorders}, which allow composing faceting components
* together.
*/
package org.apache.lucene.sandbox.facet.plain;
|
apache/manifoldcf | 1,047 | connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/IRedirectionHandler.java | /* $Id$ */
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.manifoldcf.crawler.connectors.webcrawler;
/** This interface describes the functionality needed by an redirection processor in order to handle a redirection.
*/
public interface IRedirectionHandler extends IDiscoveredLinkHandler
{
}
|
apache/manifoldcf | 1,049 | connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/MeridioClassContents.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.manifoldcf.crawler.connectors.meridio;
public class MeridioClassContents
{
public static final int FOLDER = 0;
public static final int CLASS = 1;
public int classOrFolderId;
public String classOrFolderName;
public int containerType;
}
|
apache/maven-plugins | 1,079 | maven-jmod-plugin/src/it/list-plain/src/main/java/myproject/HelloWorld.java | package myproject;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* The classic Hello World App.
*/
public class HelloWorld {
/**
* Main method.
*
* @param args Not used
*/
public static void main( String[] args )
{
System.out.println( "Hello World from JDK 9" );
}
} |
apache/maven-surefire | 1,050 | surefire-its/src/test/resources/surefire-818-ignored-tests-on-npe/src/test/java/cyril/test/Message.java | package cyril.test;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
public class Message
{
private String content;
public Message( String content )
{
this.content = content;
}
public int hashCode()
{
throw new NullPointerException();
}
}
|
apache/maven | 1,072 | api/maven-api-plugin/src/main/java/org/apache/maven/api/plugin/descriptor/lifecycle/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.
*/
/**
* Contains classes for managing plugin-specific lifecycle bindings and forked executions.
* This package helps define how plugins can modify or extend Maven's build lifecycle.
*
* @since 4.0.0
*/
package org.apache.maven.api.plugin.descriptor.lifecycle;
|
apache/maven | 1,084 | impl/maven-impl/src/main/java/org/apache/maven/api/services/model/RootDetector.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.api.services.model;
import java.nio.file.Path;
import org.apache.maven.api.Service;
/**
* Interface used to detect is a given directory "root directory".
*/
public interface RootDetector extends Service {
boolean isRootDirectory(Path dir);
}
|
apache/maven | 1,095 | impl/maven-core/src/main/java/org/apache/maven/InternalErrorException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven;
/**
* Signals an internal error in Maven itself, e.g. a programming bug.
*
*/
public class InternalErrorException extends MavenExecutionException {
public InternalErrorException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/olingo-odata4 | 1,071 | lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/TopOption.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.olingo.server.api.uri.queryoption;
/**
* Represents the system query option $top
* For example: http://.../entitySet?$top=10
*/
public interface TopOption extends SystemQueryOption {
/**
* @return Value of $top
*/
int getValue();
}
|
apache/oodt | 1,090 | commons/src/main/java/org/apache/oodt/commons/activity/ActivityStopped.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.oodt.commons.activity;
/**
* An incident that indicates that an activity has stopped.
*
* @author Kelly
* @version $Revision: 1.1 $
*/
class ActivityStopped extends Incident {
/**
* Creates a new {@link ActivityStopped} instance.
*/
ActivityStopped() {}
}
|
apache/openjpa | 1,056 | openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/entityasidentity2/Person.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.persistence.identity.entityasidentity2;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
@Entity
@Table(name = "EAI2Person")
public class Person {
@Id
int id;
}
|
apache/openjpa | 1,074 | openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/MaleUser_.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT 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 OpenJPA MetaModel Generator Tool.
**/
package org.apache.openjpa.persistence.criteria;
@jakarta.persistence.metamodel.StaticMetamodel
(value=org.apache.openjpa.persistence.criteria.MaleUser.class)
public class MaleUser_ extends CompUser_ {
}
|
apache/openjpa | 1,077 | openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/D.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.persistence.criteria;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;
@Entity
public class D {
@Id
private long id;
private String name;
@ManyToOne
private C c;
}
|
apache/ozhera | 1,031 | ozhera-prometheus-agent/ozhera-prometheus-agent-service/src/main/java/org/apache/ozhera/prometheus/agent/service/MioneMachineService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ozhera.prometheus.agent.service;
import org.apache.ozhera.prometheus.agent.domain.Ips;
import java.util.List;
public interface MioneMachineService {
List<Ips> queryMachineList(String type) ;
} |
apache/ozone | 1,075 | hadoop-hdds/erasurecode/src/test/java/org/apache/ozone/erasurecode/rawcoder/TestXORRawCoder.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ozone.erasurecode.rawcoder;
/**
* Test pure Java XOR encoding and decoding.
*/
public class TestXORRawCoder extends TestXORRawCoderBase {
public TestXORRawCoder() {
super(XORRawErasureCoderFactory.class, XORRawErasureCoderFactory.class);
}
}
|
apache/ozone | 1,080 | hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/AutoCloseSupplier.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.hdds.utils.db;
import java.util.function.Supplier;
/** An {@link AutoCloseable} {@link Supplier}. */
@FunctionalInterface
interface AutoCloseSupplier<RAW> extends AutoCloseable, Supplier<RAW> {
@Override
default void close() {
// no-op
}
}
|
apache/ozone | 1,088 | hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/util/SeekableIterator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.ozone.util;
import java.io.IOException;
import java.util.Iterator;
/**
* An {@link Iterator} that may hold resources until it is closed.
*/
public interface SeekableIterator<K, E> extends ClosableIterator<E> {
void seek(K position) throws IOException;
}
|
apache/paimon | 1,093 | paimon-core/src/main/java/org/apache/paimon/catalog/CatalogLoader.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.paimon.catalog;
import org.apache.paimon.annotation.Public;
import java.io.Serializable;
/**
* Loader for creating a {@link Catalog}.
*
* @since 1.1.0
*/
@Public
@FunctionalInterface
public interface CatalogLoader extends Serializable {
Catalog load();
}
|
apache/phoenix | 1,073 | phoenix-core-client/src/main/java/org/apache/phoenix/schema/NewerSchemaAlreadyExistsException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.phoenix.schema;
public class NewerSchemaAlreadyExistsException extends SchemaAlreadyExistsException {
private static final long serialVersionUID = 1L;
public NewerSchemaAlreadyExistsException(String schemaName) {
super(schemaName);
}
}
|
apache/phoenix | 1,073 | phoenix-pherf/src/main/java/org/apache/phoenix/pherf/workload/mt/operations/UpsertOperation.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.phoenix.pherf.workload.mt.operations;
import org.apache.phoenix.pherf.configuration.Upsert;
/**
* Defines an upsert operation.
* @see {@link OperationType#UPSERT}
*/
public interface UpsertOperation extends Operation {
Upsert getUpsert();
}
|
apache/pinot | 1,054 | pinot-plugins/pinot-timeseries-lang/pinot-timeseries-m3ql/src/main/java/org/apache/pinot/tsdb/m3ql/Constants.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pinot.tsdb.m3ql;
import java.time.Duration;
public class Constants {
public static final String LANGUAGE = "m3ql";
public static final Duration DEFAULT_RESOLUTION = Duration.ofMinutes(1);
private Constants() {
}
}
|
apache/polaris | 1,087 | runtime/service/src/intTest/java/org/apache/polaris/service/it/RestCatalogFileIT.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.polaris.service.it;
import io.quarkus.test.junit.QuarkusIntegrationTest;
import org.apache.polaris.service.it.test.PolarisRestCatalogFileIntegrationTest;
@QuarkusIntegrationTest
public class RestCatalogFileIT extends PolarisRestCatalogFileIntegrationTest {}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.