repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/phoenix
1,162
phoenix-pherf/src/main/java/org/apache/phoenix/pherf/jmx/monitors/ThreadMonitor.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.phoenix.pherf.jmx.monitors; import java.lang.management.ManagementFactory; import org.apache.phoenix.pherf.jmx.Stat; public class ThreadMonitor implements Monitor { @Override public Stat getStat() { Stat<Integer> stat = new Stat(new Integer(ManagementFactory.getThreadMXBean().getThreadCount())); return stat; } }
apache/pinot
1,167
pinot-spi/src/main/java/org/apache/pinot/spi/stream/PermanentConsumerException.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pinot.spi.stream; /** * A stream subsystem error that indicates a situation that is not likely to clear up by retrying the request (for * example, no such topic or offset out of range). */ public class PermanentConsumerException extends RuntimeException { public PermanentConsumerException(Throwable cause) { super(cause); } }
apache/pulsar
1,159
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/PulsarVersionProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pulsar.admin.cli; import org.apache.pulsar.PulsarVersion; import picocli.CommandLine.IVersionProvider; public class PulsarVersionProvider implements IVersionProvider { @Override public String[] getVersion() { return new String[]{"Current version of pulsar admin client is: " + PulsarVersion.getVersion()}; } }
apache/qpid-broker-j
1,161
broker-core/src/main/java/org/apache/qpid/server/queue/CreatingLinkInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.qpid.server.queue; import org.apache.qpid.server.model.ManagedAttributeValue; import org.apache.qpid.server.model.ManagedAttributeValueType; @ManagedAttributeValueType public interface CreatingLinkInfo extends ManagedAttributeValue { boolean isSendingLink(); String getRemoteContainerId(); String getLinkName(); }
apache/ranger
1,162
agents-audit/core/src/main/java/org/apache/ranger/audit/model/AuditEventBase.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.ranger.audit.model; import java.util.Date; public abstract class AuditEventBase { protected AuditEventBase() { } public abstract String getEventKey(); public abstract Date getEventTime(); public abstract void setEventCount(long eventCount); public abstract void setEventDurationMS(long eventDurationMS); }
apache/royale-compiler
1,141
compiler/src/main/java/org/apache/royale/compiler/internal/fxg/dom/types/Direction.java
/* * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.royale.compiler.internal.fxg.dom.types; /** * The Direction class. * * <pre> * 0 = ltr * 1 = rtl * </pre> */ public enum Direction { /** * The enum representing an 'ltr' Direction. */ LTR, /** * The enum representing an 'rtl' Direction. */ RTL; }
apache/royale-compiler
1,155
compiler/src/main/java/org/apache/royale/compiler/tree/mxml/IMXMLModelRootNode.java
/* * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.royale.compiler.tree.mxml; /** * This AST node represents the root tag inside an MXML * <code>&lt;Model&gt;</code> tag. * <p> * An {@link IMXMLModelRootNode} has N children which are * {@link IMXMLModelPropertyNode} objects. */ public interface IMXMLModelRootNode extends IMXMLModelPropertyContainerNode { }
apache/samza
1,165
samza-sql/src/main/java/org/apache/samza/sql/dsl/SamzaSqlDslConverterFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.sql.dsl; import org.apache.samza.config.Config; import org.apache.samza.sql.interfaces.DslConverter; import org.apache.samza.sql.interfaces.DslConverterFactory; public class SamzaSqlDslConverterFactory implements DslConverterFactory { @Override public DslConverter create(Config config) { return new SamzaSqlDslConverter(config); } }
apache/seatunnel
1,131
seatunnel-engine/seatunnel-engine-core/src/main/java/org/apache/seatunnel/engine/core/dag/actions/SinkConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.dag.actions; import org.apache.seatunnel.api.table.catalog.TablePath; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; @Getter @NoArgsConstructor @AllArgsConstructor public class SinkConfig implements Config { private TablePath tablePath; }
apache/seatunnel
1,148
seatunnel-api/src/main/java/org/apache/seatunnel/api/table/factory/TableSourceFactoryContext.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.api.table.factory; import org.apache.seatunnel.api.configuration.ReadonlyConfig; import lombok.Getter; @Getter public class TableSourceFactoryContext extends TableFactoryContext { public TableSourceFactoryContext(ReadonlyConfig options, ClassLoader classLoader) { super(options, classLoader); } }
apache/servicecomb-java-chassis
1,100
swagger/swagger-invocation/invocation-core/src/test/java/org/apache/servicecomb/swagger/invocation/schemas/JaxrsAddV1.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.swagger.invocation.schemas; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; import jakarta.ws.rs.QueryParam; @Path("/") public class JaxrsAddV1 { @Path("/add") @GET public int add(@QueryParam("x") int x, @QueryParam("y") int y) { return x + y; } }
apache/servicecomb-java-chassis
1,111
swagger/swagger-generator/generator-core/src/main/java/org/apache/servicecomb/swagger/generator/ParameterTypeProcessor.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.swagger.generator; import com.fasterxml.jackson.databind.JavaType; public interface ParameterTypeProcessor { JavaType getProcessType(); void process(SwaggerGenerator swaggerGenerator, OperationGenerator operationGenerator, ParameterGenerator parameterGenerator); }
apache/shardingsphere
1,087
database/protocol/dialect/postgresql/src/main/java/org/apache/shardingsphere/database/protocol/postgresql/packet/identifier/PostgreSQLIdentifierTag.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.database.protocol.postgresql.packet.identifier; /** * PostgreSQL identifier tag. */ public interface PostgreSQLIdentifierTag { /** * Get identifier tag value. * * @return identifier tag value */ char getValue(); }
apache/shardingsphere
1,111
parser/sql/statement/core/src/main/java/org/apache/shardingsphere/sql/parser/statement/core/enums/ParameterMarkerType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.sql.parser.statement.core.enums; import lombok.Getter; import lombok.RequiredArgsConstructor; /** * Parameter marker type. */ @RequiredArgsConstructor @Getter public enum ParameterMarkerType { QUESTION("?"), DOLLAR("$"); private final String marker; }
apache/sirona
1,149
server/store/cassandra/src/test/java/org/apache/sirona/cassandra/framework/CassandraTestInject.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.sirona.cassandra.framework; 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 CassandraTestInject { String value() default ""; }
apache/sis
1,165
endorsed/src/org.apache.sis.referencing/main/org/apache/sis/coordinate/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. */ /** * Tuple of coordinate values. * Every coordinate tuples and envelopes are associated with a * {@linkplain org.apache.sis.referencing.crs.AbstractCRS Coordinate Reference System}, * which may have an arbitrary number of dimensions. * * @author Martin Desruisseaux (IRD, Geomatys) * @version 1.5 * @since 1.5 */ package org.apache.sis.coordinate;
apache/stratos
1,100
components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/ApplicationInstanceActivatedEventListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.messaging.listener.application; import org.apache.stratos.messaging.listener.EventListener; /** * This listener will get triggered upon the application activated event. */ public abstract class ApplicationInstanceActivatedEventListener extends EventListener { }
apache/stratos
1,128
components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/TopicSubscriber.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.messaging.broker.connect; /** * Topic subscriber interface to be implemented by a transport specific topic subscriber. */ public interface TopicSubscriber extends TopicConnector { /** * Subscribe to a topic with a message listener. */ public abstract void subscribe(); }
apache/streampipes
1,131
streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/pe/runtime/IDataProcessorRuntime.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.extensions.api.pe.runtime; import org.apache.streampipes.extensions.api.pe.IStreamPipesDataProcessor; import org.apache.streampipes.model.graph.DataProcessorInvocation; public interface IDataProcessorRuntime extends IStreamPipesRuntime<IStreamPipesDataProcessor, DataProcessorInvocation> { }
apache/streampipes
1,131
streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/manager/SpSiddhiManager.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.wrapper.siddhi.manager; import io.siddhi.core.SiddhiManager; public enum SpSiddhiManager { INSTANCE; private SiddhiManager siddhiManager; SpSiddhiManager() { this.siddhiManager = new SiddhiManager(); } public SiddhiManager getSiddhiManager() { return siddhiManager; } }
apache/streampipes
1,145
streampipes-model/src/main/java/org/apache/streampipes/model/pipeline/PipelineVerificationResult.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.pipeline; import org.apache.streampipes.model.base.NamedStreamPipesEntity; import java.util.List; public record PipelineVerificationResult(List<ExtendedPipelineElementValidationInfo> validationInfos, List<NamedStreamPipesEntity> modifiedPipelineElements) { }
apache/syncope
1,144
core/persistence-neo4j/src/main/java/org/apache/syncope/core/persistence/neo4j/entity/EntityCacheKey.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.core.persistence.neo4j.entity; import org.apache.syncope.core.spring.security.AuthContextUtils; public record EntityCacheKey(String domain, String entityKey) { public static EntityCacheKey of(final String entityKey) { return new EntityCacheKey(AuthContextUtils.getDomain(), entityKey); } }
apache/tapestry-5
1,125
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/BeanEditorWithFormFragmentDemo.java
// Copyright 2008, 2010 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.integration.app1.pages; import org.apache.tapestry5.annotations.Persist; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.annotations.SetupRender; public class BeanEditorWithFormFragmentDemo { @Persist @Property private Job job; @SetupRender void initJob() { if (job == null) { job = new Job(); } } public static class Job { public String title; public boolean canBeDoneRemotely; public String address; } }
apache/tapestry-5
1,141
tapestry-core/src/test/java/org/apache/tapestry5/integration/activationctx/services/AppModule.java
// Copyright 2013 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.integration.activationctx.services; import org.apache.tapestry5.SymbolConstants; import org.apache.tapestry5.commons.MappedConfiguration; import org.apache.tapestry5.http.TapestryHttpSymbolConstants; /** * */ public class AppModule { public static void contributeApplicationDefaults(MappedConfiguration<String, String> configuration) { configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,fr"); configuration.add(TapestryHttpSymbolConstants.PRODUCTION_MODE, "false"); } }
apache/tez
1,169
tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGAppMasterEventType.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tez.dag.app.dag.event; public enum DAGAppMasterEventType { INTERNAL_ERROR, AM_REBOOT, DAG_FINISHED, TASK_COMMUNICATOR_SERVICE_FATAL_ERROR, CONTAINER_LAUNCHER_SERVICE_FATAL_ERROR, TASK_SCHEDULER_SERVICE_FATAL_ERROR, SCHEDULING_SERVICE_ERROR, NEW_DAG_SUBMITTED, // Indicates a new dag being submitted, to notify sub-components DAG_CLEANUP }
apache/tomcat
1,184
test/org/apache/catalina/realm/TesterRolePrincipal.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.realm; import java.security.Principal; /** * A custom role principal. */ public class TesterRolePrincipal implements Principal { /** * Principal name. */ private final String name; public TesterRolePrincipal(String aName) { name = aName; } @Override public String getName() { return name; } }
apache/tomee
1,149
container/openejb-core/src/test/java/org/apache/openejb/deployment/entity/cmp/ejbql/ALocal.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.deployment.entity.cmp.ejbql; import jakarta.ejb.EJBLocalObject; /** * @version $Revision$ $Date$ */ public interface ALocal extends EJBLocalObject { // CMP public Integer getField1(); public void setField1(Integer field1); public String getField2(); public void setField2(String field2); }
apache/tomee
1,158
container/openejb-core/src/test/java/org/apache/openejb/config/scanning/bean/MyAnnotation.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.config.scanning.bean; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}) public @interface MyAnnotation { }
apache/tomee
1,158
itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/cmp/EncCmpHome.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.test.entity.cmp; public interface EncCmpHome extends jakarta.ejb.EJBHome { public EncCmpObject create(String name) throws jakarta.ejb.CreateException, java.rmi.RemoteException; public EncCmpObject findByPrimaryKey(Integer primarykey) throws jakarta.ejb.FinderException, java.rmi.RemoteException; }
apache/tomee
1,166
itests/trimmedBeans/src/main/java/org/apache/tomee/itests/trimmedbeans/BeanB.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tomee.itests.trimmedbeans; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; /** * A bean without a bean defining annotation -> should not be found */ @ApplicationScoped public class BeanB { private @Inject BeanA beanA; public int getMeaningOfLife() { return beanA.getMeaningOfLife(); } }
apache/trafodion
1,139
core/conn/trafci/src/main/java/org/trafodion/ci/ParserMissingParamException.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 ParserMissingParamException extends Exception { /** * */ private static final long serialVersionUID = 6253398014500719153L; ParserMissingParamException() { } ParserMissingParamException(String msg) { super(msg); } }
apache/tsfile
1,158
java/tsfile/src/main/java/org/apache/tsfile/exception/NotCompatibleTsFileException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.tsfile.exception; public class NotCompatibleTsFileException extends TsFileRuntimeException { private static final long serialVersionUID = -3765109817887078265L; public NotCompatibleTsFileException(String message) { super(message); } public NotCompatibleTsFileException(Throwable cause) { super(cause); } }
apache/tsfile
1,160
java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/DoubleRLBEDecoder.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.tsfile.encoding.decoder; import java.nio.ByteBuffer; public class DoubleRLBEDecoder extends LongRLBEDecoder { /** constructor of DoubleRLBEDecoder */ public DoubleRLBEDecoder() { super(); } @Override public double readDouble(ByteBuffer buffer) { return Double.longBitsToDouble(super.readLong(buffer)); } }
apache/twill
1,165
twill-core/src/main/java/org/apache/twill/kafka/client/FetchedMessage.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.twill.kafka.client; import java.nio.ByteBuffer; /** * */ public interface FetchedMessage { TopicPartition getTopicPartition(); ByteBuffer getPayload(); /** * Returns the offset for the current message. */ long getOffset(); /** * Returns the offset for the next message to be read. */ long getNextOffset(); }
apache/uniffle
1,157
server/src/main/java/org/apache/uniffle/server/storage/hybrid/StorageManagerSelector.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.uniffle.server.storage.hybrid; import org.apache.uniffle.server.ShuffleDataFlushEvent; import org.apache.uniffle.server.storage.StorageManager; public interface StorageManagerSelector { StorageManager select(ShuffleDataFlushEvent flushEvent); enum ColdStoragePreferredFactor { HUGE_EVENT, OWNED_BY_HUGE_PARTITION, } }
apache/usergrid
1,110
stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/AllUniqueFieldsIterator.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.usergrid.persistence.collection.serialization.impl; import com.datastax.driver.core.Row; import com.datastax.driver.core.Session; import com.datastax.driver.core.Statement; import org.apache.usergrid.persistence.collection.serialization.UniqueValue; import java.util.Iterator;
apache/xmlgraphics-batik
1,145
batik-svggen/src/main/java/org/apache/batik/svggen/font/table/LookupSubtableFactory.java
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.batik.svggen.font.table; import java.io.IOException; import java.io.RandomAccessFile; /** * * @author <a href="mailto:david@steadystate.co.uk">David Schweinsberg</a> * @version $Id$ */ public interface LookupSubtableFactory { LookupSubtable read(int type, RandomAccessFile raf, int offset) throws IOException; }
google/binnavi
1,151
src/main/java/com/google/security/zynamics/zylib/gui/scripting/ScriptingLanguage.java
// Copyright 2011-2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.zylib.gui.scripting; public class ScriptingLanguage implements Comparable<ScriptingLanguage> { private final String name; private final String version; public ScriptingLanguage(final String name, final String version) { this.name = name; this.version = version; } @Override public int compareTo(final ScriptingLanguage event) { return name.compareTo(event.name); } public String getName() { return name; } @Override public String toString() { return name + " " + version; } }
google/caliper
1,155
caliper-runner/src/main/java/com/google/caliper/runner/experiment/BenchmarkParameters.java
/* * Copyright (C) 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.caliper.runner.experiment; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; import javax.inject.Qualifier; /** Binding annotation for the parameters applied to a benchmark. */ @Retention(RUNTIME) @Target({FIELD, PARAMETER, METHOD}) @Qualifier public @interface BenchmarkParameters {}
google/caliper
1,169
caliper-api/src/main/java/com/google/caliper/api/SkipThisScenarioException.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. */ package com.google.caliper.api; /** * Throw this exception from your benchmark class's setUp method, or benchmark method to indicate * that the combination of parameters supplied should not be benchmarked. For example, while you * might want to test <i>most</i> combinations of the parameters {@code size} and {@code * comparator}, you might not want to test the specific combination of {@code size=100000000} and * {@code comparator=reallyExpensiveComparator}. */ @SuppressWarnings("serial") public final class SkipThisScenarioException extends RuntimeException {}
google/cel-java
1,173
common/src/main/java/dev/cel/common/navigation/TraversalOrder.java
// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // 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.navigation; import dev.cel.common.ast.CelExpr.CelComprehension; /** * Specifies the traversal order of AST navigation. * * <p>For call expressions, the target is visited before its arguments. * * <p>For comprehensions, the visiting order is as follows: * * <ol> * <li>{@link CelComprehension#iterRange} * <li>{@link CelComprehension#accuInit} * <li>{@link CelComprehension#loopCondition} * <li>{@link CelComprehension#loopStep} * <li>{@link CelComprehension#result} * </ol> */ public enum TraversalOrder { PRE_ORDER, POST_ORDER }
google/compile-testing
1,163
src/main/java/com/google/testing/compile/JavaFileObjectSubjectFactory.java
/* * Copyright (C) 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.testing.compile; import com.google.common.truth.FailureMetadata; import com.google.common.truth.Subject; import javax.tools.JavaFileObject; import org.jspecify.annotations.Nullable; /** A factory for {@link JavaFileObjectSubject}s. */ final class JavaFileObjectSubjectFactory implements Subject.Factory<JavaFileObjectSubject, JavaFileObject> { @Override public JavaFileObjectSubject createSubject( FailureMetadata failureMetadata, @Nullable JavaFileObject that) { return new JavaFileObjectSubject(failureMetadata, that); } }
google/error-prone
1,127
core/src/test/java/com/google/errorprone/refaster/testdata/template/MultipleReferencesToIdentifierTemplate.java
/* * Copyright 2014 The Error Prone Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package com.google.errorprone.refaster.testdata.template; import com.google.errorprone.refaster.annotation.AfterTemplate; import com.google.errorprone.refaster.annotation.BeforeTemplate; /** * Refaster template referring to a single identifier multiple times. * * @author lowasser@google.com (Louis Wasserman) */ public class MultipleReferencesToIdentifierTemplate { @BeforeTemplate public boolean orSelf(boolean a) { return a || a; } @AfterTemplate public boolean identity(boolean a) { return a; } }
google/error-prone
1,151
core/src/test/java/com/google/errorprone/refaster/testdata/template/ArrayTemplate.java
/* * Copyright 2014 The Error Prone Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package com.google.errorprone.refaster.testdata.template; import com.google.errorprone.refaster.annotation.AfterTemplate; import com.google.errorprone.refaster.annotation.BeforeTemplate; import java.util.List; /** * Example Refaster template using array syntax. * * @author mdempsky@google.com (Matthew Dempsky) */ public class ArrayTemplate { @BeforeTemplate public String before(List<String> e, int i) { return e.get(i); } @AfterTemplate public String after(List<String> e, int i) { return e.toArray(new String[0])[i]; } }
google/ExoPlayer
1,160
library/core/src/main/java/com/google/android/exoplayer2/drm/KeysExpiredException.java
/* * Copyright (C) 2016 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 com.google.android.exoplayer2.drm; /** * Thrown when the drm keys loaded into an open session expire. * * @deprecated com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which * contains the same ExoPlayer code). See <a * href="https://developer.android.com/guide/topics/media/media3/getting-started/migration-guide">the * migration guide</a> for more details, including a script to help with the migration. */ @Deprecated public final class KeysExpiredException extends Exception {}
google/flatbuffers
1,200
tests/MyGame/Example/StatT.java
// automatically generated by the FlatBuffers compiler, do not modify package MyGame.Example; import com.google.flatbuffers.BaseVector; import com.google.flatbuffers.BooleanVector; import com.google.flatbuffers.ByteVector; import com.google.flatbuffers.Constants; import com.google.flatbuffers.DoubleVector; import com.google.flatbuffers.FlatBufferBuilder; import com.google.flatbuffers.FloatVector; import com.google.flatbuffers.IntVector; import com.google.flatbuffers.LongVector; import com.google.flatbuffers.ShortVector; import com.google.flatbuffers.StringVector; import com.google.flatbuffers.Struct; import com.google.flatbuffers.Table; import com.google.flatbuffers.UnionVector; import java.nio.ByteBuffer; import java.nio.ByteOrder; public class StatT { private String id; private long val; private int count; public String getId() { return id; } public void setId(String id) { this.id = id; } public long getVal() { return val; } public void setVal(long val) { this.val = val; } public int getCount() { return count; } public void setCount(int count) { this.count = count; } public StatT() { this.id = null; this.val = 0L; this.count = 0; } }
google/graphicsfuzz
1,157
ast/src/main/java/com/graphicsfuzz/common/util/GlslParserException.java
/* * Copyright 2019 The GraphicsFuzz Project Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.graphicsfuzz.common.util; import com.graphicsfuzz.parser.GLSLParser; public class GlslParserException extends Exception { private final GLSLParser parser; public GlslParserException(GLSLParser parser) { this.parser = parser; } /** * Provides access to the parser instance that failed to parse the GLSL shader. * @return Parser instance. */ public GLSLParser getParser() { return parser; } @Override public String getMessage() { return "Syntax errors occurred during parsing."; } }
google/guava
1,176
android/guava/src/com/google/common/util/concurrent/package-info.java
/* * Copyright (C) 2007 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ /** * Concurrency utilities. * * <p>Commonly used types include {@link ClosingFuture}, {@link ListenableFuture}, and {@link * Service}. * * <p>Commonly used utilities include {@link Futures}, {@link MoreExecutors}, {@link * ThreadFactoryBuilder}, and {@link Uninterruptibles}. * * <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a> * library. */ @CheckReturnValue @NullMarked package com.google.common.util.concurrent; import com.google.errorprone.annotations.CheckReturnValue; import org.jspecify.annotations.NullMarked;
google/j2cl
1,139
transpiler/javatests/com/google/j2cl/integration/java/allsimplebridges/Tester473.java
/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package allsimplebridges; import static com.google.j2cl.integration.testing.Asserts.assertTrue; import jsinterop.annotations.JsType; public class Tester473 { @JsType static class C1 { C1() {} public String get(Object value) { return "C1.get"; } } static class C2 extends C1 { C2() {} public String get(String value) { return "C2.get"; } } public static void test() { C2 s = new C2(); assertTrue(s.get("").equals("C2.get")); assertTrue(((C1) s).get("").equals("C1.get")); } }
google/tsunami-security-scanner-plugins
1,117
google/portscan/nmap/src/main/java/com/google/tsunami/plugins/portscan/nmap/client/result/Cpe.java
/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.tsunami.plugins.portscan.nmap.client.result; import com.google.auto.value.AutoValue; /** Cpe element of nmap XML result. */ @AutoValue public abstract class Cpe { public abstract String value(); public abstract Builder toBuilder(); public static Builder builder() { return new AutoValue_Cpe.Builder(); } /** Builder for {@link Cpe}. */ @AutoValue.Builder public abstract static class Builder { public abstract Builder setValue(String value); public abstract Cpe build(); } }
googleapis/google-cloud-java
1,049
java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1/src/main/java/com/google/cloud/commerce/consumer/procurement/v1/PlaceOrderMetadataOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/commerce/consumer/procurement/v1/procurement_service.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.commerce.consumer.procurement.v1; public interface PlaceOrderMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata) com.google.protobuf.MessageOrBuilder {}
googleapis/sdk-platform-java
1,151
java-core/google-cloud-core/src/main/java/com/google/cloud/ServiceFactory.java
/* * Copyright 2015 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.cloud; /** * A base interface for all service factories. * * <p>Implementation must provide a public no-arg constructor. Loading of a factory implementation * is done via {@link java.util.ServiceLoader}. * * @param <ServiceT> the service subclass * @param <ServiceOptionsT> the {@code ServiceOptions} subclass corresponding to the service */ @SuppressWarnings("rawtypes") public interface ServiceFactory<ServiceT extends Service, ServiceOptionsT extends ServiceOptions> { ServiceT create(ServiceOptionsT serviceOptions); }
hibernate/hibernate-orm
1,073
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/callbacks/xml/complete/LineItem.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.jpa.callbacks.xml.complete; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; /** * @author Steve Ebersole */ @Entity public class LineItem extends LineItemSuper { @Id private Integer id; @ManyToOne @JoinColumn(name = "order_fk") private Order order; @ManyToOne @JoinColumn(name = "product_fk") private Product product; public LineItem() { } public LineItem(Integer id, Order order, Product product, int quantity) { super( quantity ); this.id = id; this.order = order; this.product = product; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Order getOrder() { return order; } public void setOrder(Order order) { this.order = order; } public Product getProduct() { return product; } public void setProduct(Product product) { this.product = product; } }
hibernate/hibernate-orm
1,084
hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/mutable/TestEntity.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.bytecode.enhancement.mutable; import java.util.Date; import java.util.HashMap; import java.util.Map; import jakarta.persistence.Basic; import jakarta.persistence.Column; import jakarta.persistence.Convert; import jakarta.persistence.Entity; import jakarta.persistence.Id; import jakarta.persistence.Temporal; import jakarta.persistence.TemporalType; @Entity public class TestEntity { @Id private Long id; @Temporal(TemporalType.TIMESTAMP) @Column(name = "t_date") private Date date; @Basic @Column(name = "TEXTS") @Convert(converter = MapStringConverter.class) private Map<String, String> texts = new HashMap<>(); public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Date getDate() { return date; } public void setDate(Date date) { this.date = date; } public Map<String, String> getTexts() { return texts; } public void setTexts(Map<String, String> texts) { this.texts = texts; } }
hibernate/hibernate-orm
1,093
hibernate-core/src/main/java/org/hibernate/dialect/function/array/OracleArrayConcatFunction.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.dialect.function.array; import java.util.List; import org.hibernate.metamodel.mapping.JdbcMappingContainer; import org.hibernate.metamodel.model.domain.ReturnableType; import org.hibernate.sql.ast.SqlAstTranslator; import org.hibernate.sql.ast.spi.SqlAppender; import org.hibernate.sql.ast.tree.SqlAstNode; /** * Oracle concatenation function for arrays. */ public class OracleArrayConcatFunction extends ArrayConcatFunction { public OracleArrayConcatFunction() { super( "(", ",", ")" ); } @Override public void render( SqlAppender sqlAppender, List<? extends SqlAstNode> sqlAstArguments, ReturnableType<?> returnType, SqlAstTranslator<?> walker) { final String arrayTypeName = DdlTypeHelper.getTypeName( (JdbcMappingContainer) returnType, walker.getSessionFactory().getTypeConfiguration() ); sqlAppender.append( arrayTypeName ); sqlAppender.append( "_concat" ); super.render( sqlAppender, sqlAstArguments, returnType, walker ); } }
hibernate/hibernate-orm
1,095
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/embeddable/SimpleEntity.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.processor.test.embeddable; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import jakarta.persistence.Embedded; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; /** * @author Chris Cranford */ @Entity public class SimpleEntity { @Id @GeneratedValue private Integer id; @NotNullAllowed @Embedded private SimpleEmbeddable simpleEmbeddable; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public SimpleEmbeddable getSimpleEmbeddable() { return simpleEmbeddable; } public void setSimpleEmbeddable(SimpleEmbeddable simpleEmbeddable) { this.simpleEmbeddable = simpleEmbeddable; } // represents a mock TYPE_USE based annotation @Target({ ElementType.TYPE_USE }) @Retention(RetentionPolicy.RUNTIME) public @interface NotNullAllowed { } }
hibernate/hibernate-orm
1,119
hibernate-testing/src/main/java/org/hibernate/testing/orm/junit/SessionFactoryParameterResolver.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.testing.orm.junit; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.api.extension.ParameterContext; import org.junit.jupiter.api.extension.ParameterResolutionException; import org.junit.jupiter.api.extension.ParameterResolver; /** * @author Steve Ebersole */ public class SessionFactoryParameterResolver implements ParameterResolver { @Override public boolean supportsParameter( ParameterContext parameterContext, ExtensionContext extensionContext) throws ParameterResolutionException { return JUnitHelper.supportsParameterInjection( parameterContext, SessionFactoryImplementor.class ); } @Override public Object resolveParameter( ParameterContext parameterContext, ExtensionContext extensionContext) throws ParameterResolutionException { return SessionFactoryExtension.findSessionFactoryScope( extensionContext.getRequiredTestInstance(), extensionContext ).getSessionFactory(); } }
hibernate/hibernate-search
1,075
metamodel/metamodel-processor/src/main/java/org/hibernate/search/processor/annotation/processing/impl/ProcessorTypeMappingAnnotationProcessor.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.processor.annotation.processing.impl; import java.util.Optional; import javax.lang.model.element.AnnotationMirror; import javax.lang.model.element.Element; import javax.lang.model.element.Name; import javax.lang.model.element.TypeElement; import org.hibernate.search.mapper.pojo.mapping.definition.programmatic.TypeMappingStep; public interface ProcessorTypeMappingAnnotationProcessor { static Optional<ProcessorTypeMappingAnnotationProcessor> processor(AnnotationMirror annotation) { Name qualifiedName = ( (TypeElement) annotation.getAnnotationType().asElement() ).getQualifiedName(); if ( qualifiedName.contentEquals( "org.hibernate.search.mapper.pojo.bridge.builtin.annotation.GeoPointBinding" ) ) { return Optional.of( new ProcessorGeoPointBindingProcessor() ); } return Optional.empty(); } void process(TypeMappingStep mapping, AnnotationMirror annotation, Element element, ProcessorAnnotationProcessorContext context); }
hibernate/hibernate-search
1,090
mapper/pojo-base/src/main/java/org/hibernate/search/mapper/pojo/extractor/builtin/impl/OptionalValueExtractor.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.mapper.pojo.extractor.builtin.impl; import java.util.Optional; import org.hibernate.search.mapper.pojo.extractor.ContainerExtractionContext; import org.hibernate.search.mapper.pojo.extractor.ContainerExtractor; import org.hibernate.search.mapper.pojo.extractor.ValueProcessor; import org.hibernate.search.mapper.pojo.extractor.builtin.BuiltinContainerExtractors; public class OptionalValueExtractor<T> implements ContainerExtractor<Optional<T>, T> { @Override public String toString() { return BuiltinContainerExtractors.OPTIONAL; } @Override public <T1, C2> void extract(Optional<T> container, ValueProcessor<T1, ? super T, C2> perValueProcessor, T1 target, C2 context, ContainerExtractionContext extractionContext) { if ( container == null ) { return; } if ( container.isPresent() ) { perValueProcessor.process( target, container.get(), context, extractionContext ); } } @Override public boolean multiValued() { return false; } }
hibernate/hibernate-search
1,111
engine/src/main/java/org/hibernate/search/engine/search/projection/dsl/impl/FieldProjectionOptionsStepImpl.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.engine.search.projection.dsl.impl; import org.hibernate.search.engine.search.projection.ProjectionCollector; import org.hibernate.search.engine.search.projection.SearchProjection; import org.hibernate.search.engine.search.projection.dsl.FieldProjectionOptionsStep; import org.hibernate.search.engine.search.projection.spi.FieldProjectionBuilder; public class FieldProjectionOptionsStepImpl<T, P> implements FieldProjectionOptionsStep<FieldProjectionOptionsStepImpl<T, P>, P> { protected final FieldProjectionBuilder<T> fieldProjectionBuilder; private final ProjectionCollector.Provider<T, P> collectorProvider; FieldProjectionOptionsStepImpl(FieldProjectionBuilder<T> fieldProjectionBuilder, ProjectionCollector.Provider<T, P> collectorProvider) { this.fieldProjectionBuilder = fieldProjectionBuilder; this.collectorProvider = collectorProvider; } @Override public SearchProjection<P> toProjection() { return fieldProjectionBuilder.build( collectorProvider ); } }
openjdk/jdk8
1,182
langtools/test/tools/javac/diags/examples/InnerClassCantHaveStatic.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.icls.cant.have.static.decl class InnerClassCantHaveStatic { class Inner { static int i; } }
openjdk/jdk8
1,184
langtools/test/com/sun/javadoc/testProfiles/pkg2/ClassException.java
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package pkg2; /** * Simple exception class. * * @author Evgeniya Stepanova */ public class ClassException extends Exception {}
openjdk/jdk8
1,187
langtools/test/tools/javac/diags/examples/NotAllowedVariable.java
/* * Copyright (c) 2012, 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.variable.not.allowed class NotAllowedVariable { void t1() { if (true) int x = 0; } }
openjdk/jdk8
1,190
langtools/test/tools/javac/diags/examples/NotWithinBounds.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.not.within.bounds class NotWithinBounds { static class Foo<X extends Number> { } Foo<String> f1 = null; }
openjdk/jdk8
1,191
langtools/test/tools/javac/ClassLiterals/p1/SuperClass.java
/* * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * Auxiliary file for ClassLiteralHelperContext test. * (4106051) */ package p1; public class SuperClass { Class c = C.class; }
openjdk/jdk8
1,192
langtools/test/com/sun/javadoc/testIndex/pkg/Coin.java
/* * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package pkg; /** * This is a sample Enum. * * @author Jamie Ho */ public enum Coin { Penny, Nickel, Dime; public Coin(int i) {} }
oracle/coherence
1,160
prj/test/functional/security/src/main/java/security/SubjectCacheServer.java
/* * Copyright (c) 2000, 2022, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * https://oss.oracle.com/licenses/upl. */ package security; import com.tangosol.net.DefaultCacheServer; import com.oracle.coherence.testing.TestHelper; import java.security.PrivilegedExceptionAction; import javax.security.auth.Subject; /** * This class runs an instance of {@link DefaultCacheServer} * wrapped in a <code>java.security.PrivilegedExceptionAction</code> with a * specific <code>javax.security.auth.Subject</code>. * * @author dag 2010.02.23 */ public class SubjectCacheServer { // ----- static methods ------------------------------------------------- public static void main(final String[] args) throws Exception { Subject.doAs(TestHelper.SUBJECT_ADMIN, new PrivilegedExceptionAction() { public Object run() throws Exception { DefaultCacheServer.main(args); return null; } }); } }
oracle/graalvm-reachability-metadata
1,048
tests/src/com.fasterxml.jackson.core/jackson-databind/2.15.2/src/test/java/com_fasterxml_jackson_core/jackson_databind/JacksonConstructorPropertiesTest.java
/* * Copyright and related rights waived via CC0 * * You should have received a copy of the CC0 legalcode along with this * work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. */ package com_fasterxml_jackson_core.jackson_databind; import java.beans.ConstructorProperties; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; class JacksonConstructorPropertiesTest { static final ObjectMapper mapper = new ObjectMapper(); @Test void deserializeConstructorProperties() throws JsonProcessingException { Foo foo = mapper.readValue("{ \"bar\": \"baz\" }", Foo.class); assertThat(foo.getBar()).isEqualTo("baz"); } static class Foo { private String bar; @ConstructorProperties("bar") Foo(String bar) { this.bar = bar; } String getBar() { return bar; } } }
oracle/oci-java-sdk
1,178
bmc-encryption/src/main/java/com/oracle/bmc/encryption/MasterKey.java
/** * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ package com.oracle.bmc.encryption; import com.oracle.bmc.encryption.internal.CryptoAlgorithm; import com.oracle.bmc.encryption.internal.DataKey; /** Represents a MasterKey used to encrypt/decrypt Data Key. */ public interface MasterKey { /** * Generates a data encryption key (DEK) based on the algorithm provided using this MasterKey. * The returned DataKey includes a copy of the DEK encrypted under this MasterKey. * * @param cryptoAlgorithm * @return DataKey */ DataKey generateDataEncryptionKey(CryptoAlgorithm cryptoAlgorithm); /** * Decrypts and returns data key that was encrypted under this master key. * * @param encryptedDataKey * @param masterKeyId * @return Decrypted data key */ String decryptDataKey(String encryptedDataKey, String masterKeyId); }
apache/commons-rdf
1,167
commons-rdf-rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTriple.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.rdf.rdf4j; import org.apache.commons.rdf.api.Triple; /** * Marker interface for RDF4J implementations of Triple. * * @see RDF4J#createTriple(org.apache.commons.rdf.api.BlankNodeOrIRI, * org.apache.commons.rdf.api.IRI, org.apache.commons.rdf.api.RDFTerm) */ public interface RDF4JTriple extends Triple, RDF4JTripleLike { }
apache/ctakes
1,157
ctakes-ytex-uima/src/main/java/org/apache/ctakes/ytex/uima/dao/NamedEntityRegexDao.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.ctakes.ytex.uima.dao; import org.apache.ctakes.ytex.uima.model.NamedEntityRegex; import java.util.List; /** * Dao to access NamedEntity Regular Expressions used by the NamedEntityRegexAnnotator * @author vijay * */ public interface NamedEntityRegexDao { public abstract List<NamedEntityRegex> getNamedEntityRegexs(); }
apache/ctakes
1,162
ctakes-tiny-rest/src/main/java/org/apache/ctakes/rest/filter/CORSFilter.java
package org.apache.ctakes.rest.filter; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.web.filter.OncePerRequestFilter; import java.io.IOException; public class CORSFilter extends OncePerRequestFilter { private static final Log log = LogFactory.getLog( CORSFilter.class ); @Override protected void doFilterInternal( jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain ) throws jakarta.servlet.ServletException, IOException { log.debug( "Invoking CORS filter" ); response.addHeader( "Access-Control-Allow-Origin", "*" ); if ( request.getHeader( "Access-Control-Request-Method" ) != null && "OPTIONS".equals( request.getMethod() ) ) { response.addHeader( "Access-Control-Allow-Methods", "GET, POST, PUT, DELETE" ); response.addHeader( "Access-Control-Allow-Headers", "Content-Type" ); } filterChain.doFilter( request, response ); log.debug( "Exiting CORS filter" ); } }
apache/cxf
1,172
testutils/src/main/java/org/apache/cxf/customer/bare/GetCustomer.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.customer.bare; import jakarta.xml.bind.annotation.XmlRootElement; import jakarta.xml.bind.annotation.XmlType; @XmlRootElement(name = "GetCustomer") @XmlType(name = "GetCustomer") public class GetCustomer { private long id; public long getId() { return id; } public void setId(long id) { this.id = id; } }
apache/cxf
1,173
rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ResponseStatus.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.jaxrs.ext; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import jakarta.ws.rs.core.Response; @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD }) public @interface ResponseStatus { Response.Status[] value(); }
apache/deltaspike
1,132
deltaspike/examples/jsf-examples/src/main/java/org/apache/deltaspike/example/scope/RequestScopedBean.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.deltaspike.example.scope; import jakarta.annotation.PostConstruct; import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Named; /** * */ @Named @RequestScoped public class RequestScopedBean extends ScopedBean { @PostConstruct public void init() { super.init(); } }
apache/directory-fortress-core
1,158
src/test/java/org/apache/directory/fortress/core/impl/MyAnnotation.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.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.directory.fortress.core.impl; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @Retention(RetentionPolicy.RUNTIME) //@Target(ElementType.FIELD) //@Target(ElementType.TYPE) public @interface MyAnnotation { public String name(); public String value(); }
apache/directory-kerby
1,143
kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/message/AdminRep.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.kerberos.kerb.admin.message; /** * Use to construct Admin message. * Probably two kinds of reply. * add principal -- AdRep * change password? -- chRep */ public class AdminRep extends AdminMessage { public AdminRep(AdminMessageType messageType) { super(messageType); } }
apache/directory-server
1,159
protocol-dns/src/main/java/org/apache/directory/server/dns/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 the entry point to an instance of the * {@link org.apache.directory.server.dns.DnsServer}, * as well as support for configuration and the root * of the exception hierarchy. * * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> */ package org.apache.directory.server.dns;
apache/distributedlog
1,154
distributedlog-core/src/main/java/org/apache/distributedlog/feature/CoreFeatureKeys.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.distributedlog.feature; /** * List of feature keys used by distributedlog core. */ public enum CoreFeatureKeys { // @Deprecated: bkc features are managed by bookkeeper prefixed with a scope DISABLE_DURABILITY_ENFORCEMENT, // disabling logsegment rolling DISABLE_LOGSEGMENT_ROLLING, DISABLE_WRITE_LIMIT, }
apache/dolphinscheduler
1,138
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/model/Server.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.common.model; import java.util.Date; import lombok.Data; @Data public class Server { private int id; private String host; private int port; private String serverDirectory; private String heartBeatInfo; private Date createTime; private Date lastHeartbeatTime; }
apache/druid
1,168
processing/src/main/java/org/apache/druid/timeline/partition/ShardSpecLookup.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.druid.timeline.partition; import org.apache.druid.data.input.InputRow; public interface ShardSpecLookup { /** * Returns a {@link ShardSpec} for the given timestamp and the inputRow. * The timestamp must be bucketed using {@code GranularitySpec#getQueryGranularity}. */ ShardSpec getShardSpec(long timestamp, InputRow row); }
apache/druid
1,172
sql/src/main/java/org/apache/druid/sql/destination/IngestDestination.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.druid.sql.destination; import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.apache.druid.guice.annotations.UnstableApi; /** * Represents the destination where the data is ingested. */ @UnstableApi @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") public interface IngestDestination { String getDestinationName(); }
apache/dubbo
1,122
dubbo-plugin/dubbo-filter-validation/src/test/java/org/apache/dubbo/validation/support/jvalidation/mock/ValidationParameter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.validation.support.jvalidation.mock; import javax.validation.constraints.NotNull; public class ValidationParameter { @NotNull private String parameter; public ValidationParameter() {} public ValidationParameter(String parameter) { this.parameter = parameter; } }
apache/eagle
1,139
eagle-core/eagle-query/eagle-query-base/src/main/java/org/apache/eagle/query/aggregate/timeseries/Aggregator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eagle.query.aggregate.timeseries; import org.apache.eagle.log.base.taggedlog.TaggedLogAPIEntity; public interface Aggregator { /** * Accumulate callback * * @param entity accumulated entity instance * @throws Exception */ void accumulate(TaggedLogAPIEntity entity) throws Exception; }
apache/eagle
1,140
eagle-jpm/eagle-jpm-aggregation/src/main/java/org/apache/eagle/jpm/aggregation/AggregationApplicationProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eagle.jpm.aggregation; import org.apache.eagle.app.spi.AbstractApplicationProvider; public class AggregationApplicationProvider extends AbstractApplicationProvider<AggregationApplication> { @Override public AggregationApplication getApplication() { return new AggregationApplication(); } }
apache/eventmesh
1,103
eventmesh-connectors/eventmesh-connector-wecom/src/main/java/org/apache/eventmesh/connector/wecom/sink/connector/SendMessageResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eventmesh.connector.wecom.sink.connector; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; @Data public class SendMessageResponse { @JsonProperty("errcode") private int errorCode; @JsonProperty("errmsg") private String errorMessage; }
apache/eventmesh
1,138
eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/dingtalk/DingDingSinkConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eventmesh.common.config.connector.dingtalk; import org.apache.eventmesh.common.config.connector.SinkConfig; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) public class DingDingSinkConfig extends SinkConfig { private SinkConnectorConfig sinkConnectorConfig; }
apache/eventmesh
1,142
eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/PubSubConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eventmesh.common.config.connector; import lombok.Data; @Data public class PubSubConfig { private String meshAddress; private String subject; private String idc; private String env; private String group; private String appId; private String userName; private String passWord; }
apache/falcon
1,134
falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/GraphEntity.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.falcon.regression.core.response.lineage; import com.google.gson.annotations.SerializedName; /** Abstract class for graph entities. */ public abstract class GraphEntity { @SerializedName("_type") protected NODE_TYPE nodeType; public NODE_TYPE getNodeType() { return nodeType; } }
apache/falcon
1,136
falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/GraphResult.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.falcon.regression.core.response.lineage; import java.util.List; /** Abstract class for representing a result of lineage api call.*/ public abstract class GraphResult { protected int totalSize; public int getTotalSize() { return totalSize; } public abstract List<?> getResults(); }
apache/felix-dev
1,079
ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-test/src/main/java/org/apache/felix/ipojo/runtime/core/services/FooService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.ipojo.runtime.core.services; import java.util.Properties; public interface FooService { boolean foo(); Properties fooProps(); Boolean getObject(); boolean getBoolean(); int getInt(); long getLong(); double getDouble(); }
apache/felix-dev
1,083
ipojo/runtime/core-it/ipojo-core-service-dependency-policies/src/main/java/org/apache/felix/ipojo/runtime/core/test/services/FooService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.ipojo.runtime.core.test.services; import java.util.Properties; public interface FooService { boolean foo(); Properties fooProps(); Boolean getObject(); boolean getBoolean(); int getInt(); long getLong(); double getDouble(); }
apache/felix-dev
1,094
ipojo/runtime/core-it/ipojo-core-external-handlers-test/src/main/java/org/apache/felix/ipojo/runtime/externalhandlers/services/CheckService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.ipojo.runtime.externalhandlers.services; import java.util.Dictionary; import java.util.Properties; public interface CheckService { public static final String foo = "foo"; public boolean check(); public Dictionary<String, Object> getProps(); }
apache/felix-dev
1,098
dependencymanager/org.apache.felix.dependencymanager.runtime.itest/src/org/apache/felix/dm/runtime/itest/tests/CompositeAnnotationsParallelTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.dm.runtime.itest.tests; /** * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> */ public class CompositeAnnotationsParallelTest extends CompositeAnnotationsTest { public CompositeAnnotationsParallelTest() { setParallel(); } }
apache/felix-dev
1,147
bundlerepository/src/main/java/org/apache/felix/bundlerepository/Property.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.felix.bundlerepository; public interface Property { String VERSION = "version"; String URL = "url"; String URI = "uri"; String LONG = "long"; String DOUBLE = "double"; String SET = "set"; String getName(); String getType(); String getValue(); Object getConvertedValue(); }
apache/fineract
1,115
fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationReadPlatformService.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fineract.infrastructure.event.external.service; import org.apache.fineract.infrastructure.event.external.data.ExternalEventConfigurationResponse; public interface ExternalEventConfigurationReadPlatformService { ExternalEventConfigurationResponse findAllExternalEventConfigurations(); }
apache/fineract
1,136
fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/S3CredentialsData.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fineract.infrastructure.configuration.data; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @Data @NoArgsConstructor @Accessors(chain = true) public class S3CredentialsData { private String bucketName; private String accessKey; private String secretKey; }
apache/flink-kubernetes-operator
1,151
flink-autoscaler/src/main/java/org/apache/flink/autoscaler/metrics/Edge.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.autoscaler.metrics; import org.apache.flink.runtime.jobgraph.JobVertexID; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; /** Collected scaling metrics. */ @Data @NoArgsConstructor @AllArgsConstructor public class Edge { private JobVertexID from; private JobVertexID to; }
apache/flink
1,161
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/EmptyRequestBody.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.runtime.rest.messages; /** Request which do not have a request payload. */ public class EmptyRequestBody implements RequestBody { private static final EmptyRequestBody INSTANCE = new EmptyRequestBody(); private EmptyRequestBody() {} public static EmptyRequestBody getInstance() { return INSTANCE; } }
apache/fory
1,172
java/fory-core/src/main/java/org/apache/fory/exception/CopyException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fory.exception; /** Exception thrown when a copy operation fails. */ public class CopyException extends ForyException { public CopyException(String message) { super(message); } public CopyException(Throwable cause) { super(cause); } public CopyException(String message, Throwable cause) { super(message, cause); } }