repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/nifi
1,074
nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/remote/exception/RequestExpiredException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.remote.exception; /** * Used to indicate that by the time the request was serviced, it had already * expired */ public class RequestExpiredException extends Exception { private static final long serialVersionUID = -7037025330562827852L; }
apache/oodt
1,125
cli/src/main/java/org/apache/oodt/cas/cli/action/store/CmdLineActionStore.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.oodt.cas.cli.action.store; import org.apache.oodt.cas.cli.action.CmdLineAction; import java.util.Set; /** * Storage for loading supported {@link CmdLineAction}s. * * @author bfoster (Brian Foster) */ public interface CmdLineActionStore { Set<CmdLineAction> loadSupportedActions() ; }
apache/openjpa
1,098
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Cat2.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.persistence.delimited.identifiers; import jakarta.persistence.DiscriminatorValue; import jakarta.persistence.Entity; @Entity @DiscriminatorValue("Cat") public class Cat2 extends Animal2 { public Cat2() {} public Cat2(int id) { super(id); } }
apache/openjpa
1,098
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Dog2.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.persistence.delimited.identifiers; import jakarta.persistence.DiscriminatorValue; import jakarta.persistence.Entity; @Entity @DiscriminatorValue("Dog") public class Dog2 extends Animal2 { public Dog2() {} public Dog2(int id) { super(id); } }
apache/openjpa
1,102
openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/validation/XMLSuper.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.integration.validation; public class XMLSuper { private String superStrValue; public void setSuperStrValue(String superStrValue) { this.superStrValue = superStrValue; } public String getSuperStrValue() { return superStrValue; } }
apache/openjpa
1,105
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/company/IPerson.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.persistence.models.company; public interface IPerson { void setFirstName(String firstName); String getFirstName(); void setLastName(String lastName); String getLastName(); void setHomeAddress(IAddress homeAddress); IAddress getHomeAddress(); }
apache/openjpa
1,119
openjpa-kernel/src/main/java/org/apache/openjpa/datacache/ExpirationListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.datacache; /** * An entity that wishes to be notified when cache keys expire. * * @author Abe White * @since 0.3.0 */ public interface ExpirationListener { /** * Notification that an object has expired from the cache. */ void onExpire(ExpirationEvent event); }
apache/openjpa
1,121
openjpa-lib/src/test/java/org/apache/openjpa/lib/rop/TestWindowResultList.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.lib.rop; /** * Tests the {@link WindowResultList}. * * @author Abe White */ public class TestWindowResultList extends ResultListTest { @Override protected ResultList getResultList(ResultObjectProvider provider) { return new WindowResultList(provider, 10); } }
apache/openmeetings
1,088
openmeetings-web/src/main/java/org/apache/openmeetings/web/user/dashboard/WelcomeWidgetDescriptor.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License") + you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openmeetings.web.user.dashboard; public class WelcomeWidgetDescriptor extends OmWidgetDescriptor { private static final long serialVersionUID = 1L; public WelcomeWidgetDescriptor() { super("1546", "1547", "om.widget.welcome", WelcomeWidget.class); } }
apache/opennlp
1,111
opennlp-extensions/opennlp-uima/src/main/java/opennlp/uima/chunker/ChunkerModelResource.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package opennlp.uima.chunker; import opennlp.tools.chunker.ChunkerModel; /** * A resource encapsulating an OpenNLP {@link ChunkerModel} which can be shared between * <i>analysis engines</i> and loaded via the UIMA resource model. */ public interface ChunkerModelResource { ChunkerModel getModel(); }
apache/pinot
1,114
pinot-core/src/main/java/org/apache/pinot/core/query/executor/ResultsBlockStreamer.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.core.query.executor; import org.apache.pinot.core.operator.blocks.results.BaseResultsBlock; /** * Streamer for results blocks. */ public interface ResultsBlockStreamer { /** * Sends the results block. */ void send(BaseResultsBlock block) throws Exception; }
apache/plc4x
1,118
plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/PlcDiscoveryResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.plc4x.java.api.messages; import org.apache.plc4x.java.api.types.PlcResponseCode; import java.util.List; public interface PlcDiscoveryResponse extends PlcResponse { PlcDiscoveryRequest getRequest(); PlcResponseCode getResponseCode(); List<PlcDiscoveryItem> getValues(); }
apache/polygene-java
1,079
libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/common/datatypes/SmallInt.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.library.sql.generator.grammar.common.datatypes; /** * This class represents the {@code SMALLINT} type (typically 16-bit integer). * * @author Stanislav Muhametsin */ public interface SmallInt extends SQLDataType { }
apache/polygene-java
1,105
libraries/scripting/src/test/java/org/apache/polygene/library/scripting/HelloSpeaker.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ // START SNIPPET: speaker package org.apache.polygene.library.scripting; // END SNIPPET: speaker import org.apache.polygene.api.mixin.Mixins; // START SNIPPET: speaker @Mixins(ScriptMixin.class) public interface HelloSpeaker { String sayHello(); } // END SNIPPET: speaker
apache/ratis
1,106
ratis-test/src/test/java/org/apache/ratis/server/simulation/TestRaftReconfigurationWithSimulatedRpc.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ratis.server.simulation; import org.apache.ratis.server.impl.RaftReconfigurationBaseTest; public class TestRaftReconfigurationWithSimulatedRpc extends RaftReconfigurationBaseTest<MiniRaftClusterWithSimulatedRpc> implements MiniRaftClusterWithSimulatedRpc.FactoryGet { }
apache/reef
1,091
lang/java/reef-examples/src/main/java/org/apache/reef/examples/scheduler/driver/exceptions/UnsuccessfulException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.reef.examples.scheduler.driver.exceptions; /** * The operation was unsuccessful, for reasons stated in the message. */ public final class UnsuccessfulException extends Exception { public UnsuccessfulException(final String message) { super(message); } }
apache/reef
1,098
lang/java/reef-io/src/main/java/org/apache/reef/io/network/naming/parameters/NameResolverNameServerPort.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.reef.io.network.naming.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; @NamedParameter(doc = "A port number of a NameServer") public final class NameResolverNameServerPort implements Name<Integer> { }
apache/royale-compiler
1,106
compiler-common/src/main/java/org/apache/royale/compiler/common/IDefinitionPriority.java
/* * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.common; /** * The "priority" of a definition determines whether that definition shadows definitions from other * compilation units that have the same qname. */ public interface IDefinitionPriority extends Comparable<IDefinitionPriority> { }
apache/royale-compiler
1,120
compiler-common/src/main/java/org/apache/royale/swf/tags/IManagedTag.java
/* * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.swf.tags; /** * A "managed" SWF tag cannot be added to {@link org.apache.royale.swf.SWFFrame} pragmatically. It is * managed by the frame internally. * <p> * For example, {@code SymbolClass} and {@code ShowFrame} are managed tags. */ public interface IManagedTag { }
apache/samza
1,126
samza-azure/src/main/java/org/apache/samza/system/eventhub/Interceptor.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.samza.system.eventhub; /** * Interface that is used for converting bytes to bytes. */ public interface Interceptor { /** * Intercepts and converts bytes. * * @param bytes bytes to be converted * @return Converted array of bytes converted */ byte[] intercept(byte[] bytes); }
apache/seatunnel
1,070
seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/loader/SeaTunnelParentFirstClassLoader.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.common.loader; import java.net.URL; import java.util.List; public class SeaTunnelParentFirstClassLoader extends SeaTunnelBaseClassLoader { public SeaTunnelParentFirstClassLoader(List<URL> urls) { super(urls); } }
apache/seatunnel
1,071
seatunnel-connectors-v2/connector-prometheus/src/main/java/org/apache/seatunnel/connectors/seatunnel/prometheus/sink/Point.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.connectors.seatunnel.prometheus.sink; import lombok.Builder; import lombok.Data; import java.util.Map; @Data @Builder public class Point { private Map<String, String> metric; private Double value; private Long timestamp; }
apache/seatunnel
1,073
seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/server/TelemetryMetricConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.common.config.server; import lombok.Data; import java.io.Serializable; @Data public class TelemetryMetricConfig implements Serializable { private boolean enabled = ServerConfigOptions.TELEMETRY_METRIC_ENABLED.defaultValue(); }
apache/servicecomb-java-chassis
1,059
swagger/swagger-invocation/invocation-core/src/test/java/org/apache/servicecomb/swagger/invocation/schemas/PojoAddWithContextV1.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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 org.apache.servicecomb.swagger.invocation.context.InvocationContext; public class PojoAddWithContextV1 { public int add(InvocationContext context, int x, int y) { return x + y; } }
apache/servicecomb-toolkit
1,120
contractgen/src/test/projects/demo/src/main/java/demo/Application.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class Application { public Application() { } public static void main(String[] args) { SpringApplication.run(Application.class, args); } }
apache/shardingsphere
1,067
parser/distsql/statement/src/main/java/org/apache/shardingsphere/distsql/statement/type/rdl/resource/ResourceDefinitionStatement.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shardingsphere.distsql.statement.type.rdl.resource; import org.apache.shardingsphere.distsql.statement.type.rdl.RDLStatement; /** * Resource definition statement. */ public abstract class ResourceDefinitionStatement extends RDLStatement { }
apache/shenyu
1,122
shenyu-admin/src/test/java/org/apache/shenyu/admin/model/query/RuleQueryTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shenyu.admin.model.query; import org.apache.shenyu.admin.AbstractReflectGetterSetterTest; /** * Test case for RuleQuery. */ public final class RuleQueryTest extends AbstractReflectGetterSetterTest { @Override protected Class<?> getTargetClass() { return RuleQuery.class; } }
apache/skywalking-java
1,042
test/plugin/scenarios/shardingsphere-4.0.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/shardingsphere/service/api/repository/OrderRepository.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.apm.testcase.shardingsphere.service.api.repository; import org.apache.skywalking.apm.testcase.shardingsphere.service.api.entity.Order; public interface OrderRepository extends CommonRepository<Order> { }
apache/skywalking-java
1,042
test/plugin/scenarios/shardingsphere-5.0.0-scenario/src/main/java/org/apache/skywalking/apm/testcase/shardingsphere/service/api/repository/OrderRepository.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.apm.testcase.shardingsphere.service.api.repository; import org.apache.skywalking.apm.testcase.shardingsphere.service.api.entity.Order; public interface OrderRepository extends CommonRepository<Order> { }
apache/storm
1,132
storm-core/src/jvm/org/apache/storm/testing/staticmocking/MockedCluster.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version * 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package org.apache.storm.testing.staticmocking; import org.apache.storm.cluster.ClusterUtils; public class MockedCluster implements AutoCloseable { public MockedCluster(ClusterUtils inst) { ClusterUtils.setInstance(inst); } @Override public void close() throws Exception { ClusterUtils.resetInstance(); } }
apache/storm
1,140
storm-client/src/jvm/org/apache/storm/metrics2/SimpleGauge.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version * 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package org.apache.storm.metrics2; import com.codahale.metrics.Gauge; public class SimpleGauge<T> implements Gauge<T> { private T value; public SimpleGauge(T value) { this.value = value; } @Override public T getValue() { return this.value; } public void set(T value) { this.value = value; } }
apache/streampipes
1,096
streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/IPipelineCanvasMetadataStorage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.storage.api; import org.apache.streampipes.model.canvas.PipelineCanvasMetadata; public interface IPipelineCanvasMetadataStorage extends CRUDStorage<PipelineCanvasMetadata> { PipelineCanvasMetadata getPipelineCanvasMetadataForPipeline(String pipelineId); }
apache/syncope
1,108
client/idrepo/console/src/main/java/org/apache/syncope/client/console/chartjs/BarChartData.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.client.console.chartjs; /** * Provides chart data used by bar charts. * * @param <T> the generic type of it's dataset */ public class BarChartData<T extends BaseDataSet> extends ChartData<T> { private static final long serialVersionUID = 9057475640743455047L; }
apache/tajo
1,122
tajo-plan/src/main/java/org/apache/tajo/plan/exprrewrite/EvalTreeOptimizationRule.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tajo.plan.exprrewrite; import org.apache.tajo.plan.LogicalPlanner; import org.apache.tajo.plan.annotator.Prioritized; import org.apache.tajo.plan.expr.EvalNode; @Prioritized public interface EvalTreeOptimizationRule { EvalNode optimize(LogicalPlanner.PlanContext context, EvalNode tree); }
apache/tajo
1,127
tajo-core/src/main/java/org/apache/tajo/master/event/TaskEventType.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tajo.master.event; /** * Event types handled by Task. */ public enum TaskEventType { //Producer:Client, Stage T_KILL, //Producer:Stage T_SCHEDULE, //Producer:TaskAttempt T_ATTEMPT_LAUNCHED, T_ATTEMPT_COMMIT_PENDING, T_ATTEMPT_FAILED, T_ATTEMPT_SUCCEEDED, T_ATTEMPT_KILLED }
apache/tajo
1,134
tajo-common/src/main/java/org/apache/tajo/tuple/RowBlockReader.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tajo.tuple; import org.apache.tajo.storage.Tuple; public interface RowBlockReader<T extends Tuple> { /** * Return for each tuple * * @return True if tuple block is filled with tuples. Otherwise, It will return false. */ boolean next(T tuple); void reset(); long remainForRead(); }
apache/tajo
1,135
tajo-plan/src/main/java/org/apache/tajo/plan/annotator/Prioritized.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tajo.plan.annotator; 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) public @interface Prioritized { int priority() default 99; }
apache/tapestry-5
1,065
tapestry-beanvalidator/src/main/java/org/apache/tapestry5/internal/beanvalidator/BeanValidationGroupSourceImpl.java
// Copyright 2009 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.internal.beanvalidator; import java.util.Collection; import org.apache.tapestry5.beanvalidator.BeanValidatorGroupSource; public class BeanValidationGroupSourceImpl implements BeanValidatorGroupSource { private final Class<?>[] groups; public BeanValidationGroupSourceImpl(Collection<Class> groups) { this.groups = groups.toArray(new Class<?>[]{}); } @Override public Class<?>[] get() { return groups; } }
apache/tapestry-5
1,119
plastic/src/main/java/org/apache/tapestry5/internal/plastic/NoopDelegate.java
// Copyright 2011 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.internal.plastic; import org.apache.tapestry5.plastic.ClassInstantiator; import org.apache.tapestry5.plastic.PlasticClass; import org.apache.tapestry5.plastic.PlasticManagerDelegate; public class NoopDelegate implements PlasticManagerDelegate { @Override public void transform(PlasticClass plasticClass) { } @Override public ClassInstantiator configureInstantiator(String className, ClassInstantiator instantiator) { return instantiator; } }
apache/thrift
1,145
lib/javame/src/org/apache/thrift/protocol/TMap.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.thrift.protocol; /** * Helper class that encapsulates map metadata. * */ public class TMap { public TMap() {} public TMap(byte k, byte v, int s) { keyType = k; valueType = v; size = s; } public byte keyType = TType.STOP; public byte valueType = TType.STOP; public int size = 0; }
apache/tika
1,121
tika-core/src/main/java/org/apache/tika/extractor/EmbeddedDocumentExtractorFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tika.extractor; import java.io.Serializable; import org.apache.tika.metadata.Metadata; import org.apache.tika.parser.ParseContext; public interface EmbeddedDocumentExtractorFactory extends Serializable { EmbeddedDocumentExtractor newInstance(Metadata metadata, ParseContext parseContext); }
apache/tomcat
1,145
test/org/apache/naming/resources/TesterObject.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.naming.resources; public class TesterObject { private String foo; @Override public String toString() { return "This is a test object (" + super.toString() + ")."; } public void setFoo(String foo) { this.foo = foo; } public String getFoo() { return this.foo; } }
apache/tomcat
1,158
java/org/apache/coyote/NonPipeliningProcessor.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.coyote; /** * Marker interface used to indicate that the {@link Processor} does not implement pipe-lining of requests (e.g. * HTTP/1.1 supports pipe-lining whereas HTTP/2 does not) which may enable some components to clear references sooner to * aid GC. */ public interface NonPipeliningProcessor extends Processor { }
apache/tomee
1,121
server/openejb-client/src/main/java/org/apache/openejb/client/SystemException.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.client; /** * @version $Revision$ $Date$ */ public class SystemException extends Exception { public SystemException(final ThrowableArtifact cause) { super(cause.getThrowable()); } public SystemException(final Throwable cause) { super(cause); } }
apache/tomee
1,124
container/openejb-core/src/main/java/org/apache/openejb/core/JndiFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.core; import org.apache.openejb.SystemException; import javax.naming.Context; import java.util.Map; /** * @version $Rev$ $Date$ */ public interface JndiFactory { Context createComponentContext(Map<String, Object> bindings) throws SystemException; Context createRootContext(); }
apache/tomee
1,127
examples/application-composer/src/main/java/org/superbiz/composed/Movies.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.superbiz.composed; import java.util.List; /** * @version $Revision: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $ */ public interface Movies { void addMovie(Movie movie) throws Exception; void deleteMovie(Movie movie) throws Exception; List<Movie> getMovies() throws Exception; }
apache/uima-uimaj
1,123
uimaj-core/src/main/java/org/apache/uima/cas/impl/BooleanArrayFSImpl.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.uima.cas.impl; import org.apache.uima.cas.BooleanArrayFS; /** * V2 compatibility only The non-JCas cover class for Boolean Array * * @deprecated use BooleanArray instead * @forRemoval 4.0.0 */ @Deprecated(since = "3.0.0") public interface BooleanArrayFSImpl extends BooleanArrayFS { }
apache/uima-uimaj
1,137
uimaj-core/src/main/java/org/apache/uima/pear/tools/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. */ /** * <!-- Abstract --> The <CODE>org.apache.uima.pear.tools</CODE> package provides applications and * tools that allow installing PEAR packages containing UIMA-compliant components, verifying * serviceability of installed components by using UIMA API and browsing PEAR packages. <br> */ package org.apache.uima.pear.tools;
apache/uniffle
1,121
common/src/main/java/org/apache/uniffle/common/exception/NotRetryException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.common.exception; public class NotRetryException extends RssException { public NotRetryException(String message) { super(message); } public NotRetryException(Throwable e) { super(e); } public NotRetryException(String message, Throwable e) { super(message, e); } }
apache/wicket
1,096
wicket-core-tests/src/test/java/org/apache/wicket/markup/parser/filter/HeaderSectionPage_14.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.markup.parser.filter; /** * Mock page for testing. * * @author Chris Turner */ public class HeaderSectionPage_14 extends AbstractTest14WebPage { private static final long serialVersionUID = 1L; /** * Construct. */ public HeaderSectionPage_14() { } }
apache/wicket
1,108
wicket-examples/src/main/java/org/apache/wicket/examples/authentication2/AuthenticatedWebPage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.wicket.examples.authentication2; import org.apache.wicket.examples.WicketExamplePage; /** * Base class to check access to a page. If user is not logged in, redirect to the log-in page. * * @author Jonathan Locke */ public class AuthenticatedWebPage extends WicketExamplePage { }
google/bindiff
1,099
java/zylib/src/main/java/com/google/security/zynamics/zylib/general/comparators/LongComparator.java
// Copyright 2011-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.zylib.general.comparators; import java.io.Serializable; import java.util.Comparator; public class LongComparator implements Comparator<Long>, Serializable { /** Used for serialization. */ private static final long serialVersionUID = 2814764330420080628L; @Override public int compare(final Long o1, final Long o2) { final long value = o1 - o2; if (value > 0) { return 1; } else if (value < 0) { return -1; } return 0; } }
google/binnavi
1,108
src/main/java/com/google/security/zynamics/zylib/general/comparators/JCheckBoxComparator.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.general.comparators; import java.io.Serializable; import java.util.Comparator; import javax.swing.JCheckBox; public class JCheckBoxComparator implements Comparator<JCheckBox>, Serializable { /** * Used for serialization. */ private static final long serialVersionUID = -2526854370340524821L; @Override public int compare(final JCheckBox o1, final JCheckBox o2) { return Boolean.valueOf(o1.isSelected()).compareTo(Boolean.valueOf(o2.isSelected())); } }
google/graphicsfuzz
1,127
fuzzerserver/src/main/java/com/graphicsfuzz/server/IServerJob.java
/* * Copyright 2018 The GraphicsFuzz Project Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.graphicsfuzz.server; import com.graphicsfuzz.server.thrift.Job; public interface IServerJob { /** * Get a job. * @return null if this IServerJob should be removed from the job list. * @throws ServerJobException to handle communication problems with server */ Job getJob() throws ServerJobException; /** * Report that job is finished. * @return true if this IServerJob should be removed from the job list. */ boolean finishJob(Job job) throws ServerJobException; }
google/guava
1,151
guava/src/com/google/common/math/package-info.java
/* * Copyright (C) 2011 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. */ /** * Arithmetic functions operating on primitive values and on {@link java.math.BigInteger} and {@link * java.math.BigDecimal} instances. * * <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a> * library. * * <p>See the Guava User Guide article on <a * href="https://github.com/google/guava/wiki/MathExplained">math utilities</a>. */ @CheckReturnValue @NullMarked package com.google.common.math; import com.google.errorprone.annotations.CheckReturnValue; import org.jspecify.annotations.NullMarked;
google/guice
1,132
core/src/com/google/inject/internal/InternalClassesToSkipSources.java
/* * Copyright (C) 2023 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.inject.internal; import com.google.common.collect.ImmutableSet; /** Returns internal classes that should be skipped when calculating sources. */ public final class InternalClassesToSkipSources { private InternalClassesToSkipSources() {} public static ImmutableSet<Class<?>> classesToSkipSources() { return ImmutableSet.of( RealMapBinder.class, RealMapBinder.MultimapBinder.class, RealMultibinder.class, RealOptionalBinder.class, ProviderMethodsModule.class); } }
google/j2cl
1,080
transpiler/javatests/com/google/j2cl/integration/java/varargs/innerpackage/SuperWithNoPublicConstructors.java
/* * Copyright 2019 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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 varargs.innerpackage; import java.util.ArrayList; import java.util.List; public class SuperWithNoPublicConstructors { public String which; private SuperWithNoPublicConstructors() { which = "None"; } private SuperWithNoPublicConstructors(Object... args) { which = "Private"; } protected SuperWithNoPublicConstructors(List... args) { which = "Protected"; } SuperWithNoPublicConstructors(ArrayList... args) { which = "PackagePrivate"; } }
google/j2cl
1,100
transpiler/javatests/com/google/j2cl/integration/java/selfreferencingnativetype/Foo.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 selfreferencingnativetype; import jsinterop.annotations.JsType; @JsType(namespace = "zoo") public class Foo { public static String getMe() { return "me"; } // Refer to the implementation "zoo.Foo$impl" instead to avoid creating an "invalid" circular // reference. @JsType(isNative = true, name = "Foo$impl", namespace = "zoo") public static class ZooFoo { public static native String getMe(); } public static String getMeViaNative() { return ZooFoo.getMe(); } }
google/j2cl
1,103
transpiler/javatests/com/google/j2cl/integration/java/allsimplebridges/Tester429.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; public class Tester429 { abstract static class C1 { C1() {} public abstract String get(Object value); } static class C2 extends C1 { C2() {} @Override public String get(Object value) { return "C2.get"; } } public static void test() { C2 s = new C2(); assertTrue(s.get(new Object()).equals("C2.get")); assertTrue(((C1) s).get("").equals("C2.get")); } }
google/j2cl
1,108
transpiler/javatests/com/google/j2cl/integration/java/jsproperties/Foo.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 jsproperties; import jsinterop.annotations.JsProperty; /** * Tests for non native static JsProperty. */ public class Foo { private static int f = 10; public static int getF() { return f; } @JsProperty public static int getA() { return f + 1; } @JsProperty public static void setA(int a) { f = a + 2; } @JsProperty(name = "abc") public static int getB() { return f + 3; } @JsProperty(name = "abc") public static void setB(int a) { f = a + 4; } }
google/oss-fuzz
1,156
projects/json-smart-v2/JSONParserFuzzer.java
// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //////////////////////////////////////////////////////////////////////////////// import com.code_intelligence.jazzer.api.FuzzedDataProvider; import net.minidev.json.parser.JSONParser; import net.minidev.json.parser.ParseException; public class JSONParserFuzzer { public static void fuzzerTestOneInput(FuzzedDataProvider data) { String input = data.consumeRemainingAsString(); JSONParser jp = new JSONParser(JSONParser.MODE_PERMISSIVE); try { jp.parse(input); } catch (ParseException | NumberFormatException e) { return; } } }
google/santa-tracker-android
1,081
doodles-lib/src/main/java/com/google/android/apps/santatracker/doodles/shared/logging/DoodleDebugLogger.java
/* * Copyright 2019. Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.android.apps.santatracker.doodles.shared.logging; import com.google.android.apps.santatracker.util.SantaLog; /** * A stub logger for the purposes of testing output of log statements in the Pineapple 2016 games. */ public class DoodleDebugLogger extends DoodleLogger { private static final String TAG = DoodleDebugLogger.class.getSimpleName(); @Override public void logEvent(DoodleLogEvent event) { SantaLog.d(TAG, event.toString()); } }
googleapis/google-cloud-java
1,042
java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/UndeployProcessorVersionResponseOrBuilder.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/documentai/v1beta3/document_processor_service.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.documentai.v1beta3; public interface UndeployProcessorVersionResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.UndeployProcessorVersionResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/google-oauth-java-client
1,080
google-oauth-client-servlet/src/main/java/com/google/api/client/extensions/servlet/auth/package-info.java
/* * Copyright (c) 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ /** * {@link com.google.api.client.util.Beta} <br> * Servlets that can be completed by users to create and complete a web server auth flow to obtain a * credential. * * <p>Warning: starting with version 1.7, usage of this for OAuth 2.0 is deprecated. Instead use * {@link com.google.api.client.extensions.servlet.auth.oauth2}. * * @since 1.4 * @author moshenko@google.com (Jacob Moshenko) */ @com.google.api.client.util.Beta package com.google.api.client.extensions.servlet.auth;
googlearchive/science-journal
1,067
OpenScienceJournal/whistlepunk_library/src/main/java/com/google/android/apps/forscience/whistlepunk/IRecorderService.java
/* * Copyright 2017 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.android.apps.forscience.whistlepunk; import android.content.Intent; import com.google.android.apps.forscience.whistlepunk.accounts.AppAccount; interface IRecorderService { void beginServiceRecording(String experimentName, Intent launchIntent); void endServiceRecording( AppAccount appAccount, boolean notifyRecordingEnded, String runId, String experimentId, String experimentTitle); }
hibernate/hibernate-orm
1,068
hibernate-core/src/main/java/org/hibernate/query/hql/spi/SqmCreationOptions.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.query.hql.spi; import org.hibernate.Incubating; import org.hibernate.query.sqm.StrictJpaComplianceViolation; /** * Options for semantic analysis * * @author Steve Ebersole */ @Incubating public interface SqmCreationOptions { /** * Should we interpret the query strictly according to the JPA specification? In * other words, should Hibernate "extensions" to the query language be disallowed? * * @see StrictJpaComplianceViolation */ default boolean useStrictJpaCompliance() { return false; } /** * @see org.hibernate.cfg.AvailableSettings#JSON_FUNCTIONS_ENABLED */ default boolean isJsonFunctionsEnabled() { return false; } /** * @see org.hibernate.cfg.AvailableSettings#XML_FUNCTIONS_ENABLED */ default boolean isXmlFunctionsEnabled() { return false; } /** * @see org.hibernate.cfg.AvailableSettings#PORTABLE_INTEGER_DIVISION */ default boolean isPortableIntegerDivisionEnabled() { return false; } }
hibernate/hibernate-orm
1,072
hibernate-jfr/src/main/java/org/hibernate/event/jfr/internal/PartialFlushEvent.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.event.jfr.internal; import org.hibernate.event.monitor.spi.DiagnosticEvent; import org.hibernate.internal.build.AllowNonPortable; import jdk.jfr.Category; import jdk.jfr.Description; import jdk.jfr.Event; import jdk.jfr.Label; import jdk.jfr.Name; import jdk.jfr.StackTrace; @Name( PartialFlushEvent.NAME ) @Label( "PartialFlushEvent Execution" ) @Category( "Hibernate ORM" ) @Description( "PartialFlushEvent Execution" ) @StackTrace @AllowNonPortable public class PartialFlushEvent extends Event implements DiagnosticEvent { public static final String NAME = "org.hibernate.orm.PartialFlushEvent"; @Label( "Session Identifier" ) public String sessionIdentifier; @Label( "Number Of Processed Entities" ) public int numberOfEntitiesProcessed; @Label( "Number Of Processed Collections" ) public int numberOfCollectionsProcessed; @Label( "Auto Flush" ) public boolean isAutoFlush; @Override public String toString() { return NAME ; } }
hibernate/hibernate-search
1,028
integrationtest/v5migrationhelper/engine/src/test/java/org/hibernate/search/test/dsl/embedded/ContainerEntity.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.test.dsl.embedded; import org.hibernate.search.annotations.DocumentId; import org.hibernate.search.annotations.Field; import org.hibernate.search.annotations.Indexed; import org.hibernate.search.annotations.IndexedEmbedded; /** * @author neek */ @Indexed class ContainerEntity { @DocumentId private Long id; @Field private String parentStringValue; @IndexedEmbedded(depth = 1, prefix = "emb.") private EmbeddedEntity embeddedEntity; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getParentStringValue() { return parentStringValue; } public void setParentStringValue(String parentStringValue) { this.parentStringValue = parentStringValue; } public EmbeddedEntity getEmbeddedEntity() { return embeddedEntity; } public void setEmbeddedEntity(EmbeddedEntity embeddedEntity) { this.embeddedEntity = embeddedEntity; } }
hibernate/hibernate-shards
1,121
src/main/java/org/hibernate/shards/loadbalance/ShardLoadBalancer.java
/** * Copyright (C) 2007 Google Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ package org.hibernate.shards.loadbalance; import org.hibernate.shards.ShardId; /** * Describes a load balance for shards. * Implementations are expected to be threadsafe. * * @author maxr@google.com (Max Ross) */ public interface ShardLoadBalancer { /** * @return the next ShardId */ ShardId getNextShardId(); }
openjdk/apidiff
1,165
test/showDocs/demo-src/m/module-info.java
/* * Copyright (c) 2020, 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. */ /** * This is module {@code m}. * This is additional information. * @since 1.0 */ module m { exports p; }
openjdk/jdk8
1,136
langtools/test/com/sun/javadoc/testPrivateClasses/pkg/PublicInterface.java
/* * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package pkg; public interface PublicInterface extends PrivateInterface { }
openjdk/jdk8
1,146
jdk/test/java/net/URLClassLoader/closetest/serverRoot/Test.java
/* * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ public class Test { public Test () { System.out.println ("Test created"); } }
openjdk/jdk8
1,153
langtools/test/tools/javac/accessVirtualInner/a/A.java
/* * Copyright (c) 2002, 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 a; public class A { protected void foo() { throw new InternalError(); } }
openjdk/jdk8
1,153
langtools/test/tools/javac/accessVirtualInner/c/C.java
/* * Copyright (c) 2002, 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 c; import b.*; public class C extends B { protected void foo() { // ok } }
openjdk/jdk8
1,153
langtools/test/tools/javac/diags/examples/LocalEnum.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.local.enum class LocalEnum { void m() { enum E { a, b, c}; } }
openjdk/jdk8
1,158
langtools/test/tools/javac/ClassLiterals/p1/C.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 C {}
openjdk/jdk8
1,163
jdk/test/java/lang/instrument/ilib/Injector.java
/* * Copyright (c) 2005, 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 ilib; interface Injector { byte[] bytecodes(String className, String methodName, int location); }
openjdk/jtreg
1,177
test/badgroups/badname/Test.java
/* * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* @test */ // dummy test, to refer to in TEST.groups public class Test { public static void main(String... args) { } }
openjdk/jtreg
1,180
test/testng/std/Test.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. */ /* * @test */ public class Test { public static void main(String... args) { System.out.println("hello!"); } }
openjdk/jtreg
1,184
test/libdirs/l1/L1.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. */ import java.io.PrintStream; public class L1 { public L1(PrintStream out) { out.println(getClass().getName()); } }
openjdk/jtreg
1,184
test/libdirs/l2/L2.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. */ import java.io.PrintStream; public class L2 { public L2(PrintStream out) { out.println(getClass().getName()); } }
openjdk/jtreg
1,184
test/libdirs/l4/L4.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. */ import java.io.PrintStream; public class L4 { public L4(PrintStream out) { out.println(getClass().getName()); } }
openjdk/jtreg
1,184
test/libdirs/l6/L6.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. */ import java.io.PrintStream; public class L6 { public L6(PrintStream out) { out.println(getClass().getName()); } }
oracle/nosql
1,135
kvmain/src/main/java/oracle/kv/impl/admin/CommandServiceResponder.java
/*- * Copyright (C) 2011, 2025 Oracle and/or its affiliates. All rights reserved. * * This file was distributed by Oracle as part of a version of Oracle NoSQL * Database made available at: * * http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html * * Please see the LICENSE file included in the top-level directory of the * appropriate version of Oracle NoSQL Database for a copy of the license and * additional information. */ package oracle.kv.impl.admin; import static oracle.kv.impl.async.StandardDialogTypeFamily.COMMAND_SERVICE_TYPE_FAMILY; import java.util.concurrent.Executor; import java.util.logging.Logger; import oracle.kv.impl.async.JavaSerialResponder; /** * A responder (server-side) async dialog handler for CommandService. */ class CommandServiceResponder extends JavaSerialResponder<CommandService> { CommandServiceResponder(CommandService server, Executor executor, Logger logger) { super(server, CommandService.class, executor, COMMAND_SERVICE_TYPE_FAMILY, logger); } }
apache/crunch
1,133
crunch-core/src/main/java/org/apache/crunch/io/ReadableSourceTarget.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.crunch.io; import org.apache.crunch.SourceTarget; /** * An interface that indicates that a {@code SourceTarget} instance can be read * into the local client. * * @param <T> * The type of data read. */ public interface ReadableSourceTarget<T> extends ReadableSource<T>, SourceTarget<T> { }
apache/cxf
1,113
rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/SpringJaxrsClassesScanServer.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.spring; import org.apache.cxf.endpoint.Server; import org.springframework.context.annotation.Bean; public class SpringJaxrsClassesScanServer extends AbstractJaxrsClassesScanServer { @Bean public Server jaxRsServer() { return super.createJaxRsServer(); } }
apache/cxf
1,115
systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/GenericBookStoreSpringInt1.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.systest.jaxrs; import java.util.Collections; import java.util.List; public class GenericBookStoreSpringInt1 implements GenericBookInterface<SuperBook> { public List<SuperBook> getSuperBook() { return Collections.singletonList(new SuperBook("super", 111L, true)); } }
apache/cxf
1,128
rt/frontend/simple/src/main/java/org/apache/cxf/simple/SimpleServiceBuilder.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.simple; import org.apache.cxf.frontend.AbstractServiceFactory; import org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean; public class SimpleServiceBuilder extends AbstractServiceFactory { public SimpleServiceBuilder() { super(new ReflectionServiceFactoryBean()); } }
apache/cxf
1,133
tools/javato/ws/src/test/java/org/apache/attachment/AddNumbersImpl.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.attachment; @jakarta.jws.WebService(targetNamespace = "http://apache.org/attachment", endpointInterface = "org.apache.attachment.AddNumbers") public class AddNumbersImpl implements AddNumbers { public int addNumbers(jakarta.activation.DataHandler body) { return 1; } }
apache/deltaspike
1,082
deltaspike/core/impl/obsolete/src/test/java/org/apache/deltaspike/test/core/api/util/bean/WithInjectionPoint.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.deltaspike.test.core.api.util.bean; import jakarta.enterprise.inject.spi.BeanManager; import jakarta.inject.Inject; import jakarta.inject.Named; /** * */ @Named("ipoint") public class WithInjectionPoint { @Inject private BeanManager beanManager; }
apache/directory-scimple
1,098
scim-spec/scim-spec-schema/src/main/java/org/apache/directory/scim/spec/annotation/ScimType.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.directory.scim.spec.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) public @interface ScimType { }
apache/directory-studio
1,073
plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/model/AuxiliaryObjectClass.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.directory.studio.openldap.config.model; /** * Java bean for an auxiliary object class. * * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> */ public interface AuxiliaryObjectClass { }
apache/doris-manager
1,102
manager/manager/src/main/java/org/apache/doris/stack/model/request/construct/DbCreateReq.java
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. package org.apache.doris.stack.model.request.construct; import lombok.Data; import org.springframework.util.StringUtils; @Data public class DbCreateReq { private String name; private String describe; public boolean hasEmptyField() { return StringUtils.isEmpty(name); } }
apache/druid
1,114
processing/src/test/java/org/apache/druid/segment/loading/NoopDataSegmentKiller.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.segment.loading; import org.apache.druid.timeline.DataSegment; /** * Mostly used for test purpose. */ public class NoopDataSegmentKiller implements DataSegmentKiller { @Override public void kill(DataSegment segments) { } @Override public void killAll() { } }
apache/druid
1,125
processing/src/main/java/org/apache/druid/collections/ResourceHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.collections; import java.io.Closeable; /** * */ public interface ResourceHolder<T> extends Closeable { T get(); @Override void close(); static <T extends Closeable> ResourceHolder<T> fromCloseable(final T resource) { return new CloseableResourceHolder<>(resource); } }
apache/dubbo-spi-extensions
1,108
dubbo-xds/src/main/java/org/apache/dubbo/registry/xds/XdsInitializationException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.registry.xds; public final class XdsInitializationException extends Exception { public XdsInitializationException(String message) { super(message); } public XdsInitializationException(String message, Throwable cause) { super(message, cause); } }
apache/dubbo
1,099
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/argument/TypeConverter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.rpc.protocol.tri.rest.argument; import javax.annotation.Nullable; import java.lang.reflect.Type; public interface TypeConverter { @Nullable <T> T convert(Object source, Class<T> targetClass); @Nullable <T> T convert(Object source, Type targetType); }
apache/empire-db
1,125
empire-db/src/main/java/org/apache/empire/db/context/DBRollbackHandler.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.empire.db.context; import java.sql.Connection; import org.apache.empire.db.DBObject; public interface DBRollbackHandler { DBObject getObject(); String getObjectInfo(); void combine(DBRollbackHandler successor); void rollback(Connection conn); void discard(Connection conn); }
apache/eventmesh
1,069
eventmesh-connectors/eventmesh-connector-jdbc/src/main/java/org/apache/eventmesh/connector/jdbc/connection/PreparedParameter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.jdbc.connection; import java.sql.JDBCType; import lombok.Data; /** * Represents a parameter for a prepared statement. */ @Data public class PreparedParameter { private Object value; private JDBCType jdbcType; }
apache/eventmesh
1,101
eventmesh-common/src/main/java/org/apache/eventmesh/common/remote/response/CreateTaskResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.remote.response; import org.apache.eventmesh.common.remote.request.CreateTaskRequest; import java.util.List; import lombok.Data; @Data public class CreateTaskResponse { private String taskId; private List<CreateTaskRequest.JobDetail> jobIdList; }