repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
google/truth | 1,156 | core/src/test/java/com/google/common/truth/extension/Employee.java | /*
* Copyright (c) 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.common.truth.extension;
import com.google.auto.value.AutoValue;
/** Represents an employee. */
@AutoValue
public abstract class Employee {
public static Employee create(
String username, long id, String name, Location location, boolean isCeo) {
return new AutoValue_Employee(username, id, name, location, isCeo);
}
abstract String username();
abstract long id();
abstract String name();
abstract Location location();
abstract boolean isCeo();
public enum Location {
MTV,
PIT,
CHI,
NYC
}
}
|
google/tsunami-security-scanner-plugins | 1,065 | google/detectors/rce/cve202121972/src/main/java/com/google/tsunami/plugins/detectors/rce/cve202121972/VcenterUploadOvaDetectorBootstrapModule.java | /*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.tsunami.plugins.detectors.rce.cve202121972;
import com.google.tsunami.plugin.PluginBootstrapModule;
/** A {@link PluginBootstrapModule} for {@link VcenterUploadOvaDetectorBootstrapModule}. */
public final class VcenterUploadOvaDetectorBootstrapModule extends PluginBootstrapModule {
@Override
protected void configurePlugin() {
registerPlugin(
com.google.tsunami.plugins.detectors.rce.cve202121972.VcenterUploadOvaDetector.class);
}
}
|
google/tsunami-security-scanner-plugins | 1,066 | google/detectors/rce/cve20187600/src/main/java/com/google/tsunami/plugins/detectors/rce/cve20187600/DrupalCve20187600DetectorBootstrapModule.java | /*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.tsunami.plugins.detectors.rce.cve20187600;
import com.google.tsunami.plugin.PluginBootstrapModule;
/** A {@link PluginBootstrapModule} for {@link DrupalCve20187600DetectorBootstrapModule}. */
public final class DrupalCve20187600DetectorBootstrapModule extends PluginBootstrapModule {
@Override
protected void configurePlugin() {
registerPlugin(
com.google.tsunami.plugins.detectors.rce.cve20187600.DrupalCve20187600Detector.class);
}
}
|
googleads/google-ads-java | 1,114 | google-ads-stubs-v19/src/main/java/com/google/ads/googleads/v19/common/ActivityCityInfoOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v19/common/criteria.proto
// Protobuf Java Version: 3.25.7
package com.google.ads.googleads.v19.common;
public interface ActivityCityInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v19.common.ActivityCityInfo)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* String value of the activity city. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return Whether the value field is set.
*/
boolean hasValue();
/**
* <pre>
* String value of the activity city. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return The value.
*/
java.lang.String getValue();
/**
* <pre>
* String value of the activity city. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return The bytes for value.
*/
com.google.protobuf.ByteString
getValueBytes();
}
|
googleads/google-ads-java | 1,114 | google-ads-stubs-v20/src/main/java/com/google/ads/googleads/v20/common/ActivityCityInfoOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v20/common/criteria.proto
// Protobuf Java Version: 3.25.7
package com.google.ads.googleads.v20.common;
public interface ActivityCityInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v20.common.ActivityCityInfo)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* String value of the activity city. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return Whether the value field is set.
*/
boolean hasValue();
/**
* <pre>
* String value of the activity city. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return The value.
*/
java.lang.String getValue();
/**
* <pre>
* String value of the activity city. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return The bytes for value.
*/
com.google.protobuf.ByteString
getValueBytes();
}
|
googleads/google-ads-java | 1,114 | google-ads-stubs-v21/src/main/java/com/google/ads/googleads/v21/common/ActivityCityInfoOrBuilder.java | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v21/common/criteria.proto
// Protobuf Java Version: 3.25.7
package com.google.ads.googleads.v21.common;
public interface ActivityCityInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v21.common.ActivityCityInfo)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* String value of the activity city. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return Whether the value field is set.
*/
boolean hasValue();
/**
* <pre>
* String value of the activity city. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return The value.
*/
java.lang.String getValue();
/**
* <pre>
* String value of the activity city. The Geo Target Constant resource
* name.
* </pre>
*
* <code>optional string value = 1;</code>
* @return The bytes for value.
*/
com.google.protobuf.ByteString
getValueBytes();
}
|
googleapis/google-cloud-java | 1,059 | java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/DisableAdvancedSiteSearchResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.discoveryengine.v1alpha;
public interface DisableAdvancedSiteSearchResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.DisableAdvancedSiteSearchResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/google-cloud-java | 1,059 | java-discoveryengine/proto-google-cloud-discoveryengine-v1alpha/src/main/java/com/google/cloud/discoveryengine/v1alpha/SetUriPatternDocumentDataResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto
// Protobuf Java Version: 3.25.8
package com.google.cloud.discoveryengine.v1alpha;
public interface SetUriPatternDocumentDataResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1alpha.SetUriPatternDocumentDataResponse)
com.google.protobuf.MessageOrBuilder {}
|
googleapis/java-bigtable-hbase | 1,097 | bigtable-client-core-parent/bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BigtableFixedProtoScan.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.
*/
package com.google.cloud.bigtable.hbase;
import com.google.api.core.InternalApi;
import com.google.bigtable.v2.ReadRowsRequest;
import org.apache.hadoop.hbase.client.Scan;
/** A wrapper class that wraps a Bigtable {@link ReadRowsRequest}. */
@InternalApi
public class BigtableFixedProtoScan extends Scan {
private ReadRowsRequest request;
public BigtableFixedProtoScan(ReadRowsRequest request) {
this.request = request;
}
public ReadRowsRequest getRequest() {
return request;
}
}
|
googlearchive/caja | 1,167 | src/com/google/caja/parser/js/scope/WorstCaseScopeAnalyzer.java | // Copyright (C) 2009 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.js.scope;
/**
* A scope analyzer that will generate masking/redeclaration events whenever
* at lease one of JScript or an interpreter that has standard scoping would do
* so.
*
* @author mikesamuel@gmail.com
*/
public class WorstCaseScopeAnalyzer<S extends AbstractScope>
extends ES5ScopeAnalyzer<S> {
public WorstCaseScopeAnalyzer(ScopeListener<S> listener) { super(listener); }
@Override protected boolean fnCtorsDeclareInBody() { return true; }
@Override protected boolean fnCtorsDeclareInContaining() { return true; }
}
|
googleworkspace/java-samples | 1,158 | classroom/snippets/src/test/java/TestBatchAddStudents.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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.util.Arrays;
import java.util.List;
import org.junit.Test;
// Unit test class for Batch Add Students classroom snippet
public class TestBatchAddStudents extends BaseTest {
@Test
public void testBatchAddStudents() throws GeneralSecurityException, IOException {
setup(BatchAddStudents.SCOPES);
List<String> studentEmails = Arrays.asList("insert_student_1_email", "insert_student_2_email");
BatchAddStudents.batchAddStudents(testCourse.getId(), studentEmails);
}
}
|
hibernate/hibernate-orm | 1,061 | hibernate-core/src/test/java/org/hibernate/orm/test/id/usertype/inet/Inet.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.id.usertype.inet;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Objects;
/**
* @author Vlad Mihalcea
*/
public class Inet {
private final String address;
public Inet(String address) {
this.address = address;
}
public String getAddress() {
return address;
}
@Override
public boolean equals(Object o) {
if ( this == o ) {
return true;
}
if ( o == null || getClass() != o.getClass() ) {
return false;
}
return Objects.equals( address, Inet.class.cast( o ).address );
}
@Override
public int hashCode() {
return Objects.hash( address );
}
public InetAddress toInetAddress() {
try {
String host = address.replaceAll( "\\/.*$", "" );
return Inet4Address.getByName( host );
}
catch (UnknownHostException e) {
throw new IllegalStateException( e );
}
}
@Override
public String toString() {
return address;
}
}
|
hibernate/hibernate-orm | 1,063 | hibernate-core/src/test/java/org/hibernate/orm/test/batch/DataPoint.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.batch;
import java.math.BigDecimal;
/**
* @author Gavin King
*/
public class DataPoint {
private long id;
private BigDecimal x;
private BigDecimal y;
private String description;
/**
* @return Returns the description.
*/
public String getDescription() {
return description;
}
/**
* @param description The description to set.
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return Returns the id.
*/
public long getId() {
return id;
}
/**
* @param id The id to set.
*/
public void setId(long id) {
this.id = id;
}
/**
* @return Returns the x.
*/
public BigDecimal getX() {
return x;
}
/**
* @param x The x to set.
*/
public void setX(BigDecimal x) {
this.x = x;
}
/**
* @return Returns the y.
*/
public BigDecimal getY() {
return y;
}
/**
* @param y The y to set.
*/
public void setY(BigDecimal y) {
this.y = y;
}
}
|
hibernate/hibernate-orm | 1,087 | hibernate-core/src/test/java/org/hibernate/orm/test/discriminatedcollections/Client.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.discriminatedcollections;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.Id;
import jakarta.persistence.OneToMany;
import java.util.HashSet;
import java.util.Set;
@Entity
class Client {
@Id
private Integer id;
private String name;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "client", fetch = FetchType.LAZY)
private Set<DebitAccount> debitAccounts = new HashSet<>();
@OneToMany(cascade = CascadeType.ALL, mappedBy = "client", fetch = FetchType.LAZY)
private Set<CreditAccount> creditAccounts = new HashSet<>();
Client() {}
public Client(Integer id, String name) {
this.id = id;
this.name = name;
}
public Integer getId() {
return id;
}
public String getName() {
return name;
}
public Set<CreditAccount> getCreditAccounts() {
return creditAccounts;
}
public Set<DebitAccount> getDebitAccounts() {
return debitAccounts;
}
}
|
hibernate/hibernate-orm | 1,090 | hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/EmbeddedIdJpaAnnotation.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.models.spi.ModelsContext;
import jakarta.persistence.EmbeddedId;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class EmbeddedIdJpaAnnotation implements EmbeddedId {
/**
* Used in creating dynamic annotation instances (e.g. from XML)
*/
public EmbeddedIdJpaAnnotation(ModelsContext modelContext) {
}
/**
* Used in creating annotation instances from JDK variant
*/
public EmbeddedIdJpaAnnotation(EmbeddedId annotation, ModelsContext modelContext) {
}
/**
* Used in creating annotation instances from Jandex variant
*/
public EmbeddedIdJpaAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) {
}
@Override
public Class<? extends Annotation> annotationType() {
return EmbeddedId.class;
}
}
|
hibernate/hibernate-orm | 1,090 | hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/PostRemoveJpaAnnotation.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.models.spi.ModelsContext;
import jakarta.persistence.PostRemove;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class PostRemoveJpaAnnotation implements PostRemove {
/**
* Used in creating dynamic annotation instances (e.g. from XML)
*/
public PostRemoveJpaAnnotation(ModelsContext modelContext) {
}
/**
* Used in creating annotation instances from JDK variant
*/
public PostRemoveJpaAnnotation(PostRemove annotation, ModelsContext modelContext) {
}
/**
* Used in creating annotation instances from Jandex variant
*/
public PostRemoveJpaAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) {
}
@Override
public Class<? extends Annotation> annotationType() {
return PostRemove.class;
}
}
|
hibernate/hibernate-orm | 1,092 | hibernate-core/src/main/java/org/hibernate/boot/models/annotations/internal/SortNaturalAnnotation.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.SortNatural;
import org.hibernate.models.spi.ModelsContext;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class SortNaturalAnnotation implements SortNatural {
/**
* Used in creating dynamic annotation instances (e.g. from XML)
*/
public SortNaturalAnnotation(ModelsContext modelContext) {
}
/**
* Used in creating annotation instances from JDK variant
*/
public SortNaturalAnnotation(SortNatural annotation, ModelsContext modelContext) {
}
/**
* Used in creating annotation instances from Jandex variant
*/
public SortNaturalAnnotation(Map<String, Object> attributeValues, ModelsContext modelContext) {
}
@Override
public Class<? extends Annotation> annotationType() {
return SortNatural.class;
}
}
|
hibernate/hibernate-search | 1,068 | mapper/pojo-base/src/main/java/org/hibernate/search/mapper/pojo/bridge/builtin/impl/DefaultDurationBridge.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.mapper.pojo.bridge.builtin.impl;
import java.time.Duration;
import org.hibernate.search.engine.cfg.spi.ParseUtils;
import org.hibernate.search.mapper.pojo.logging.impl.FormattingLog;
public final class DefaultDurationBridge extends AbstractConvertingDefaultBridge<Duration, Long> {
public static final DefaultDurationBridge INSTANCE = new DefaultDurationBridge();
private DefaultDurationBridge() {
}
@Override
protected String toString(Duration value) {
return value.toString();
}
@Override
protected Duration fromString(String value) {
return ParseUtils.parseDuration( value );
}
@Override
protected Long toConvertedValue(Duration value) {
try {
return value.toNanos();
}
catch (ArithmeticException ae) {
throw FormattingLog.INSTANCE.valueTooLargeForConversionException( Long.class, value, ae );
}
}
@Override
protected Duration fromConvertedValue(Long value) {
return Duration.ofNanos( value );
}
}
|
hibernate/hibernate-validator | 1,046 | integrationtest/java/modules/simple/src/test/java/org/hibernate/validator/integrationtest/java/module/simple/constraint/JavaModulePathIT.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.validator.integrationtest.java.module.simple.constraint;
import static org.hibernate.validator.testutil.ConstraintViolationAssert.assertThat;
import static org.hibernate.validator.testutil.ConstraintViolationAssert.violationOf;
import jakarta.validation.Validation;
import jakarta.validation.Validator;
import org.hibernate.validator.HibernateValidator;
import org.hibernate.validator.integrationtest.java.module.simple.model.Car;
import org.testng.annotations.Test;
public class JavaModulePathIT {
@Test
public void test() {
Validator validator = Validation.byProvider( HibernateValidator.class )
.configure()
.buildValidatorFactory()
.getValidator();
assertThat( validator.validate( new Car() ) ).containsOnlyViolations(
violationOf( CarServiceConstraint.class ).withMessage( "CarServiceConstraint:message" ),
violationOf( CarConstraint.class ).withMessage( "CarConstraint:message" )
);
}
}
|
hibernate2011/RosClient | 1,162 | app/src/main/java/com/jilk/ros/rosbridge/indication/Indicated.java | /**
* Copyright (c) 2014 Jilk Systems, Inc.
*
* This file is part of the Java ROSBridge Client.
*
* The Java ROSBridge Client is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Java ROSBridge Client is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the Java ROSBridge Client. If not, see http://www.gnu.org/licenses/.
*
*/
package com.jilk.ros.rosbridge.indication;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Indicated {
// if later we want multiple indicated fields, use an int here
}
|
hibernate2011/RosClient | 1,162 | app/src/main/java/com/jilk/ros/rosbridge/indication/Indicator.java | /**
* Copyright (c) 2014 Jilk Systems, Inc.
*
* This file is part of the Java ROSBridge Client.
*
* The Java ROSBridge Client is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Java ROSBridge Client is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the Java ROSBridge Client. If not, see http://www.gnu.org/licenses/.
*
*/
package com.jilk.ros.rosbridge.indication;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Indicator {
// if later we want multiple indicated fields, use an int here
}
|
openjdk/jdk8 | 1,162 | jdk/test/java/lang/invoke/lambda/LambdaReceiver_anotherpkg/LambdaReceiver_A.java | /*
* Copyright (c) 2014, 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 LambdaReceiver_anotherpkg;
public class LambdaReceiver_A {
protected final int f() { return 2; }
}
|
openjdk/jdk8 | 1,163 | langtools/test/com/sun/javadoc/testCompletionFailure/pkg1/NumberFormatTest.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg1;
import java.text.NumberFormat;
public abstract class NumberFormatTest extends NumberFormat { }
|
openjdk/jdk8 | 1,174 | langtools/test/tools/javac/diags/examples/IllegalNonAsciiDigit.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.illegal.nonascii.digit
class X {
int i = 0\u0660; // Zero followed by Arabic-Indic Digit Zero
}
|
openjdk/jdk8 | 1,178 | jdk/test/java/rmi/activation/CommandEnvironment/Retireable.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 interface Retireable
extends java.rmi.Remote
{
public void retire()
throws java.rmi.RemoteException;
}
|
openjdk/jdk8 | 1,179 | langtools/test/com/sun/javadoc/testConstructorIndent/C.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
public class C {
/**
* This is just a simple constructor.
* @param i a param.
*/
public C(int i) {}
}
|
openjdk/jdk8 | 1,179 | langtools/test/tools/javac/diags/examples/EnumsNotSupported.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// key: compiler.err.enums.not.supported.in.source
// options: -source 1.4 -Xlint:-options
enum EnumsNotSupported { A, B, C }
|
openjdk/jdk8 | 1,179 | langtools/test/tools/javac/generics/rawSeparate/Hashtable.java | /*
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package util;
public class Hashtable<K,V> {
public synchronized V put(K key, V value) {
throw new Error();
}
}
|
openjdk/jtreg | 1,205 | test/6527624/B/BB/BadBB1.java | /*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @key A-only
*/
public class BadBB1 {
public static void main(String[] args) {
throw new Error("should not happen");
}
}
|
openjdk/jtreg | 1,205 | test/6527624/B/BB/BadBB2.java | /*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @key B-only
*/
public class BadBB2 {
public static void main(String[] args) {
throw new Error("should not happen");
}
}
|
oracle/json-in-db | 1,166 | MongoExamples/src/main/java/emp/Update.java | package emp;
import org.bson.Document;
import com.mongodb.ConnectionString;
import com.mongodb.client.MongoClient;
import com.mongodb.client.MongoClients;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoDatabase;
import com.mongodb.client.model.Filters;
/**
* Updates an employee document using whole document replacement.
*
* <p>
* Run first: {@link CreateCollection}, {@link Insert}
* </p>
*/
public class Update {
public static void main(String[] args) throws Exception {
ConnectionString cStr = new ConnectionString(args[0]);
try (MongoClient client = MongoClients.create(cStr)) {
MongoDatabase db = client.getDatabase(cStr.getDatabase());
MongoCollection<Document> col = db.getCollection("employees");
Document obj = col.find().filter(Filters.eq("name", "Blake")).first();
System.out.println(obj);
obj.put("salary", 25000);
col.replaceOne(Filters.eq("_id", obj.getObjectId("_id")), obj);
System.out.println("Blake's salary is updated");
System.out.println(obj);
}
}
}
|
oracle/nosql | 1,180 | kvmain/src/main/java/oracle/kv/impl/test/TestIOHook.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.test;
import java.io.IOException;
/**
* TestIOHook is used to induce testing behavior that can't be provoked
* externally. Specifically, one of such situation is to throw an IOException.
*
* To use this, a unit test should implement TestIOHook with a class that overrides
* the desired method. The desired code will have a method that allows the unit
* test to specify a hook, and will execute the hook if it is non-null.
* This should be done within an assert like so:
*
* assert TestHookExecute.doIOHookIfSet(myTestHook, hookArg);
*
* See StorewideLoggingView for an example.
*/
public interface TestIOHook<T> {
void doHook(T arg) throws IOException;
}
|
apache/commons-lang | 1,170 | src/main/java/org/apache/commons/lang3/stream/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
*
* 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.
*/
/**
* Provides utility classes to complement those in {@link java.util.stream}.
*
* <p>Contains utilities to allow streaming of failable functional interfaces from the
* {@code org.apache.commons.lang3.functions} package allowing streaming of functional expressions
* that may raise an Exception.
*
* @since 3.11
*/
package org.apache.commons.lang3.stream;
|
apache/commons-rdf | 1,151 | commons-rdf-jena/src/main/java/org/apache/commons/rdf/jena/JenaBlankNode.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.rdf.jena;
import org.apache.commons.rdf.api.BlankNode;
import org.apache.jena.graph.Node;
/**
* A Jena-backed {@link BlankNode}.
* <p>
* The underlying Jena {@link Node} can be accessed from {@link #asJenaNode()}.
*
* @see Node#isBlank()
*/
public interface JenaBlankNode extends JenaRDFTerm, BlankNode {
}
|
apache/commons-statistics | 1,119 | commons-statistics-descriptive/src/main/java/org/apache/commons/statistics/descriptive/DoubleStatistic.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.statistics.descriptive;
import java.util.function.DoubleConsumer;
/**
* Represents a state object for computing a statistic over {@code double} valued input(s).
*
* @since 1.1
*/
public interface DoubleStatistic extends DoubleConsumer, StatisticResult {
// Composite interface
}
|
apache/curator | 1,144 | curator-framework/src/main/java/org/apache/curator/framework/imps/PathAndBytes.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.curator.framework.imps;
class PathAndBytes {
private final String path;
private final byte[] data;
PathAndBytes(String path, byte[] data) {
this.path = path;
this.data = data;
}
String getPath() {
return path;
}
byte[] getData() {
return data;
}
}
|
apache/curator | 1,152 | curator-x-async/src/main/java/org/apache/curator/x/async/api/AsyncPathable.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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;
/**
* Terminal operation for various builders
*/
public interface AsyncPathable<T> {
/**
* Commit the currently building operation using the given path
* and invoke ZooKeeper
*
* @param path the path
* @return usually an async stage
*/
T forPath(String path);
}
|
apache/cxf | 1,148 | tools/corba/src/test/java/org/apache/cxf/tools/corba/utils/TestWSDLCorbaFactoryImpl.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.corba.utils;
import javax.wsdl.xml.WSDLWriter;
import com.ibm.wsdl.factory.WSDLFactoryImpl;
public class TestWSDLCorbaFactoryImpl extends WSDLFactoryImpl {
/**
* Create a new instance of a WSDLWriter.
*/
public WSDLWriter newWSDLWriter() {
return new TestWSDLCorbaWriterImpl();
}
}
|
apache/cxf | 1,166 | rt/wsdl/src/main/java/org/apache/cxf/wsdl/binding/WSDLBindingFactory.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.wsdl.binding;
import javax.wsdl.Binding;
import org.apache.cxf.binding.BindingFactory;
import org.apache.cxf.service.model.BindingInfo;
import org.apache.cxf.service.model.ServiceInfo;
public interface WSDLBindingFactory extends BindingFactory {
BindingInfo createBindingInfo(ServiceInfo serviceInfo, Binding binding, String ns);
}
|
apache/datafusion-comet | 1,164 | common/src/main/java/org/apache/comet/CometSchemaImporter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.comet;
import org.apache.arrow.c.*;
import org.apache.arrow.memory.BufferAllocator;
/** This is a simple wrapper around SchemaImporter to make it accessible from Java Arrow. */
public class CometSchemaImporter extends AbstractCometSchemaImporter {
public CometSchemaImporter(BufferAllocator allocator) {
super(allocator);
}
}
|
apache/deltaspike | 1,101 | deltaspike/modules/security/impl/src/test/java/org/apache/deltaspike/test/security/impl/authorization/secured/SecuredBean4.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.test.security.impl.authorization.secured;
import jakarta.enterprise.context.ApplicationScoped;
@ApplicationScoped
@SecuredBeanWithStereotype1
@SecuredBeanWithStereotype2
public class SecuredBean4
{
public String getResult()
{
return "result";
}
}
|
apache/deltaspike | 1,107 | deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/controller/uc001/SimplePageConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.test.jsf.impl.config.view.controller.uc001;
import org.apache.deltaspike.core.api.config.view.ViewConfig;
import org.apache.deltaspike.core.api.config.view.controller.ViewControllerRef;
@ViewControllerRef(PageBean001.class)
class SimplePageConfig implements ViewConfig
{
}
|
apache/deltaspike | 1,124 | deltaspike/modules/proxy/impl-asm/src/test/java/org/apache/deltaspike/proxy/impl/TestInvocationHandler.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.proxy.impl;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
public class TestInvocationHandler implements InvocationHandler
{
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
{
return null;
}
}
|
apache/deltaspike | 1,132 | deltaspike/test-utils/src/main/java/org/apache/deltaspike/test/control/LockedContainerVersions.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.test.control;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(value = { ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
public @interface LockedContainerVersions
{
}
|
apache/derby | 1,142 | java/org.apache.derby.engine/org/apache/derby/iapi/services/io/ErrorObjectInput.java | /*
Derby - Class org.apache.derby.iapi.services.io.ErrorObjectInput
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS 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.iapi.services.io;
import java.io.ObjectInput;
/**
Limit and ObjectInput capabilities.
Combin
*/
public interface ErrorObjectInput extends ObjectInput, ErrorInfo
{
public String getErrorInfo();
public Exception getNestedException();
}
|
apache/directory-scimple | 1,113 | scim-spec/scim-spec-schema/src/main/java/org/apache/directory/scim/spec/annotation/ScimResourceIdReference.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.directory.scim.spec.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface ScimResourceIdReference {
}
|
apache/directory-studio | 1,112 | plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/difference/DifferenceType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.directory.studio.schemaeditor.model.difference;
/**
* This enum represents the type of Difference.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public enum DifferenceType
{
IDENTICAL, ADDED, MODIFIED, REMOVED
} |
apache/dolphinscheduler | 1,094 | dolphinscheduler-task-executor/src/main/java/org/apache/dolphinscheduler/task/executor/exceptions/TaskExecutorNotFoundException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.task.executor.exceptions;
public class TaskExecutorNotFoundException extends TaskExecutorRuntimeException {
public TaskExecutorNotFoundException(int taskExecutorId) {
super("Cannot find the TaskExecutor(id=" + taskExecutorId + ")");
}
}
|
apache/doris-flink-connector | 1,138 | flink-doris-connector/src/main/java/org/apache/doris/flink/sink/LoadStatus.java | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.doris.flink.sink;
/** enum of LoadStatus. */
public class LoadStatus {
public static final String SUCCESS = "Success";
public static final String PUBLISH_TIMEOUT = "Publish Timeout";
public static final String LABEL_ALREADY_EXIST = "Label Already Exists";
public static final String FAIL = "Fail";
}
|
apache/doris-manager | 1,133 | manager/dm-common/src/main/java/org/apache/doris/manager/common/heartbeat/HeartBeatResult.java | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.doris.manager.common.heartbeat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class HeartBeatResult {
List<HeartBeatEventResult> eventResults;
List<InstanceStateResult> stateResults;
}
|
apache/drill | 1,146 | exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/PrelFinalizable.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.drill.exec.planner.sql.handlers;
import org.apache.drill.exec.planner.physical.Prel;
/**
* A marker interface that means that this node should be finalized before execution planning. This allows calculations
* not relevant to planning to be done only once.
*/
public interface PrelFinalizable {
Prel finalizeRel();
}
|
apache/drill | 1,158 | exec/java-exec/src/main/java/org/apache/drill/exec/store/mock/DoubleGen.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.drill.exec.store.mock;
/**
* Generates random field values uniformly distributed over
* the range +-1 million, with any number of digits past
* the decimal point.
*/
public class DoubleGen extends AbstractFieldGen {
@Override
public void setValue() {
colWriter.setDouble(rand.nextDouble() * 2_000_000 - 1_000_000);
}
}
|
apache/dubbo-hessian-lite | 1,132 | java-8-test/src/test/java/com/alibaba/com/caucho/hessian3/io/BigIntegerDeserializer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.alibaba.com.caucho.hessian3.io;
import java.math.BigInteger;
public class BigIntegerDeserializer extends JavaDeserializer {
public BigIntegerDeserializer() {
super(BigInteger.class);
}
@Override
protected Object instantiate() throws Exception {
return new BigInteger("0");
}
}
|
apache/dubbo-samples | 1,122 | 2-advanced/dubbo-samples-spi-compatible/src/main/java/org/apache/dubbo/samples/basic/spi/MyExporter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.samples.basic.spi;
import com.alibaba.dubbo.rpc.Exporter;
import com.alibaba.dubbo.rpc.Invoker;
public class MyExporter<T> implements Exporter<T> {
@Override
public Invoker<T> getInvoker() {
return new MyInvoker<>();
}
@Override
public void unexport() {
}
}
|
apache/empire-db | 1,157 | empire-db/src/main/java/org/apache/empire/data/list/DataListFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.empire.data.list;
import java.util.List;
import org.apache.empire.data.RecordData;
public interface DataListFactory<T extends DataListEntry>
{
void prepareQuery(Object cmd, Object context);
List<T> newList(int capacity);
T newEntry(int rownum, RecordData dataRow);
void completeQuery(List<T> list);
}
|
apache/felix-dev | 1,091 | dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/hello/api/ServiceConsumerConf.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.dependencymanager.samples.hello.api;
/**
* This is our type-safe configuration for the ServiceConsumer component.
*
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
*/
public interface ServiceConsumerConf {
String getKey();
}
|
apache/felix-dev | 1,109 | ipojo/runtime/distributions/ten-minutes-tutorial/src/main/solution/spell.services/src/spell/services/DictionaryService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package spell.services;
public interface DictionaryService {
/**
* Check for the existence of a word.
* @param word the word to be checked.
* @return true if the word is in the dictionary,
* false otherwise.
**/
public boolean checkWord(String word);
}
|
apache/fesod | 1,150 | fesod-examples/src/test/java/org/apache/fesod/excel/demo/web/FastExcelApplication.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fesod.excel.demo.web;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class FastExcelApplication {
public static void main(String[] args) {
SpringApplication.run(FastExcelApplication.class, args);
}
}
|
apache/fesod | 1,153 | fesod/src/test/java/org/apache/fesod/excel/cache/CacheData.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fesod.excel.cache;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.fesod.excel.annotation.ExcelProperty;
/**
*
*/
@Getter
@Setter
@EqualsAndHashCode
public class CacheData {
@ExcelProperty("姓名")
private String name;
@ExcelProperty("年龄")
private Long age;
}
|
apache/fineract | 1,133 | fineract-savings/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsProductRepository.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.portfolio.savings.domain;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
public interface SavingsProductRepository extends JpaRepository<SavingsProduct, Long>, JpaSpecificationExecutor<SavingsProduct> {
//
}
|
apache/flink | 1,136 | flink-formats/flink-compress/src/main/java/org/apache/flink/formats/compress/extractor/Extractor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.formats.compress.extractor;
import java.io.Serializable;
/**
* An {@link Extractor} turns a record into a byte array for writing data. For use with {@link
* org.apache.flink.formats.compress.CompressWriters}.
*/
public interface Extractor<T> extends Serializable {
byte[] extract(T element);
}
|
apache/geaflow | 1,106 | geaflow/geaflow-core/geaflow-engine/geaflow-cluster/src/main/java/org/apache/geaflow/cluster/protocol/IHighAvailableEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.geaflow.cluster.protocol;
import org.apache.geaflow.ha.runtime.HighAvailableLevel;
/**
* A recoverable event that save and replay after fail over.
*/
public interface IHighAvailableEvent {
/**
* Returns the HA level.
*/
HighAvailableLevel getHaLevel();
}
|
apache/geaflow | 1,118 | geaflow/geaflow-state/geaflow-state-common/src/main/java/org/apache/geaflow/state/pushdown/filter/IVertexFilter.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.geaflow.state.pushdown.filter;
import org.apache.geaflow.model.graph.vertex.IVertex;
import org.apache.geaflow.state.data.DataType;
public interface IVertexFilter<K, VV> extends IFilter<IVertex<K, VV>> {
@Override
default DataType dateType() {
return DataType.V;
}
}
|
apache/geode | 1,152 | geode-dunit/src/main/java/org/apache/geode/internal/cache/tier/sockets/HaHelper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.geode.internal.cache.tier.sockets;
/**
* Helper class to access the required functions of this package from outside the package.
*/
public class HaHelper {
public static boolean checkPrimary(CacheClientProxy proxy) {
System.out.println("proxy " + proxy.getProxyID() + " : " + proxy.isPrimary());
return proxy.isPrimary();
}
}
|
apache/gobblin | 1,134 | gobblin-core/src/main/java/org/apache/gobblin/source/extractor/exception/HighWatermarkException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.source.extractor.exception;
public class HighWatermarkException extends Exception {
private static final long serialVersionUID = 1L;
public HighWatermarkException(String message) {
super(message);
}
public HighWatermarkException(String message, Exception e) {
super(message, e);
}
}
|
apache/gobblin | 1,134 | gobblin-core/src/main/java/org/apache/gobblin/source/extractor/exception/RestApiClientException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.source.extractor.exception;
public class RestApiClientException extends Exception {
private static final long serialVersionUID = 1L;
public RestApiClientException(String message) {
super(message);
}
public RestApiClientException(String message, Exception e) {
super(message, e);
}
}
|
apache/gravitino | 1,163 | core/src/main/java/org/apache/gravitino/OverwriteDefaultConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino;
import java.util.Map;
/** Provide methods to overwrite the default config. */
public interface OverwriteDefaultConfig {
/**
* Returns key value pairs to overwrite the config which are not set explicitly.
*
* @return a Map of Config key and value pairs
*/
Map<String, String> getOverwriteDefaultConfig();
}
|
apache/groovy | 1,183 | src/main/java/groovy/transform/TypeCheckingMode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package groovy.transform;
/**
* This enumeration can be used whenever it is preferred to annotate a class as
* {@link TypeChecked} in general, but where only one or more methods are "dynamic". This allows the user
* to annotate the class itself then annotate only the methods which require exclusion.
*/
public enum TypeCheckingMode {
PASS,
SKIP
}
|
apache/hadoop | 1,111 | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/LocalizationState.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.yarn.api.records;
import org.apache.hadoop.classification.InterfaceAudience.Public;
import org.apache.hadoop.classification.InterfaceStability.Unstable;
/**
* State of localization.
*/
@Public
@Unstable
public enum LocalizationState {
PENDING,
COMPLETED,
FAILED
}
|
apache/hadoop | 1,121 | hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/fairness/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.
*/
/**
* Includes router handlers fairness manager and policy implementations.
*/
@InterfaceAudience.Private
@InterfaceStability.Evolving
package org.apache.hadoop.hdfs.server.federation.fairness;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
|
apache/hbase | 1,141 | hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/master/MetricsMasterSourceFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.master;
import org.apache.yetus.audience.InterfaceAudience;
/**
* Interface of a factory to create MetricsMasterSource when given a MetricsMasterWrapper
*/
@InterfaceAudience.Private
public interface MetricsMasterSourceFactory {
MetricsMasterSource create(MetricsMasterWrapper masterWrapper);
}
|
apache/hcatalog | 1,155 | webhcat/svr/src/main/java/org/apache/hcatalog/templeton/EnqueueBean.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.hcatalog.templeton;
/**
* EnqueueBean - The results of a call that enqueues a Hadoop job.
*/
public class EnqueueBean {
public String id;
public EnqueueBean() {}
/**
* Create a new EnqueueBean.
*
* @param id job id
*/
public EnqueueBean(String id) {
this.id = id;
}
}
|
apache/hive | 1,150 | ql/src/java/org/apache/hadoop/hive/ql/security/HadoopDefaultMetastoreAuthenticator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hive.ql.security;
import org.apache.hadoop.hive.metastore.IHMSHandler;
public class HadoopDefaultMetastoreAuthenticator extends HadoopDefaultAuthenticator
implements HiveMetastoreAuthenticationProvider {
@Override
public void setMetaStoreHandler(IHMSHandler handler) {
setConf(handler.getConf());
}
}
|
apache/hive | 1,154 | ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveRelNode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hive.ql.optimizer.calcite.reloperators;
import org.apache.calcite.plan.Convention;
import org.apache.calcite.rel.RelNode;
public interface HiveRelNode extends RelNode {
/** Calling convention for relational operations that occur in Hive. */
Convention CONVENTION = new Convention.Impl("HIVE", HiveRelNode.class);
}
|
apache/hop | 1,154 | engine/src/test/java/org/apache/hop/junit/rules/RestoreHopEngineEnvironment.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.junit.rules;
import org.apache.hop.core.HopEnvironment;
public class RestoreHopEngineEnvironment extends RestoreHopEnvironment {
@Override
void defaultInit() throws Throwable {
super.defaultInit();
HopEnvironment.init();
}
@Override
void cleanUp() {
HopEnvironment.reset();
super.cleanUp();
}
}
|
apache/hudi | 1,153 | hudi-aws/src/main/java/org/apache/hudi/aws/sync/util/GluePartitionFilterGenerator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.aws.sync.util;
import org.apache.hudi.expression.Expression;
import org.apache.hudi.hive.util.PartitionFilterGenerator;
public class GluePartitionFilterGenerator extends PartitionFilterGenerator {
protected String generateFilterString(Expression filter) {
return filter.accept(new GlueFilterGenVisitor());
}
}
|
apache/ignite-3 | 1,127 | modules/network/src/test/resources/org/apache/ignite/internal/network/processor/UnmarshallableTypeMessage.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.network.processor;
import java.util.ArrayList;
import org.apache.ignite.internal.network.NetworkMessage;
import org.apache.ignite.internal.network.annotations.Transferable;
@Transferable(1)
public interface UnmarshallableTypeMessage extends NetworkMessage {
ArrayList<Integer> a();
}
|
apache/ignite-3 | 1,146 | modules/cli/src/main/java/org/apache/ignite/internal/cli/core/repl/DisconnectEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.cli.core.repl;
import org.apache.ignite.internal.cli.event.Event;
import org.apache.ignite.internal.cli.event.EventType;
/**
* User session disconnected event.
*/
public class DisconnectEvent implements Event {
@Override
public EventType eventType() {
return EventType.DISCONNECT;
}
}
|
apache/ignite | 1,142 | modules/binary/api/src/main/java/org/apache/ignite/internal/binary/BinaryWriteReplacer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.binary;
import org.jetbrains.annotations.Nullable;
/**
* Interface to perform write replace.
*/
interface BinaryWriteReplacer {
/**
* Perform replace.
*
* @param target Original object.
* @return Replaced object.
*/
@Nullable public Object replace(Object target);
}
|
apache/ignite | 1,157 | modules/core/src/main/java/org/apache/ignite/internal/processors/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.
*/
/**
* Package with Apache Ignite internal Processors.
* Processor is Ignite component with lifecycle associated with node lifecycle.
*
* See also <a href='https://github.com/apache/ignite/tree/master/modules/core/src/main/java/org/apache/ignite/internal/processors/'>
* Package Readme</a>
*
*/
package org.apache.ignite.internal.processors;
|
apache/ignite | 1,158 | modules/core/src/main/java/org/apache/ignite/client/ClientRetryAllPolicy.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.client;
/**
* Retry policy that always returns {@code true}.
*/
public class ClientRetryAllPolicy implements ClientRetryPolicy {
/** */
private static final long serialVersionUID = 0L;
/** {@inheritDoc} */
@Override public boolean shouldRetry(ClientRetryPolicyContext context) {
return true;
}
}
|
apache/incubator-heron | 1,140 | storm-compatibility/v0.10.2/src/java/backtype/storm/generated/StormTopology.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package backtype.storm.generated;
import org.apache.heron.api.HeronTopology;
public class StormTopology {
private HeronTopology topology;
public StormTopology() {
}
public StormTopology(HeronTopology topology) {
this.topology = topology;
}
public HeronTopology getStormTopology() {
return topology;
}
}
|
apache/incubator-heron | 1,140 | storm-compatibility/v0.10.2/src/java/backtype/storm/topology/base/BaseComponent.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package backtype.storm.topology.base;
import java.util.Map;
import backtype.storm.topology.IComponent;
public abstract class BaseComponent implements IComponent {
private static final long serialVersionUID = 3451500233699261898L;
@Override
public Map<String, Object> getComponentConfiguration() {
return null;
}
}
|
apache/incubator-hugegraph-toolchain | 1,124 | hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/mapper/UserInfoMapper.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS 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.mapper;
import org.apache.hugegraph.entity.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@Mapper
@Component
public interface UserInfoMapper extends BaseMapper<UserInfo> {
}
|
apache/incubator-kie-drools | 1,101 | drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/facts/FactWithString.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.integrationtests.facts;
public class FactWithString {
private final String stringValue;
public FactWithString(final String stringValue) {
this.stringValue = stringValue;
}
public String getStringValue() {
return stringValue;
}
}
|
apache/incubator-kie-drools | 1,117 | drools-reliability/drools-reliability-core/src/main/java/org/drools/reliability/core/StoredObject.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.reliability.core;
import org.drools.core.common.InternalWorkingMemoryEntryPoint;
public interface StoredObject {
default boolean isEvent() {
return false;
}
boolean isPropagated();
Object getObject();
long repropagate(InternalWorkingMemoryEntryPoint ep);
} |
apache/incubator-kie-drools | 1,129 | drools-model/drools-canonical-model/src/main/java/org/drools/model/ConstraintOperator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.drools.model;
import java.util.function.BiPredicate;
public interface ConstraintOperator {
<T, V> BiPredicate<T, V> asPredicate();
default boolean hasIndex() {
return false;
}
default Index.ConstraintType getIndexType() {
throw new UnsupportedOperationException();
}
}
|
apache/incubator-kie-drools | 1,134 | drools-traits/src/main/java/org/drools/traits/core/reteoo/TraitRuntimeComponentFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.drools.traits.core.reteoo;
import org.drools.traits.core.factmodel.TraitRegistry;
import org.drools.core.reteoo.RuntimeComponentFactory;
import org.drools.base.RuleBase;
public interface TraitRuntimeComponentFactory extends RuntimeComponentFactory {
TraitRegistry getTraitRegistry(RuleBase knowledgeBase);
}
|
apache/incubator-kie-drools | 1,136 | kie-dmn/kie-dmn-api/src/main/java/org/kie/dmn/api/marshalling/DMNMarshaller.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.dmn.api.marshalling;
import java.io.Reader;
import java.io.Writer;
import org.kie.dmn.model.api.Definitions;
public interface DMNMarshaller {
Definitions unmarshal(final Reader isr);
Definitions unmarshal(final String xml);
String marshal(Object o);
void marshal(Object o, Writer out);
}
|
apache/incubator-kie-drools | 1,148 | kie-api/src/main/java/org/kie/api/definition/rule/ActivationListener.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.api.definition.rule;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = ElementType.TYPE)
public @interface ActivationListener {
String value();
}
|
apache/incubator-kie-kogito-apps | 1,102 | jobs-service/jobs-service-internal-api/src/main/java/org/kie/kogito/jobs/service/exception/JobServiceException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.service.exception;
public class JobServiceException extends RuntimeException {
public JobServiceException(String message) {
super(message);
}
public JobServiceException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/incubator-kie-kogito-runtimes | 1,099 | api/kogito-api-incubation-rules-services/src/main/java/org/kie/kogito/incubation/rules/services/RuleUnitService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.kogito.incubation.rules.services;
import java.util.stream.Stream;
import org.kie.kogito.incubation.common.DataContext;
import org.kie.kogito.incubation.common.Id;
public interface RuleUnitService {
Stream<DataContext> evaluate(Id queryId, DataContext inputContext);
}
|
apache/incubator-kie-kogito-runtimes | 1,117 | api/kogito-api-incubation-rules/src/main/java/org/kie/kogito/incubation/rules/data/DataIds.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.kogito.incubation.rules.data;
public class DataIds {
private final DataSourceId dataSourceId;
public DataIds(DataSourceId dataSourceId) {
this.dataSourceId = dataSourceId;
}
public DataId get(String dataId) {
return new DataId(dataSourceId, dataId);
}
}
|
apache/incubator-retired-wave | 1,148 | wave/src/main/java/org/waveprotocol/wave/model/util/Predicate.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.util;
/**
* Simple predicate function interface
*
* (Do we already have one as of 18/Aug/09?)
*
* @author danilatos@google.com (Daniel Danilatos)
*/
public interface Predicate<T> {
/**
* @param input
* @return the result of this predicate on the input
*/
boolean apply(T input);
}
|
apache/incubator-seata | 1,166 | compatible/src/main/java/io/seata/common/LockStrategyMode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.common;
@Deprecated
public enum LockStrategyMode {
/**
* Optimistic lock mode is recommended when resources are not reused in the current global transaction.
*/
OPTIMISTIC,
/**
* Pessimistic lock mode is recommended when there may be repeated use of the same resource in a global transaction.
*/
PESSIMISTIC
}
|
apache/inlong | 1,122 | inlong-manager/manager-client-tools/src/main/java/org/apache/inlong/manager/client/cli/pojo/ClusterTagInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.inlong.manager.client.cli.pojo;
import lombok.Data;
/**
* Cluster tag info, including cluster tag name, status, etc.
*/
@Data
public class ClusterTagInfo {
private Integer id;
private String clusterTag;
private String extParams;
private String inCharges;
private Integer status;
}
|
apache/inlong | 1,129 | inlong-sort/sort-common/src/test/java/org/apache/inlong/sort/protocol/node/format/CanalJsonFormatTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.inlong.sort.protocol.node.format;
import org.apache.inlong.sort.SerializeBaseTest;
/**
* Test for {@link CanalJsonFormat}
*/
public class CanalJsonFormatTest extends SerializeBaseTest<CanalJsonFormat> {
@Override
public CanalJsonFormat getTestObject() {
return new CanalJsonFormat();
}
}
|
apache/inlong | 1,136 | inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/ddl/indexes/Index.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.inlong.sort.protocol.ddl.indexes;
import org.apache.inlong.sort.protocol.ddl.enums.IndexType;
import lombok.Data;
import java.util.List;
/**
* Index for create table operation
*/
@Data
public class Index {
private IndexType indexType;
private String indexName;
private List<String> indexColumns;
}
|
apache/inlong | 1,137 | inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/instance/MqttInstance.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.inlong.agent.plugin.instance;
import org.apache.inlong.agent.conf.InstanceProfile;
import org.apache.inlong.agent.constant.TaskConstants;
public class MqttInstance extends CommonInstance {
@Override
public void setInodeInfo(InstanceProfile profile) {
profile.set(TaskConstants.INODE_INFO, "");
}
}
|
apache/iotdb | 1,109 | iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/subscription/payload/response/PipeSubscribeResponseVersion.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.rpc.subscription.payload.response;
public enum PipeSubscribeResponseVersion {
VERSION_1((byte) 1),
;
private final byte version;
PipeSubscribeResponseVersion(final byte type) {
this.version = type;
}
public byte getVersion() {
return version;
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.