repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/struts
1,039
core/src/main/java/org/apache/struts2/locale/DefaultLocaleProviderFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.struts2.locale; public class DefaultLocaleProviderFactory implements LocaleProviderFactory { @Override public LocaleProvider createLocaleProvider() { return new DefaultLocaleProvider(); } }
apache/tapestry-5
1,036
tapestry-core/src/main/java/org/apache/tapestry5/services/AssetAlias.java
// Copyright 2013-2014 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.services; /** * Identifies a virtual folder and a path within that folder. * * @since 5.4 * @deprecated Deprecated in 5.4 (see notes in {@link ClasspathAssetAliasManager}). */ public class AssetAlias { public final String virtualFolder, path; public AssetAlias(String virtualFolder, String path) { this.virtualFolder = virtualFolder; this.path = path; } }
apache/tapestry-5
1,037
plastic/src/main/java/org/apache/tapestry5/plastic/ConstructorCallback.java
// Copyright 2011 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.plastic; /** * Supplies construction-time logic for the class' constructor. */ public interface ConstructorCallback { /** * Invoked at the end of the class constructor to perform any additional initializations. * * @param instance newly constructed instance * @param context instance context for class */ void onConstruct(Object instance, InstanceContext context); }
apache/tapestry-5
1,041
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/ServiceBuilder.java
// Copyright 2008 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; /** * A callback used to create a service implementation. */ public interface ServiceBuilder<T> { /** * Construct the service. A non-null object that implements the service interface must be returned. * * @param resources used to lookup dependencies or access resources * @return the core service implementation */ T buildService(ServiceResources resources); }
apache/tez
1,045
hadoop-shim/src/main/java/org/apache/tez/hadoop/shim/DefaultHadoopShim.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tez.hadoop.shim; import org.apache.hadoop.classification.InterfaceAudience.Private; /** * Default Hadoop Shim. For now, it mimics HadoopShim. */ @Private public class DefaultHadoopShim extends HadoopShim { }
apache/tomee
1,025
itests/jaxrs/src/test/java/org/apache/tomee/itests/jaxrs/applogging/TriangleResource.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tomee.itests.jaxrs.applogging; import jakarta.ws.rs.GET; import jakarta.ws.rs.Path; @Path("/triangle") public class TriangleResource { @GET public String get() { return ""; } }
apache/tomee
1,030
tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/InjectionFailedException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tomee.catalina; /** * @version $Rev$ $Date$ */ public class InjectionFailedException extends IllegalStateException { public InjectionFailedException(final Throwable cause) { super(cause); } }
apache/uniffle
1,038
common/src/main/java/org/apache/uniffle/common/merger/KeyValueIterator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.uniffle.common.merger; import java.io.IOException; public interface KeyValueIterator<K, V> { K getCurrentKey(); V getCurrentValue(); boolean next() throws IOException; void close() throws IOException; }
apache/unomi
1,062
api/src/main/java/org/apache/unomi/api/ConsentStatus.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.api; /** * This enum class represents the type of grant a @Consent might have. The revoke grant type is a special one used to * remove a consent for a profile. */ public enum ConsentStatus { GRANTED, DENIED, REVOKED }
apache/wicket
1,052
wicket-spring/src/test/java/org/apache/wicket/spring/Bean.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.spring; import org.apache.wicket.util.io.IClusterable; /** * Mock spring bean * * @author Igor Vaynberg (ivaynberg) */ public class Bean implements IClusterable { private static final long serialVersionUID = 1L; }
google/auto
1,027
value/src/it/functional/src/test/java/com/google/auto/value/annotations/StringValues.java
/* * Copyright 2014 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.auto.value.annotations; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * An annotation with one member, an array of strings with the default name {@code value}, and * runtime retention so it can be accessed through reflection. * * @author emcmanus@google.com (Éamonn McManus) */ @Retention(RetentionPolicy.RUNTIME) public @interface StringValues { String[] value(); }
google/guice
1,035
extensions/struts2/src/com/google/inject/struts2/Struts2GuicePluginModule.java
/* * Copyright (C) 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.inject.struts2; import com.google.inject.AbstractModule; /** * Initializes the Struts 2 Guice Plugin. Must be added to the injector returned by {@link * com.google.inject.servlet.GuiceServletContextListener#getInjector}. * * @author benmccann.com */ public class Struts2GuicePluginModule extends AbstractModule { @Override protected void configure() { requestStaticInjection(Struts2Factory.class); } }
google/j2cl
1,032
transpiler/javatests/com/google/j2cl/integration/java/nativeinjectionapt/Main.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 nativeinjectionapt; import static com.google.j2cl.integration.testing.Asserts.assertTrue; /** Integration tests for native methods written by APTs. */ public class Main { public static void main(String... args) { assertTrue(MyClass.nativeStaticMethod().equals("MyClass")); assertTrue(NativeClass.nativeStaticMethod().equals("NativeClass")); assertTrue(SuperMyClass.nativeStaticMethod().equals("SuperMyClass")); } }
openjdk/jdk8
1,070
langtools/test/com/sun/javadoc/testNoPackagesFile/C.java
/* * Copyright (c) 2003, 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 C {}
openjdk/jdk8
1,070
langtools/test/com/sun/javadoc/testSummaryHeading/C.java
/* * Copyright (c) 2003, 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 C {}
openjdk/jdk8
1,073
jdk/test/java/rmi/server/RMIClassLoader/spi/Foo.java
/* * Copyright (c) 2001, 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 Foo { }
openjdk/jtreg
1,083
test/junitLibs/extlibs/extLib/ExtLib.java
/* * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ public class ExtLib { }
oracle/coherence
1,027
prj/coherence-core/src/main/java/com/tangosol/dev/assembler/Irem.java
/* * Copyright (c) 2000, 2020, Oracle and/or its affiliates. * * Licensed under the Universal Permissive License v 1.0 as shown at * http://oss.oracle.com/licenses/upl. */ package com.tangosol.dev.assembler; import java.io.IOException; import java.io.DataInput; import java.io.DataOutput; /** * The IREM simple op computes the remainder when the second integer in the * stack is divided by the first. * <p><code><pre> * JASM op : IREM (0x70) * JVM byte code(s): IREM (0x70) * Details : * </pre></code> * * @version 0.50, 06/12/98, assembler/dis-assembler * @author Cameron Purdy */ public class Irem extends Op implements Constants { // ----- constructors --------------------------------------------------- /** * Construct the op. */ public Irem() { super(IREM); } // ----- data members --------------------------------------------------- /** * The name of this class. */ private static final String CLASS = "Irem"; }
oracle/nosql
1,030
kvtest/kvstore-IT/src/main/java/oracle/kv/TryClassTimeout.java
/*- * See the file LICENSE for redistribution information. * * Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved. * */ package oracle.kv; import org.junit.Test; /** * Try class timeouts. This is a unit test class, but the class name doesn't * end with "Test", so it won't be run automatically. */ @TestClassTimeoutMillis(1*1000) public class TryClassTimeout extends TestBase { @Test public void testQuick() { System.out.println("testQuick"); } @Test public void testSlow() throws Exception { Thread.sleep(2000); System.out.println("testSlow"); } @Test public void testSlow2() throws Exception { Thread.sleep(2000); System.out.println("testSlow2"); } @Test public void testQuick2() throws Exception { System.out.println("testQuick2"); } @Test public void testCatchInterrupt() { try { Thread.sleep(2000); } catch (InterruptedException e) { } } }
oracle/oci-java-sdk
1,044
bmc-common/src/main/java/com/oracle/bmc/waiter/FixedTimeDelayStrategy.java
/** * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved. * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. */ package com.oracle.bmc.waiter; import com.oracle.bmc.waiter.WaiterConfiguration.WaitContext; /** Delay strategy that waits a constant amount of time between poll attempts. */ public class FixedTimeDelayStrategy implements DelayStrategy { /** The amount of time to wait (in millis) between each condition check. */ private final long timeBetweenAttempsInMillis; @Override public long nextDelay(WaitContext context) { return timeBetweenAttempsInMillis; } @java.beans.ConstructorProperties({"timeBetweenAttempsInMillis"}) public FixedTimeDelayStrategy(final long timeBetweenAttempsInMillis) { this.timeBetweenAttempsInMillis = timeBetweenAttempsInMillis; } }
apache/commons-math
1,025
commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/special/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. */ /** * Implementations of special functions. * Note that Beta and Gamma functions are available in * <a href="https://commons.apache.org/numbers">Commons Numbers</a>. */ package org.apache.commons.math4.legacy.special;
apache/cordova-plugin-file
1,063
src/android/TypeMismatchException.java
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.cordova.file; @SuppressWarnings("serial") public class TypeMismatchException extends Exception { public TypeMismatchException(String message) { super(message); } }
apache/datafusion-comet
1,046
common/src/main/java/org/apache/comet/CometNativeException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.comet; /** Parent class for all exceptions thrown from Comet native side. */ public class CometNativeException extends CometRuntimeException { public CometNativeException(String message) { super(message); } }
apache/drill
1,039
logical/src/main/java/org/apache/drill/common/expression/types/DataTypeFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.drill.common.expression.types; public abstract class DataTypeFactory { public abstract DataType getArrayType(DataType containedType); public abstract DataType getMapType(DataType keyType, DataType valueType); }
apache/dubbo
1,034
dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/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. */ /** * {@link org.apache.dubbo.rpc.protocol.dubbo.FutureAdapter} was in dubbo-rpc-dubbo module, * considering some users will use this class directly, keep the package not changed. */ package org.apache.dubbo.rpc.protocol.dubbo;
apache/falcon
1,049
metrics/src/main/java/org/apache/falcon/plugin/MonitoringPlugin.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.falcon.plugin; import org.apache.falcon.aspect.ResourceMessage; /** * Generic interface to receiving monitoring and metric messages. */ public interface MonitoringPlugin { void monitor(ResourceMessage message); }
apache/fesod
1,038
fesod/src/main/java/org/apache/fesod/excel/enums/WriteDirectionEnum.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.fesod.excel.enums; /** * Direction of writing * * **/ public enum WriteDirectionEnum { /** * Vertical write. */ VERTICAL, /** * Horizontal write. */ HORIZONTAL, ; }
apache/fineract
1,030
fineract-provider/src/main/java/org/apache/fineract/mix/service/XBRLResultService.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.mix.service; import java.sql.Date; import org.apache.fineract.mix.data.XBRLData; public interface XBRLResultService { XBRLData getXBRLResult(Date startDate, Date endDate, String currency); }
apache/geode
1,047
geode-core/src/main/java/org/apache/geode/internal/admin/TransportConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.admin; /** * A simple value object to contain information needed to connect to a remote * {@link GfManagerAgent}. This class may not be necessary. Perhaps a URL would suffice... */ public interface TransportConfig { }
apache/gobblin
1,036
gobblin-api/src/main/java/org/apache/gobblin/runtime/JobShutdownException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.gobblin.runtime; /** * An exception thrown when a job cannot be graciously shutdown. */ public class JobShutdownException extends Exception { public JobShutdownException(String message) { super(message); } }
apache/guacamole-client
1,025
guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/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. */ /** * Jetty 9 WebSocket tunnel implementation. The classes here require at least * Jetty 9, prior to Jetty 9.1 (when support for JSR 356 was implemented). */ package org.apache.guacamole.tunnel.websocket.jetty9;
apache/hadoop-mapreduce
1,048
src/tools/org/apache/hadoop/tools/rumen/SingleEventEmitter.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.tools.rumen; import org.apache.hadoop.mapreduce.jobhistory.HistoryEvent; abstract class SingleEventEmitter { abstract HistoryEvent maybeEmitEvent(ParsedLine line, String name, HistoryEventEmitter that); }
apache/hadoop
1,028
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/constants/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ @InterfaceAudience.Public @InterfaceStability.Evolving package org.apache.hadoop.fs.azurebfs.constants; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/hadoop
1,028
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/contracts/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ @InterfaceAudience.Public @InterfaceStability.Evolving package org.apache.hadoop.fs.azurebfs.contracts; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/harmony
1,040
classlib/modules/print/src/main/java/common/javax/print/URIException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 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.print; import java.net.URI; public interface URIException { int URIInaccessible = 1; int URISchemeNotSupported = 2; int URIOtherProblem = -1; int getReason(); URI getUnsupportedURI(); }
apache/harmony
1,041
classlib/modules/awt/src/main/java/common/java/awt/datatransfer/FlavorMap.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 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.awt.datatransfer; import java.util.Map; public interface FlavorMap { Map<String, DataFlavor> getFlavorsForNatives(String[] natives); Map<DataFlavor, String> getNativesForFlavors(DataFlavor[] flavors); }
apache/harmony
1,044
classlib/modules/print/src/main/java/common/javax/print/MultiDocPrintJob.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 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.print; import javax.print.attribute.PrintRequestAttributeSet; public interface MultiDocPrintJob extends DocPrintJob { void print(MultiDoc multiDoc, PrintRequestAttributeSet attributes) throws PrintException; }
apache/harmony
1,064
drlvm/src/test/regression/H6020/Parent_ObjectCase.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.h6020; class Parent_ObjectCase { private static final Child_ObjectCase childCache = new Child_ObjectCase(); public static Child_ObjectCase createChild(){ return childCache; } }
apache/hbase
1,046
hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/DummyException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hbase.ipc; /** * Just a dummy exception for testing IPCUtil.isFatalConnectionException. */ public class DummyException extends Exception { private static final long serialVersionUID = 215191975455115118L; }
apache/hbase
1,048
hbase-server/src/main/java/org/apache/hadoop/hbase/util/KeyRange.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hbase.util; import org.apache.yetus.audience.InterfaceAudience; /** * A key range use in split coverage. */ @InterfaceAudience.Private public interface KeyRange { byte[] getStartKey(); byte[] getEndKey(); }
apache/hive
1,051
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/HiveInputCounters.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.hive.ql.exec.tez; import org.apache.hadoop.classification.InterfaceAudience; @InterfaceAudience.Private public enum HiveInputCounters { RAW_INPUT_SPLITS, GROUPED_INPUT_SPLITS, INPUT_FILES, INPUT_DIRECTORIES }
apache/hop
1,048
engine/src/test/java/org/apache/hop/core/injection/MetaBeanWrong1.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hop.core.injection; /** Wrong declaration - two annotations on the one field. */ @InjectionSupported(localizationPrefix = "") public class MetaBeanWrong1 { @Injection(name = "TEST") @InjectionDeep private String s; }
apache/ignite-3
1,028
modules/marshaller-common/src/main/java/org/apache/ignite/internal/util/Factory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.util; /** * Factory interface. * * @param <T> Object type. */ public interface Factory<T> { /** * Creates object. * * @return Object. */ public T create(); }
apache/incubator-graphar
1,024
maven-projects/java/src/main/java/org/apache/graphar/writers/builder/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ @FFIApplication(jniLibrary = GAR_JNI_LIBRARY_NAME) package org.apache.graphar.writers.builder; import static org.apache.graphar.util.JNILibraryName.GAR_JNI_LIBRARY_NAME; import com.alibaba.fastffi.FFIApplication;
apache/incubator-heron
1,028
contrib/bolts/kafka/src/java/org/apache/heron/bolts/kafka/KafkaProducerFactory.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.heron.bolts.kafka; import java.io.Serializable; import org.apache.kafka.clients.producer.Producer; public interface KafkaProducerFactory<K, V> extends Serializable { Producer<K, V> create(); }
apache/incubator-heron
1,034
storm-compatibility/v0.10.2/src/java/org/apache/storm/generated/Bolt.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.storm.generated; import org.apache.heron.api.generated.TopologyAPI; public class Bolt { private final TopologyAPI.Bolt delegate; public Bolt(TopologyAPI.Bolt bolt) { this.delegate = bolt; } }
apache/incubator-kie-drools
1,032
drools-commands/src/main/java/org/drools/commands/jaxb/ObjectFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.drools.commands.jaxb; import jakarta.xml.bind.annotation.XmlRegistry; @XmlRegistry public class ObjectFactory { public JaxbListWrapper createJaxbListWrapper() { return new JaxbListWrapper(); } }
apache/incubator-kie-drools
1,038
kie-api/src/main/java/org/kie/api/command/ExecutableCommand.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.api.command; import org.kie.api.runtime.Context; public interface ExecutableCommand<T> extends Command<T> { T execute(Context context); default boolean autoFireAllRules() { return true; } }
apache/incubator-kie-drools
1,040
drools-mvel/src/main/java/org/drools/mvel/asm/ReturnValueStub.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.drools.mvel.asm; import org.drools.base.rule.accessor.ReturnValueExpression; public interface ReturnValueStub extends ReturnValueExpression, InvokerStub { void setReturnValue(ReturnValueExpression returnValue); }
apache/jclouds
1,065
apis/sqs/src/main/java/org/jclouds/sqs/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. */ /** * This package contains an Amazon SQS api implemented by {@link org.jclouds.http.HttpCommandExecutorService} commands. * * @see <a href="http://docs.amazonwebservices.com/AWSSimpleQueueService/latest/APIReference/index.html"/> */ package org.jclouds.sqs;
apache/jena
1,049
jena-tdb1/src/main/java/org/apache/jena/tdb1/setup/ObjectFileBuilder.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.tdb1.setup; import org.apache.jena.tdb1.base.file.FileSet; import org.apache.jena.tdb1.base.objectfile.ObjectFile; public interface ObjectFileBuilder { ObjectFile buildObjectFile(FileSet fileSet, String ext) ; }
apache/jena
1,050
jena-integration-tests/src/test/java/org/apache/jena/sys/TS_Sys.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.sys; import org.junit.platform.suite.api.SelectClasses; import org.junit.platform.suite.api.Suite; @Suite @SelectClasses({ TestJenaSystem.class, TestJenaSystemWithFreshJVM.class }) public class TS_Sys { }
apache/johnzon
1,064
johnzon-mapper/src/test/java/org/superbiz/Model.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.superbiz; public class Model extends ModelBase<Model.ChildA, Model.ChildB> { public static class ChildA extends ModelSuperBase.ChildA { public String detail; } public static class ChildB extends ModelSuperBase.ChildB { } }
apache/kafka
1,029
clients/src/main/java/org/apache/kafka/common/errors/TransactionalIdAuthorizationException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kafka.common.errors; public class TransactionalIdAuthorizationException extends AuthorizationException { public TransactionalIdAuthorizationException(final String message) { super(message); } }
apache/kafka
1,038
clients/src/main/java/org/apache/kafka/common/network/InvalidReceiveException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kafka.common.network; import org.apache.kafka.common.KafkaException; public class InvalidReceiveException extends KafkaException { public InvalidReceiveException(String message) { super(message); } }
apache/kylin
1,031
src/common-service/src/main/java/org/apache/kylin/rest/request/SCD2ConfigRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kylin.rest.request; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; @Data public class SCD2ConfigRequest { @JsonProperty("scd2_enabled") private Boolean scd2Enabled; }
apache/logging-flume
1,038
flume-ng-node/src/test/java/org/apache/flume/node/lookup/TestLookup.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache license, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the license for the specific language governing permissions and * limitations under the license. */ package org.apache.flume.node.lookup; import org.apache.commons.text.lookup.StringLookup; /** * Test Lookup. */ public class TestLookup implements StringLookup { @Override public String lookup(String key) { return key; } }
apache/lucene
1,043
lucene/core/src/java/org/apache/lucene/internal/vectorization/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. */ /** * Internal implementations to support SIMD vectorization. This package is for internal Lucene use * only! * * @see org.apache.lucene.internal.vectorization.VectorizationProvider */ package org.apache.lucene.internal.vectorization;
apache/maven-compiler-plugin
1,037
src/it/mcompiler-21_class-remove/src/main/java/BeanA2.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package foo; /** * dumb test bean */ public class BeanA2 { private int i; private BeanA beanA; public int getI() { return beanA.getI(); } public void setI(int i) { beanA.setI(i); } }
apache/myfaces
1,048
impl/src/test/java/jakarta/faces/component/AbstractComponentTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package jakarta.faces.component; import org.apache.myfaces.test.base.junit.AbstractFacesTestCase; /** * Abstract basis clazz for Apache MyFaces' test kit. */ public abstract class AbstractComponentTest extends AbstractFacesTestCase { }
apache/phoenix
1,024
phoenix-core-client/src/main/java/org/apache/phoenix/hbase/index/scanner/ReseekableScanner.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.phoenix.hbase.index.scanner; import java.io.IOException; import org.apache.hadoop.hbase.Cell; public interface ReseekableScanner extends Scanner { boolean reseek(Cell key) throws IOException; }
apache/pinot
1,033
pinot-spi/src/main/java/org/apache/pinot/spi/data/readers/RecordExtractorConfig.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.data.readers; import java.util.Map; /** * Interface for configs of {@link RecordExtractor} */ public interface RecordExtractorConfig { default void init(Map<String, String> props) { } }
apache/ratis
1,043
ratis-test/src/test/java/org/apache/ratis/netty/TestRaftExceptionWithNetty.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.netty; import org.apache.ratis.RaftExceptionBaseTest; public class TestRaftExceptionWithNetty extends RaftExceptionBaseTest<MiniRaftClusterWithNetty> implements MiniRaftClusterWithNetty.FactoryGet { }
apache/samza
1,038
samza-rest/src/main/java/org/apache/samza/rest/resources/ResourceConstants.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.samza.rest.resources; public class ResourceConstants { public static final String GET_TASKS_URL = "http://%s/v1/jobs/%s/%s/tasks/"; public static final String GET_JOBS_URL = "http://%s/v1/jobs/%s/%s/"; }
apache/sis
1,025
endorsed/src/org.apache.sis.storage.netcdf/main/org/apache/sis/storage/netcdf/ucar/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. */ /** * Implementation of the {@link org.apache.sis.storage.netcdf.base} API * as wrappers around the UCAR netCDF library. * * @author Martin Desruisseaux (IRD, Geomatys) */ package org.apache.sis.storage.netcdf.ucar;
apache/solr
1,043
solr/core/src/java/org/apache/solr/cluster/placement/DeleteReplicasRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.cluster.placement; import java.util.Set; import org.apache.solr.cluster.Replica; /** Delete replicas request. */ public interface DeleteReplicasRequest extends ModificationRequest { Set<Replica> getReplicas(); }
apache/solr
1,046
solr/core/src/java/org/apache/solr/util/plugin/PluginInfoInitialized.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.util.plugin; import org.apache.solr.core.PluginInfo; /** * A plugin that can be initialized with a PluginInfo * * @since solr 1.4 */ public interface PluginInfoInitialized { public void init(PluginInfo info); }
apache/solr
1,053
solr/core/src/java/org/apache/solr/search/grouping/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * APIs and classes for implementing result grouping * * <p>See the <a * href="https://solr.apache.org/guide/solr/latest/query-guide/result-grouping.html">Solr Ref * Guide</a> for more information */ package org.apache.solr.search.grouping;
apache/solr
1,055
solr/core/src/java/org/apache/solr/update/processor/Signature.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.update.processor; import org.apache.solr.common.params.SolrParams; public abstract class Signature { public void init(SolrParams nl) {} public abstract void add(String content); public abstract byte[] getSignature(); }
apache/syncope
1,034
common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/TemplatableTO.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.common.lib.to; import java.util.Map; import org.apache.syncope.common.lib.BaseBean; @FunctionalInterface public interface TemplatableTO extends BaseBean { Map<String, AnyTO> getTemplates(); }
apache/tajo
1,054
tajo-algebra/src/main/java/org/apache/tajo/algebra/NotExpr.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.algebra; public class NotExpr extends UnaryOperator { public NotExpr(Expr child) { super(OpType.Not); setChild(child); } @Override boolean equalsTo(Expr expr) { return expr instanceof NotExpr; } }
apache/thrift
1,057
lib/javame/src/org/apache/thrift/protocol/TMessageType.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.thrift.protocol; /** * Message type constants in the Thrift protocol. * */ public final class TMessageType { public static final byte CALL = 1; public static final byte REPLY = 2; public static final byte EXCEPTION = 3; }
apache/tinkerpop
1,025
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/ThrowingSupplier.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 ThrowingSupplier<T> { public T get() throws Exception; }
apache/tomcat
1,065
java/org/apache/catalina/ThreadBindingListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.catalina; /** * Callback for establishing naming association when entering the application scope. This corresponds to setting the * context classloader. */ public interface ThreadBindingListener { void bind(); void unbind(); }
apache/tomcat
1,085
java/jakarta/websocket/OnOpen.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package jakarta.websocket; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface OnOpen { }
apache/tomcat80
1,084
java/javax/websocket/OnClose.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 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.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface OnClose { }
apache/tomcat80
1,084
java/javax/websocket/OnError.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package javax.websocket; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface OnError { }
apache/tomee
1,046
container/openejb-loader/src/test/java/org/apache/openejb/observer/Assert.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.observer; @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD}) public @interface Assert { String[] value(); }
google/binnavi
1,035
src/main/java/com/google/security/zynamics/binnavi/debug/models/processmanager/_Doc.java
// Copyright 2011-2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.binnavi.debug.models.processmanager; /** * The process manager package contains classes that are used to synchronize the real target process * with the debugger's idea of what the target process looks like. There is one process manager * object for each target process. Like the real target process, the process manager object contains * threads, registers, memory, and other process-related things. */
google/binnavi
1,037
src/main/java/com/google/security/zynamics/reil/interpreter/ICpuPolicy.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.reil.interpreter; import com.google.security.zynamics.reil.OperandSize; /** * Interface used by all CPU policies that give information about the native source CPU to the REIL * interpreter. */ public interface ICpuPolicy { String[] getFlags(); String getProgramCounter(); String[] getRegisters(); OperandSize getRegisterSize(String programCounter); void start(ReilInterpreter interpreter); }
google/gdata-java-client
1,029
java/src/com/google/gdata/client/spreadsheet/SpreadsheetQuery.java
/* Copyright (c) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.gdata.client.spreadsheet; import com.google.gdata.client.DocumentQuery; import java.net.URL; /** * Simple class for cells-feed-specific queries. * * */ public class SpreadsheetQuery extends DocumentQuery { /** * Constructs a query for querying spreadsheets that you have access to. * * @param feedUrl the feed's URI */ public SpreadsheetQuery(URL feedUrl) { super(feedUrl); } }
google/google-ctf
1,028
2019/quals/reversing-android/project/core/src/com/google/ctf/game/Body.java
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.ctf.game; import com.badlogic.gdx.math.Vector2; class Body { Vector2 position; Vector2 size; float g = 0f; boolean facingRight; boolean moving; boolean jumping; Body(Vector2 position) { this.position = position; this.facingRight = true; this.moving = false; this.jumping = false; } void setSize(Vector2 size) { this.size = size; } }
google/jsinterop-base
1,034
java/jsinterop/base/super/com/google/gwt/core/client/UnsafeNativeLong.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.gwt.core.client; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * UnsafeNativeLong provided here to make J2CL compile this target without GWT dep. It is not * intended for use by third parties. */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.SOURCE) public @interface UnsafeNativeLong {}
google/oss-fuzz
1,034
projects/hsqldb/SqlPreparedStatementFuzzer.java
import com.code_intelligence.jazzer.api.FuzzedDataProvider; import com.code_intelligence.jazzer.api.FuzzerSecurityIssueHigh; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.sql.PreparedStatement; public class SqlPreparedStatementFuzzer extends TestServer { SqlPreparedStatementFuzzer(boolean verbose) { super(verbose); } void testOneInput(String fuzzyString) { try (Connection connection = getConnection()) { PreparedStatement preparedStatement = connection.prepareStatement("UPDATE TestTable SET value=? WHERE key=1"); preparedStatement.setString(1, fuzzyString); preparedStatement.executeUpdate(); } catch (SQLException ex) { /* ignore */ } } public static void fuzzerTestOneInput(FuzzedDataProvider fuzzedDataProvider) throws Exception { try (TestServer fuzzer = new SqlPreparedStatementFuzzer(false)) { fuzzer.testOneInput(fuzzedDataProvider.consumeRemainingAsAsciiString()); } } }
openjdk/jdk8
1,072
langtools/test/tools/javac/annotations/default/C.java
/* * Copyright (c) 2003, 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. */ @A(x=1) class C { }
oracle/fastr
1,068
org.rosuda.javaGD/src/org/rosuda/javaGD/GDState.java
// // Java Graphics Device // // Created by Simon Urbanek on Thu Aug 05 2004. // Copyright (c) 2004-2009 Simon Urbanek. All rights reserved. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; // version 2.1 of the License. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA // package org.rosuda.javaGD; import java.awt.Color; import java.awt.Font; /** object storing the current graphics state */ public class GDState { public Color col; public Color fill; public Font f; }
apache/cxf
1,034
systests/uncategorized/src/test/java/org/apache/cxf/systest/type_substitution/Fruit.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.systest.type_substitution; import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlJavaTypeAdapter(AppleAdapter.class) public interface Fruit { String getColor(); String getFlavor(); }
apache/cxf
1,036
rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/IDocumentService.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.cxf.aegis.services; import org.w3c.dom.Document; public interface IDocumentService { Document returnDocument(); BeanWithDOM getBeanWithDOM(); String simpleStringReturn(); // purposes of comparison }
apache/drill
1,029
contrib/storage-druid/src/main/java/org/apache/drill/exec/store/druid/common/DruidFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.store.druid.common; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @JsonDeserialize(using = DruidFilterDeserializer.class) public interface DruidFilter { String toJson(); }
apache/dubbo
1,045
dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/RuleConverter.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dubbo.rpc.cluster; import org.apache.dubbo.common.URL; import org.apache.dubbo.common.extension.SPI; import java.util.List; @SPI public interface RuleConverter { List<URL> convert(URL subscribeUrl, Object source); }
apache/flink
1,027
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/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. */ /** * This package contains the operators that perform the stream transformations. One or more * operators are bundled into a "chain" and executed in a stream task. */ package org.apache.flink.streaming.runtime.operators;
apache/flink
1,031
flink-runtime/src/test/java/org/apache/flink/runtime/util/jartestprogram/WordFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.runtime.util.jartestprogram; /** Static filter method for lambda tests. */ public class WordFilter { public static boolean filter(String value) { return !value.contains("not"); } }
apache/gobblin
1,027
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/locks/JobLockEventListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.gobblin.runtime.locks; /** * The listener for lock events. * * @author joelbaranick */ public class JobLockEventListener { /** * Invoked when the lock is lost */ public void onLost() { } }
apache/groovy
1,029
subprojects/groovy-groovydoc/src/main/java/org/codehaus/groovy/tools/groovydoc/OutputTool.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.codehaus.groovy.tools.groovydoc; public interface OutputTool { void makeOutputArea(String filename); void writeToOutput(String fileName, String text, String charset) throws Exception; }
apache/groovy
1,037
src/test/groovy/org/codehaus/groovy/tools/rootloadersync/ConcreteJavaSubclass.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.codehaus.groovy.tools.rootloadersync; public class ConcreteJavaSubclass extends AbstractGroovySuperclass { @Override public String myAbstractMethod() { return "string from subclass"; } }
apache/hadoop
1,029
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/constants/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ @InterfaceAudience.Private @InterfaceStability.Evolving package org.apache.hadoop.fs.azurebfs.constants; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability;
apache/harmony
1,028
drlvm/vm/tests/lazy/broken/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface3.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.vm.test.lazyresolution.data; public interface LazyInterface3 { static String stringStaticField = new Integer(13).toString(); void interfaceCall2(); void interfaceCall3(); }
apache/harmony
1,035
drlvm/vm/tests/lazy/org/apache/harmony/vm/test/lazyresolution/data/LazyInterface4.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS 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.vm.test.lazyresolution.data; public interface LazyInterface4 extends LazyInterface2, LazyInterface3 { public static int intStaticField=Integer.parseInt("14"); void interfaceCall4(); }
apache/harmony
1,037
classlib/modules/swing/src/main/java/common/javax/swing/event/PopupMenuEvent.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT 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 Anton Avtamonov */ package javax.swing.event; import java.util.EventObject; public class PopupMenuEvent extends EventObject { public PopupMenuEvent(final Object source) { super(source); } }
apache/helix
1,036
helix-core/src/main/java/org/apache/helix/manager/zk/zookeeper/IZkStateListener.java
package org.apache.helix.manager.zk.zookeeper; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Use IZkStateListener in zookeeper-api module instead. */ @Deprecated public interface IZkStateListener extends org.apache.helix.zookeeper.zkclient.IZkStateListener { }