repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/jena
1,135
jena-arq/src/main/java/org/apache/jena/sparql/function/library/leviathan/ln.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.sparql.function.library.leviathan; import org.apache.jena.sparql.expr.NodeValue; import org.apache.jena.sparql.function.FunctionBase1; public class ln extends FunctionBase1 { @Override public NodeValue exec(NodeValue v) { return NodeValue.makeDouble(Math.log(v.getDouble())); } }
apache/jena
1,143
jena-arq/src/test/java/org/apache/jena/sparql/core/TestDatasetMisc.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.sparql.core; import org.apache.jena.query.Dataset; import org.apache.jena.query.DatasetFactory; import org.apache.jena.sparql.AbstractTestAdditional; public class TestDatasetMisc extends AbstractTestAdditional { @Override protected Dataset dataset() { return DatasetFactory.create(); } }
apache/kafka
1,089
streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBTimeOrderedSessionSchemaWithIndexSegmentedBytesStoreTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kafka.streams.state.internals; public class RocksDBTimeOrderedSessionSchemaWithIndexSegmentedBytesStoreTest extends AbstractDualSchemaRocksDBSegmentedBytesStoreTest { @Override SchemaType schemaType() { return SchemaType.SessionSchemaWithIndex; } }
apache/kafka
1,124
streams/src/main/java/org/apache/kafka/streams/kstream/internals/WrappingNullableDeserializer.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kafka.streams.kstream.internals; import org.apache.kafka.common.serialization.Deserializer; import org.apache.kafka.streams.processor.internals.SerdeGetter; public interface WrappingNullableDeserializer<Outer, InnerK, InnerV> extends Deserializer<Outer> { void setIfUnset(final SerdeGetter getter); }
apache/kafka
1,132
clients/src/main/java/org/apache/kafka/common/errors/AuthorizerNotReadyException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kafka.common.errors; /** * An exception that indicates that the authorizer is not ready to receive the request yet. */ public class AuthorizerNotReadyException extends RetriableException { private static final long serialVersionUID = 1L; public AuthorizerNotReadyException() { super(); } }
apache/kafka
1,153
streams/src/main/java/org/apache/kafka/streams/kstream/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Provides a high-level programming model (DSL) to express a (stateful) data flow computation over input {@link org.apache.kafka.streams.kstream.KStream streams} and {@link org.apache.kafka.streams.kstream.KTable tables}. * Use {@link org.apache.kafka.streams.StreamsBuilder} as entry for your program. */ package org.apache.kafka.streams.kstream;
apache/karaf
1,073
examples/karaf-blueprint-example/karaf-blueprint-example-common/src/main/java/org/apache/karaf/examples/blueprint/common/BookingService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.karaf.examples.blueprint.common; import java.util.List; /** * Simple interface describing the booking service. */ public interface BookingService { List<Booking> list(); Booking get(Long id); void add(Booking booking); }
apache/logging-log4j2
1,135
log4j-api/src/main/java/org/apache/logging/log4j/status/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. */ /** Status API for Log4j 2. Should not be used by typical applications performing logging but may be * used by applications reporting on the status of the logging system */ @Export @Version("2.23.1") package org.apache.logging.log4j.status; import org.osgi.annotation.bundle.Export; import org.osgi.annotation.versioning.Version;
apache/lucene
1,142
lucene/core/src/java/org/apache/lucene/codecs/lucene95/HasIndexSlice.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.lucene.codecs.lucene95; import org.apache.lucene.store.IndexInput; /** * Implementors can return the IndexInput from which their values are read. For use by vector * quantizers. */ public interface HasIndexSlice { /** Returns an IndexInput from which to read this instance's values. */ IndexInput getSlice(); }
apache/manifoldcf
1,084
connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/ConfluenceResource.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.manifoldcf.crawler.connectors.confluence.model; /** * <p>ConfluenceResource class</p> * <p>Used as base class for other classes like Page and Attachments</p> * * @author Antonio David Perez Morales &lt;adperezmorales@gmail.com&gt; * */ public class ConfluenceResource { }
apache/marmotta
1,103
commons/marmotta-commons/src/ext/java/javolution/util/internal/map/sorted/MapEntryImpl.java
/* * Javolution - Java(TM) Solution for Real-Time and Embedded Systems * Copyright (C) 2012 - Javolution (http://javolution.org/) * All rights reserved. * * Permission to use, copy, modify, and distribute this software is * freely granted, provided that this notice is preserved. */ package javolution.util.internal.map.sorted; import java.io.Serializable; import java.util.Map; /** * The sorted map entry implementation (serializable). */ public final class MapEntryImpl<K, V> implements Map.Entry<K, V>, Serializable { private static final long serialVersionUID = 0x600L; // Version. K key; V value; public MapEntryImpl(K key, V value) { this.key = key; this.value = value; } @Override public K getKey() { return key; } @Override public V getValue() { return value; } @Override public V setValue(V value) { V oldValue = this.value; this.value = value; return oldValue; } @Override public String toString() { return key + "=" + value; } }
apache/mina-sshd
1,125
sshd-sources/tomcat-apr-5.5.23-sources/org/apache/tomcat/jni/User.java
package org.apache.tomcat.jni; public class User { public static native long uidCurrent(long paramLong) throws Error; public static native long gidCurrent(long paramLong) throws Error; public static native long uid(String paramString, long paramLong) throws Error; public static native long usergid(String paramString, long paramLong) throws Error; public static native long gid(String paramString, long paramLong) throws Error; public static native String username(long paramLong1, long paramLong2) throws Error; public static native String groupname(long paramLong1, long paramLong2) throws Error; public static native int uidcompare(long paramLong1, long paramLong2); public static native int gidcompare(long paramLong1, long paramLong2); public static native String homepath(String paramString, long paramLong) throws Error; } /* Location: C:\Users\lgoldstein\.m2\repository\tomcat\tomcat-apr\5.5.23\tomcat-apr-5.5.23.jar!\org\apache\tomcat\jni\User.class * Java compiler version: 2 (46.0) * JD-Core Version: 0.7.1 */
apache/myfaces
1,147
api/src/main/java/jakarta/faces/flow/builder/ReturnBuilder.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package jakarta.faces.flow.builder; /** * * @since 2.2 */ public abstract class ReturnBuilder implements NodeBuilder { public abstract ReturnBuilder fromOutcome(String outcome); public abstract ReturnBuilder fromOutcome(jakarta.el.ValueExpression outcome); public abstract ReturnBuilder markAsStartNode(); }
apache/nifi
1,081
nifi-extension-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/ioconcept/writer/FlowFileWriter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.jms.processors.ioconcept.writer; import org.apache.nifi.processor.ProcessSession; import java.util.List; public interface FlowFileWriter<T> { void write(ProcessSession session, List<T> messages, FlowFileWriterCallback<T> flowFileWriterCallback); }
apache/olingo-odata4
1,099
lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/provider/CsdlOnDeleteAction.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.commons.api.edm.provider; /** * The enum Csdl on delete action. */ public enum CsdlOnDeleteAction { /** * The Cascade. */ Cascade, /** * The None. */ None, /** * The SetNull. */ SetNull, /** * The SetDefault. */ SetDefault }
apache/olingo-odata4
1,123
lib/client-core/src/main/java/org/apache/olingo/client/core/uri/HasFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.client.core.uri; import org.apache.olingo.client.api.uri.FilterArg; public class HasFilter extends AbstractComparingFilter { public HasFilter(final FilterArg left, final FilterArg right) { super(left, right); } @Override protected String getOp() { return "has"; } }
apache/openjpa
1,103
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/common/apps/DetachablePC.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.persistence.enhance.common.apps; import java.io.Serializable; import jakarta.persistence.Entity; @Entity public class DetachablePC implements Serializable { private static final long serialVersionUID = 1L; private long id; private String val; }
apache/openjpa
1,108
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/FrequentFlierPlan.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.persistence.criteria; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; @Entity public class FrequentFlierPlan { @Id @GeneratedValue private String id; private String name; private int annualMiles; }
apache/openwebbeans-meecrowave
1,134
meecrowave-junit/src/test/java/org/app/MyAppClass.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.app; import jakarta.enterprise.context.ApplicationScoped; /** * @author <a href="mailto:struberg@yahoo.de">Mark Struberg</a> */ @ApplicationScoped public class MyAppClass { private String x = "init"; public String getX() { return x; } public void setX(String x) { this.x = x; } }
apache/openwebbeans
1,111
webbeans-web/src/main/java/org/apache/webbeans/web/lifecycle/test/MockServletContextEvent.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.webbeans.web.lifecycle.test; import jakarta.servlet.ServletContextEvent; public class MockServletContextEvent extends ServletContextEvent { private static final long serialVersionUID = 1L; public MockServletContextEvent() { super(new MockServletContext()); } }
apache/openwhisk-devtools
1,106
java-action-archetype/src/main/resources/archetype-resources/src/main/java/FunctionApp.java
package $groupId; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import com.google.gson.JsonObject; /** * Hello FunctionApp */ public class FunctionApp { public static JsonObject main(JsonObject args) { JsonObject response = new JsonObject(); response.addProperty("greetings", "Hello! Welcome to OpenWhisk"); return response; } }
apache/paimon
1,143
paimon-api/src/main/java/org/apache/paimon/rest/RESTObjectMapper.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.paimon.rest; import org.apache.paimon.shade.jackson2.com.fasterxml.jackson.databind.ObjectMapper; /** * Object mapper for REST request and response. * * @deprecated Use {@link RESTApi} */ @Deprecated public class RESTObjectMapper { public static final ObjectMapper OBJECT_MAPPER = RESTApi.OBJECT_MAPPER; }
apache/pekko-http
1,119
http-core/src/main/java/org/apache/pekko/http/javadsl/model/headers/ContentDispositionTypes.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * license agreements; and to You under the Apache License, version 2.0: * * https://www.apache.org/licenses/LICENSE-2.0 * * This file is part of the Apache Pekko project, which was derived from Akka. */ /* * Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com> */ package org.apache.pekko.http.javadsl.model.headers; public final class ContentDispositionTypes { private ContentDispositionTypes() {} public static final ContentDispositionType INLINE = org.apache.pekko.http.scaladsl.model.headers.ContentDispositionTypes.inline$.MODULE$; public static final ContentDispositionType ATTACHMENT = org.apache.pekko.http.scaladsl.model.headers.ContentDispositionTypes.attachment$.MODULE$; public static final ContentDispositionType FORM_DATA = org.apache.pekko.http.scaladsl.model.headers.ContentDispositionTypes.form$minusdata$.MODULE$; public static ContentDispositionType Ext(String name) { return new org.apache.pekko.http.scaladsl.model.headers.ContentDispositionTypes.Ext(name); } }
apache/phoenix
1,128
phoenix-core/src/test/java/org/apache/hadoop/metrics2/lib/ExposedMetricsInfoImpl.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.metrics2.lib; /** * Helper class to expose access to the {@link org.apache.hadoop.metrics2.lib.MetricsInfoImpl} */ public class ExposedMetricsInfoImpl extends MetricsInfoImpl { /** */ public ExposedMetricsInfoImpl(String name, String description) { super(name, description); } }
apache/plc4x
1,127
plc4j/spi/src/main/java/org/apache/plc4x/java/spi/configuration/annotations/Required.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.plc4x.java.spi.configuration.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface Required { }
apache/polaris
1,114
runtime/service/src/main/java/org/apache/polaris/service/task/TaskHandlerConfiguration.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.polaris.service.task; import io.smallrye.config.ConfigMapping; import io.smallrye.config.WithDefault; @ConfigMapping(prefix = "polaris.tasks") public interface TaskHandlerConfiguration { @WithDefault("-1") int maxConcurrentTasks(); @WithDefault("-1") int maxQueuedTasks(); }
apache/polaris
1,144
polaris-core/src/main/java/org/apache/polaris/core/DigestUtils.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.polaris.core; import com.google.common.hash.Hashing; import java.nio.charset.StandardCharsets; public final class DigestUtils { private DigestUtils() { // utils class } public static String sha256Hex(String input) { return Hashing.sha256().hashString(input, StandardCharsets.UTF_8).toString(); } }
apache/polygene-java
1,104
core/bootstrap/src/main/java/org/apache/polygene/bootstrap/layered/IllegalLayerAssemblerException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.bootstrap.layered; import org.apache.polygene.bootstrap.AssemblyException; public class IllegalLayerAssemblerException extends AssemblyException { public IllegalLayerAssemblerException( String message ) { super( message ); } }
apache/polygene-java
1,108
libraries/uid/src/main/java/org/apache/polygene/library/uid/sequence/PersistingSequencingService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.library.uid.sequence; import org.apache.polygene.api.mixin.Mixins; import org.apache.polygene.api.service.ServiceComposite; @Mixins( PersistedSequencingMixin.class ) public interface PersistingSequencingService extends Sequencing, ServiceComposite { }
apache/rocketmq-flink
1,106
src/main/java/org/apache/flink/connector/rocketmq/sink/writer/serializer/RocketMQSerializerWrapper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.connector.rocketmq.sink.writer.serializer; import org.apache.flink.annotation.Internal; /** * Wrap the RocketMQ Schema into RocketMQSerializationSchema. We support schema evolution out of box * by this implementation. */ @Internal public class RocketMQSerializerWrapper {}
apache/samza
1,115
samza-azure/src/main/java/org/apache/samza/system/azureblob/utils/BlobMetadataGeneratorFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.samza.system.azureblob.utils; import org.apache.samza.config.Config; public interface BlobMetadataGeneratorFactory { /** * Creates an instance of {@link BlobMetadataGenerator} */ BlobMetadataGenerator getBlobMetadataGeneratorInstance(Config blobMetadataGeneratorConfig); }
apache/seatunnel
1,103
seatunnel-engine/seatunnel-engine-core/src/main/java/org/apache/seatunnel/engine/core/job/ExecutionAddress.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ package org.apache.seatunnel.engine.core.job; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; @Data @AllArgsConstructor @NoArgsConstructor public class ExecutionAddress implements Serializable { private String hostname; private int port; }
apache/servicecomb-saga-actuator
1,097
saga-spring/src/test/java/org/apache/servicecomb/saga/spring/ActorBasedSagaSpringApplicationTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.saga.spring; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest(classes = SagaSpringApplication.class, properties = "saga.runningMode=actor") public class ActorBasedSagaSpringApplicationTest extends SagaSpringApplicationTestBase { }
apache/servicecomb-saga-actuator
1,116
saga-core/src/main/java/org/apache/servicecomb/saga/transports/SQLTransport.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.saga.transports; import java.util.List; import org.apache.servicecomb.saga.core.SagaResponse; import org.apache.servicecomb.saga.core.Transport; public interface SQLTransport extends Transport { SagaResponse with(String datasource, String sql, List<List<String>> params); }
apache/servicecomb-samples
1,040
java-chassis-integration-tests/springmvc-tests/common/src/test/java/org/apache/servicecomb/demo/springmvc/tests/endpoints/EnglishGreetingRestEndpointBase.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.demo.springmvc.tests.endpoints; public class EnglishGreetingRestEndpointBase { public String sayHi(String name) { return "Hi " + name; } public String home() { return "Welcome home"; } }
apache/servicecomb-toolkit
1,069
oas-validator/oas-validator-core/src/main/java/org/apache/servicecomb/toolkit/oasv/diffvalidation/factory/CallbackDiffValidatorFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.toolkit.oasv.diffvalidation.factory; import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.CallbackDiffValidator; public interface CallbackDiffValidatorFactory extends OasObjectDiffValidatorFactory<CallbackDiffValidator> { }
apache/servicecomb-toolkit
1,069
oas-validator/oas-validator-core/src/main/java/org/apache/servicecomb/toolkit/oasv/diffvalidation/factory/EncodingDiffValidatorFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.toolkit.oasv.diffvalidation.factory; import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.EncodingDiffValidator; public interface EncodingDiffValidatorFactory extends OasObjectDiffValidatorFactory<EncodingDiffValidator> { }
apache/servicecomb-toolkit
1,069
oas-validator/oas-validator-core/src/main/java/org/apache/servicecomb/toolkit/oasv/diffvalidation/factory/PathItemDiffValidatorFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.toolkit.oasv.diffvalidation.factory; import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.PathItemDiffValidator; public interface PathItemDiffValidatorFactory extends OasObjectDiffValidatorFactory<PathItemDiffValidator> { }
apache/servicecomb-toolkit
1,069
oas-validator/oas-validator-core/src/main/java/org/apache/servicecomb/toolkit/oasv/diffvalidation/factory/ResponseDiffValidatorFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.toolkit.oasv.diffvalidation.factory; import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.ResponseDiffValidator; public interface ResponseDiffValidatorFactory extends OasObjectDiffValidatorFactory<ResponseDiffValidator> { }
apache/shardingsphere-elasticjob
1,100
kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/infra/time/TimeService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shardingsphere.elasticjob.kernel.infra.time; /** * Time service. */ public final class TimeService { /** * Get current millis. * * @return current millis */ public long getCurrentMillis() { return System.currentTimeMillis(); } }
apache/shardingsphere
1,102
parser/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/statement/DistSQLStatement.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shardingsphere.distsql.statement; import org.apache.shardingsphere.sql.parser.statement.core.statement.SQLStatement; /** * DistSQL statement. */ public abstract class DistSQLStatement extends SQLStatement { protected DistSQLStatement() { super(null); } }
apache/shenyu
1,111
shenyu-sdk/shenyu-sdk-spring/src/main/java/org/apache/shenyu/sdk/spring/NoFallbackAvailableException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shenyu.sdk.spring; public class NoFallbackAvailableException extends RuntimeException { private static final long serialVersionUID = 5196228762350964700L; public NoFallbackAvailableException(final String message, final Throwable cause) { super(message, cause); } }
apache/shiro
1,148
web/src/main/java/org/apache/shiro/web/tags/LacksRoleTag.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.shiro.web.tags; /** * @since 0.1 */ public class LacksRoleTag extends RoleTag { //TODO - complete JavaDoc public LacksRoleTag() { } protected boolean showTagBody(String roleName) { boolean hasRole = getSubject() != null && getSubject().hasRole(roleName); return !hasRole; } }
apache/skywalking
1,083
oap-server/server-library/library-module/src/test/java/org/apache/skywalking/oap/server/library/module/ModuleAProviderConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.library.module; import lombok.Getter; public class ModuleAProviderConfig extends ModuleConfig { @Getter private String attr1; @Getter private Integer attr2; @Getter private Long attr3; @Getter private boolean attr4; }
apache/skywalking
1,089
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/meter/function/PercentileArgument.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.core.analysis.meter.function; import lombok.Getter; import lombok.RequiredArgsConstructor; @RequiredArgsConstructor @Getter public class PercentileArgument { private final BucketedValues bucketedValues; private final int[] ranks; }
apache/skywalking
1,098
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/cluster/ServiceRegisterException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.core.cluster; public class ServiceRegisterException extends RuntimeException { public ServiceRegisterException(String message) { super(message); } public ServiceRegisterException(Throwable cause) { super(cause); } }
apache/solr
1,138
solr/api/src/java/org/apache/solr/client/api/model/DeleteNodeRequestBody.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.client.api.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; public class DeleteNodeRequestBody { @Schema(description = "Request ID to track this action which will be processed asynchronously.") @JsonProperty("async") public String async; }
apache/stratos
1,070
components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/exception/CartridgeAlreadyExistsException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.stratos.cloud.controller.exception; /** * Cartridge already exists exception. */ public class CartridgeAlreadyExistsException extends Exception { public CartridgeAlreadyExistsException(String message) { super(message); } }
apache/stratos
1,083
components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/policy/UnremovablePolicyException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.stratos.autoscaler.exception.policy; import org.apache.stratos.autoscaler.exception.AutoScalerException; public class UnremovablePolicyException extends AutoScalerException { public UnremovablePolicyException(String msg) { super(msg); } }
apache/streampark-quickstart
1,079
quickstart-flink/quickstart-connector/src/main/java/org/apache/streampark/flink/quickstart/connector/bean/Behavior.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.streampark.flink.quickstart.connector.bean; import lombok.Data; /** * @author benjobs */ @Data public class Behavior { private String user_id; private Long item_id; private Long category_id; private String behavior; private Long ts; }
apache/streampipes
1,064
streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/buffer/JoinStyle.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.processors.geo.jvm.jts.helper.buffer; public enum JoinStyle { Round(1), Mitre(2), Bevel(3); private int number; JoinStyle(int number) { this.number = number; } public int getNumber() { return number; } }
apache/streampipes
1,099
streampipes-model/src/main/java/org/apache/streampipes/model/connect/adapter/compact/CompactEventProperty.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.model.connect.adapter.compact; import com.fasterxml.jackson.annotation.JsonInclude; @JsonInclude(JsonInclude.Include.NON_NULL) public record CompactEventProperty( String label, String description, String propertyScope, String semanticType ) { }
apache/struts
1,135
plugins/json/src/main/java/org/apache/struts2/json/bridge/StringBridge.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.struts2.json.bridge; /** * User: maurizio.cucchiara * Date: Oct 28, 2010 * Time: 12:46:16 AM */ public class StringBridge implements FieldBridge{ public String objectToString(Object object) { if (object == null) { return null; } return object.toString(); } }
apache/struts
1,153
core/src/main/java/org/apache/struts2/util/finder/Test.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.struts2.util.finder; /** * This is the testing interface that is used to accept or reject resources. */ public interface Test<T> { /** * The test method. * * @param t The resource object to test. * @return True if the resource should be accepted, false otherwise. */ boolean test(T t); }
apache/synapse
1,123
modules/securevault/src/main/java/org/apache/synapse/securevault/EncryptionProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.synapse.securevault; /** * Provides Encrypt operation */ public interface EncryptionProvider { /** * Encrypts a plain text * * @param plainText as a byte array * @return cipher text as a byte array */ public byte[] encrypt(byte[] plainText); }
apache/synapse
1,124
modules/securevault/src/main/java/org/apache/synapse/securevault/IKeyStoreLoader.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.synapse.securevault; import java.security.KeyStore; /** * Provides a way to load KeyStore */ public interface IKeyStoreLoader { /** * returns an instance of KeyStore object * * @return KeyStore Instance */ public abstract KeyStore getKeyStore(); }
apache/synapse
1,136
modules/samples/services/EJBSampleBeans/src/samples/ejb/StoreLocator.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package samples.ejb; import javax.ejb.Remote; import samples.bean.Location; /** * The remote interface of the StoreLocator stateless session bean: defines methods that can be * remotely invoked on the EJB. */ @Remote public interface StoreLocator { public String getClosestStore(Location loc); }
apache/syncope
1,099
core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/policy/TicketExpirationPolicy.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.core.persistence.api.entity.policy; import org.apache.syncope.common.lib.policy.TicketExpirationPolicyConf; public interface TicketExpirationPolicy extends Policy { TicketExpirationPolicyConf getConf(); void setConf(TicketExpirationPolicyConf conf); }
apache/tika
1,109
tika-eval/tika-eval-core/src/main/java/org/apache/tika/eval/core/textstats/BasicTokenCountStatsCalculator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tika.eval.core.textstats; import org.apache.tika.eval.core.tokens.TokenCounts; public class BasicTokenCountStatsCalculator implements TokenCountStatsCalculator<TokenCounts> { @Override public TokenCounts calculate(TokenCounts tokenCounts) { return tokenCounts; } }
apache/tomcat80
1,164
java/org/apache/catalina/tribes/Heartbeat.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.catalina.tribes; /** * Can be implemented by the ChannelListener and Membership listeners to receive heartbeat * notifications from the Channel * @version 1.0 * @see Channel * @see Channel#heartbeat() */ public interface Heartbeat { /** * Heartbeat invocation for resources cleanup etc */ public void heartbeat(); }
apache/tomee
1,073
arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/remote/BigFinderHome.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.arquillian.tests.bmp.remote; import jakarta.ejb.EJBHome; import java.rmi.RemoteException; import java.util.Collection; public interface BigFinderHome extends EJBHome { Collection<BigFinder> findN(int count) throws RemoteException; }
apache/trafodion
1,114
core/conn/trafci/src/main/java/org/trafodion/ci/ValidationException.java
// @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // @@@ END COPYRIGHT @@@ package org.trafodion.ci; public class ValidationException extends Exception { /** * */ private static final long serialVersionUID = 8842989562052059377L; ValidationException() { } ValidationException(String msg) { super(msg); } }
apache/trafodion
1,141
core/conn/trafci/src/main/java/org/trafodion/ci/JDBCVproc.java
// @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // @@@ END COPYRIGHT @@@ package org.trafodion.ci; public class JDBCVproc { public static String getVproc() { try { return (org.trafodion.jdbc.t4.Vproc.getVproc()); } catch (java.lang.IllegalAccessError iae) { return iae.getMessage(); } } }
apache/unomi
1,126
graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/providers/GraphQLQueryProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.unomi.graphql.providers; import graphql.annotations.processor.GraphQLAnnotations; import graphql.schema.GraphQLFieldDefinition; import java.util.Set; public interface GraphQLQueryProvider extends GraphQLProvider { Set<GraphQLFieldDefinition> getQueries(GraphQLAnnotations graphQLAnnotations); }
apache/wicket
1,115
wicket-examples/src/test/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.util.markup.xhtml; import org.junit.jupiter.api.Test; /** * Checks that the html markup files are well formed xml-s. * * @author akiraly */ public class WellFormedXmlTest extends WellFormedXmlTestCase { @Test @Override public void markupFiles() { super.markupFiles(); } }
google/android-classyshark
1,125
ClassySharkWS/src/com/google/classyshark/analytics/Analytics.java
/* * Copyright 2017 Google, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 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.classyshark.analytics; import com.google.classyshark.Version; // based on https://github.com/siddii/jgoogleanalytics public enum Analytics { INSTANCE; public void addActivation() { JGoogleAnalyticsTracker tracker = new JGoogleAnalyticsTracker( "ClassyShark-Activation", Version.MAJOR + "." + Version.MINOR, "UA-91889970-1"); FocusPoint focusPoint = new FocusPoint("Activation"); tracker.trackAsynchronously(focusPoint); } }
google/cel-java
1,146
common/src/main/java/dev/cel/common/values/CelValueProvider.java
// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package dev.cel.common.values; import com.google.errorprone.annotations.Immutable; import java.util.Map; import java.util.Optional; /** CelValueProvider is an interface for constructing new struct values. */ @Immutable public interface CelValueProvider { /** * Constructs a new struct value. * * <p>Note that the return type is defined as CelValue rather than StructValue to account for * special cases such as wrappers where its primitive is returned. */ Optional<CelValue> newValue(String structType, Map<String, Object> fields); }
google/closure-compiler
1,122
src/com/google/javascript/jscomp/parsing/parser/trees/ComprehensionForTree.java
/* * Copyright 2014 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.javascript.jscomp.parsing.parser.trees; import com.google.javascript.jscomp.parsing.parser.util.SourceRange; public class ComprehensionForTree extends ParseTree { public final ParseTree initializer; public final ParseTree collection; public ComprehensionForTree( SourceRange location, ParseTree initializer, ParseTree collection) { super(ParseTreeType.COMPREHENSION_FOR, location); this.initializer = initializer; this.collection = collection; } }
google/depan
1,101
DepanNodeUI/prod/src/com/google/devtools/depan/nodes/filters/eclipse/ui/widgets/FilterReferenceControl.java
/* * Copyright 2016 The Depan Project Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.devtools.depan.nodes.filters.eclipse.ui.widgets; import com.google.devtools.depan.nodes.filters.model.ContextualFilter; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; /** * @author <a href="leeca@pnambic.com">Lee Carver</a> */ public class FilterReferenceControl extends Composite { public FilterReferenceControl(Composite parent) { super(parent, SWT.NONE); } public void setClosureFilter(ContextualFilter contextualFilter) { } }
google/guava
1,156
guava/src/com/google/common/cache/IgnoreJRERequirement.java
/* * Copyright 2019 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package com.google.common.cache; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Target; /** * Disables Animal Sniffer's checking of compatibility with older versions of Java/Android. * * <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}. */ @Target({METHOD, CONSTRUCTOR, TYPE, FIELD}) @interface IgnoreJRERequirement {}
google/j2cl
1,115
junit/generator/javatests/com/google/j2cl/junit/integration/stacktrace/data/StacktraceTestBase.java
/* * Copyright 2019 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.j2cl.junit.integration.stacktrace.data; import org.junit.Before; /** Base class for all tests that do stack deobfuscation. */ public class StacktraceTestBase { @Before public void setup() { // By adding a second creation site for an exception, the instantiation call // (RuntimeException.create) is not inlined, hence avoiding the extra stack frame in compiled // mode see (b/64729436). try { throw new RuntimeException(); } catch (RuntimeException expected) { } } }
google/j2objc
1,087
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_en.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * $Id: SerializerMessages_en.java 468654 2006-10-28 07:09:23Z minchau $ */ package org.apache.xml.serializer.utils; /** * Default implementation. This is just an empty class. * @xsl.usage internal */ public final class SerializerMessages_en extends SerializerMessages { }
google/j2objc
1,089
jre_emul/apache_harmony/classlib/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/MisprintEvent.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.harmony.beans.tests.support; import java.util.EventObject; public class MisprintEvent extends EventObject { private static final long serialVersionUID = 6237503200476618235L; public MisprintEvent(Object object) { super(object); } }
google/j2objc
1,122
jre_emul/android/frameworks/base/core/java/android/test/suitebuilder/annotation/Smoke.java
/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.test.suitebuilder.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Marks a test that should run as part of the smoke tests. * The <code>android.test.suitebuilder.SmokeTestSuiteBuilder</code> * will run all tests with this annotation. */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD, ElementType.TYPE}) public @interface Smoke { }
google/nomulus
1,152
core/src/main/java/google/registry/module/bsa/BsaServlet.java
// Copyright 2023 The Nomulus Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package google.registry.module.bsa; import com.google.monitoring.metrics.MetricReporter; import dagger.Lazy; import google.registry.module.ServletBase; public final class BsaServlet extends ServletBase { private static final BsaComponent component = DaggerBsaComponent.create(); private static final BsaRequestHandler requestHandler = component.requestHandler(); private static final Lazy<MetricReporter> metricReporter = component.metricReporter(); public BsaServlet() { super(requestHandler, metricReporter); } }
google/search-samples
1,113
app-indexing/app/src/main/java/com/recipe_app/client/database/RecipeNoteTable.java
/* * Copyright 2014 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.recipe_app.client.database; public class RecipeNoteTable { public static final String TABLE = "recipe_notes"; public static final String ID_COLUMN = "_id"; public static final String ID = TABLE + "." + ID_COLUMN; public static final String RECIPE_ID_COLUMN ="recipe_id"; public static final String RECIPE_ID = TABLE + "." + RECIPE_ID_COLUMN; public static final String TEXT_COLUMN = "text"; public static final String TEXT = TABLE + "." + TEXT_COLUMN; }
googleads/google-ads-java
1,100
google-ads-stubs-v19/src/main/java/com/google/ads/googleads/v19/common/LocationInfoOrBuilder.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 LocationInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v19.common.LocationInfo) com.google.protobuf.MessageOrBuilder { /** * <pre> * The geo target constant resource name. * </pre> * * <code>optional string geo_target_constant = 2;</code> * @return Whether the geoTargetConstant field is set. */ boolean hasGeoTargetConstant(); /** * <pre> * The geo target constant resource name. * </pre> * * <code>optional string geo_target_constant = 2;</code> * @return The geoTargetConstant. */ java.lang.String getGeoTargetConstant(); /** * <pre> * The geo target constant resource name. * </pre> * * <code>optional string geo_target_constant = 2;</code> * @return The bytes for geoTargetConstant. */ com.google.protobuf.ByteString getGeoTargetConstantBytes(); }
googleads/google-ads-java
1,100
google-ads-stubs-v20/src/main/java/com/google/ads/googleads/v20/common/LocationInfoOrBuilder.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 LocationInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v20.common.LocationInfo) com.google.protobuf.MessageOrBuilder { /** * <pre> * The geo target constant resource name. * </pre> * * <code>optional string geo_target_constant = 2;</code> * @return Whether the geoTargetConstant field is set. */ boolean hasGeoTargetConstant(); /** * <pre> * The geo target constant resource name. * </pre> * * <code>optional string geo_target_constant = 2;</code> * @return The geoTargetConstant. */ java.lang.String getGeoTargetConstant(); /** * <pre> * The geo target constant resource name. * </pre> * * <code>optional string geo_target_constant = 2;</code> * @return The bytes for geoTargetConstant. */ com.google.protobuf.ByteString getGeoTargetConstantBytes(); }
googleads/google-ads-java
1,100
google-ads-stubs-v21/src/main/java/com/google/ads/googleads/v21/common/LocationInfoOrBuilder.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 LocationInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v21.common.LocationInfo) com.google.protobuf.MessageOrBuilder { /** * <pre> * The geo target constant resource name. * </pre> * * <code>optional string geo_target_constant = 2;</code> * @return Whether the geoTargetConstant field is set. */ boolean hasGeoTargetConstant(); /** * <pre> * The geo target constant resource name. * </pre> * * <code>optional string geo_target_constant = 2;</code> * @return The geoTargetConstant. */ java.lang.String getGeoTargetConstant(); /** * <pre> * The geo target constant resource name. * </pre> * * <code>optional string geo_target_constant = 2;</code> * @return The bytes for geoTargetConstant. */ com.google.protobuf.ByteString getGeoTargetConstantBytes(); }
googleapis/discovery-artifact-manager
1,107
toolkit/src/main/java/com/google/api/codegen/viewmodel/PathTemplateView.java
/* Copyright 2016 Google Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.api.codegen.viewmodel; import com.google.auto.value.AutoValue; @AutoValue public abstract class PathTemplateView { public abstract String name(); public abstract String pattern(); public static Builder newBuilder() { return new AutoValue_PathTemplateView.Builder(); } @AutoValue.Builder public abstract static class Builder { public abstract Builder name(String val); public abstract Builder pattern(String val); public abstract PathTemplateView build(); } }
googleapis/google-cloud-java
1,031
java-shopping-merchant-reports/proto-google-shopping-merchant-reports-v1beta/src/main/java/com/google/shopping/merchant/reports/v1beta/RelativeDemandChangeTypeOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/shopping/merchant/reports/v1beta/reports.proto // Protobuf Java Version: 3.25.8 package com.google.shopping.merchant.reports.v1beta; public interface RelativeDemandChangeTypeOrBuilder extends // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reports.v1beta.RelativeDemandChangeType) com.google.protobuf.MessageOrBuilder {}
googleapis/google-oauth-java-client
1,090
google-oauth-client-servlet/src/main/java/com/google/api/client/extensions/auth/helpers/package-info.java
/* * Copyright (c) 2011 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. */ /** * {@link com.google.api.client.util.Beta} <br> * Auth object framework that will provide an interface to create easy to use, object-oriented * methods to obtain and manage auth credentials. * * <p>Warning: starting with version 1.7, usage of this for OAuth 2.0 is deprecated. Instead use * {@code com.google.api.client.auth.oauth2}. * * @since 1.4 * @author moshenko@google.com (Jacob Moshenko) */ @com.google.api.client.util.Beta package com.google.api.client.extensions.auth.helpers;
googleapis/sdk-platform-java
1,088
gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/grpc/ServiceClientClassComposer.java
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.api.generator.gapic.composer.grpc; import com.google.api.generator.gapic.composer.common.AbstractServiceClientClassComposer; public class ServiceClientClassComposer extends AbstractServiceClientClassComposer { private static final ServiceClientClassComposer INSTANCE = new ServiceClientClassComposer(); protected ServiceClientClassComposer() { super(GrpcContext.instance()); } public static ServiceClientClassComposer instance() { return INSTANCE; } }
googleapis/sdk-platform-java
1,088
gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/rest/ServiceClientClassComposer.java
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.api.generator.gapic.composer.rest; import com.google.api.generator.gapic.composer.common.AbstractServiceClientClassComposer; public class ServiceClientClassComposer extends AbstractServiceClientClassComposer { private static final ServiceClientClassComposer INSTANCE = new ServiceClientClassComposer(); protected ServiceClientClassComposer() { super(RestContext.instance()); } public static ServiceClientClassComposer instance() { return INSTANCE; } }
hibernate/hibernate-ogm
1,056
infinispan-embedded/src/test/java/org/hibernate/ogm/datastore/infinispan/test/dialect/impl/counter/TransportNotDefinedSequenceGenerationTest.java
/* * Hibernate OGM, Domain model persistence for NoSQL datastores * * License: GNU Lesser General Public License (LGPL), version 2.1 or later * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.ogm.datastore.infinispan.test.dialect.impl.counter; import org.hibernate.ogm.backendtck.id.SequenceNextValueGenerationTest; import org.hibernate.ogm.datastore.infinispan.InfinispanProperties; import org.hibernate.ogm.utils.TestForIssue; import org.hibernate.ogm.utils.jpa.GetterPersistenceUnitInfo; /** * Repeat {@link SequenceNextValueGenerationTest} tests * with a configuration does not defining transport * * @author Fabio Massimo Ercoli */ @TestForIssue(jiraKey = "OGM-1376") public class TransportNotDefinedSequenceGenerationTest extends SequenceNextValueGenerationTest { protected void configure(GetterPersistenceUnitInfo info) { super.configure( info ); info.getProperties().setProperty( InfinispanProperties.CONFIGURATION_RESOURCE_NAME, "infinispan-local.xml" ); } }
hibernate/hibernate-orm
1,031
hibernate-testing/src/main/java/org/hibernate/testing/orm/domain/gambit/BasicEntity.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.testing.orm.domain.gambit; import java.util.Objects; import jakarta.persistence.Entity; import jakarta.persistence.Id; /** * @author Chris Cranford */ @Entity public class BasicEntity { @Id private Integer id; private String data; public BasicEntity() { } public BasicEntity(Integer id, String data) { this.id = id; this.data = data; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getData() { return data; } public void setData(String data) { this.data = data; } @Override public boolean equals(Object o) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } BasicEntity that = (BasicEntity) o; return Objects.equals( id, that.id ) && Objects.equals( data, that.data ); } @Override public int hashCode() { return Objects.hash( id, data ); } }
hibernate/hibernate-orm
1,043
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/rawtypes/EmployeeWithRawType.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.processor.test.rawtypes; import java.util.Collection; import jakarta.persistence.Basic; import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.ManyToMany; /** * @author Emmanuel Bernard */ @Entity public class EmployeeWithRawType implements java.io.Serializable { @Id protected String id; @Basic protected String name; @ManyToMany(targetEntity = DeskWithRawType.class, mappedBy = "employees", cascade = CascadeType.ALL) protected Collection desks = new java.util.ArrayList(); public EmployeeWithRawType() { } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Collection getDesks() { return desks; } public void setDesks(Collection desks) { this.desks = desks; } }
hibernate/hibernate-orm
1,053
hibernate-core/src/test/java/org/hibernate/orm/test/subclassfilter/Employee.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.subclassfilter; import jakarta.persistence.Column; import java.util.HashSet; import java.util.Set; /** * Implementation of Employee. * * @author Steve Ebersole */ public class Employee extends Person { @Column(name="`title`") private String title; private String department; private Employee manager; private Set minions = new HashSet(); public Employee() { } public Employee(String name) { super( name ); } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDepartment() { return department; } public void setDepartment(String department) { this.department = department; } public Employee getManager() { return manager; } public void setManager(Employee manager) { this.manager = manager; } public Set getMinions() { return minions; } public void setMinions(Set minions) { this.minions = minions; } }
hibernate/hibernate-orm
1,054
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/naturalid/mutable/cached/CachedMutableNaturalIdNonStrictReadWriteTest.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.mapping.naturalid.mutable.cached; import org.hibernate.testing.orm.junit.DomainModel; import org.hibernate.testing.orm.junit.ServiceRegistry; import org.hibernate.testing.orm.junit.SessionFactory; import org.hibernate.testing.orm.junit.Setting; import static org.hibernate.cfg.AvailableSettings.GENERATE_STATISTICS; import static org.hibernate.cfg.AvailableSettings.USE_SECOND_LEVEL_CACHE; import static org.hibernate.testing.cache.CachingRegionFactory.DEFAULT_ACCESSTYPE; @ServiceRegistry( settings = { @Setting( name = USE_SECOND_LEVEL_CACHE, value = "true" ), @Setting( name = DEFAULT_ACCESSTYPE, value = "nonstrict-read-write" ), @Setting( name = GENERATE_STATISTICS, value = "true" ) } ) @DomainModel( annotatedClasses = {A.class, Another.class, AllCached.class, B.class, SubClass.class} ) @SessionFactory public class CachedMutableNaturalIdNonStrictReadWriteTest extends CachedMutableNaturalIdTest { }
hibernate/hibernate-orm
1,067
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/identifier/uuid/time/Book.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.mapping.identifier.uuid.time; import java.util.UUID; import org.hibernate.annotations.UuidGenerator; import jakarta.persistence.Basic; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import static org.hibernate.annotations.UuidGenerator.Style.TIME; /** * @author Steve Ebersole */ //tag::example-identifiers-generators-uuid-implicit[] @Entity public class Book { @Id @GeneratedValue @UuidGenerator(style = TIME) private UUID id; @Basic private String name; //end::example-identifiers-generators-uuid-implicit[] protected Book() { // for Hibernate use } public Book(String name) { this.name = name; } public UUID getId() { return id; } public String getName() { return name; } public void setName(String name) { this.name = name; } //tag::example-identifiers-generators-uuid-implicit[] } //end::example-identifiers-generators-uuid-implicit[]
hibernate/hibernate-orm
1,092
hibernate-core/src/main/java/org/hibernate/boot/spi/SessionFactoryBuilderImplementor.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.boot.spi; import org.hibernate.boot.SessionFactoryBuilder; import static org.hibernate.internal.log.DeprecationLogger.DEPRECATION_LOGGER; /** * Additional SPI contract for {@link SessionFactoryBuilder}, mainly intended for * implementors of {@link SessionFactoryBuilderFactory}. * * @author Steve Ebersole */ public interface SessionFactoryBuilderImplementor extends SessionFactoryBuilder { /** * Called if {@link org.hibernate.cfg.AvailableSettings#ALLOW_JTA_TRANSACTION_ACCESS} * is not enabled. */ void disableJtaTransactionAccess(); /** * @deprecated with no replacement. */ @Deprecated(since = "7.0", forRemoval = true) default void disableRefreshDetachedEntity() { DEPRECATION_LOGGER.deprecatedRefreshLockDetachedEntity(); } /** * Build the {@link SessionFactoryOptions} that will ultimately be passed to the * constructor of {@link org.hibernate.internal.SessionFactoryImpl}. */ SessionFactoryOptions buildSessionFactoryOptions(); }
hibernate/hibernate-search
1,045
mapper/pojo-base/src/main/java/org/hibernate/search/mapper/pojo/bridge/builtin/spatial/impl/LatitudeMarker.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.mapper.pojo.bridge.builtin.spatial.impl; import org.hibernate.search.mapper.pojo.bridge.binding.MarkerBindingContext; import org.hibernate.search.mapper.pojo.bridge.builtin.programmatic.GeoPointBinder; import org.hibernate.search.mapper.pojo.bridge.builtin.programmatic.LatitudeLongitudeMarkerBinder; public class LatitudeMarker { private final String markerSet; /** * Private constructor, use {@link GeoPointBinder#latitude()} instead. */ private LatitudeMarker(String markerSet) { this.markerSet = markerSet; } public String getMarkerSet() { return markerSet; } public static class Binder implements LatitudeLongitudeMarkerBinder { private String markerSet; @Override public Binder markerSet(String markerSet) { this.markerSet = markerSet; return this; } @Override public void bind(MarkerBindingContext context) { context.marker( new LatitudeMarker( markerSet ) ); } } }
hibernate/hibernate-search
1,077
mapper/orm/src/main/java/org/hibernate/search/mapper/orm/loading/impl/PersistenceContextLookupStrategy.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.mapper.orm.loading.impl; import org.hibernate.engine.spi.EntityKey; import org.hibernate.engine.spi.PersistenceContext; import org.hibernate.engine.spi.SessionImplementor; /** * A lookup strategy that checks the persistence context (first level cache). * <p> * Ported from Search 5: {@code org.hibernate.search.query.hibernate.impl.PersistenceContextObjectInitializer}. * * @author Emmanuel Bernard */ class PersistenceContextLookupStrategy implements EntityLoadingCacheLookupStrategyImplementor { static PersistenceContextLookupStrategy create(SessionImplementor session) { return new PersistenceContextLookupStrategy( session ); } private final PersistenceContext persistenceContext; private PersistenceContextLookupStrategy(SessionImplementor session) { this.persistenceContext = session.getPersistenceContext(); } @Override public Object lookup(EntityKey entityKey) { return persistenceContext.getEntity( entityKey ); } }
hibernate/hibernate-shards
1,135
src/main/java/org/hibernate/shards/query/SetCacheableEvent.java
/** * Copyright (C) 2007 Google Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * This library 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 * Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ package org.hibernate.shards.query; import org.hibernate.Query; /** * @author Maulik Shah */ public class SetCacheableEvent implements QueryEvent { private final boolean cacheable; public SetCacheableEvent(boolean cacheable) { this.cacheable = cacheable; } public void onEvent(Query query) { query.setCacheable(cacheable); } }
openjdk/jdk8
1,150
langtools/test/tools/javadoc/annotations/annotatePackage/pkg1/A.java
/* * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** * Doc comment here is ignored. */ package pkg1; public @interface A { Class value(); }
openjdk/jdk8
1,157
langtools/test/tools/javac/diags/examples/IntNumberTooLarge.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.int.number.too.large class IntNumberTooLarge { int i = 12345678901234567890; }
openjdk/jdk8
1,161
langtools/test/tools/javac/diags/examples/PackageAnnos.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.pkg.annotations.sb.in.package-info.java @Deprecated package p; class PackageAnnos { }
openjdk/jdk8
1,165
jdk/test/java/lang/ClassLoader/deadlock/SupAlice.java
/* * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package comSB; public class SupAlice { static { System.out.println("comSB.SupAlice loaded"); } }
oracle/coherence
1,101
prj/coherence-core/src/main/java/com/tangosol/internal/net/service/peer/initiator/InitiatorDependencies.java
/* * Copyright (c) 2000, 2020, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.tangosol.internal.net.service.peer.initiator; import com.tangosol.internal.net.service.peer.PeerDependencies; /** * The InitiatorDependencies interface provides an Initiator object with its external * dependencies. * * @author pfm 2011.06.27 * @since Coherence 12.1.2 */ public interface InitiatorDependencies extends PeerDependencies { /** * Return the maximum amount of time (in milliseconds) that the Initiator will wait * for a new Connection to be established. If 0, the Initiator will wait indefinitely. * This property defaults to the ServiceDependencies.getRequestTimeoutMillis() value. * * @return the connect timeout */ public long getConnectTimeoutMillis(); /** * Return a default timeout value of the request send timeout value. * * @return the request send timeout */ public long getRequestSendTimeoutMillis(); }
oracle/coherence
1,119
prj/coherence-core/src/main/java/com/tangosol/dev/assembler/If_acmpeq.java
/* * Copyright (c) 2000, 2020, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.tangosol.dev.assembler; import java.io.IOException; import java.io.DataInput; import java.io.DataOutput; /** * The IF_ACMPEQ op branches to the label if the top two references on the * stack are equal. * <p><code><pre> * JASM op : IF_ACMPEQ (0xa5) * JVM byte code(s): IF_ACMPEQ (0xa5) * Details : * </pre></code> * * @version 0.50, 06/14/98, assembler/dis-assembler * @author Cameron Purdy */ public class If_acmpeq extends OpBranch implements Constants { // ----- constructors --------------------------------------------------- /** * Construct the op. * * @param label the label to branch to */ public If_acmpeq(Label label) { super(IF_ACMPEQ, label); } // ----- data members --------------------------------------------------- /** * The name of this class. */ private static final String CLASS = "If_acmpeq"; }