repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/incubator-kie-drools
1,055
drools-quarkus-extension/drools-quarkus-examples/drools-quarkus-examples-multiunit/src/main/java/org/drools/quarkus/ruleunit/examples/multiunit/RuleOutput1.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.drools.quarkus.ruleunit.examples.multiunit; public class RuleOutput1 { private final String text; public RuleOutput1(String text) { this.text = text; } public String getText() { return text; } }
apache/incubator-kie-drools
1,110
drools-verifier/drools-verifier-drl/src/main/java/org/drools/verifier/components/VerifierAccessorDescr.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.drools.verifier.components; public class VerifierAccessorDescr extends RuleComponent { public VerifierAccessorDescr(VerifierRule rule) { super( rule ); } public VerifierComponentType getVerifierComponentType() { return VerifierComponentType.ACCESSOR; } }
apache/incubator-kie-drools
1,123
drools-verifier/drools-verifier-core/src/main/java/org/drools/verifier/core/index/Index.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.drools.verifier.core.index; import org.drools.verifier.core.index.model.Columns; import org.drools.verifier.core.index.model.ObjectTypes; import org.drools.verifier.core.index.model.Rules; public interface Index { Rules getRules(); Columns getColumns(); ObjectTypes getObjectTypes(); }
apache/incubator-kie-kogito-runtimes
1,101
jbpm/process-serialization-protobuf/src/main/java/org/jbpm/flow/serialization/MarshallerWriterContext.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.jbpm.flow.serialization; import java.io.OutputStream; import org.kie.api.runtime.process.NodeInstance; public interface MarshallerWriterContext extends MarshallerContext { OutputStream output(); NodeInstanceWriter findNodeInstanceWriter(NodeInstance nodeInstance); }
apache/incubator-kie-kogito-runtimes
1,119
api/kogito-services/src/main/java/org/kie/kogito/services/jobs/impl/StaticJobService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.kogito.services.jobs.impl; public class StaticJobService { private static class InstanceHolder { private static InMemoryJobService INSTANCE = new InMemoryJobService(); } public static InMemoryJobService staticJobService() { return InstanceHolder.INSTANCE; } }
apache/incubator-livy
1,155
test-lib/src/main/java/org/apache/livy/test/jobs/Sleeper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.livy.test.jobs; import org.apache.livy.Job; import org.apache.livy.JobContext; public class Sleeper implements Job<Void> { private final long millis; public Sleeper(long millis) { this.millis = millis; } @Override public Void call(JobContext jc) throws Exception { Thread.sleep(millis); return null; } }
apache/incubator-retired-slider
1,125
slider-core/src/main/java/org/apache/slider/server/appmaster/web/layout/AppLayout.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.slider.server.appmaster.web.layout; import org.apache.hadoop.yarn.webapp.SubView; import org.apache.slider.server.appmaster.web.view.IndexBlock; /** * */ public class AppLayout extends WebUILayout { @Override protected Class<? extends SubView> content() { return IndexBlock.class; } }
apache/incubator-retired-wave
1,134
wave/src/main/java/org/waveprotocol/wave/client/scroll/TargetScroller.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.waveprotocol.wave.client.scroll; /** * A target-based scroller. * * @param <M> scroll target, which can be measured by a measurer. */ public interface TargetScroller<M> { /** * Moves the viewport to include {@code target}. * * @param target target to move to. */ void moveTo(M target); }
apache/incubator-seata
1,120
sqlparser/seata-sqlparser-druid/src/main/java/org/apache/seata/sqlparser/druid/DruidDbTypeParserImpl.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seata.sqlparser.druid; import com.alibaba.druid.util.JdbcUtils; import org.apache.seata.sqlparser.util.DbTypeParser; class DruidDbTypeParserImpl implements DbTypeParser { @Override public String parseFromJdbcUrl(String jdbcUrl) { return JdbcUtils.getDbType(jdbcUrl, null); } }
apache/incubator-seata
1,134
core/src/main/java/org/apache/seata/core/protocol/transaction/BranchCommitResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seata.core.protocol.transaction; import org.apache.seata.core.protocol.MessageType; /** * The type Branch commit response. * */ public class BranchCommitResponse extends AbstractBranchEndResponse { @Override public short getTypeCode() { return MessageType.TYPE_BRANCH_COMMIT_RESULT; } }
apache/incubator-seata
1,134
core/src/main/java/org/apache/seata/core/protocol/transaction/GlobalCommitResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seata.core.protocol.transaction; import org.apache.seata.core.protocol.MessageType; /** * The type Global commit response. * */ public class GlobalCommitResponse extends AbstractGlobalEndResponse { @Override public short getTypeCode() { return MessageType.TYPE_GLOBAL_COMMIT_RESULT; } }
apache/incubator-seata
1,134
core/src/main/java/org/apache/seata/core/protocol/transaction/GlobalReportResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seata.core.protocol.transaction; import org.apache.seata.core.protocol.MessageType; /** * The type Global report response. * */ public class GlobalReportResponse extends AbstractGlobalEndResponse { @Override public short getTypeCode() { return MessageType.TYPE_GLOBAL_REPORT_RESULT; } }
apache/incubator-seata
1,134
core/src/main/java/org/apache/seata/core/protocol/transaction/GlobalStatusResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seata.core.protocol.transaction; import org.apache.seata.core.protocol.MessageType; /** * The type Global status response. * */ public class GlobalStatusResponse extends AbstractGlobalEndResponse { @Override public short getTypeCode() { return MessageType.TYPE_GLOBAL_STATUS_RESULT; } }
apache/incubator-tuweni
1,158
concurrent/src/main/java/org/apache/tuweni/concurrent/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. * * Classes and utilities for working with concurrency. * * <p> * These classes are included in the standard Tuweni distribution, or separately when using the gradle dependency * 'org.apache.tuweni:tuweni-concurrent' (tuweni-concurrent.jar). */ @ParametersAreNonnullByDefault package org.apache.tuweni.concurrent; import javax.annotation.ParametersAreNonnullByDefault;
apache/inlong
1,117
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/web/simplemvc/Context.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.inlong.tubemq.server.master.web.simplemvc; import java.util.Set; public interface Context { void put(String key, Object value); Object get(String key); void remove(String key); void clear(); void destroy(); boolean containsKey(String key); Set<String> keySet(); }
apache/iotdb
1,106
iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/subscription/payload/request/PipeSubscribeRequestVersion.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iotdb.rpc.subscription.payload.request; public enum PipeSubscribeRequestVersion { VERSION_1((byte) 1), ; private final byte version; PipeSubscribeRequestVersion(final byte type) { this.version = type; } public byte getVersion() { return version; } }
apache/iotdb
1,112
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/read/resp/info/IDeviceSchemaInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iotdb.db.schemaengine.schemaregion.read.resp.info; import org.apache.tsfile.utils.Binary; public interface IDeviceSchemaInfo extends ISchemaInfo { Boolean isAligned(); int getTemplateId(); Binary getAttributeValue(final String attributeKey); String[] getRawNodes(); }
apache/iotdb
1,122
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/TsBlockSerdeFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iotdb.db.queryengine.execution.exchange; import org.apache.tsfile.read.common.block.column.TsBlockSerde; import java.util.function.Supplier; public class TsBlockSerdeFactory implements Supplier<TsBlockSerde> { @Override public TsBlockSerde get() { return new TsBlockSerde(); } }
apache/iotdb
1,127
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/Relation.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iotdb.db.queryengine.plan.relational.sql.ast; public abstract class Relation extends Node { protected Relation(NodeLocation location) { super(location); } @Override public <R, C> R accept(AstVisitor<R, C> visitor, C context) { return visitor.visitRelation(this, context); } }
apache/jackrabbit-oak
1,133
oak-examples/standalone/src/main/java/org/apache/jackrabbit/oak/standalone/OakServer.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.jackrabbit.oak.standalone; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class OakServer { public static void main(String[] args) { SpringApplication.run(OakServer.class, args); } }
apache/jclouds
1,143
providers/azureblob/src/main/java/org/jclouds/azureblob/domain/ListBlobsInclude.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jclouds.azureblob.domain; public enum ListBlobsInclude { COPY, METADATA, SNAPSHOTS, UNCOMMITTEDBLOBS; public static ListBlobsInclude fromValue(String symbol) { return ListBlobsInclude.valueOf(symbol.toUpperCase()); } @Override public String toString() { return name().toLowerCase(); } }
apache/jclouds
1,157
apis/ec2/src/main/java/org/jclouds/ec2/compute/util/EC2ComputeUtils.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jclouds.ec2.compute.util; import jakarta.inject.Singleton; import org.jclouds.domain.Location; import org.jclouds.domain.LocationScope; @Singleton public class EC2ComputeUtils { public static String getZoneFromLocationOrNull(Location location) { return location.getScope() == LocationScope.ZONE ? location.getId() : null; } }
apache/jclouds
1,157
compute/src/test/java/org/jclouds/compute/stub/StubApiMetadataTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jclouds.compute.stub; import org.jclouds.compute.internal.BaseComputeServiceApiMetadataTest; import org.testng.annotations.Test; @Test(groups = "unit", testName = "StubApiMetadataTest") public class StubApiMetadataTest extends BaseComputeServiceApiMetadataTest { public StubApiMetadataTest() { super(new StubApiMetadata()); } }
apache/jmeter
1,159
src/core/src/main/java/org/apache/jmeter/threads/SetupThreadGroup.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jmeter.threads; /** * SetupThreadGroup.java is a special type of ThreadGroup that can be used for * setting up of a test before the bulk of the test executes later. * */ public class SetupThreadGroup extends ThreadGroup { private static final long serialVersionUID = 240L; public SetupThreadGroup() { super(); } }
apache/kafka
1,150
generator/src/main/java/org/apache/kafka/message/checker/UnificationException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kafka.message.checker; public class UnificationException extends RuntimeException { private static final long serialVersionUID = 1L; public UnificationException(String message, Throwable cause) { super(message, cause); } public UnificationException(String message) { this(message, null); } }
apache/kylin
1,121
src/core-common/src/main/java/org/apache/kylin/common/persistence/transaction/EpochCheckBroadcastNotifier.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kylin.common.persistence.transaction; import lombok.EqualsAndHashCode; @EqualsAndHashCode public class EpochCheckBroadcastNotifier extends BroadcastEventReadyNotifier { @Override public BroadcastScopeEnum getBroadcastScope() { return BroadcastScopeEnum.LEADER_NODES; } }
apache/kylin
1,127
src/common-service/src/main/java/org/apache/kylin/rest/request/UpdateAWSTableExtDescRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kylin.rest.request; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; @Data public class UpdateAWSTableExtDescRequest { @JsonProperty("project") private String project; @JsonProperty("tables") private List<S3TableExtInfo> tables; }
apache/kylin
1,132
src/core-metadata/src/main/java/org/apache/kylin/cube/model/validation/ResultLevel.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kylin.cube.model.validation; /** * Validation result level * * @author jianliu * */ public enum ResultLevel { ERROR("ERROR"), WARN("WARN"); private String level; ResultLevel(String level) { this.level = level; } public String toString() { return level; } }
apache/kyuubi
1,163
kyuubi-util-scala/src/test/java/org/apache/kyuubi/tags/DeltaTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kyuubi.tags; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.scalatest.TagAnnotation; @TagAnnotation @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD, ElementType.TYPE}) public @interface DeltaTest {}
apache/lucene
1,143
lucene/luke/src/java/org/apache/lucene/luke/app/desktop/components/SearchTabOperator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.lucene.luke.app.desktop.components; /** Operator for the Search tab */ public interface SearchTabOperator extends ComponentOperatorRegistry.ComponentOperator { void searchByTerm(String field, String term); void mltSearch(int docNum); void enableExactHitsCB(boolean value); void setExactHits(boolean value); }
apache/manifoldcf
1,145
connectors/livelink/build-stub/src/main/java/com/opentext/api/LLSession.java
/* $Id$ */ /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.opentext.api; /** Stub classes to get connector to build. */ public class LLSession extends LLConnect { public LLSession(String server, int port, String something, String user, String password, LLValue whoknows) { super(server,port,null,null); } public static void GetCARootCerts(String path, LLValue something) { } }
apache/maven-plugins
1,111
maven-compiler-plugin/src/it/includes-excludes/src/test/java/org/apache/maven/it0055/PersonTwoTest.java
package org.apache.maven.it0055; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT 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 junit.framework.TestCase; public class PersonTwoTest extends TestCase { public void testPerson() { Person person = new Person(); person.setName( "foo" ); assertEquals( "foo", person.getName() ); } }
apache/maven-resolver
1,141
maven-resolver-api/src/main/java/org/eclipse/aether/scope/ResolutionScope.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.eclipse.aether.scope; /** * Generic resolution scope. * * @since 2.0.0 * * @noimplement This interface is not intended to be implemented by clients. * @noextend This interface is not intended to be extended by clients. */ public interface ResolutionScope { /** * The label. */ String getId(); }
apache/nifi
1,075
nifi-extension-bundles/nifi-extension-utils/nifi-record-utils/nifi-schema-inference-utils/src/main/java/org/apache/nifi/schema/inference/RecordSourceFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.schema.inference; import java.io.IOException; import java.io.InputStream; import java.util.Map; public interface RecordSourceFactory<T> { RecordSource<T> create(Map<String, String> variables, InputStream contentStream) throws IOException; }
apache/olingo-odata4
1,132
lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmOperationImportInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.commons.api.edm; /** * Objects of this class contain information about one action or function import inside the EntityDataModel. */ public interface EdmOperationImportInfo { /** * @return the entity container name which contains this function import. */ String getEntityContainerName(); }
apache/olingo-odata4
1,134
lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/FormatOption.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.server.api.uri.queryoption; /** * Represents the system query option $format * For example: http://.../entitySet?$format=json */ public interface FormatOption extends SystemQueryOption { // TODO planned: define best representation for format to enable user defined formats String getFormat(); }
apache/oodt
1,142
resource/src/main/java/org/apache/oodt/cas/resource/noderepo/NodeRepository.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.resource.noderepo; //OODT imports import org.apache.oodt.cas.resource.structs.ResourceNode; //JDK imports import java.util.List; /** * * @author bfoster * @version $Revision$ * * <p> * The Node Repository interface. * </p> */ public interface NodeRepository { List<ResourceNode> loadNodes(); }
apache/oozie
1,134
fluent-job/fluent-job-api/src/test/java/org/apache/oozie/fluentjob/api/action/TestTouchz.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.oozie.fluentjob.api.action; import org.junit.Test; import static org.junit.Assert.assertEquals; public class TestTouchz { @Test public void testGetPath() { final String path = "path"; final Touchz touchz = new Touchz(path); assertEquals(path, touchz.getPath()); } }
apache/openjpa
1,119
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Chevrolet2.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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("Chevrolet") public class Chevrolet2 extends Car2 { public Chevrolet2() {} public Chevrolet2(int id) { super(id); } }
apache/openjpa
1,123
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/NoGenEntityL3.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.inheritance; import jakarta.persistence.Entity; @Entity public class NoGenEntityL3 extends NoGenMappedSuperclassL2 { private int l3data; public int getL3Data() { return l3data; } public void setL3Data(int data) { l3data = data; } }
apache/openjpa
1,132
openjpa-persistence/src/main/java/org/apache/openjpa/persistence/query/TypeExpression.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.query; /** * Denotes TYPE(e) Expression. * * @author Pinaki Poddar * */ public class TypeExpression extends UnaryOperatorExpression { private static final long serialVersionUID = 1L; public TypeExpression(Expression op) { super(op, UnaryFunctionalOperator.TYPE); } }
apache/openwebbeans
1,131
webbeans-impl/src/test/java/org/apache/webbeans/test/xml/strict/AlternativeStereotype.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.webbeans.test.xml.strict; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import jakarta.enterprise.inject.Alternative; import jakarta.enterprise.inject.Stereotype; @Stereotype @Alternative @Retention(RUNTIME) public @interface AlternativeStereotype { }
apache/ozhera
1,127
trace-etl/trace-etl-api/src/main/java/org/apache/ozhera/trace/etl/api/service/TraceManagerService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.ozhera.trace.etl.api.service; import org.apache.ozhera.trace.etl.domain.HeraTraceEtlConfig; import com.xiaomi.youpin.infra.rpc.Result; import java.util.List; /** * @Description * @Date 2022/4/24 7:35 pm */ public interface TraceManagerService { Result<List<HeraTraceEtlConfig>> getAll(); }
apache/phoenix
1,141
phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/PhoenixMonitoredResultSet.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.phoenix.jdbc; import java.sql.ResultSet; import java.util.Map; import org.apache.phoenix.monitoring.MetricType; public interface PhoenixMonitoredResultSet extends ResultSet { Map<String, Map<MetricType, Long>> getReadMetrics(); Map<MetricType, Long> getOverAllRequestReadMetrics(); void resetMetrics(); }
apache/pinot
1,159
pinot-common/src/main/java/org/apache/pinot/sql/parsers/PinotSqlType.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.sql.parsers; public enum PinotSqlType { /* Data Query Language (DQL), e.g. SELECT */ DQL, /* Data Control Language(DCL), e.g. GRANT, REVOKE */ DCL, /* Data Manipulation Language (DML), e.g. INSERT, UPSERT, UPDATE, DELETE */ DML, /* Data Definition Language (DDL), e.g. CREATE, DROP, ALTER, TRUNCATE */ DDL }
apache/plc4x-extras
1,096
plc4j/integrations/apache-nifi/nifi-1/nifi-plc4x-processors/src/main/java/org/apache/plc4x/nifi/subscription/Plc4xSubscriptionType.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.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.nifi.subscription; public enum Plc4xSubscriptionType { CHANGE, // of state (Event is sent as soon as a value changes) CYCLIC, //(The Event is sent in regular cyclic intervals) EVENT //(The Event is usually explicitly sent form the PLC as a signal) }
apache/plc4x
1,108
plc4j/transports/pcap-replay/src/main/java/org/apache/plc4x/java/transport/pcapreplay/PcapReplayTransportConfiguration.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.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.transport.pcapreplay; import org.apache.plc4x.java.transport.pcap.PcapTransportConfiguration; public interface PcapReplayTransportConfiguration extends PcapTransportConfiguration { float getReplaySpeedFactor(); boolean isLoop(); String getFilter(); }
apache/poi
1,193
poi-excelant/src/main/java9/module-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. ==================================================================== */ module org.apache.poi.excelant { requires ant; requires transitive org.apache.poi.poi; requires org.apache.poi.ooxml; exports org.apache.poi.ss.excelant; exports org.apache.poi.ss.excelant.util; opens org.apache.poi.ss.excelant; }
apache/pulsar
1,122
pulsar-broker/src/main/java/org/apache/pulsar/broker/delayed/bucket/BucketSnapshotSerializationException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pulsar.broker.delayed.bucket; public class BucketSnapshotSerializationException extends RuntimeException { public BucketSnapshotSerializationException(String message) { super(message); } public BucketSnapshotSerializationException(Throwable t) { super(t); } }
apache/pulsar
1,145
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/SinkStatusUtil.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pulsar.common.policies.data; import java.io.IOException; import org.apache.pulsar.common.util.ObjectMapperFactory; public class SinkStatusUtil { public static SinkStatus decode(String json) throws IOException { return ObjectMapperFactory.getMapper().reader().readValue(json, SinkStatus.class); } }
apache/royale-compiler
1,116
compiler/src/main/java/org/apache/royale/compiler/internal/tree/as/parts/IAccessorFunctionContentsPart.java
/* * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.royale.compiler.internal.tree.as.parts; import org.apache.royale.compiler.internal.tree.as.KeywordNode; public interface IAccessorFunctionContentsPart extends IFunctionContentsPart { void setAccessorKeyword(KeywordNode keyword); KeywordNode getAccessorKeyword(); }
apache/samza
1,160
samza-api/src/main/java/org/apache/samza/serializers/ByteSerde.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.serializers; /** * A serializer for bytes that is effectively a pass-through, but can be useful for binary messages. */ public class ByteSerde implements Serde<byte[]> { @Override public byte[] toBytes(byte[] bytes) { return bytes; } @Override public byte[] fromBytes(byte[] bytes) { return bytes; } }
apache/seatunnel-web
1,091
seatunnel-datasource/seatunnel-datasource-client/src/main/java/org/apache/seatunnel/datasource/response/PageResultResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.datasource.response; import lombok.Data; import java.util.List; @Data public class PageResultResponse<T> { private Integer pageNum; private Integer pageSize; private Integer total; private Integer pages; private List<T> dataList; }
apache/seatunnel
1,113
seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/storage/Storage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.hive.storage; import org.apache.seatunnel.api.configuration.ReadonlyConfig; import org.apache.seatunnel.connectors.seatunnel.file.config.HadoopConf; public interface Storage { HadoopConf buildHadoopConfWithReadOnlyConfig(ReadonlyConfig readonlyConfig); }
apache/servicecomb-fence
1,121
common/common-authentication/src/main/java/org/apache/servicecomb/fence/token/SessionTokenStore.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.fence.token; import org.springframework.security.core.userdetails.UserDetails; public class SessionTokenStore implements TokenStore<SessionToken> { @Override public SessionToken createToken(UserDetails userDetails) { return new SessionToken(userDetails.getUsername()); } }
apache/servicecomb-java-chassis
1,080
foundations/foundation-protobuf/src/test/java/org/apache/servicecomb/foundation/protobuf/internal/schema/scalar/TestFixed64Schema.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.foundation.protobuf.internal.schema.scalar; public class TestFixed64Schema extends TestNumberBaseSchema { public TestFixed64Schema() { minValue = Long.MIN_VALUE; maxValue = Long.MAX_VALUE; initFields("fixed64", "objFixed64"); } }
apache/servicecomb-java-chassis
1,122
demo/demo-consul/consumer/src/main/java/org/apache/servicecomb/samples/User.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.samples; public class User { private Long id; private String name; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
apache/servicecomb-saga-actuator
1,123
saga-format/src/main/java/org/apache/servicecomb/saga/format/JsonFailedSagaResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.saga.format; import com.fasterxml.jackson.annotation.JsonProperty; import org.apache.servicecomb.saga.core.FailedSagaResponse; public class JsonFailedSagaResponse extends FailedSagaResponse { public JsonFailedSagaResponse(@JsonProperty("body") String body) { super(body); } }
apache/servicecomb-saga-actuator
1,140
saga-core/src/main/java/org/apache/servicecomb/saga/core/EventContext.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.saga.core; public interface EventContext { void beginTransaction(SagaRequest request); void endTransaction(SagaRequest request, SagaResponse response); void abortTransaction(SagaRequest request, SagaResponse response); void compensateTransaction(SagaRequest request, SagaResponse response); }
apache/shardingsphere
1,120
kernel/authority/core/src/main/java/org/apache/shardingsphere/authority/constant/AuthorityOrder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.authority.constant; import lombok.AccessLevel; import lombok.NoArgsConstructor; /** * Authority order. */ @NoArgsConstructor(access = AccessLevel.PRIVATE) public final class AuthorityOrder { /** * Authority order. */ public static final int ORDER = 500; }
apache/shenyu
1,115
shenyu-plugin/shenyu-plugin-metrics/src/main/java/org/apache/shenyu/plugin/metrics/enums/MetricType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.plugin.metrics.enums; /** * Metric type. */ public enum MetricType { /** * Counter metric type. */ COUNTER, /** * Gauge metric type. */ GAUGE, /** * Histogram metric type. */ HISTOGRAM; MetricType() { } }
apache/skywalking
1,060
oap-server/server-tools/profile-exporter/tool-profile-snapshot-exporter/src/main/java/org/apache/skywalking/oap/server/tool/profile/exporter/ProfileSnapshotExporter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.tool.profile.exporter; import lombok.extern.slf4j.Slf4j; @Slf4j public class ProfileSnapshotExporter { public static void main(String[] args) { ProfileSnapshotExporterBootstrap.export(args); } }
apache/skywalking
1,083
oap-server/server-library/library-elasticsearch-client/src/main/java/org/apache/skywalking/library/elasticsearch/requests/factory/AliasFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.library.elasticsearch.requests.factory; import com.linecorp.armeria.common.HttpRequest; public interface AliasFactory { /** * Returns a request to list all indices behind the {@code alias}. */ HttpRequest indices(String alias); }
apache/skywalking
1,124
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/server/HTTPHandlerRegister.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.core.server; import com.linecorp.armeria.common.HttpMethod; import java.util.List; import org.apache.skywalking.oap.server.library.module.Service; public interface HTTPHandlerRegister extends Service { void addHandler(Object httpService, List<HttpMethod> httpMethods); }
apache/storm
1,175
storm-client/src/jvm/org/apache/storm/state/IStateSpout.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version * 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.state; import java.io.Serializable; import java.util.Map; import org.apache.storm.task.TopologyContext; public interface IStateSpout extends Serializable { void open(Map<String, Object> conf, TopologyContext context); void close(); void nextTuple(StateSpoutOutputCollector collector); void synchronize(SynchronizeOutputCollector collector); }
apache/stratos
1,079
components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/application/signup/ApplicationSignUpRemovedEventListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.stratos.messaging.listener.application.signup; import org.apache.stratos.messaging.listener.EventListener; /** * Application signup removed event listener. */ public abstract class ApplicationSignUpRemovedEventListener extends EventListener { }
apache/stratos
1,085
components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/policy/DeploymentPolicyAlreadyExistsException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.stratos.autoscaler.exception.policy; /** * Cartridge already exists exception. */ public class DeploymentPolicyAlreadyExistsException extends Exception { public DeploymentPolicyAlreadyExistsException(String message) { super(message); } }
apache/stratos
1,132
components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosCommandContext.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.stratos.cli; public class StratosCommandContext extends CommandContext { public StratosCommandContext(StratosApplication application) { super(application); } public StratosApplication getStratosApplication() { return (StratosApplication) getApplication(); } }
apache/streampark
1,096
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/metrics/spark/SparkExecutor.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.streampark.console.core.metrics.spark; import lombok.Getter; import lombok.Setter; import java.io.Serializable; @Getter @Setter public class SparkExecutor implements Serializable { private Long memoryUsed; private Long maxMemory; private Long totalCores; }
apache/streampipes
1,078
streampipes-extensions/streampipes-processors-filters-siddhi/src/main/java/org/apache/streampipes/processors/siddhi/trend/TrendOperator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.processors.siddhi.trend; public enum TrendOperator { INCREASE("Increase"), DECREASE("Decrease"); private String label; TrendOperator(String label) { this.label = label; } public String getLabel() { return label; } }
apache/streampipes
1,112
streampipes-extensions-api/src/main/java/org/apache/streampipes/extensions/api/pe/config/IDataStreamConfiguration.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.extensions.api.pe.config; import org.apache.streampipes.extensions.api.pe.IStreamPipesDataStream; import org.apache.streampipes.model.SpDataStream; public interface IDataStreamConfiguration extends IPipelineElementConfiguration<SpDataStream, IStreamPipesDataStream> { }
apache/syncope
1,138
common/am/lib/src/main/java/org/apache/syncope/common/lib/types/OIDCSubjectType.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.common.lib.types; public enum OIDCSubjectType { PUBLIC("public"), PAIRWISE("pairwise"); private final String externalForm; OIDCSubjectType(final String external) { this.externalForm = external; } public String getExternalForm() { return externalForm; } }
apache/tajo
1,162
tajo-common/src/test/java/org/apache/tajo/type/TestTypeStringEncoder.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.type; import static org.apache.tajo.type.TypeStringEncoder.decode; import static org.apache.tajo.type.TypeStringEncoder.encode; import static org.junit.Assert.assertEquals; public class TestTypeStringEncoder extends TestTypeEncoder { public void assertSerialize(Type type) { assertEquals(type, decode(encode(type))); } }
apache/tapestry-5
1,119
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ShowSelection.java
// Copyright 2006, 2007 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.integration.app1.pages; import org.apache.tapestry5.annotations.OnEvent; public class ShowSelection { private int selected; public int getSelected() { return selected; } public void setSelected(int selected) { this.selected = selected; } @OnEvent("passivate") int passivate() { return selected; } @OnEvent("activate") void activate(int selected) { this.selected = selected; } }
apache/tez
1,153
tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerState.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with this * work for additional information regarding copyright ownership. The ASF * licenses this file to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.apache.tez.dag.app.rm.container; public enum AMContainerState { ALLOCATED, LAUNCHING, IDLE, RUNNING, // indicates a NM stop request has been attempted. This request could fail, in // which case an RM stop request needs to be sent. STOP_REQUESTED, // A stop request has been registered with YARN STOPPING, COMPLETED, }
apache/tika
1,139
tika-serialization/src/main/java/org/apache/tika/serialization/TikaSerializationException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.serialization; import org.apache.tika.exception.TikaException; public class TikaSerializationException extends TikaException { public TikaSerializationException(String msg) { super(msg); } public TikaSerializationException(String msg, Throwable cause) { super(msg, cause); } }
apache/tiles
1,149
tiles-compat/src/main/java/org/apache/tiles/compat/preparer/package-info.java
/* * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * <p>"View preparers" are objects that allows the "preparation" of a Tiles artifact * (definition, template or attribute) before it is rendered.</p> * <p>This package contains "compatibility" preparers, i.e. ViewPreparers that are * compatibile with Tiles 1 "controllers".</p> */ package org.apache.tiles.compat.preparer;
apache/tomee
1,137
container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/EjbReferenceInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.assembler.classic; public class EjbReferenceInfo extends InjectableInfo { public String homeClassName; public String interfaceClassName; public String ejbDeploymentId; public boolean ambiguous; public boolean externalReference; public String link; public boolean localbean; }
apache/tomee
1,143
container/openejb-core/src/test/java/org/apache/openejb/util/CollectionsUtilTest.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.util; import org.junit.Test; import java.util.List; public class CollectionsUtilTest { @Test public void safeIterationForNullList() { final List<String> stringList = null; for (final String string : CollectionsUtil.safe(stringList)) { } //PASS: No NPE thrown } }
apache/tomee
1,144
container/openejb-junit/src/main/java/org/apache/openejb/junit/jee/config/Property.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.junit.jee.config; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface Property { String key(); String value(); }
apache/tomee
1,147
container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/oejb3/Adapters.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.jee.oejb3; import jakarta.xml.bind.annotation.adapters.CollapsedStringAdapter; public class Adapters { public static final CollapsedStringAdapter collapsedStringAdapterAdapter = new CollapsedStringAdapter(); public static final PropertiesAdapter propertiesAdapterAdapter = new PropertiesAdapter(); }
apache/tomee
1,150
container/openejb-core/src/test/java/org/apache/openejb/util/BarUrlHandler.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.util; import java.io.IOException; import java.net.URL; import java.net.URLConnection; /** * @version $Revision$ $Date$ */ public class BarUrlHandler extends java.net.URLStreamHandler { protected URLConnection openConnection(final URL u) throws IOException { throw new IOException("bar"); } }
apache/tomee
1,150
container/openejb-core/src/test/java/org/apache/openejb/util/FooUrlHandler.java
/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.util; import java.io.IOException; import java.net.URL; import java.net.URLConnection; /** * @version $Revision$ $Date$ */ public class FooUrlHandler extends java.net.URLStreamHandler { protected URLConnection openConnection(final URL u) throws IOException { throw new IOException("foo"); } }
apache/tomee
1,155
container/openejb-core/src/main/java/org/apache/openejb/junit/AppResource.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.junit; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) @Deprecated // use org.apache.openejb.testing.AppResource public @interface AppResource { }
apache/tomee
1,155
container/openejb-junit/src/main/java/org/apache/openejb/junit/Transaction.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.junit; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface Transaction { boolean rollback() default false; }
apache/usergrid
1,122
stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/core/QueueManager.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.usergrid.persistence.qakka.core; import java.util.List; public interface QueueManager { void createQueue(Queue queue); void updateQueueConfig(Queue queue); void deleteQueue(String queueName); Queue getQueueConfig(String queueName); List<String> getListOfQueues(); }
apache/wicket
1,138
wicket-core-tests/src/test/java/org/apache/wicket/ajax/form/ThirdPage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.ajax.form; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; /** * */ public class ThirdPage extends WebPage { private static final long serialVersionUID = 1L; /** * Construct. */ public ThirdPage() { add(new Label("label", "Hello world.")); } }
apache/wicket
1,141
wicket-core/src/main/java/org/apache/wicket/resource/ITextResourceCompressor.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.resource; /** * Allow for different implementations of a text compressor */ @FunctionalInterface public interface ITextResourceCompressor { /** * Remove comments and white spaces from the text resource * * @param original * @return compressed text resource */ String compress(String original); }
apache/zookeeper
1,151
zookeeper-server/src/main/java/org/apache/zookeeper/audit/AuditLogger.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.zookeeper.audit; public interface AuditLogger { /** * Called during initialization of the logger. */ default void initialize() { } /** * Called to log an audit event. * * @param auditEvent contains all the fields to be logged */ void logAuditEvent(AuditEvent auditEvent); }
google/agi
1,178
gapic/src/main/com/google/gapid/util/Arrays.java
/* * Copyright (C) 2018 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.gapid.util; /** * Array utilities. */ public class Arrays { private Arrays() { } public static <T> T last(T[] array) { return (array == null || array.length == 0) ? null : array[array.length - 1]; } public static <T> T getOrDefault(T[] array, int idx, T dflt) { return array == null || idx >= array.length ? dflt : array[idx]; } public static long[] filled(long[] array, long val) { // No generic pattern here because want a long[] array rather than Long[] array. java.util.Arrays.fill(array, val); return array; } }
google/binnavi
1,125
src/main/java/com/google/security/zynamics/binnavi/debug/connection/packets/commands/ResumeCommand.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.binnavi.debug.connection.packets.commands; import com.google.security.zynamics.binnavi.debug.connection.DebugCommandType; /** * Command class for resume commands. This command should be sent to resume a thread in the target * process. */ public final class ResumeCommand extends DebugCommand { /** * Creates a new resume command. * * @param packetId Packet ID of the command. */ public ResumeCommand(final int packetId) { super(DebugCommandType.CMD_RESUME, packetId); } }
google/cloud-cup-android
1,144
app/src/main/java/fr/steren/cloudcup/games/BoilerplateGameActivity.java
/* Copyright 2014 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package fr.steren.cloudcup.games; import android.os.Bundle; import fr.steren.cloudcup.GameActivity; import fr.steren.cloudcup.R; public class BoilerplateGameActivity extends GameActivity { private static final String LOG_TAG = BoilerplateGameActivity.class.getSimpleName(); @Override public void onCreate(Bundle savedInstanceState) { state = GameState.GAME; super.onCreate(savedInstanceState); setContentView(R.layout.boilerplate_game_activity); } }
google/exposure-notifications-android
1,094
privateanalytics/src/main/java/com/google/android/libraries/privateanalytics/PrivateAnalyticsEventListener.java
/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.libraries.privateanalytics; /** * Listener interface that can be implemented if it is relevant to observe asynchronous events * triggered by the SDK (analytics worker starting, or status of the network request for remote * config). */ public interface PrivateAnalyticsEventListener { void onPrivateAnalyticsWorkerTaskStarted(); void onPrivateAnalyticsRemoteConfigCallSuccess(int length); void onPrivateAnalyticsRemoteConfigCallFailure(Exception err); }
google/guice
1,147
extensions/grapher/test/com/google/inject/grapher/demo/AssistedInjectModule.java
/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.inject.grapher.demo; import com.google.inject.AbstractModule; import com.google.inject.assistedinject.FactoryModuleBuilder; /** * Module to add {@link AssistedInject}-based elements to the demo {@link Injector}. * * @author phopkins@gmail.com (Pete Hopkins) */ public class AssistedInjectModule extends AbstractModule { @Override protected void configure() { install( new FactoryModuleBuilder() .implement(DanceParty.class, DancePartyImpl.class) .build(DancePartyFactory.class)); } }
google/j2cl
1,168
jre/java/java/util/ConcurrentModificationException.java
/* * Copyright 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package java.util; /** * See <a * href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/ConcurrentModificationException.html">the * official Java API doc</a> for details. */ public class ConcurrentModificationException extends RuntimeException { public ConcurrentModificationException() {} public ConcurrentModificationException(String message) { super(message); } public ConcurrentModificationException(Throwable cause) { super(cause); } public ConcurrentModificationException(String message, Throwable cause) { super(message, cause); } }
google/or-tools
1,153
cmake/samples/java/src/test/java/com/google/ortools/AppTest.java
// Copyright 2010-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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES 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.ortools; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** Unit test for simple App. */ public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ public AppTest(String testName) { super(testName); } /** * @return the suite of tests being tested */ public static Test suite() { return new TestSuite(AppTest.class); } /** Rigourous Test :-) */ public void testApp() { assertTrue(true); } }
google/play-licensing
1,136
lvl_library/src/main/java/com/google/android/vending/licensing/NullDeviceLimiter.java
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.android.vending.licensing; /** * A DeviceLimiter that doesn't limit the number of devices that can use a * given user's license. * <p> * Unless you have reason to believe that your application is being pirated * by multiple users using the same license (signing in to Market as the same * user), we recommend you use this implementation. */ public class NullDeviceLimiter implements DeviceLimiter { public int isDeviceAllowed(String userId) { return Policy.LICENSED; } }
google/tsunami-security-scanner-plugins
1,027
community/detectors/rce/apache_spark_exposed_api/src/main/java/com/google/tsunami/plugins/detectors/rce/apachesparksexposedapi/ApacheSparksExposedApiVulnDetectorBootstrapModule.java
/* * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.tsunami.plugins.detectors.rce.apachesparksexposedapi; import com.google.tsunami.plugin.PluginBootstrapModule; /** A {@link PluginBootstrapModule} for {@link ApacheSparksExposedApiVulnDetector}. */ public final class ApacheSparksExposedApiVulnDetectorBootstrapModule extends PluginBootstrapModule { @Override protected void configurePlugin() { registerPlugin(ApacheSparksExposedApiVulnDetector.class); } }
hibernate/hibernate-orm
1,063
hibernate-core/src/test/java/org/hibernate/orm/test/bootstrap/binding/annotations/access/jpa/Course3.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.bootstrap.binding.annotations.access.jpa; import java.util.List; import jakarta.persistence.Access; import jakarta.persistence.AccessType; import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.OneToMany; /** * @author Hardy Ferentschik */ @Entity @Access(AccessType.PROPERTY) public class Course3 { private long id; private String title; private List<Student> students; @Id @GeneratedValue @Access(AccessType.FIELD) public long getId() { return id; } public void setId(long id) { this.id = id; } @OneToMany(cascade = CascadeType.ALL) public List<Student> getStudents() { return students; } public void setStudents(List<Student> students) { this.students = students; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } }
hibernate/hibernate-orm
1,069
hibernate-core/src/test/java/org/hibernate/orm/test/jpa/orphan/onetoone/multilevelcascade/Tranche.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.jpa.orphan.onetoone.multilevelcascade; import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; import jakarta.persistence.FetchType; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToOne; @Entity public class Tranche { @Id @GeneratedValue private Long id; @ManyToOne(optional = false, fetch = FetchType.EAGER) private Tranchenmodell tranchenmodell; @OneToOne(mappedBy = "tranche", cascade = CascadeType.ALL, fetch = FetchType.LAZY, orphanRemoval = true) private Y y; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Tranchenmodell getTranchenmodell() { return tranchenmodell; } public void setTranchenmodell(Tranchenmodell tranchenmodell) { this.tranchenmodell = tranchenmodell; } public Y getY() { return y; } public void setY(Y y) { this.y = y; } }