repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/tomcat80 | 1,101 | java/javax/websocket/HandshakeResponse.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package javax.websocket;
import java.util.List;
import java.util.Map;
public interface HandshakeResponse {
/**
* Name of the WebSocket accept HTTP header.
*/
public static final String SEC_WEBSOCKET_ACCEPT = "Sec-WebSocket-Accept";
Map<String,List<String>> getHeaders();
}
|
apache/trafodion | 1,068 | core/conn/trafci/src/main/java/org/trafodion/ci/PrunUserInterruption.java | // @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
//
// @@@ END COPYRIGHT @@@
package org.trafodion.ci;
public class PrunUserInterruption extends Exception
{
/**
*
*/
private static final long serialVersionUID = 794988996507793357L;
PrunUserInterruption()
{
}
}
|
apache/uima-uimaj | 1,067 | uimaj-core/src/main/java/org/apache/uima/cas/impl/MethodHandlesLookup.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.uima.cas.impl;
import java.lang.invoke.MethodHandles;
public class MethodHandlesLookup {
private MethodHandlesLookup() {
}
public static MethodHandles.Lookup getMethodHandlesLookup() {
return MethodHandles.lookup();
}
}
|
apache/unomi | 1,056 | graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/providers/GraphQLCodeRegistryProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.unomi.graphql.providers;
import graphql.schema.GraphQLCodeRegistry;
public interface GraphQLCodeRegistryProvider extends GraphQLProvider {
GraphQLCodeRegistry.Builder getCodeRegistry(final GraphQLCodeRegistry codeRegistry);
}
|
apache/wicket | 1,055 | wicket-core-tests/src/test/java/org/apache/wicket/markup/html/link/Href_2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup.html.link;
/**
* Mock page for testing.
*
* @author Chris Turner
*/
public class Href_2 extends Href_1
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*
*/
public Href_2()
{
}
}
|
apache/zookeeper | 1,083 | zookeeper-it/src/main/java/org/apache/zookeeper/BenchMain.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.zookeeper;
import java.io.File;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
public class BenchMain {
public static void main(String args[]) throws Exception {
org.openjdk.jmh.Main.main(args);
}
}
|
google/binnavi | 1,049 | src/main/java/com/google/security/zynamics/binnavi/standardplugins/utils/DirectorySelecter.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.standardplugins.utils;
import java.io.File;
import javax.swing.JFileChooser;
public final class DirectorySelecter extends JFileChooser {
private static final long serialVersionUID = 5354437749644373707L;
public DirectorySelecter(final String title) {
super(new File("."));
setDialogTitle(title);
setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
setAcceptAllFileFilterUsed(false);
}
}
|
google/binnavi | 1,057 | src/main/java/com/google/security/zynamics/binnavi/disassembly/INaviFunctionNodeListener.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.disassembly;
import com.google.security.zynamics.binnavi.Gui.GraphWindows.CommentDialogs.Interfaces.IComment;
import com.google.security.zynamics.zylib.gui.zygraph.nodes.IFunctionNodeListener;
/**
* Interface for listeners that want to be notified about changes in function nodes.
*/
public interface INaviFunctionNodeListener extends INaviViewNodeListener,
IFunctionNodeListener<INaviFunctionNode, IComment> {
}
|
google/conscrypt | 1,086 | common/src/main/java/org/conscrypt/CertBlocklist.java | /*
* Copyright 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.conscrypt;
import java.math.BigInteger;
import java.security.PublicKey;
/**
* A set of certificates that are blacklisted from trust.
*/
public interface CertBlocklist {
/**
* Returns whether the given public key is in the blacklist.
*/
boolean isPublicKeyBlockListed(PublicKey publicKey);
/**
* Returns whether the given serial number is in the blacklist.
*/
boolean isSerialNumberBlockListed(BigInteger serial);
}
|
google/google-ctf | 1,033 | 2021/quals/pwn-tridroid/challenge/src/app/src/test/java/com/google/ctf/pwn/tridroid/ExampleUnitTest.java | // Copyright 2021 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.
//
// Author: Sajjad "JJ" Arshad (sajjadium)
package com.google.ctf.pwn.tridroid;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
|
google/j2cl | 1,047 | transpiler/javatests/com/google/j2cl/integration/java/allsimplebridges/Tester897.java | /*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package allsimplebridges;
import static com.google.j2cl.integration.testing.Asserts.assertTrue;
public class Tester897 {
static class C1 {
C1() {}
public String get(Object value) {
return "C1.get";
}
public String get(String value) {
return "C1.get";
}
}
public static void test() {
C1 s = new C1();
assertTrue(s.get(new Object()).equals("C1.get"));
assertTrue(s.get("").equals("C1.get"));
}
}
|
google/oss-fuzz | 1,091 | projects/apache-commons-compress/ArchiverDumpFuzzer.java | // Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
import org.apache.commons.compress.archivers.dump.DumpArchiveInputStream;
import java.io.ByteArrayInputStream;
import java.io.IOException;
public class ArchiverDumpFuzzer extends BaseTests {
public static void fuzzerTestOneInput(byte[] data) {
try {
fuzzArchiveInputStream(new DumpArchiveInputStream(new ByteArrayInputStream(data)));
} catch (IOException ignored) {
}
}
}
|
googleworkspace/java-samples | 1,072 | drive/snippets/drive_v2/src/test/java/TestExportPdf.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.ByteArrayOutputStream;
import java.io.IOException;
import java.security.GeneralSecurityException;
import org.junit.Test;
public class TestExportPdf extends BaseTest {
@Test
public void exportPdf() throws IOException, GeneralSecurityException {
String id = createTestDocument();
ByteArrayOutputStream out = ExportPdf.exportPdf(id);
assertEquals("%PDF", out.toString("UTF-8").substring(0, 4));
}
}
|
googleworkspace/java-samples | 1,072 | drive/snippets/drive_v2/src/test/java/TestSearchFiles.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.assertNotEquals;
import com.google.api.services.drive.model.File;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.util.List;
import org.junit.Test;
public class TestSearchFiles extends BaseTest {
@Test
public void searchFiles()
throws IOException, GeneralSecurityException {
this.createTestBlob();
List<File> files = SearchFile.searchFile();
assertNotEquals(0, files.size());
}
}
|
googleworkspace/java-samples | 1,072 | drive/snippets/drive_v3/src/test/java/TestExportPdf.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.ByteArrayOutputStream;
import java.io.IOException;
import java.security.GeneralSecurityException;
import org.junit.Test;
public class TestExportPdf extends BaseTest {
@Test
public void exportPdf() throws IOException, GeneralSecurityException {
String id = createTestDocument();
ByteArrayOutputStream out = ExportPdf.exportPdf(id);
assertEquals("%PDF", out.toString("UTF-8").substring(0, 4));
}
}
|
googleworkspace/java-samples | 1,072 | drive/snippets/drive_v3/src/test/java/TestSearchFiles.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.assertNotEquals;
import com.google.api.services.drive.model.File;
import java.io.IOException;
import java.security.GeneralSecurityException;
import java.util.List;
import org.junit.Test;
public class TestSearchFiles extends BaseTest {
@Test
public void searchFiles()
throws IOException, GeneralSecurityException {
this.createTestBlob();
List<File> files = SearchFile.searchFile();
assertNotEquals(0, files.size());
}
}
|
hibernate/hibernate-tools | 1,050 | orm/src/main/java/org/hibernate/tool/internal/reveng/util/EnhancedValue.java | /*
* Hibernate Tools, Tooling for your Hibernate Projects
*
* Copyright 2024-2025 Red Hat, 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 org.hibernate.tool.internal.reveng.util;
import java.util.Properties;
import org.hibernate.mapping.KeyValue;
public interface EnhancedValue extends KeyValue {
void setIdentifierGeneratorProperties(Properties suggestedProperties);
Properties getIdentifierGeneratorProperties();
void setIdentifierGeneratorStrategy(String s);
String getIdentifierGeneratorStrategy();
}
|
openjdk/jdk8 | 1,062 | jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NumberType.java | /*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: NumberType.java,v 1.2.4.1 2005/09/05 11:25:11 pvedula Exp $
*/
package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
/**
* @author Jacek Ambroziak
* @author Santiago Pericas-Geertsen
*/
public abstract class NumberType extends Type {
public boolean isNumber() {
return true;
}
public boolean isSimple() {
return true;
}
}
|
openjdk/jdk8 | 1,088 | langtools/test/com/sun/javadoc/testNewLanguageFeatures/pkg2/Foo3.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg2;
public class Foo3 {}
|
openjdk/jdk8 | 1,088 | langtools/test/com/sun/javadoc/testNewLanguageFeatures/pkg2/Foo4.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg2;
public class Foo4 {}
|
openjdk/jdk8 | 1,095 | langtools/test/tools/javac/processing/6512707/TestEnum.java | /*
* Copyright (c) 2008, 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 enum TestEnum
{
ONE,
TWO
}
|
openjdk/jdk8 | 1,110 | langtools/test/tools/javadoc/6964914/Error.java | /*
* Copyright (c) 2010, 2011, 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 Error {
Object x // no semicolon
}
|
openjdk/jtreg | 1,113 | test/modlibs/buildAction/BuildLibPkg.java | /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @library /libs/packages
* @build lp.lp_C
*/
|
oracle/coherence | 1,041 | prj/coherence-core/src/main/java/com/tangosol/coherence/reporter/locator/MultiplyLocator.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.coherence.reporter.locator;
import com.tangosol.coherence.reporter.extractor.MultiplyExtractor;
import com.tangosol.util.ValueExtractor;
/**
* FunctionLocator extension to multiply two locators
*
* @since Coherence 3.4
* @author ew 2008.01.28
*/
public class MultiplyLocator
extends FunctionLocator
{
/**
* @inheritDoc
*/
public ValueExtractor getExtractor()
{
super.getExtractor();
if (m_veExtractor == null)
{
ValueExtractor[] aVE = new ValueExtractor[2];
if (m_veColumn1 == null || m_veColumn2 == null)
{
buildExtractors();
}
aVE[0] = m_veColumn1;
aVE[1] = m_veColumn2;
return new MultiplyExtractor(aVE);
}
return m_veExtractor;
}
}
|
oracle/nosql | 1,088 | kvmain/src/main/java/oracle/kv/stats/DetailedMetrics.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.stats;
/**
* Interface to the per-partition and per-shard metrics returned by
* {@link oracle.kv.ParallelScanIterator#getPartitionMetrics and
* oracle.kv.ParallelScanIterator#getShardMetrics()}.
*/
public interface DetailedMetrics {
/**
* Return the name of the Shard or a Partition.
*/
public String getName();
/**
* Return the total time in Milli Seconds for scanning the Shard or
* Partition.
*/
public long getScanTime();
/**
* Return the record count for the Shard or Partition.
*/
public long getScanRecordCount();
}
|
apache/commons-ognl | 1,065 | src/test/java/org/apache/commons/ognl/test/objects/ITreeContentProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.ognl.test.objects;
import java.util.Collection;
/**
*/
public interface ITreeContentProvider
extends IContentProvider
{
Collection getChildren( Object parentElement );
boolean hasChildren( Object parentElement );
}
|
apache/crunch | 1,081 | crunch-lambda/src/main/java/org/apache/crunch/lambda/fn/SFunction.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.lambda.fn;
import java.io.Serializable;
import java.util.function.Function;
/**
* Serializable version of the Java Function functional interface.
*/
@FunctionalInterface
public interface SFunction<S, T> extends Function<S, T>, Serializable {
}
|
apache/cxf | 1,064 | rt/management/src/main/java/org/apache/cxf/management/persistence/ExchangeDataFilter.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.management.persistence;
/**
* This interface can be implemented to indicate to PersistOutInterceptor
* if an ExchangeData should be persisted.
*/
public interface ExchangeDataFilter {
boolean shouldPersist(ExchangeData data);
}
|
apache/cxf | 1,073 | tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo4.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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;
import jakarta.jws.WebService;
@WebService(targetNamespace = "http://cxf.apache.org/test/HelloService", name = "HelloService")
public interface Echo4 {
String echo(String request) throws TransientMessageException;
}
|
apache/deltaspike | 1,031 | deltaspike/core/impl/obsolete/src/test/java/org/apache/deltaspike/test/core/api/alternative/global/SubBaseBean1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.test.core.api.alternative.global;
import jakarta.enterprise.context.Dependent;
import jakarta.enterprise.inject.Alternative;
@Alternative
@Dependent
public class SubBaseBean1 extends BaseBean1
{
}
|
apache/deltaspike | 1,048 | deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/handler/QueryRunner.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.deltaspike.data.impl.handler;
import org.apache.deltaspike.data.impl.builder.QueryBuilder;
public interface QueryRunner
{
Object executeQuery(QueryBuilder builder, CdiQueryInvocationContext context) throws Throwable;
}
|
apache/doris-manager | 1,029 | manager/general/src/main/java/org/apache/doris/stack/exception/PasswordWeakException.java | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.exception;
public class PasswordWeakException extends Exception {
public static final String MESSAGE = "密码强度太低,请重新输入";
public PasswordWeakException() {
super(MESSAGE);
}
}
|
apache/doris-manager | 1,031 | manager/general/src/main/java/org/apache/doris/stack/exception/NameDuplicatedException.java | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.exception;
public class NameDuplicatedException extends Exception {
public static final String MESSAGE = "名称重复,请重新输入";
public NameDuplicatedException() {
super(MESSAGE);
}
}
|
apache/doris-spark-connector | 1,049 | spark-load/spark-load-core/src/main/java/org/apache/doris/common/ResponseEntity.java | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.common;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.Data;
@Data
public class ResponseEntity {
private Integer code;
private String msg;
private JsonNode data;
private Integer count;
}
|
apache/drill | 1,067 | exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/Comparator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.drill.exec.physical.impl.common;
/**
* Comparator type. Used in Join and Aggregation operators.
*/
public enum Comparator {
NONE, // No comparator
EQUALS, // Equality comparator
IS_NOT_DISTINCT_FROM // 'IS NOT DISTINCT FROM' comparator
} |
apache/eventmesh | 1,061 | eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/boot/ThreadPoolGroup.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.runtime.boot;
/**
* The implementation class for this interface is used to assemble the thread pool required by the server
*
*/
public interface ThreadPoolGroup {
void initThreadPool();
void shutdownThreadPool();
}
|
apache/felix-dev | 1,057 | tools/osgicheck-maven-plugin/src/main/java/org/apache/felix/maven/osgicheck/impl/Check.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.felix.maven.osgicheck.impl;
import java.io.IOException;
import org.apache.maven.plugin.MojoExecutionException;
public interface Check {
String getName();
void check(CheckContext ctx) throws IOException, MojoExecutionException;
}
|
apache/fineract | 1,043 | fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiConstants.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.survey.api;
/**
* Created by Cieyou on 2/27/14.
*/
public final class SurveyApiConstants {
private SurveyApiConstants() {
}
static final String SURVEY_RESOURCE_NAME = "Survey";
}
|
apache/fineract | 1,046 | fineract-core/src/main/java/org/apache/fineract/commands/exception/CommandResultPersistenceException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.commands.exception;
public class CommandResultPersistenceException extends RuntimeException {
public CommandResultPersistenceException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/fineract | 1,051 | fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeOffBehaviour.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.test.data;
public enum ChargeOffBehaviour {
ZERO_INTEREST("ZERO_INTEREST"), //
REGULAR("REGULAR"); //
public final String value;
ChargeOffBehaviour(String value) {
this.value = value;
}
}
|
apache/flink | 1,053 | flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/iomanager/BulkBlockChannelReader.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.runtime.io.disk.iomanager;
import org.apache.flink.core.memory.MemorySegment;
import java.util.List;
/** */
public interface BulkBlockChannelReader extends FileIOChannel {
List<MemorySegment> getFullSegments();
}
|
apache/ftpserver | 1,072 | ftplet-api/src/main/java/org/apache/ftpserver/ftplet/Authentication.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ftpserver.ftplet;
/**
* Represents a type of authentication request, typically anonymous or a
* username and password combination
*
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*/
public interface Authentication {
}
|
apache/geaflow | 1,033 | geaflow/geaflow-plugins/geaflow-store/geaflow-store-api/src/main/java/org/apache/geaflow/store/api/key/IKMapStore.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.store.api.key;
import org.apache.geaflow.state.key.KeyMapTrait;
import org.apache.geaflow.store.IBaseStore;
public interface IKMapStore<K, UK, UV> extends KeyMapTrait<K, UK, UV>, IBaseStore {
}
|
apache/geaflow | 1,051 | geaflow/geaflow-state/geaflow-state-api/src/main/java/org/apache/geaflow/state/DynamicEdgeState.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.state;
import org.apache.geaflow.model.graph.edge.IEdge;
public interface DynamicEdgeState<K, VV, EV> extends DynamicQueryableState<K, VV, EV, IEdge<K, EV>>,
MultiVersionedRevisableState<K, IEdge<K, EV>> {
}
|
apache/geode | 1,066 | geode-core/src/main/java/org/apache/geode/internal/process/signal/SignalListener.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.geode.internal.process.signal;
import java.util.EventListener;
/**
* The SignalListener class...
*
* @see java.util.EventListener
*
* @since GemFire 7.0
*/
public interface SignalListener extends EventListener {
void handle(SignalEvent event);
}
|
apache/gravitino | 1,067 | lineage/src/main/java/org/apache/gravitino/lineage/processor/NoopProcessor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.gravitino.lineage.processor;
import io.openlineage.server.OpenLineage.RunEvent;
public class NoopProcessor implements LineageProcessor {
@Override
public RunEvent process(RunEvent runEvent) {
return runEvent;
}
}
|
apache/harmony | 1,051 | classlib/modules/beans/src/main/java/java/beans/AwtSystemColorPersistenceDelegate.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package java.beans;
import java.awt.SystemColor;
class AwtSystemColorPersistenceDelegate extends
StaticFieldPersistenceDelegate {
public AwtSystemColorPersistenceDelegate() {
super();
}
static {
init(SystemColor.class);
}
}
|
apache/harmony | 1,076 | classlib/modules/awt/src/main/java/common/java/awt/color/CMMException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT 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 Oleg V. Khaschansky
*/
package java.awt.color;
public class CMMException extends java.lang.RuntimeException {
private static final long serialVersionUID = 5775558044142994965L;
public CMMException (String s) {
super (s);
}
}
|
apache/harmony | 1,108 | drlvm/src/test/regression/H4874/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.h4874;
import junit.framework.TestCase;
public class Test extends TestCase {
public void test() {
double one = 1;
double result = (-2) % one;
assertTrue(Double.compare(result, -0.0) == 0);
}
}
|
apache/hawq | 1,063 | pxf/pxf-jdbc/src/main/java/org/apache/hawq/pxf/plugins/jdbc/utils/MysqlProduct.java | package org.apache.hawq.pxf.plugins.jdbc.utils;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* Implements methods for MySQL Database.
*/
public class MysqlProduct extends DbProduct {
@Override
public String wrapDate(Object dateVal){
return "DATE('" + dateVal + "')";
}
}
|
apache/hudi | 1,068 | hudi-common/src/main/java/org/apache/hudi/exception/HoodieClusteringException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hudi.exception;
public class HoodieClusteringException extends HoodieException {
public HoodieClusteringException(String msg) {
super(msg);
}
public HoodieClusteringException(String msg, Throwable e) {
super(msg, e);
}
}
|
apache/ignite | 1,049 | modules/core/src/test/java/org/apache/ignite/internal/processors/service/inner/MyServiceFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.processors.service.inner;
/**
* Service factory.
*/
public class MyServiceFactory {
/**
* @return Service.
*/
public static MyService create() {
return new MyServiceImpl();
}
}
|
apache/incubator-kie-kogito-runtimes | 1,050 | jbpm/jbpm-flow/src/main/java/org/jbpm/process/core/impl/XmlProcessDumper.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jbpm.process.core.impl;
import org.kie.api.definition.process.Process;
public interface XmlProcessDumper {
String dumpProcess(org.kie.api.definition.process.Process process);
Process readProcess(String processXml);
}
|
apache/incubator-retired-wave | 1,056 | wave/src/main/java/org/waveprotocol/wave/client/wavepanel/view/ReplyBoxView.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.waveprotocol.wave.client.wavepanel.view;
/**
* Represents an reply indicator associated with a Root Thread.
*/
public interface ReplyBoxView extends ThreadReplyIndicatorView, IntrinsicReplyBoxView {
RootThreadView getParent();
}
|
apache/inlong | 1,060 | inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/pojo/CommandInfoDto.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.agent.pojo;
import lombok.Data;
@Data
public class CommandInfoDto {
private int commandResult;
private String dataTime;
private String deliveryTime;
private String id;
private int opType;
private int taskId;
}
|
apache/iotdb | 1,036 | iotdb-core/datanode/src/main/java/org/apache/iotdb/db/exception/runtime/ClassLoaderManagerInitializationException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iotdb.db.exception.runtime;
public class ClassLoaderManagerInitializationException extends RuntimeException {
public ClassLoaderManagerInitializationException(String message) {
super(message);
}
}
|
apache/iotdb | 1,065 | iotdb-api/udf-api/src/main/java/org/apache/iotdb/udf/api/exception/UDFException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.iotdb.udf.api.exception;
public class UDFException extends RuntimeException {
public UDFException(String message) {
super(message);
}
public UDFException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/jackrabbit-filevault | 1,048 | vault-validation/src/main/java/org/apache/jackrabbit/vault/validation/spi/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 FileVault validation framework SPI. Provides classes/interfaces to implement validators on FileVault packages.
*/
@Version("1.9.0")
package org.apache.jackrabbit.vault.validation.spi;
import org.osgi.annotation.versioning.Version;
|
apache/jackrabbit-oak | 1,055 | oak-security-spi/src/main/java/org/apache/jackrabbit/oak/plugins/tree/TreeTypeAware.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jackrabbit.oak.plugins.tree;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public interface TreeTypeAware {
@Nullable
TreeType getType();
void setType(@NotNull TreeType type);
}
|
apache/jclouds | 1,048 | apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/internal/BaseCinderApiExpectTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jclouds.openstack.cinder.v1.internal;
import org.jclouds.openstack.cinder.v1.CinderApi;
/**
* Base class for writing Volume Rest Api Expect tests
*/
public class BaseCinderApiExpectTest extends BaseCinderExpectTest<CinderApi> {
}
|
apache/jclouds | 1,051 | providers/softlayer/src/main/java/org/jclouds/softlayer/domain/internal/BlockDeviceTemplateGroup.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jclouds.softlayer.domain.internal;
public class BlockDeviceTemplateGroup {
private final String globalIdentifier;
public BlockDeviceTemplateGroup(String globalIdentifier) {
this.globalIdentifier = globalIdentifier;
}
}
|
apache/jclouds | 1,082 | core/src/main/java/org/jclouds/http/HttpCommandExecutorService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jclouds.http;
/**
* Capable of invoking http commands.
*/
public interface HttpCommandExecutorService {
/**
* Returns a {@code HttpResponse} from the server which responded to the
* {@code command}.
*/
HttpResponse invoke(HttpCommand command);
}
|
apache/jena | 1,053 | jena-db/jena-dboe-transaction/src/main/java/org/apache/jena/dboe/transaction/txn/QuorumGenerator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.transaction.txn;
import org.apache.jena.query.TxnType;
/** Generate a transaction quorum for a transaction as it begins */
public interface QuorumGenerator {
public ComponentGroup genQuorum(TxnType txnType);
}
|
apache/jena | 1,070 | jena-arq/src/main/java/org/apache/jena/sparql/sse/builders/SSE_ExprBuildException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.sparql.sse.builders;
public class SSE_ExprBuildException extends SSE_BuildException
{
public SSE_ExprBuildException (String msg) { super(msg); }
public SSE_ExprBuildException (String msg, Throwable cause) { super(msg, cause); }
}
|
apache/kafka | 1,058 | storage/src/main/java/org/apache/kafka/storage/internals/checkpoint/PartitionMetadata.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kafka.storage.internals.checkpoint;
import org.apache.kafka.common.Uuid;
public record PartitionMetadata(int version, Uuid topicId) {
public String encode() {
return "version: " + version + "\ntopic_id: " + topicId;
}
}
|
apache/kylin | 1,067 | src/core-job/src/test/java/org/apache/kylin/job/execution/BaseTestExecutable.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.job.execution;
/**
*/
public abstract class BaseTestExecutable extends AbstractExecutable {
public BaseTestExecutable() {
super();
}
public BaseTestExecutable(Object notSetId) {
super(notSetId);
}
}
|
apache/logging-log4j2 | 1,071 | log4j-1.2-api/src/main/java/org/apache/log4j/config/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.
*/
/**
* Log4j 1.x compatibility layer.
*/
@Export
@Version("2.20.1")
@Open("org.apache.logging.log4j.core")
package org.apache.log4j.config;
import aQute.bnd.annotation.jpms.Open;
import org.osgi.annotation.bundle.Export;
import org.osgi.annotation.versioning.Version;
|
apache/maven-archetype | 1,050 | archetype-common/src/main/java/org/apache/maven/archetype/downloader/DownloadException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.archetype.downloader;
/**
* @author Jason van Zyl
*/
public class DownloadException extends Exception {
public DownloadException(String string, Throwable throwable) {
super(string, throwable);
}
}
|
apache/metamodel | 1,077 | excel/src/main/java/org/apache/metamodel/excel/XlsxRowCallback.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.metamodel.excel;
import java.util.List;
import org.apache.metamodel.data.Style;
/**
* Callback for read rows in an XLSX spreadsheet.
*/
interface XlsxRowCallback {
public boolean row(int rowNumber, List<String> values, List<Style> styles);
}
|
apache/myfaces | 1,038 | integration-tests/ajax/src/main/java/org/apache/myfaces/core/integrationtests/ajax/test1Protocol/ViewData.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.myfaces.core.integrationtests.ajax.test1Protocol;
/**
* a helper model class storing the testing data
*/
public class ViewData
{
public int cnt = 0;
public int elemCnt = 0;
public int red = 0;
}
|
apache/myfaces | 1,074 | impl/src/main/java/org/apache/myfaces/config/element/FacesFlowView.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.myfaces.config.element;
import java.io.Serializable;
/**
*
* @author Leonardo Uribe
*/
public abstract class FacesFlowView implements Serializable
{
public abstract String getId();
public abstract String getVdlDocument();
}
|
apache/nifi | 1,056 | nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/concurrency/DebuggableTimedLock.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.nifi.util.concurrency;
import java.util.concurrent.TimeUnit;
public interface DebuggableTimedLock {
void lock();
boolean tryLock(long timePeriod, TimeUnit timeUnit);
boolean tryLock();
void unlock(String task);
}
|
apache/oodt | 1,057 | resource/src/main/java/org/apache/oodt/cas/resource/queuerepo/QueueRepositoryFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.oodt.cas.resource.queuerepo;
/**
*
* @author bfoster
* @version $Revision$
*
* <p>
* The Queue Repository Factory interface.
* </p>
*/
public interface QueueRepositoryFactory {
QueueRepository createQueueRepository();
}
|
apache/openjpa | 1,073 | openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataContext.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.openjpa.meta;
/**
* Allows us to access configuration through metadata in a generic way.
*
* @author Abe White
*/
public interface MetaDataContext {
/**
* Access metadata repository.
*/
MetaDataRepository getRepository();
}
|
apache/openwebbeans | 1,045 | webbeans-impl/src/test/java/org/apache/webbeans/test/managed/multipleinterfaces/MyEntity.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.webbeans.test.managed.multipleinterfaces;
// @Entity ...
public class MyEntity {
private int id;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
}
|
apache/ozhera | 1,044 | ozhera-operator/ozhera-operator-service/src/main/java/org/apache/ozhera/operator/bo/HeraObjectMeta.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ozhera.operator.bo;
import lombok.Data;
import java.io.Serializable;
/**
* @date 2023-02-09
*/
@Data
public class HeraObjectMeta implements Serializable {
private String namespace;
private String name;
}
|
apache/pinot | 1,066 | pinot-spi/src/main/java/org/apache/pinot/spi/config/table/TimestampIndexGranularity.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pinot.spi.config.table;
/**
* TimestampIndexGranularity is the enum of different time granularities from MILLIS to YEAR.
*/
public enum TimestampIndexGranularity {
MILLISECOND, SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, YEAR
}
|
apache/poi | 1,099 | poi/src/main/java/org/apache/poi/hssf/model/package-info.java | /* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
/**
* Provides low level API structures for reading, writing, modifying XLS files.
*
* @see org.apache.poi.hssf.usermodel
*/
package org.apache.poi.hssf.model; |
apache/polygene-java | 1,055 | core/api/src/main/java/org/apache/polygene/api/composite/InjectedFieldDescriptor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.composite;
import java.lang.reflect.Field;
/**
* Composite injected field descriptor.
*/
public interface InjectedFieldDescriptor
{
Field field();
DependencyDescriptor dependency();
}
|
apache/pulsar | 1,083 | pulsar-client/src/main/java/org/apache/pulsar/client/impl/Hash.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.pulsar.client.impl;
public interface Hash extends org.apache.pulsar.common.util.Hash {
/**
* Generate the hash of a given String.
*
* @return The hash of {@param s}, which is non-negative integer.
*/
int makeHash(String s);
}
|
apache/qpid-broker-j | 1,063 | qpid-test-utils/src/main/java/org/apache/qpid/test/utils/tls/KeyStoreEntry.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.test.utils.tls;
import java.security.KeyStore;
import java.security.KeyStoreException;
public interface KeyStoreEntry
{
void addEntryToKeyStore(final KeyStore keyStore, final char[] secret) throws KeyStoreException;
}
|
apache/ratis | 1,060 | ratis-test/src/test/java/org/apache/ratis/server/simulation/TestRetryCacheWithSimulatedRpc.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ratis.server.simulation;
import org.apache.ratis.RetryCacheTests;
public class TestRetryCacheWithSimulatedRpc
extends RetryCacheTests<MiniRaftClusterWithSimulatedRpc>
implements MiniRaftClusterWithSimulatedRpc.FactoryGet {
}
|
apache/reef | 1,065 | lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/ConfigurationProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.tang;
/**
* Objects that can provide a Configuration implement this interface.
*/
public interface ConfigurationProvider {
/**
* @return a Configuration provided by this instance.
*/
Configuration getConfiguration();
}
|
apache/royale-compiler | 1,060 | compiler/src/main/java/org/apache/royale/compiler/tree/mxml/IMXMLPrivateNode.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.royale.compiler.tree.mxml;
/**
* This AST node represents an MXML <code><Private></code> tag.
* <p>
* An {@link IMXMLPrivateNode} has no child nodes.
*/
public interface IMXMLPrivateNode extends IMXMLNode
{
}
|
apache/rya | 1,041 | extras/rya.pcj.fluo/rya.pcj.functions.geo/src/main/java/org/apache/rya/indexing/pcj/functions/geo/RCC8TPPRdf4J.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.rya.indexing.pcj.functions.geo;
public class RCC8TPPRdf4J extends FunctionAdapter {
public RCC8TPPRdf4J() {
super(new org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql.RCC8TPP());
}
}
|
apache/servicecomb-java-chassis | 1,030 | common/common-protobuf/src/test/java/org/apache/servicecomb/codec/protobuf/schema/model/ScoreInfo.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.codec.protobuf.schema.model;
public class ScoreInfo {
private Integer type;
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
}
|
apache/servicecomb-pack | 1,034 | omega/omega-spring-tx/src/main/java/org/apache/servicecomb/pack/omega/transaction/spring/CallbackType.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.pack.omega.transaction.spring;
public enum CallbackType {
/**
* Compensation is for the Saga pattern
*/
Compensation,
/**
* Coordination is for the TCC pattern
*/
Coordination
}
|
apache/shardingsphere | 1,039 | kernel/global-clock/type/hlc/src/main/java/org/apache/shardingsphere/globalclock/type/hlc/HLCProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.shardingsphere.globalclock.type.hlc;
import org.apache.shardingsphere.globalclock.provider.GlobalClockProvider;
/**
* Hybrid logical clock provider.
*/
public interface HLCProvider extends GlobalClockProvider {
}
|
apache/streampipes | 1,025 | streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/constants/GenericCouchDbConstants.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.streampipes.storage.couchdb.constants;
public class GenericCouchDbConstants {
public static final String DESIGN_DOC_NAME = "appDocType";
public static final String DB_NAME = "genericstorage";
}
|
apache/struts-examples | 1,067 | message-store/src/main/java/org/apache/struts/example/HelloWorld1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts.example;
import org.apache.struts2.ActionSupport;
public class HelloWorld1 extends ActionSupport {
public String execute() throws Exception {
addActionError("Hello from HelloWorld1!");
return SUCCESS;
}
}
|
apache/tajo | 1,073 | tajo-core/src/main/java/org/apache/tajo/master/event/QueryEventType.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tajo.master.event;
public enum QueryEventType {
// Producer: TajoMaster
START,
KILL,
// Producer: Stage
STAGE_COMPLETED,
// Producer: Query
QUERY_COMPLETED,
// Producer: Any component
DIAGNOSTIC_UPDATE,
INTERNAL_ERROR,
}
|
apache/tapestry-5 | 1,039 | tapestry-json/src/main/java/org/apache/tapestry5/json/exceptions/JSONTypeMismatchException.java | package org.apache.tapestry5.json.exceptions;
import org.apache.tapestry5.json.JSONType;
public class JSONTypeMismatchException extends RuntimeException
{
private static final long serialVersionUID = 268314880458464132L;
private final String location;
private final JSONType requiredType;
private final Class<? extends Object> invalidClass;
public JSONTypeMismatchException(String location, JSONType requiredType,
Class<? extends Object> invalidClass)
{
super(location + (invalidClass == null ? " is null."
: " is not a " + requiredType.name() + ". Actual: " + invalidClass.getName()));
this.location = location;
this.requiredType = requiredType;
this.invalidClass = invalidClass;
}
public String getLocation()
{
return this.location;
}
public JSONType getRequiredType()
{
return this.requiredType;
}
public Class<? extends Object> getInvalidClass()
{
return this.invalidClass;
}
}
|
apache/tapestry-5 | 1,046 | tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/test/internal/util/OneShotLockSubject.java | // Copyright 2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.ioc.test.internal.util;
import org.apache.tapestry5.ioc.internal.util.OneShotLock;
/**
* Evolved from a test for aspects + annotations to a test of a class that utilizeds OneShotLock as a utility.
*/
public class OneShotLockSubject
{
private final OneShotLock lock = new OneShotLock();
public void go()
{
lock.check();
}
public void done()
{
lock.lock();
}
}
|
apache/thrift | 1,077 | lib/java/src/test/java/org/apache/thrift/test/fuzz/ParseCompactFuzzer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.thrift.test.fuzz;
import org.apache.thrift.protocol.TCompactProtocol;
public class ParseCompactFuzzer {
public static void fuzzerTestOneInput(byte[] input) throws Exception {
FuzzTestUtils.testParse(input, new TCompactProtocol.Factory());
}
}
|
apache/tinkerpop | 1,056 | gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/ThrowingBiConsumer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.tinkerpop.gremlin.util.function;
/**
* @author Stephen Mallette (http://stephen.genoprime.com)
*/
@FunctionalInterface
public interface ThrowingBiConsumer<A, B> {
public void accept(final A a, final B b) throws Exception;
}
|
apache/tomee | 1,046 | container/openejb-core/src/main/java/org/apache/openejb/config/provider/MalformedProviderNameException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.openejb.config.provider;
/**
* @version $Rev$ $Date$
*/
public class MalformedProviderNameException extends IllegalArgumentException {
public MalformedProviderNameException(final String s) {
super(s);
}
}
|
apache/unomi | 1,059 | persistence-spi/src/main/java/org/apache/unomi/persistence/spi/aggregate/BaseAggregate.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.unomi.persistence.spi.aggregate;
public abstract class BaseAggregate {
private String field;
public BaseAggregate(String field) {
this.field = field;
}
public String getField() {
return field;
}
}
|
apache/usergrid | 1,070 | stack/core/src/main/java/org/apache/usergrid/persistence/ResultsIterator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.usergrid.persistence;
import java.util.Iterator;
/**
* Iterator to know if we have more records in cursor.
*/
public interface ResultsIterator extends Iterator {
/**
* is there a cursor
* @return
*/
boolean hasPages();
}
|
apache/zookeeper | 1,037 | zookeeper-contrib/zookeeper-contrib-loggraph/src/main/java/org/apache/zookeeper/graph/filterops/SymbolArg.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.zookeeper.graph.filterops;
import org.apache.zookeeper.graph.FilterOp.*;
public class SymbolArg extends Arg<String> {
public SymbolArg(String value) {
super(ArgType.SYMBOL);
this.value = value;
}
};
|
google/android-classyshark | 1,054 | ClassySharkWS/src/com/google/classyshark/updater/networking/NetworkManager.java | /*
* Copyright 2016 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.classyshark.updater.networking;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class NetworkManager {
public static GitHubApi getGitHubApi() {
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(GitHubApi.ENDPOINT)
.addConverterFactory(GsonConverterFactory.create())
.build();
return retrofit.create(GitHubApi.class);
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.