repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/eagle
1,037
eagle-core/eagle-common/src/main/java/org/apache/eagle/common/security/RolesAllowed.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eagle.common.security; import java.lang.annotation.*; @Inherited @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface RolesAllowed { User.Role[] value(); }
apache/eventmesh
1,035
eventmesh-runtime-v2/src/main/java/org/apache/eventmesh/runtime/RuntimeFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.eventmesh.runtime; /** * RuntimeFactory */ public interface RuntimeFactory extends AutoCloseable { void init() throws Exception; Runtime createRuntime(RuntimeInstanceConfig runtimeInstanceConfig); }
apache/fesod
1,051
fesod/src/test/java/org/apache/fesod/excel/extra/ExtraData.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fesod.excel.extra; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; /** * */ @Getter @Setter @EqualsAndHashCode public class ExtraData { private String row1; private String row2; }
apache/fluss
1,047
fluss-common/src/main/java/org/apache/fluss/lake/batch/ArrowRecordBatch.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.fluss.lake.batch; import org.apache.fluss.annotation.PublicEvolving; /** * The Arrow implementation of the RecordBatch interface. * * @since 0.7 */ @PublicEvolving public class ArrowRecordBatch implements RecordBatch {}
apache/geode
1,029
geode-core/src/main/java/org/apache/geode/management/internal/exceptions/NoMembersException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.geode.management.internal.exceptions; import org.apache.geode.GemFireException; public class NoMembersException extends GemFireException { public NoMembersException(String message) { super(message); } }
apache/giraph
1,034
giraph-block-app/src/main/java/org/apache/giraph/block_app/framework/piece/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. */ /** * Single execution object - Piece, and related classes. * * AbstractPiece is parent class of all Pieces. Most frequentlly * users should extend Piece class itself */ package org.apache.giraph.block_app.framework.piece;
apache/groovy
1,048
src/test/groovy/gls/annotations/closures/JavaAnnotationWithClassElement.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package gls.annotations.closures; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @Retention(RetentionPolicy.RUNTIME) public @interface JavaAnnotationWithClassElement { Class elem(); }
apache/hadoop
1,025
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/http/HttpFileSystem.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.fs.http; /** * A Filesystem that reads from HTTP endpoint. */ public class HttpFileSystem extends AbstractHttpFileSystem { @Override public String getScheme() { return "http"; } }
apache/hertzbeat
1,024
hertzbeat-remoting/src/main/java/org/apache/hertzbeat/remoting/netty/NettyServerConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hertzbeat.remoting.netty; import lombok.Data; /** * netty server config */ @Data public class NettyServerConfig { private Integer port; private Integer idleStateEventTriggerTime = 100; }
apache/hive
1,046
storage-api/src/java/org/apache/hadoop/hive/ql/io/sarg/LiteralDelegate.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hive.ql.io.sarg; import org.apache.hadoop.conf.Configurable; /** * Interface to retrieve a literal value */ public interface LiteralDelegate extends Configurable { Object getLiteral(); String getId(); }
apache/hive
1,055
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner2.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hive.ql.txn.compactor; /** * Same as TestCleaner but tests delta file names in Hive 1.3.0 format */ public class TestCleaner2 extends TestCleaner { @Override boolean useHive130DeltaDirName() { return true; } }
apache/hop
1,039
engine/src/main/java/org/apache/hop/core/annotations/ActionTransformType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hop.core.annotations; public enum ActionTransformType { ENV_CHECK, INPUT, OUTPUT, JOIN, LOOKUP, DELETE, UPDATE, FILE, MAIL, RDBMS, GRAPH, NOSQL, HOP_FILE, HOP_PIPELINE, HOP_WORKFLOW }
apache/hudi
1,024
hudi-flink-datasource/hudi-flink1.17.x/src/main/java/org/apache/hudi/adapter/SinkFunctionAdapter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hudi.adapter; import org.apache.flink.streaming.api.functions.sink.SinkFunction; /** * Adapter clazz for {@link SinkFunction}. */ public interface SinkFunctionAdapter<I> extends SinkFunction<I> { }
apache/hudi
1,024
hudi-flink-datasource/hudi-flink1.18.x/src/main/java/org/apache/hudi/adapter/SinkFunctionAdapter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hudi.adapter; import org.apache.flink.streaming.api.functions.sink.SinkFunction; /** * Adapter clazz for {@link SinkFunction}. */ public interface SinkFunctionAdapter<I> extends SinkFunction<I> { }
apache/hudi
1,024
hudi-flink-datasource/hudi-flink1.19.x/src/main/java/org/apache/hudi/adapter/SinkFunctionAdapter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hudi.adapter; import org.apache.flink.streaming.api.functions.sink.SinkFunction; /** * Adapter clazz for {@link SinkFunction}. */ public interface SinkFunctionAdapter<I> extends SinkFunction<I> { }
apache/hudi
1,024
hudi-flink-datasource/hudi-flink1.20.x/src/main/java/org/apache/hudi/adapter/SinkFunctionAdapter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hudi.adapter; import org.apache.flink.streaming.api.functions.sink.SinkFunction; /** * Adapter clazz for {@link SinkFunction}. */ public interface SinkFunctionAdapter<I> extends SinkFunction<I> { }
apache/hudi
1,041
hudi-common/src/main/java/org/apache/hudi/exception/CorruptedLogFileException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hudi.exception; /** * An Exception thrown when the log file corrupted. */ public class CorruptedLogFileException extends HoodieException { public CorruptedLogFileException(String msg) { super(msg); } }
apache/ignite-3
1,030
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/storage/UpdateLogEvent.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ignite.internal.catalog.storage; import org.apache.ignite.internal.catalog.storage.serialization.MarshallableEntry; /** * Update log event. */ public interface UpdateLogEvent extends MarshallableEntry { }
apache/incubator-graphar
1,026
maven-projects/java/src/main/java/org/apache/graphar/readers/chunkinfo/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. */ @FFIApplication(jniLibrary = GAR_JNI_LIBRARY_NAME) package org.apache.graphar.readers.chunkinfo; import static org.apache.graphar.util.JNILibraryName.GAR_JNI_LIBRARY_NAME; import com.alibaba.fastffi.FFIApplication;
apache/incubator-kie-drools
1,030
kie-dmn/kie-dmn-api/src/main/java/org/kie/dmn/api/core/ast/DecisionNode.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.dmn.api.core.ast; import org.kie.dmn.api.core.DMNType; import org.kie.dmn.model.api.Decision; public interface DecisionNode extends DMNNode { DMNType getResultType(); Decision getDecision(); }
apache/incubator-kie-drools
1,032
drools-decisiontables/src/test/java/org/kie/kogito/quickstart/Result.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR 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.quickstart; public class Result { private Object value; public Object getValue() { return value; } public void setValue( Object value ) { this.value = value; } }
apache/incubator-retired-wave
1,029
wave/src/main/java/org/waveprotocol/wave/client/account/ProfileListener.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR 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.account; /** * Listen to changes in a profile. * * @author kalman@google.com (Benjamin Kalman) */ public interface ProfileListener { void onProfileUpdated(Profile profile); }
apache/incubator-seata
1,025
server/src/main/java/org/apache/seata/server/cluster/listener/ClusterChangeListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.server.cluster.listener; /** */ public interface ClusterChangeListener { /** * cluster change event * @param event event */ void onChangeEvent(ClusterChangeEvent event); }
apache/incubator-seata
1,041
core/src/main/java/org/apache/seata/core/rpc/netty/ProtocolDecoder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.rpc.netty; import io.netty.buffer.ByteBuf; import org.apache.seata.core.protocol.RpcMessage; /** * the protocol decoder * **/ public interface ProtocolDecoder { RpcMessage decodeFrame(ByteBuf in); }
apache/incubator-xtable
1,029
xtable-api/src/main/java/org/apache/xtable/model/validation/ValidationCheck.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.xtable.model.validation; /** * List of supported validation checks * * @since 0.1 */ public enum ValidationCheck { CHECK_TABLE_SPEC, CHECK_SCHEMA, CHECK_BASIC_COUNTS, COMPARE_STATISTICS }
apache/jclouds
1,030
apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/RebootType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR 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.openstack.nova.v2_0.domain; public enum RebootType { HARD, SOFT; public String value() { return name(); } public static RebootType fromValue(String v) { return valueOf(v); } }
apache/jena
1,034
jena-arq/src/main/java/org/apache/jena/sparql/core/describe/DescribeBNodeClosureFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.sparql.core.describe; public class DescribeBNodeClosureFactory implements DescribeHandlerFactory { @Override public DescribeHandler create() { return new DescribeBNodeClosure(); } }
apache/jena
1,041
jena-db/jena-dboe-base/src/main/java/org/apache/jena/dboe/base/block/BlockParams.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.dboe.base.block; public interface BlockParams { public FileMode getFileMode(); public Integer getBlockSize(); public Integer getBlockReadCacheSize(); public Integer getBlockWriteCacheSize(); }
apache/jena
1,046
jena-arq/src/test/java/org/apache/jena/sparql/core/assembler/TS_Assembler.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.sparql.core.assembler; import org.junit.platform.suite.api.SelectClasses; import org.junit.platform.suite.api.Suite; @Suite @SelectClasses({ TestInMemDatasetAssembler.class }) public class TS_Assembler {}
apache/jena
1,055
jena-arq/src/test/java/org/apache/jena/riot/tokens/TS_Tokens.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.riot.tokens; import org.junit.platform.suite.api.SelectClasses; import org.junit.platform.suite.api.Suite; @Suite @SelectClasses({ TestTokenizerText.class , TestTokenForNode.class }) public class TS_Tokens { }
apache/jena
1,059
jena-base/src/main/java/org/apache/jena/atlas/io/PrintUtils.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.atlas.io; /** * @deprecated Use {@link Printable#toString} */ @Deprecated(forRemoval = true) public class PrintUtils { public static String toString(Printable object) { return Printable.toString(object); } }
apache/kafka
1,034
clients/src/main/java/org/apache/kafka/common/security/authenticator/DefaultLogin.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kafka.common.security.authenticator; public class DefaultLogin extends AbstractLogin { @Override public String serviceName() { return "kafka"; } @Override public void close() { } }
apache/kafka
1,060
clients/src/main/java/org/apache/kafka/common/replica/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Provides mechanism for determining placement of Kafka log replicas. * <strong>This package is not a supported Kafka API; the implementation may change without warning between minor or patch releases.</strong> */ package org.apache.kafka.common.replica;
apache/karaf
1,045
features/core/src/main/java/org/apache/karaf/features/internal/model/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. */ @javax.xml.bind.annotation.XmlSchema( namespace = org.apache.karaf.features.FeaturesNamespaces.URI_CURRENT, elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package org.apache.karaf.features.internal.model;
apache/kylin
1,031
src/core-common/src/main/java/org/apache/kylin/rest/exception/PasswordDecryptionException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.exception; public class PasswordDecryptionException extends RuntimeException { public PasswordDecryptionException(String message, Throwable cause) { super(message, cause); } }
apache/lucene
1,044
lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoMembershipShape.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.spatial3d.geom; /** * Membership shapes have capabilities of both geohashing and membership determination. * * @lucene.experimental */ public interface GeoMembershipShape extends GeoShape, GeoOutsideDistance {}
apache/lucene
1,053
lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoBounds.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.spatial3d.geom; /** * Generic shape that supports bounds. This describes methods that help shapes compute their bounds. * * @lucene.experimental */ public interface GeoBounds extends Bounded, Membership, PlanetObject {}
apache/nifi
1,037
nifi-framework-api/src/main/java/org/apache/nifi/action/details/ConfigureDetails.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.action.details; /** * Provides details about a configure action. */ public interface ConfigureDetails extends ActionDetails { String getName(); String getPreviousValue(); String getValue(); }
apache/openjpa
1,051
openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Closeable.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.lib.util; /** * Generic interface for components that can be closed so that helpers * can treate them in a generic way. * * @author Abe White */ public interface Closeable { void close() throws Exception; }
apache/pdfbox
1,038
pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDSpecialColorSpace.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.pdfbox.pdmodel.graphics.color; /** * Special colour spaces add features or properties to an underlying colour space. * * @author John Hewson */ public abstract class PDSpecialColorSpace extends PDColorSpace { }
apache/pekko
1,043
docs/src/test/java/jdocs/typed/tutorial_3/inprogress1/Device.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * license agreements; and to You under the Apache License, version 2.0: * * https://www.apache.org/licenses/LICENSE-2.0 * * This file is part of the Apache Pekko project, which was derived from Akka. */ /* * Copyright (C) 2018-2022 Lightbend Inc. <https://www.lightbend.com> */ package jdocs.typed.tutorial_3.inprogress1; /* //#read-protocol-1 package com.example; //#read-protocol-1 */ // #read-protocol-1 import java.util.Optional; import org.apache.pekko.actor.typed.ActorRef; public class Device { public interface Command {} public static final class ReadTemperature implements Command { final ActorRef<RespondTemperature> replyTo; public ReadTemperature(ActorRef<RespondTemperature> replyTo) { this.replyTo = replyTo; } } public static final class RespondTemperature { final Optional<Double> value; public RespondTemperature(Optional<Double> value) { this.value = value; } } } // #read-protocol-1
apache/polygene-java
1,031
tutorials/cargo/src/main/java/org/apache/polygene/tutorials/cargo/step2/Voyage.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.tutorials.cargo.step2; import org.apache.polygene.api.property.Property; public interface Voyage { Property<Double> capacity(); Property<Double> bookedCargoSize(); }
apache/pulsar
1,036
pulsar-websocket/src/main/java/org/apache/pulsar/websocket/CryptoKeyReaderFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.websocket; import org.apache.pulsar.client.api.CryptoKeyReader; /** * Factory class to create {@link CryptoKeyReader}. * */ public interface CryptoKeyReaderFactory { CryptoKeyReader create(); }
apache/ratis
1,032
ratis-common/src/main/java/org/apache/ratis/protocol/exceptions/ServerNotReadyException.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ratis.protocol.exceptions; /** * The server is not ready yet. */ public class ServerNotReadyException extends RaftException { public ServerNotReadyException(String message) { super(message); } }
apache/ratis
1,044
ratis-test/src/test/java/org/apache/ratis/grpc/TestLogMetadataTestsWithGrpc.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.ratis.grpc; import org.apache.ratis.server.impl.LogMetadataTests; public class TestLogMetadataTestsWithGrpc extends LogMetadataTests<MiniRaftClusterWithGrpc> implements MiniRaftClusterWithGrpc.FactoryGet{ }
apache/servicecomb-toolkit
1,035
cli/src/main/java/org/apache/servicecomb/toolkit/cli/CheckStyleAbbr.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.toolkit.cli; import io.airlift.airline.Command; @Command(name = "cs", description = "Check style for OpenAPI v3 spec yaml", hidden = true) public class CheckStyleAbbr extends CheckStyleBase { }
apache/sis
1,050
endorsed/src/org.apache.sis.portrayal/main/org/apache/sis/style/Style.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.sis.style; /** * Place-holder for future definition of a style API. * See package description for more information. * * @author Martin Desruisseaux (Geomatys) * @version 1.5 * @since 1.5 */ public interface Style { }
apache/skywalking
1,028
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/DAO.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.storage; import org.apache.skywalking.oap.server.library.module.Service; /** * A specific interface for storage layer services. */ public interface DAO extends Service { }
apache/solr
1,035
solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/TupleStreamParser.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.client.solrj.io.stream; import java.io.Closeable; import java.io.IOException; import java.util.Map; public interface TupleStreamParser extends Closeable { Map<String, Object> next() throws IOException; }
apache/solr
1,046
solr/api/src/java/org/apache/solr/client/api/model/UploadToFileStoreResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.client.api.model; import com.fasterxml.jackson.annotation.JsonProperty; public class UploadToFileStoreResponse extends SolrJerseyResponse { @JsonProperty public String file; @JsonProperty public String message; }
apache/solr
1,067
solr/core/src/java/org/apache/solr/spelling/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. */ /** * APIs and classes used by the {@link org.apache.solr.handler.component.SpellCheckComponent} * * <p>See {@link org.apache.lucene.search.spell} and {@link org.apache.lucene.search.suggest} for * additional information. */ package org.apache.solr.spelling;
apache/stormcrawler
1,049
core/src/test/java/org/apache/stormcrawler/bolt/FetcherBoltTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.stormcrawler.bolt; import org.junit.jupiter.api.BeforeEach; public class FetcherBoltTest extends AbstractFetcherBoltTest { @BeforeEach void setUpContext() throws Exception { bolt = new FetcherBolt(); } }
apache/struts
1,054
core/src/test/java/org/apache/struts2/ProxyInvocationAction.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.struts2; /** * Need by the ProxyInvocationTest */ public class ProxyInvocationAction extends ActionSupport implements ProxyInvocationInterface { @Override public String show() { return "proxyResult"; } }
apache/tapestry-5
1,030
tapestry-core/src/test/java/org/apache/tapestry5/pagetester/PageTesterTest.java
// Copyright 2012 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.pagetester; import org.apache.tapestry5.test.PageTester; import org.testng.Assert; import org.testng.annotations.Test; public class PageTesterTest extends Assert { @Test public void setupRequestFromURI_accepts_query_strings() { PageTester pageTester = new PageTester("org.example.app1", "app1"); pageTester.setupRequestFromURI("/foo/somePage?param=value"); } }
apache/teaclave-java-tee-sdk
1,029
test/common/src/main/java/org/apache/teaclave/javasdk/test/common/SM3Service.java
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. package org.apache.teaclave.javasdk.test.common; import org.apache.teaclave.javasdk.common.annotations.EnclaveService; @EnclaveService public interface SM3Service { byte[] sm3Service(String plainText) throws Exception; }
apache/teaclave-java-tee-sdk
1,029
test/common/src/main/java/org/apache/teaclave/javasdk/test/common/SM4Service.java
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. package org.apache.teaclave.javasdk.test.common; import org.apache.teaclave.javasdk.common.annotations.EnclaveService; @EnclaveService public interface SM4Service { String sm4Service(String plaintext) throws Exception; }
apache/tez
1,050
tez-common/src/main/java/org/apache/tez/dag/records/TaskAttemptIDAware.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.records; public interface TaskAttemptIDAware extends TaskIDAware { TezTaskAttemptID getTaskAttemptID(); @Override default TezTaskID getTaskID() { return getTaskAttemptID().getTaskID(); } }
apache/thrift
1,046
lib/java/src/main/java/org/apache/thrift/transport/sasl/DataFrameReader.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.thrift.transport.sasl; /** Frames for thrift (serialized) messages. */ public class DataFrameReader extends FrameReader<DataFrameHeaderReader> { public DataFrameReader() { super(new DataFrameHeaderReader()); } }
apache/tomee
1,032
container/openejb-core/src/main/java/org/apache/openejb/client/LocalInitialContextFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.client; /** * @deprecated use org.apache.openejb.core.LocalInitialContextFactory */ @Deprecated public class LocalInitialContextFactory extends org.apache.openejb.core.LocalInitialContextFactory { }
apache/tomee
1,032
itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/EncStatefulHome.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.test.stateful; public interface EncStatefulHome extends jakarta.ejb.EJBHome { public EncStatefulObject create(String name) throws jakarta.ejb.CreateException, java.rmi.RemoteException; }
google/binnavi
1,049
src/main/java/com/google/security/zynamics/zylib/net/NetHelpers.java
// Copyright 2011-2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.zylib.net; public class NetHelpers { private static final int MAX_PORT = 65535; public static boolean isValidPort(final int port) { return (port >= 0) && (port <= MAX_PORT); } public static boolean isValidPort(final String port) { try { final int portValue = Integer.parseInt(port); return isValidPort(portValue); } catch (final NumberFormatException e) { return false; } } }
google/blockly-android
1,024
blocklylib-core/src/main/java/com/google/blockly/model/BlocklySerializerException.java
/* * Copyright 2015 Google Inc. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.blockly.model; import java.io.IOException; /** * An exception that is thrown when there is an error serializing a Blockly Workspace to XML. */ public class BlocklySerializerException extends IOException { public BlocklySerializerException(String message) { super(message); } public BlocklySerializerException(Throwable cause) { super(cause); } }
google/depan
1,040
DepanPersistence/prod/src/com/google/devtools/depan/resources/Resources.java
/* * Copyright 2017 The Depan Project Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.devtools.depan.resources; /** * @author <a href="mailto:leeca@pnambic.com">Lee Carver</a> */ public class Resources { private Resources() { // Prevent instantiation. } public static void setProperty( ResourceContainer matchers, String name, String key, String value) { PropertyDocument<?> doc = (PropertyDocument<?>) matchers.getResource(name); doc.setProperty(key, value); } }
google/graphicsfuzz
1,036
ast/src/test/java/com/graphicsfuzz/common/ast/stmt/ContinueStmtTest.java
/* * Copyright 2018 The GraphicsFuzz Project Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.graphicsfuzz.common.ast.stmt; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotSame; import org.junit.Test; public class ContinueStmtTest { @Test public void testContinueStmt() { assertEquals("continue;\n", new ContinueStmt().getText()); final ContinueStmt continueStmt = new ContinueStmt(); assertNotSame(continueStmt, continueStmt.clone()); } }
google/guava
1,062
android/guava/src/com/google/common/cache/Weigher.java
/* * Copyright (C) 2011 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package com.google.common.cache; import com.google.common.annotations.GwtCompatible; /** * Calculates the weights of cache entries. * * @author Charles Fry * @since 11.0 */ @GwtCompatible public interface Weigher<K, V> { /** * Returns the weight of a cache entry. There is no unit for entry weights; rather they are simply * relative to each other. * * @return the weight of the entry; must be non-negative */ int weigh(K key, V value); }
google/guava
1,063
android/guava/src/com/google/common/io/FileWriteMode.java
/* * Copyright (C) 2012 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package com.google.common.io; import com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.J2ktIncompatible; /** * Modes for opening a file for writing. The default when mode when none is specified is to truncate * the file before writing. * * @author Colin Decker */ @J2ktIncompatible @GwtIncompatible public enum FileWriteMode { /** Specifies that writes to the opened file should append to the end of the file. */ APPEND }
google/guice
1,052
extensions/grapher/test/com/google/inject/grapher/demo/DeLorian.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.Inject; import com.google.inject.Provider; class DeLorian { // We @Inject a Provider to demonstrate that the graph doesn't differentiate // between a Provider<T> and just @Injecting T. @Inject @Driver Provider<Person> driver; @Inject FluxCapacitor fluxCapacitor; @Inject PrivateTestModule.Exposed exposed; @Inject public void setEnergySource(EnergySource energySource) {} }
google/j2cl
1,086
jre/java/java/lang/SafeVarargs.java
/* * Copyright 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 java.lang; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Claims to the compiler that the annotation target does nothing potentially unsafe to its varargs * argument. */ @Documented @Retention(value = RetentionPolicy.RUNTIME) @Target(value = {ElementType.CONSTRUCTOR, ElementType.METHOD}) public @interface SafeVarargs {}
google/jsinterop-generator
1,053
java/jsinterop/generator/closure/JavaFile.java
/* * Copyright 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package jsinterop.generator.closure; import com.google.auto.value.AutoValue; @AutoValue abstract class JavaFile { @AutoValue.Builder abstract static class Builder { abstract Builder filePath(String filePath); abstract Builder fileContent(String fileContent); abstract JavaFile build(); } abstract String getFileContent(); abstract String getFilePath(); static Builder builder() { return new AutoValue_JavaFile.Builder(); } }
google/paco
1,057
Paco-Server/src/com/google/sampling/experiential/server/JSONBlobWriter.java
package com.google.sampling.experiential.server; import java.io.IOException; import java.util.logging.Logger; import org.joda.time.DateTimeZone; import com.google.sampling.experiential.gcs.GCSFetcher; public class JSONBlobWriter { public static final Logger log = Logger.getLogger(JSONBlobWriter.class.getName()); public JSONBlobWriter() { } public String writeEventsAsJSON(boolean anon, EventQueryResultPair eventQueryResultPair, String jobId, DateTimeZone timeZoneForClient, boolean inlineBlobs, Float pacoProtocol, boolean fullBlobAddress) throws IOException { // TODO see if sorting of events is already being done on the query. This seems like the wrong place to do it and it may be redundant EventRetriever.sortEvents(eventQueryResultPair.getEvents()); String jsonOutput = EventJsonDownloader.jsonifyEvents(anon, timeZoneForClient.getID(), inlineBlobs, eventQueryResultPair, pacoProtocol, fullBlobAddress); return GCSFetcher.writeJsonBlobToGCS(jobId, jsonOutput).getKeyString(); } }
googleapis/gapic-generator
1,041
src/main/java/com/google/api/codegen/packagegen/PackageGenerator.java
/* Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.api.codegen.packagegen; import com.google.api.codegen.common.GeneratedResult; import com.google.api.codegen.config.PackageMetadataConfig; import com.google.api.tools.framework.model.Model; import java.io.IOException; import java.util.Map; /** Generates package metadata. */ public interface PackageGenerator<T> { Map<String, GeneratedResult<T>> generate(Model model, PackageMetadataConfig config) throws IOException; }
openjdk/jdk8
1,035
jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/RelativeLocationPath.java
/* * reserved comment block * DO NOT REMOVE OR ALTER! */ /* * Copyright 2001-2004 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. */ /* * $Id: RelativeLocationPath.java,v 1.2.4.1 2005/09/02 11:59:22 pvedula Exp $ */ package com.sun.org.apache.xalan.internal.xsltc.compiler; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen */ abstract class RelativeLocationPath extends Expression { public abstract int getAxis(); public abstract void setAxis(int axis); }
openjdk/jdk8
1,075
langtools/test/tools/javac/enum/enumSwitch/Color2.java
/* * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ enum Color { red }
openjdk/jdk8
1,075
langtools/test/tools/javac/processing/6430209/test0.java
/* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ public class test0 { }
openjdk/jdk8
1,082
langtools/test/tools/javadoc/dupOk/sp2/p/A.java
/* * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package p; public class A {}
openjdk/jdk8
1,085
langtools/test/tools/javac/missingClass/B.java
/* * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // this file intentionally empty
oracle/coherence
1,030
prj/coherence-core/src/main/java/com/tangosol/dev/assembler/Dup_x1.java
/* * Copyright (c) 2000, 2020, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.tangosol.dev.assembler; import java.io.IOException; import java.io.DataInput; import java.io.DataOutput; /** * The DUP_X1 simple op duplicates the top word of the stack and places it * two down in the stack. * <p><code><pre> * JASM op : DUP_X1 (0x5a) * JVM byte code(s): DUP_X1 (0x5a) * Details : * </pre></code> * * @version 0.50, 06/12/98, assembler/dis-assembler * @author Cameron Purdy */ public class Dup_x1 extends Op implements Constants { // ----- constructors --------------------------------------------------- /** * Construct the op. */ public Dup_x1() { super(DUP_X1); } // ----- data members --------------------------------------------------- /** * The name of this class. */ private static final String CLASS = "Dup_x1"; }
oracle/json-in-db
1,038
SodaExamples/src/main/java/emp/RunAll.java
package emp; /** * Runs all the examples at once. */ public class RunAll { public static void main(String[] args) throws Exception { print("Running CreateCollection"); CreateCollection.main(args); print("Running Insert"); Insert.main(args); print("Running JSONP"); JSONP.main(args); print("Running JSONB"); JSONB.main(args); print("Running Jackson"); Jackson.main(args); print("Running Update"); Update.main(args); print("Running UpdateMerge"); UpdateMerge.main(args); print("Running GetAll"); GetAll.main(args); print("Running Filter"); Filter.main(args); print("Running Filter2"); Filter2.main(args); } private static void print(String title) { System.out.println(); System.out.println(title); System.out.println("------------------------"); } }
oracle/oci-java-sdk
1,042
bmc-common/src/main/java/com/oracle/bmc/auth/exception/AuthClientException.java
/** * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ package com.oracle.bmc.auth.exception; import com.oracle.bmc.model.BmcException; /** Authentication client exception. */ public class AuthClientException extends BmcException { private static final long serialVersionUID = 1L; /** * Create a wrapper around an authentication client exception. * * @param message message * @param cause BMC exception that indicated this is an authentication client exception */ public AuthClientException(String message, BmcException cause) { super( cause.getStatusCode(), cause.getServiceCode(), message, cause.getOpcRequestId(), cause); } }
apache/cxf
1,035
rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl/extensions/SoapOperation.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.binding.soap.wsdl.extensions; import javax.wsdl.extensions.soap.SOAPOperation; import javax.wsdl.extensions.soap12.SOAP12Operation; public interface SoapOperation extends SOAPOperation, SOAP12Operation { }
apache/cxf
1,042
tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/date/EchoCalendar.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.tools.fortest.date; import java.util.Calendar; import jakarta.jws.WebService; @WebService public class EchoCalendar { public Calendar echoCalendar(Calendar c) { return Calendar.getInstance(); } }
apache/distributedlog
1,037
distributedlog-core/src/main/java/org/apache/distributedlog/api/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. */ /** * DistributedLog NEW API. * * <p>This is the new Java8 {@link java.util.concurrent.CompletableFuture} based API. It is * <strong>experimental</strong> and still under developing. */ package org.apache.distributedlog.api;
apache/drill
1,045
exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/FragmentLeaf.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.drill.exec.physical.base; /** * A Physical Operator that can be the leaf node of one particular execution * fragment. Typically includes Receivers and Scans. */ public interface FragmentLeaf extends PhysicalOperator { }
apache/druid
1,028
extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3SSEKmsConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.druid.storage.s3; import com.fasterxml.jackson.annotation.JsonProperty; public class S3SSEKmsConfig { @JsonProperty private String keyId; public String getKeyId() { return keyId; } }
apache/druid
1,038
processing/src/main/java/org/apache/druid/query/topn/TopNMetricSpecBuilder.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.druid.query.topn; /** */ public interface TopNMetricSpecBuilder<T> { void skipTo(String previousStop); void ignoreAfterThreshold(); void ignoreFirstN(int n); void keepOnlyN(int n); T build(); }
apache/flink
1,040
flink-runtime/src/main/java/org/apache/flink/runtime/util/KeyGroupedIterator.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.runtime.util; import java.io.IOException; import java.util.Iterator; public interface KeyGroupedIterator<E> { boolean nextKey() throws IOException; E getCurrent(); Iterator<E> getValues(); }
apache/flink
1,043
flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlTimeProvider.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.runtime.state.ttl; /** Provides time to TTL logic to judge about state expiration. */ public interface TtlTimeProvider { TtlTimeProvider DEFAULT = System::currentTimeMillis; long currentTimestamp(); }
apache/geode
1,056
geode-dunit/src/main/java/org/apache/geode/test/junit/rules/Locator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package org.apache.geode.test.junit.rules; import org.apache.geode.distributed.internal.InternalLocator; import org.apache.geode.internal.cache.InternalCache; public interface Locator extends Member { InternalCache getCache(); InternalLocator getLocator(); }
apache/gobblin
1,035
gobblin-core/src/main/java/org/apache/gobblin/source/extractor/extract/CommandType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.gobblin.source.extractor.extract; /** * Interface for all source to * track a list of their CommandTypes * (e.g. CD, LS for SFTP or * GET, PUT for REST) * @author stakiar */ public interface CommandType { }
apache/grails-core
1,026
grails-databinding-core/src/main/groovy/grails/databinding/CollectionDataBindingSource.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.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 grails.databinding; import java.util.List; /** * @see DataBindingSource * @since 3.0 */ public interface CollectionDataBindingSource { List<DataBindingSource> getDataBindingSources(); }
apache/grails-core
1,052
grails-shell-cli/src/test/groovy/org/grails/cli/TestTerminal.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.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.grails.cli; import jline.TerminalSupport; public class TestTerminal extends TerminalSupport { public TestTerminal() { super(true); setAnsiSupported(false); setEchoEnabled(false); } }
apache/hadoop-common
1,024
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/test/HFSTestCase.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.test; import org.junit.Rule; import org.junit.rules.MethodRule; public abstract class HFSTestCase extends HTestCase { @Rule public MethodRule hdfsTestHelper = new TestHdfsHelper(); }
apache/hadoop
1,031
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/diagnostics/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. */ @InterfaceAudience.Private @InterfaceStability.Evolving package org.apache.hadoop.fs.azurebfs.diagnostics; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop
1,031
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/diagnostics/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. */ @InterfaceAudience.Private @InterfaceStability.Evolving package org.apache.hadoop.fs.azurebfs.diagnostics; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop
1,036
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/audit/AuditorFlags.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.fs.s3a.audit; /** * Flags which can be passed down during initialization, or after it. */ public enum AuditorFlags { /** * Are out of band operations allowed? */ PermitOutOfBandOperations }
apache/harmony
1,026
classlib/modules/awt/src/main/java/unix/org/apache/harmony/awt/nativebridge/linux/ErrorHandler.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @author Pavel Dolgov */ package org.apache.harmony.awt.nativebridge.linux; public class ErrorHandler { public final static native boolean isError(); public final static native String getInfo(); }
apache/harmony
1,043
classlib/modules/awt/src/main/java/common/java/awt/event/AWTEventListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @author Michael Danilov */ package java.awt.event; import java.awt.AWTEvent; import java.util.EventListener; public interface AWTEventListener extends EventListener { public void eventDispatched(AWTEvent event); }
apache/hbase
1,033
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/LockedResourceType.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hbase.procedure2; import org.apache.yetus.audience.InterfaceAudience; @InterfaceAudience.Private public enum LockedResourceType { SERVER, NAMESPACE, TABLE, REGION, PEER, META, GLOBAL }
apache/hop
1,041
plugins/transforms/mongodb/src/main/java/org/apache/hop/mongo/MongoUtilLogger.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hop.mongo; public interface MongoUtilLogger { void debug(String s); void info(String s); void warn(String s, Throwable throwable); void error(String s, Throwable throwable); boolean isDebugEnabled(); }
apache/iceberg
1,053
api/src/main/java/org/apache/iceberg/encryption/EncryptedKey.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iceberg.encryption; import java.nio.ByteBuffer; import java.util.Map; public interface EncryptedKey { String keyId(); ByteBuffer encryptedKeyMetadata(); String encryptedById(); Map<String, String> properties(); }