repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/tomcat
1,086
java/jakarta/websocket/OnError.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package jakarta.websocket; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface OnError { }
apache/tsfile
1,026
java/tsfile/src/main/java/org/apache/tsfile/fileSystem/fileOutputFactory/FileOutputFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.tsfile.fileSystem.fileOutputFactory; import org.apache.tsfile.write.writer.TsFileOutput; public interface FileOutputFactory { TsFileOutput getTsFileOutput(String filePath, boolean append); }
google/binnavi
1,028
src/main/java/com/google/security/zynamics/binnavi/API/debug/DebuggerProcessStartReply.java
// Copyright 2011-2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.binnavi.API.debug; import com.google.security.zynamics.binnavi.debug.connection.packets.replies.ProcessStartReply; public class DebuggerProcessStartReply extends DebuggerReply { public DebuggerProcessStartReply(final ProcessStartReply reply) { super(reply); } public ProcessStart getProcessStartModule() { return new ProcessStart(((ProcessStartReply) reply).getProcessStart()); } }
google/copybara
1,058
java/com/google/copybara/config/OptionsAwareModule.java
/* * Copyright (C) 2016 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.copybara.config; import com.google.copybara.Options; import net.starlark.java.annot.StarlarkBuiltin; /** * A {@link StarlarkBuiltin} that implements this interface will be initialized with the options. * * <p>This method will be invoked just after registering the namespace objects in Skylark. */ public interface OptionsAwareModule { /** * Set the options for the current Copybara run. */ void setOptions(Options options); }
google/guava
1,046
guava-tests/test/com/google/common/util/concurrent/RunnablesTest.java
/* * Copyright (C) 2013 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.util.concurrent; import com.google.common.annotations.GwtCompatible; import junit.framework.TestCase; import org.jspecify.annotations.NullUnmarked; /** * Unit tests for {@link Runnables}. * * @author Olivier Pernet */ @GwtCompatible @NullUnmarked public class RunnablesTest extends TestCase { public void testDoNothingRunnableIsSingleton() { assertSame(Runnables.doNothing(), Runnables.doNothing()); } }
hibernate/hibernate-orm
1,024
hibernate-core/src/main/java/org/hibernate/annotations/processing/Pattern.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.annotations.processing; import jakarta.persistence.criteria.Expression; import org.hibernate.Incubating; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.CLASS; /** * Indicates that a parameter of type {@link String} of a * {@linkplain Find finder method} is a pattern involving * wildcard characters {@code _} and {@code %}. * <p> * For example: * <pre> * &#064;Find * List&lt;Book&gt; getBooksWithTitle(@Pattern String title); * </pre> * <p> * A parameter annotated {@code @Pattern} results in a * {@link jakarta.persistence.criteria.CriteriaBuilder#like(Expression, String) like} * condition in the generated code. * * @see Find * * @since 6.5 * @author Gavin King */ @Target(PARAMETER) @Retention(CLASS) @Incubating public @interface Pattern { }
openjdk/jdk8
1,080
jdk/test/java/beans/XMLEncoder/6380849/Bean.java
/* * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ public class Bean { }
openjdk/jtreg
1,083
test/junitLibs/tests/libs/absLib/AbsLib.java
/* * Copyright (c) 2017, 2022, 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 AbsLib { }
openjdk/jtreg
1,083
test/junitLibs/tests/libs/relLib/RelLib.java
/* * Copyright (c) 2017, 2022, 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 RelLib { }
apache/commons-net
1,052
src/test/java/org/apache/commons/net/ftp/FTPCommandTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.net.ftp; import org.junit.jupiter.api.Test; public class FTPCommandTest { @SuppressWarnings("deprecation") // test of deprecated code @Test public void testArray() { FTPCommand.checkArray(); } }
apache/cxf
1,040
services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.xkms.handlers; import org.apache.cxf.xkms.model.xkms.StatusType; import org.apache.cxf.xkms.model.xkms.ValidateRequestType; public interface Validator { StatusType validate(ValidateRequestType request); }
apache/cxf
1,052
rt/wsdl/src/main/java/org/apache/cxf/wsdl/JAXBExtensibilityElement.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.wsdl; public class JAXBExtensibilityElement extends TExtensibilityElementImpl { Object value; JAXBExtensibilityElement(Object o) { value = o; } public Object getValue() { return value; } }
apache/cxf
1,061
core/src/main/java/org/apache/cxf/endpoint/Server.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.endpoint; import org.apache.cxf.transport.Destination; public interface Server { void start(); void stop(); void destroy(); boolean isStarted(); Destination getDestination(); Endpoint getEndpoint(); }
apache/derby
1,045
java/org.apache.derby.commons/org/apache/derby/shared/api/DerbyModuleAPI.java
/* Derby - Class org.apache.derby.shared.api.DerbyModuleAPI Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.derby.shared.api; /** * This vacuous interface allows us to lookup the Derby modules * via java.util.ServiceLoader.load(). **/ public interface DerbyModuleAPI {}
apache/directory-kerby
1,038
kerby-pkix/src/main/java/org/apache/kerby/cms/type/UnsignedAttributes.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.cms.type; import org.apache.kerby.asn1.type.Asn1SetOf; /** * UnsignedAttributes ::= SET SIZE (1..MAX) OF Attribute */ public class UnsignedAttributes extends Asn1SetOf<Attribute> { }
apache/drill
1,047
logical/src/main/java/org/apache/drill/common/logical/data/AbstractBuilder.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.common.logical.data; public abstract class AbstractBuilder<T extends LogicalOperator> { static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(AbstractBuilder.class); public abstract T build(); }
apache/eagle
1,034
eagle-core/eagle-common/src/main/java/org/apache/eagle/common/agg/AggregateHandler.java
/* * * * Licensed to the Apache Software Foundation (ASF) under one or more * * contributor license agreements. See the NOTICE file distributed with * * this work for additional information regarding copyright ownership. * * The ASF licenses this file to You under the Apache License, Version 2.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.agg; import java.util.List; /** * Since 8/4/16. */ public interface AggregateHandler { void onAggregate(List<AggregateResult> result); }
apache/eventmesh
1,026
eventmesh-spi/src/main/java/org/apache/eventmesh/spi/loader/EventMeshExtensionConstant.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.spi.loader; public class EventMeshExtensionConstant { /** * eventmesh plugin base path */ public static final String EVENTMESH_EXTENSION_META_DIR = "META-INF/eventmesh/"; }
apache/fluss
1,049
fluss-rpc/src/main/java/org/apache/fluss/rpc/protocol/RequestType.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.rpc.protocol; /** The type of protocol used for communication. */ public enum RequestType { SHUTDOWN(-1), FLUSS(0), KAFKA(1); public final int id; RequestType(int id) { this.id = id; } }
apache/geaflow
1,026
geaflow/geaflow-model/src/main/java/org/apache/geaflow/model/graph/message/IGraphMessage.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.geaflow.model.graph.message; import java.io.Serializable; import java.util.Iterator; public interface IGraphMessage<K, MESSAGE> extends Iterator<MESSAGE>, Serializable { K getTargetVId(); }
apache/geaflow
1,035
geaflow/geaflow-infer/src/main/java/org/apache/geaflow/infer/InferTaskRun.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.geaflow.infer; import java.util.List; public interface InferTaskRun { /** * Run infer task. */ void run(List<String> script); /** * Stop infer task. */ void stop(); }
apache/groovy
1,065
src/test/groovy/org/codehaus/groovy/dummy/Groovy8144A.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.codehaus.groovy.dummy; /** * Inherits a public method from a package-private base class and is used to verify * the generated INVOKEVIRTUAL call is on this and not super. */ public class Groovy8144A extends Groovy8144ABase { }
apache/groovy
1,065
src/test/groovy/org/codehaus/groovy/dummy/Groovy8144B.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.codehaus.groovy.dummy; /** * Inherits a public method from a public abstract base class and is used to verify * the generated INVOKEVIRTUAL call is on this and not super. */ public class Groovy8144B extends Groovy8144BBase { }
apache/hadoop
1,029
hadoop-tools/hadoop-fs2img/src/main/java/org/apache/hadoop/hdfs/server/namenode/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.Public @InterfaceStability.Unstable package org.apache.hadoop.hdfs.server.namenode; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop
1,030
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/extensions/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.extensions; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop
1,034
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/ProgressListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.impl; /** * Interface for progress listeners to implement. */ public interface ProgressListener { default void progressChanged(ProgressListenerEvent eventType, long bytesTransferred) {}; }
apache/harmony
1,047
drlvm/vm/tests/kernel/org/apache/harmony/lang/ProtectedSuccessor.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT 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 Evgueni V. Brevnov */ package org.apache.harmony.lang; @SuppressWarnings(value={"all"}) public class ProtectedSuccessor extends ProtectedMethod { private void privateMethod() { status +=5; } }
apache/harmony
1,081
drlvm/src/test/regression/H2086/Test.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.harmony.drlvm.tests.regression.h2086; import junit.framework.TestCase; public class Test extends TestCase { public void test() { java.util.concurrent.atomic.AtomicLong al = new java.util.concurrent.atomic.AtomicLong(); } }
apache/helix
1,034
helix-core/src/main/java/org/apache/helix/controller/stages/IntermediateStateOutput.java
package org.apache.helix.controller.stages; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import org.apache.helix.controller.common.ResourcesStateMap; /** * Output for IntermediateStateCalStage. */ public class IntermediateStateOutput extends ResourcesStateMap { }
apache/hop
1,060
core/src/main/java/org/apache/hop/core/IProgressMonitor.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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; public interface IProgressMonitor { void beginTask(String message, int nrWorks); void subTask(String message); boolean isCanceled(); void worked(int nrWorks); void done(); void setTaskName(String taskName); }
apache/incubator-atlas
1,052
common/src/main/java/org/apache/atlas/service/Service.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.atlas.service; import org.apache.atlas.AtlasException; /** * Service interface to start any background jobs. */ public interface Service { void start() throws AtlasException; void stop() throws AtlasException; }
apache/incubator-pegasus
1,054
java-client/src/main/java/org/apache/pegasus/rpc/Meta.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pegasus.rpc; import org.apache.pegasus.base.error_code; import org.apache.pegasus.operator.client_operator; public abstract class Meta { public abstract error_code.error_types operate(client_operator op, int retryCount); }
apache/incubator-retired-wave
1,029
wave/src/main/java/org/waveprotocol/box/server/util/SuccessFailCallback.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR 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.box.server.util; /** * A generic onSuccess/onFailure callback interface. */ public interface SuccessFailCallback<S, F> { void onSuccess(S successValue); void onFailure(F failureValue); }
apache/incubator-seata
1,048
server/src/main/java/org/apache/seata/server/config/AsyncConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.config; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.EnableAsync; @Configuration @EnableAsync(proxyTargetClass = true) public class AsyncConfig {}
apache/inlong
1,031
inlong-common/src/main/java/org/apache/inlong/common/pojo/audit/AuditConfigRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.inlong.common.pojo.audit; import lombok.Data; import lombok.NoArgsConstructor; /** * Audit MQ config request info. */ @Data @NoArgsConstructor public class AuditConfigRequest { private String clusterTag; }
apache/jena
1,025
jena-db/jena-dboe-index-test/src/main/java/org/apache/jena/dboe/index/testlib/RangeIndexMaker.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.index.testlib; import org.apache.jena.dboe.index.RangeIndex; public interface RangeIndexMaker extends IndexMaker { RangeIndex makeRangeIndex(); @Override String getLabel(); }
apache/jena
1,034
jena-integration-tests/src/test/java/org/apache/jena/test/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.test.assembler; import org.junit.platform.suite.api.SelectClasses; import org.junit.platform.suite.api.Suite; @Suite @SelectClasses({ TestDatasetAssembler.class }) public class TS_Assembler { }
apache/jena
1,044
jena-base/src/test/java/org/apache/jena/atlas/lib/persistent/TS_Persistent.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.lib.persistent; import org.junit.platform.suite.api.SelectClasses; import org.junit.platform.suite.api.Suite; @Suite @SelectClasses({ TestPSet.class, TestPMap.class }) public class TS_Persistent {}
apache/kylin
1,031
src/common-service/src/main/java/org/apache/kylin/rest/service/TableFusionModelSupporter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.service; public interface TableFusionModelSupporter { void onDropModel(String modelId, String project, boolean ignoreType); void onStopStreamingJob(String modelId, String project); }
apache/kyuubi
1,044
kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/cli/RowSet.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kyuubi.jdbc.hive.cli; public interface RowSet extends Iterable<Object[]> { RowSet extractSubset(int maxRows); int numColumns(); int numRows(); long getStartOffset(); void setStartOffset(long startOffset); }
apache/linkis
1,024
linkis-commons/linkis-storage/src/main/java/org/apache/linkis/storage/pipeline/PipelineWriter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.linkis.storage.pipeline; import org.apache.linkis.common.io.FsWriter; import java.util.Map; public abstract class PipelineWriter extends FsWriter { public void close(Map<String, Object> args) {} }
apache/logging-log4j2
1,024
log4j-core/src/main/java/org/apache/logging/log4j/core/config/composite/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. */ /** * Support for composite configurations. */ @Export @Version("2.20.1") package org.apache.logging.log4j.core.config.composite; import org.osgi.annotation.bundle.Export; import org.osgi.annotation.versioning.Version;
apache/logging-log4j2
1,024
log4j-core/src/main/java/org/apache/logging/log4j/core/config/properties/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. */ /** * Configuration using Properties files. */ @Export @Version("2.20.1") package org.apache.logging.log4j.core.config.properties; import org.osgi.annotation.bundle.Export; import org.osgi.annotation.versioning.Version;
apache/logging-log4j2
1,037
log4j-docker/src/main/java/org/apache/logging/log4j/docker/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. */ @Export @Open("org.apache.logging.log4j.core") @Version("2.20.1") package org.apache.logging.log4j.docker; import aQute.bnd.annotation.jpms.Open; import org.osgi.annotation.bundle.Export; import org.osgi.annotation.versioning.Version;
apache/manifoldcf
1,033
connectors/filenet/build-stub/src/main/java/com/filenet/api/query/RepositoryRow.java
/* $Id$ */ /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.filenet.api.query; import com.filenet.api.property.Properties; /** Stub interface to allow the connector to build fully. */ public interface RepositoryRow extends java.io.Serializable { public Properties getProperties(); }
apache/maven-pmd-plugin
1,040
src/it/MPMD-304-toolchain-support/src/main/java/sample/Name.java
package sample; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ public class Name extends Thread { private final String name; public Name( String name ) { this.name = name; } @Override public String toString() { return name; } }
apache/olingo-odata4
1,035
lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/EdmSingleton.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.commons.api.edm; /** * An {@link EdmSingleton} represents a single entity inside the entity model. */ public interface EdmSingleton extends EdmBindingTarget { // No additional methods needed for now. }
apache/oodt
1,033
webapp/fmprod/src/main/java/org/apache/oodt/cas/product/exceptions/CasProductException.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.oodt.cas.product.exceptions; /** * CasProductException for internal exceptions */ public class CasProductException extends Exception { public CasProductException(String message){ super(message); } }
apache/oozie
1,036
core/src/test/java/org/apache/oozie/action/ssh/TestSshActionExecutorAsExtension.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.oozie.action.ssh; public class TestSshActionExecutorAsExtension extends TestSshActionExecutor { @Override protected String getActionXMLSchema() { return "uri:oozie:ssh-action:0.2"; } }
apache/opennlp
1,045
opennlp-api/src/main/java/opennlp/tools/util/ext/ExtensionServiceKeys.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package opennlp.tools.util.ext; public final class ExtensionServiceKeys { /** * Property key for the unique {@code id} which identifies an * OpenNLP extension service. */ public static final String ID = "OPENLP_EXTENSION_ID"; }
apache/paimon
1,037
paimon-common/src/main/java/org/apache/paimon/data/columnar/TimestampColumnVector.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.paimon.data.columnar; import org.apache.paimon.data.Timestamp; /** Timestamp column vector. */ public interface TimestampColumnVector extends ColumnVector { Timestamp getTimestamp(int i, int precision); }
apache/pekko-http
1,035
http-core/src/main/java/org/apache/pekko/http/javadsl/model/headers/RawHeader.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * license agreements; and to You under the Apache License, version 2.0: * * https://www.apache.org/licenses/LICENSE-2.0 * * This file is part of the Apache Pekko project, which was derived from Akka. */ /* * Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com> */ package org.apache.pekko.http.javadsl.model.headers; import org.apache.pekko.annotation.DoNotInherit; /** * A header in its 'raw' name/value form, not parsed into a modelled header class. To add a custom * header type, implement {@link ModeledCustomHeader} and {@link ModeledCustomHeaderFactory} rather * than extending {@link RawHeader} */ @DoNotInherit public abstract class RawHeader extends org.apache.pekko.http.scaladsl.model.HttpHeader { public abstract String name(); public abstract String value(); public static RawHeader create(String name, String value) { return new org.apache.pekko.http.scaladsl.model.headers.RawHeader(name, value); } }
apache/poi
1,054
poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/BodyElementType.java
/* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ package org.apache.poi.xwpf.usermodel; public enum BodyElementType { CONTENTCONTROL, PARAGRAPH, TABLE, }
apache/polygene-java
1,029
core/api/src/main/java/org/apache/polygene/api/structure/UsedLayersDescriptor.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.api.structure; import java.util.stream.Stream; /** * Used Layers Descriptor. */ public interface UsedLayersDescriptor { Stream<? extends LayerDescriptor> layers(); }
apache/qpid-broker-j
1,028
broker-core/src/main/java/org/apache/qpid/server/model/InjectedAttributeOrStatistic.java
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.qpid.server.model; public interface InjectedAttributeOrStatistic<C extends ConfiguredObject, T> extends InjectedAttributeStatisticOrOperation<C>, ConfiguredObjectAttributeOrStatistic<C, T> { }
apache/reef
1,029
lang/java/reef-annotations/src/main/java/org/apache/reef/annotations/audience/RuntimeAuthor.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.reef.annotations.audience; /** * Indicates that an interface or API to be consumed or used by authors of * additional REEF runtimes, not authors of REEF jobs. */ public @interface RuntimeAuthor { }
apache/reef
1,034
lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/files/FileType.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.reef.runtime.common.files; import org.apache.reef.annotations.audience.RuntimeAuthor; /** * Type of a File Resource used by Runtimes. */ @RuntimeAuthor public enum FileType { PLAIN, LIB, ARCHIVE }
apache/rocketmq-dashboard
1,041
src/main/java/org/apache/rocketmq/dashboard/service/ProducerService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.rocketmq.dashboard.service; import org.apache.rocketmq.remoting.protocol.body.ProducerConnection; public interface ProducerService { ProducerConnection getProducerConnection(String producerGroup, String topic); }
apache/rocketmq
1,030
auth/src/main/java/org/apache/rocketmq/auth/authorization/strategy/AuthorizationStrategy.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.rocketmq.auth.authorization.strategy; import org.apache.rocketmq.auth.authorization.context.AuthorizationContext; public interface AuthorizationStrategy { void evaluate(AuthorizationContext context); }
apache/royale-compiler
1,036
compiler/src/main/java/org/apache/royale/compiler/css/ICSSPropertyValue.java
/* * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.royale.compiler.css; /** * Base interface for CSS property values. Inherit this interface to create * strong-type property values. */ public interface ICSSPropertyValue extends ICSSNode { }
apache/samza
1,037
samza-api/src/main/java/org/apache/samza/metrics/ReadableMetricsRegistryListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.samza.metrics; public interface ReadableMetricsRegistryListener { void onCounter(String group, Counter counter); void onGauge(String group, Gauge<?> gauge); void onTimer(String group, Timer timer); }
apache/seatunnel
1,044
seatunnel-api/src/main/java/org/apache/seatunnel/api/source/SourceEvent.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seatunnel.api.source; import java.io.Serializable; /** * A base class for the events passed between the {@link SourceReader} and {@link * SourceSplitEnumerator}. */ public interface SourceEvent extends Serializable {}
apache/sis
1,048
endorsed/src/org.apache.sis.feature/main/org/apache/sis/filter/FilterName.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.filter; /** * Placeholder for GeoAPI 3.1 interfaces (not yet released). * Shall not be visible in public API, as it will be deleted after next GeoAPI release. */ enum FilterName { RESOURCE_ID, INCLUDE, EXCLUDE; }
apache/struts
1,050
plugins/cdi/src/test/java/org/apache/struts2/cdi/FooConsumer.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.cdi; import jakarta.inject.Inject; /** * FooConsumer. */ public class FooConsumer { @Inject FooService fooService; public void foo() { System.out.println(fooService.getHello()); } }
apache/syncope
1,031
client/idrepo/console/src/main/java/org/apache/syncope/client/console/layout/GroupForm.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.client.console.layout; import org.apache.syncope.client.ui.commons.wizards.any.AnyForm; import org.apache.syncope.common.lib.to.GroupTO; public interface GroupForm extends AnyForm<GroupTO> { }
apache/tajo
1,046
tajo-common/src/main/java/org/apache/tajo/util/graph/DirectedGraphVisitor.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tajo.util.graph; import org.apache.tajo.exception.TajoException; import java.util.Stack; public interface DirectedGraphVisitor<CONTEXT, V> { void visit(CONTEXT context, Stack<V> stack, V v) throws TajoException; }
apache/tsfile
1,041
java/tsfile/src/main/java/org/apache/tsfile/compatibility/StreamDeserializer.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.tsfile.compatibility; import java.io.IOException; import java.io.InputStream; public interface StreamDeserializer<T> { T deserialize(InputStream inputStream, DeserializeConfig context) throws IOException; }
apache/velocity-engine
1,025
velocity-engine-core/src/main/java/org/apache/velocity/app/event/EventHandler.java
package org.apache.velocity.app.event; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Base interface for all event handlers * * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a> * @version $Id$ */ public interface EventHandler { }
apache/xmlbeans
1,047
src/main/java/org/apache/xmlbeans/impl/values/XmlPositiveIntegerImpl.java
/* Copyright 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. */ package org.apache.xmlbeans.impl.values; import org.apache.xmlbeans.XmlPositiveInteger; import org.apache.xmlbeans.SchemaType; public class XmlPositiveIntegerImpl extends JavaIntegerHolderEx implements XmlPositiveInteger { public XmlPositiveIntegerImpl() { super(XmlPositiveInteger.type, false); } public XmlPositiveIntegerImpl(SchemaType type, boolean complex) { super(type, complex); } }
apache/xmlgraphics-fop
1,029
fop-core/src/main/java/org/apache/fop/render/pdf/extensions/PDFLayerExtension.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT 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$ */ package org.apache.fop.render.pdf.extensions; // CSOFF: LineLengthCheck public class PDFLayerExtension extends PDFDictionaryExtension { PDFLayerExtension() { super(PDFDictionaryType.Layer); } }
google/auto
1,046
value/src/it/functional/src/main/java/PackagelessNestedValueType.java
/* * Copyright 2012 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import com.google.auto.value.AutoValue; import java.util.Map; /** * @author emcmanus@google.com (Éamonn McManus) */ @SuppressWarnings("DefaultPackage") public class PackagelessNestedValueType { @AutoValue public abstract static class Nested { abstract Map<Integer, String> numberNames(); public static Nested create(Map<Integer, String> numberNames) { return new AutoValue_PackagelessNestedValueType_Nested(numberNames); } } }
google/bindiff
1,024
java/zylib/src/main/java/com/google/security/zynamics/zylib/types/graphs/IGraphEdge.java
// Copyright 2011-2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.zylib.types.graphs; /** * Interface for graph edges. * * @param <T> The type of the nodes connected by the edge. */ public interface IGraphEdge<T> { /** * Returns the source node of the edge. * * @return The source node of the edge. */ T getSource(); /** * Returns the target node of the edge. * * @return The target node of the edge. */ T getTarget(); }
google/binnavi
1,043
src/main/java/com/google/security/zynamics/zylib/system/IdaException.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.system; /** * Exception class used to signal problems loading IDA Pro. * * @author thomasdullien@google.com (Thomas Dullien) */ public final class IdaException extends Exception { /** * Creates a new exception object. * * @param msg The exception message. * @param cause The original cause */ public IdaException(final String msg, final Throwable cause) { super(msg, cause); } }
google/depan
1,040
DepanJson/prod/src/com/google/devtools/depan/pushjson/PushJsonLogger.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.pushjson; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Provide a common logger for the entire pushjson package. * * @author <a href="mailto:leeca@pnambic.com">Lee Carver</a> */ public class PushJsonLogger { public static final Logger LOG = LoggerFactory.getLogger(PushJsonLogger.class.getName()); private PushJsonLogger() { // Prevent instantiation. } }
google/devx-tools
1,046
waterfall/java/com/google/waterfall/usb/AndroidUsbModule.java
package com.google.waterfall.usb; import static android.content.Context.USB_SERVICE; import android.content.Context; import android.hardware.usb.UsbManager; import androidx.annotation.VisibleForTesting; import dagger.Module; import dagger.Provides; import javax.inject.Singleton; /** Dagger module to inject USB manager */ @Module public class AndroidUsbModule { private final UsbService service; @VisibleForTesting static UsbManagerIntf usbManager; public AndroidUsbModule(UsbService service) { this.service = service; } /** * Allow the application context to be injected but require that it be annotated with {@link * ForService @Annotation} to explicitly differentiate it from an activity context. */ @Provides @Singleton @ForService Context provideServiceContext() { return service; } @Provides @Singleton UsbManagerIntf provideUsbManager() { if (usbManager != null) { return usbManager; } return new AoaUsbManager((UsbManager) service.getSystemService(USB_SERVICE)); } }
google/oss-fuzz
1,054
projects/spring-framework/spring-web/ContentDispositionFuzzer.java
// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // import com.code_intelligence.jazzer.api.FuzzedDataProvider; import org.springframework.http.ContentDisposition; import org.springframework.util.Assert; public class ContentDispositionFuzzer { public static void fuzzerTestOneInput(FuzzedDataProvider data) { String value = data.consumeRemainingAsString(); try { ContentDisposition content = ContentDisposition.parse(value); } catch (IllegalArgumentException e) {} } }
google/sagetv
1,082
java/sage/vfs/MediaNodeSorter.java
/* * Copyright 2015 The SageTV Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package sage.vfs; /** * * @author Narflex */ public interface MediaNodeSorter extends java.util.Comparator { // version used for programatic calling public String getTechnique(); // Pretty version which is presented to the user public String getName(); public boolean isAscending(); // We want to override these so that we can avoid refreshing when there's redundant sorter changes public boolean equals(Object o); public int hashCode(); }
googleworkspace/java-samples
1,047
drive/snippets/drive_v2/src/test/java/TestTouchFile.java
/* * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import static org.junit.Assert.assertEquals; import java.io.IOException; import java.security.GeneralSecurityException; import org.junit.Test; public class TestTouchFile extends BaseTest { @Test public void touchFile() throws IOException, GeneralSecurityException { String id = this.createTestBlob(); long now = System.currentTimeMillis(); long modifiedTime = TouchFile.touchFile(id, now); assertEquals(now, modifiedTime); } }
googleworkspace/java-samples
1,047
drive/snippets/drive_v3/src/test/java/TestTouchFile.java
/* * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import static org.junit.Assert.assertEquals; import java.io.IOException; import java.security.GeneralSecurityException; import org.junit.Test; public class TestTouchFile extends BaseTest { @Test public void touchFile() throws IOException, GeneralSecurityException { String id = this.createTestBlob(); long now = System.currentTimeMillis(); long modifiedTime = TouchFile.touchFile(id, now); assertEquals(now, modifiedTime); } }
openjdk/jdk8
1,075
jdk/test/java/lang/Class/forName/arrayClass/Class1.java
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ public class Class1 {}
openjdk/jdk8
1,075
jdk/test/java/lang/Class/forName/arrayClass/Class2.java
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ public class Class2 {}
openjdk/jdk8
1,075
jdk/test/java/lang/Class/forName/arrayClass/Class3.java
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ public class Class3 {}
openjdk/jdk8
1,075
jdk/test/java/lang/Class/forName/arrayClass/Class4.java
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ public class Class4 {}
openjdk/jdk8
1,077
langtools/test/tools/javac/6257443/package-info.java
/* * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ @Deprecated package foo;
openjdk/jdk8
1,082
langtools/test/tools/javac/api/6431435/p/B.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. */ package p; public class B { }
openjdk/jdk8
1,086
langtools/test/tools/javac/abstract/U3.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. */ public class U3 extends p1.U2 { }
oracle/nosql
1,039
httpproxy/httpproxy/src/main/java/oracle/nosql/proxy/protocol/ByteInputStream.java
/*- * Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved. * * This file was distributed by Oracle as part of a version of Oracle NoSQL * Database made available at: * * http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html * * Please see the LICENSE file included in the top-level directory of the * appropriate version of Oracle NoSQL Database for a copy of the license and * additional information. */ package oracle.nosql.proxy.protocol; /** * An extension of the Netty ByteBufInputStream that provides access to methods * to get and set offsets into the byte buffer that underlies the stream. This * class prevents knowledge of Netty from being required in the serialization * code. * * NOTE: this class implements DataInput */ import io.netty.buffer.ByteBuf; import oracle.nosql.nson.util.NettyByteInputStream; public class ByteInputStream extends NettyByteInputStream { public ByteInputStream(ByteBuf buffer) { super(buffer); } }
oracle/nosql
1,060
kvmain/src/main/java/oracle/kv/impl/async/SocketPrepared.java
/*- * Copyright (C) 2011, 2025 Oracle and/or its affiliates. All rights reserved. * * This file was distributed by Oracle as part of a version of Oracle NoSQL * Database made available at: * * http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html * * Please see the LICENSE file included in the top-level directory of the * appropriate version of Oracle NoSQL Database for a copy of the license and * additional information. */ package oracle.kv.impl.async; import java.net.Socket; import java.nio.ByteBuffer; /** * A handler for when the socket is prepared for a sync connection. */ public interface SocketPrepared extends ListeningChannelErrorHandler { /** * Called after pre-read determines the channel is of sync and the channel * is configured non-blocking and unregistered from the async executor. * * @param preReadData the pre-read data * @param socket the blocking socket for further operation */ void onPrepared(ByteBuffer preReadData, Socket socket); }
apache/crunch
1,045
crunch-core/src/it/java/org/apache/crunch/lib/join/DefaultFullOuterJoinIT.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.crunch.lib.join; public class DefaultFullOuterJoinIT extends AbstractFullOuterJoinIT { @Override protected <K, U, V> JoinStrategy<K, U, V> getJoinStrategy() { return new DefaultJoinStrategy<K, U, V>(); } }
apache/crunch
1,045
crunch-core/src/it/java/org/apache/crunch/lib/join/DefaultLeftOuterJoinIT.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.crunch.lib.join; public class DefaultLeftOuterJoinIT extends AbstractLeftOuterJoinIT { @Override protected <K, U, V> JoinStrategy<K, U, V> getJoinStrategy() { return new DefaultJoinStrategy<K, U, V>(); } }
apache/cxf
1,031
rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/inheritance/intf/ChildImpl.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.aegis.inheritance.intf; public class ChildImpl implements IChild { public String getChildName() { return "child"; } public String getParentName() { return "parent"; } }
apache/cxf
1,037
tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/model/XFault.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.validator.internal.model; import org.apache.cxf.wsdl.WSDLConstants; public final class XFault extends XWsdl { public XFault() { super(); setQName(WSDLConstants.QNAME_FAULT); } }
apache/cxf
1,037
tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/model/XInput.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.validator.internal.model; import org.apache.cxf.wsdl.WSDLConstants; public final class XInput extends XWsdl { public XInput() { super(); setQName(WSDLConstants.QNAME_INPUT); } }
apache/cxf
1,039
tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/MyClass1.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.exception; public class MyClass1 { private String name; public String getName() { return this.name; } public void setName(String name) { this.name = name; } }
apache/cxf
1,044
rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/HelloService.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.service.factory; import org.apache.cxf.message.Exchange; public interface HelloService { String sayHello(); void ping(); String echoWithExchange(Exchange ex, String text); String echo(String text); }
apache/cxf
1,044
systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/Injectable.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.systest.jaxrs.security; import jakarta.ws.rs.core.SecurityContext; import jakarta.ws.rs.core.UriInfo; public interface Injectable { void setSecurityContext(SecurityContext sc); void setUriInfo(UriInfo ui); }
apache/directory-kerby
1,039
kerby-pkix/src/main/java/org/apache/kerby/x509/type/KeyIdentifier.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.kerby.x509.type; import org.apache.kerby.asn1.type.Asn1OctetString; /** * * <pre> * KeyIdentifier ::= OCTET STRING * </pre> * */ public class KeyIdentifier extends Asn1OctetString { }
apache/doris-manager
1,037
manager/general/src/main/java/org/apache/doris/stack/model/ldap/LdapUser.java
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. package org.apache.doris.stack.model.ldap; import lombok.Data; @Data public class LdapUser { private String dn; private String email; private String lastName; private String entryUUID; private String firstName; }
apache/dubbo
1,028
dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/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. */ /** * * The inspiration of service registration and discovery comes from * <a href="https://spring.io/projects/spring-cloud-commons">Spring Cloud Commons</a>. * * @since 2.7.5 */ package org.apache.dubbo.registry.client;
apache/dubbo
1,044
dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ScopeClassLoaderListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.rpc.model; public interface ScopeClassLoaderListener<T extends ScopeModel> { void onAddClassLoader(T scopeModel, ClassLoader classLoader); void onRemoveClassLoader(T scopeModel, ClassLoader classLoader); }