repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/tapestry-5 | 1,100 | tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/BadPublishDuplicate.java | // Copyright 2009 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.integration.app1.components;
import org.apache.tapestry5.annotations.Component;
import org.apache.tapestry5.corelib.components.PasswordField;
import org.apache.tapestry5.corelib.components.TextField;
public class BadPublishDuplicate
{
@Component(publishParameters = "value")
private TextField textField;
// Can't do this: have a duplicate published parameter:
@Component(publishParameters = "value")
private PasswordField passwordField;
}
|
apache/tika | 1,144 | tika-core/src/main/java/org/apache/tika/sax/xpath/TextMatcher.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tika.sax.xpath;
/**
* Final evaluation state of a <code>.../text()</code> XPath expression.
* Matches all text children of the current element.
*/
public class TextMatcher extends Matcher {
public static final Matcher INSTANCE = new TextMatcher();
public boolean matchesText() {
return true;
}
}
|
apache/tomcat | 1,159 | java/jakarta/websocket/DeploymentException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.io.Serial;
public class DeploymentException extends Exception {
@Serial
private static final long serialVersionUID = 1L;
public DeploymentException(String message) {
super(message);
}
public DeploymentException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/tomee | 1,108 | server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/beans/MyExpertRestClass.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.server.cxf.rs.beans;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
@Path("/expert")
public class MyExpertRestClass {
@Path("/still-hi/")
@POST
public String hi(String you) {
return "hi " + you;
}
}
|
apache/tomee | 1,117 | container/openejb-core/src/main/java/org/apache/openejb/config/ValidationFailure.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.openejb.config;
public class ValidationFailure extends ValidationException {
public ValidationFailure(final String message) {
super(message);
}
public String getPrefix() {
return "FAIL";
}
public String getCategory() {
return "failures";
}
}
|
apache/tomee | 1,117 | container/openejb-core/src/main/java/org/apache/openejb/config/ValidationWarning.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.openejb.config;
public class ValidationWarning extends ValidationException {
public ValidationWarning(final String message) {
super(message);
}
public String getPrefix() {
return "WARN";
}
public String getCategory() {
return "warnings";
}
}
|
apache/tomee | 1,123 | tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/RequestNotActiveException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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;
/**
* Thrown when a {@link jakarta.servlet.http.HttpServletRequest} is invoked on a thread with no active servlet request
*/
public class RequestNotActiveException extends IllegalStateException {
public RequestNotActiveException(String message) {
super(message);
}
}
|
apache/tomee | 1,128 | examples/ejb-examples/src/main/java/org/superbiz/servlet/SecureEJBLocal.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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.servlet;
import jakarta.ejb.Local;
import java.security.Principal;
@Local
public interface SecureEJBLocal {
Principal getCallerPrincipal();
boolean isCallerInRole(String role);
void allowUserMethod();
void allowManagerMethod();
void allowFakeMethod();
void denyAllMethod();
}
|
apache/tsfile | 1,136 | java/tsfile/src/main/java/org/apache/tsfile/fileSystem/FSPath.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.tsfile.fileSystem;
public class FSPath {
private final FSType fsType;
private final String path;
public FSPath(FSType fsType, String path) {
this.fsType = fsType;
this.path = path;
}
public FSType getFsType() {
return fsType;
}
public String getPath() {
return path;
}
}
|
apache/uniffle | 1,120 | internal-client/src/main/java/org/apache/uniffle/client/request/RetryableRequest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.client.request;
public abstract class RetryableRequest {
protected int retryMax;
protected long retryIntervalMax;
public int getRetryMax() {
return retryMax;
}
public long getRetryIntervalMax() {
return retryIntervalMax;
}
public abstract String operationType();
}
|
apache/usergrid | 1,090 | stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/api/impl/JerseyResourceConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.usergrid.persistence.qakka.api.impl;
import org.glassfish.jersey.server.ResourceConfig;
public class JerseyResourceConfig extends ResourceConfig {
public JerseyResourceConfig() {
packages( "org.apache.usergrid.persistence.qakka.api" );
}
}
|
apache/wicket | 1,110 | wicket-core-tests/src/test/java/org/apache/wicket/markup/html/basic/SimplePage_4.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup.html.basic;
import org.apache.wicket.markup.html.WebPage;
/**
* Mock page for testing.
*
* @author Chris Turner
*/
public class SimplePage_4 extends WebPage
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*/
public SimplePage_4()
{
}
}
|
apache/wicket | 1,110 | wicket-core-tests/src/test/java/org/apache/wicket/markup/html/basic/SimplePage_5.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.markup.html.basic;
import org.apache.wicket.markup.html.WebPage;
/**
* Mock page for testing.
*
* @author Chris Turner
*/
public class SimplePage_5 extends WebPage
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*/
public SimplePage_5()
{
}
}
|
apache/wicket | 1,110 | wicket-core-tests/src/test/java/org/apache/wicket/resource/loader/FooInitializer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wicket.resource.loader;
import org.apache.wicket.Application;
import org.apache.wicket.IInitializer;
/**
*
*/
class FooInitializer implements IInitializer
{
@Override
public void init(Application application)
{
}
@Override
public void destroy(Application application)
{
}
}
|
apache/xmlbeans | 1,124 | src/main/java/org/apache/xmlbeans/impl/schema/ClassLoaderResourceLoader.java | /* Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.xmlbeans.impl.schema;
import org.apache.xmlbeans.ResourceLoader;
import java.io.InputStream;
public class ClassLoaderResourceLoader implements ResourceLoader
{
ClassLoader _classLoader;
public ClassLoaderResourceLoader(ClassLoader classLoader)
{
_classLoader = classLoader;
}
public InputStream getResourceAsStream(String resourceName)
{
return _classLoader.getResourceAsStream(resourceName);
}
public void close() {}
}
|
apache/xmlgraphics-fop | 1,121 | fop-core/src/main/java/org/apache/fop/render/awt/viewer/StatusListener.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* $Id$ */
package org.apache.fop.render.awt.viewer;
/**
* Listener interface used by the PreviewDialog.
*/
public interface StatusListener {
/** Called when a page has been renderered. */
void notifyPageRendered();
/** Called when the renderer has stopped. */
void notifyRendererStopped();
}
|
google/android-classyshark | 1,087 | ClassySharkAndroid/app/src/main/java/com/google/classysharkandroid/reflector/ClassesNamesList.java | /*
* Copyright 2015 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.classysharkandroid.reflector;
import java.util.LinkedList;
import java.util.List;
public class ClassesNamesList {
private List<String> list;
public ClassesNamesList() {
list = new LinkedList<>();
}
public void add(String className) {
list.add(className);
}
public List<String> getClassNames() {
return this.list;
}
public String getClassName(int position) {
return this.list.get(position);
}
}
|
google/bindiff | 1,075 | java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/tabpanels/projecttabpanel/treenodepanels/charts/ChartBarRenderer.java | // Copyright 2011-2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.bindiff.gui.tabpanels.projecttabpanel.treenodepanels.charts;
import java.awt.Paint;
import org.jfree.chart.renderer.category.BarRenderer3D;
public class ChartBarRenderer extends BarRenderer3D {
private final Paint[] colors;
public ChartBarRenderer(final Paint[] colors) {
this.colors = colors;
}
@Override
public Paint getItemPaint(final int row, final int column) {
return this.colors[column % this.colors.length];
}
}
|
google/bindiff | 1,096 | java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/comboboxes/memorybox/JMemoryBoxModel.java | // Copyright 2011-2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.zylib.gui.comboboxes.memorybox;
import javax.swing.DefaultComboBoxModel;
public class JMemoryBoxModel extends DefaultComboBoxModel<String> {
private final int m_maximum;
public JMemoryBoxModel(final int maximum) {
m_maximum = maximum;
}
public void add(final String string) {
removeElement(string);
insertElementAt(string, 0);
while (getSize() > m_maximum) {
removeElementAt(m_maximum);
}
setSelectedItem(string);
}
}
|
google/depan | 1,110 | DepanEdgeUI/prod/src/com/google/devtools/depan/relations/models/RelationSetRepository.java | package com.google.devtools.depan.relations.models;
import com.google.devtools.depan.graph.api.Relation;
import java.util.Collection;
/**
* Abstract repository that provides access to the relation selection.
*/
public interface RelationSetRepository {
public static interface ChangeListener {
/**
* A single relation changed status to the supplied state.
*/
void includedRelationChanged(Relation relation, boolean included);
/**
* Multiple relations changed state. Query the repository for
* the current states.
*/
void relationsChanged();
}
public static interface ProvidesUniverse {
Collection<Relation> getUniverse();
}
/**
* Indicate whether the supplied {@code relation} is included
* in the relation set.
*/
boolean isRelationIncluded(Relation relation);
/**
* Set whether the supplied {@link Relation} is included in
* the relation set.
*/
void setRelationChecked(Relation relation, boolean isIncluded);
void addChangeListener(ChangeListener listener);
void removeChangeListener(ChangeListener listener);
} |
google/error-prone | 1,128 | core/src/main/java/com/google/errorprone/refaster/annotation/OfKind.java | /*
* Copyright 2013 The Error Prone Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.errorprone.refaster.annotation;
import com.sun.source.tree.Tree.Kind;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Annotation to specify what tree kinds are allowed or disallowed to match a given expression.
*
* @author lowasser@google.com (Louis Wasserman)
*/
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.SOURCE)
public @interface OfKind {
Kind[] value();
}
|
google/j2cl | 1,078 | transpiler/javatests/com/google/j2cl/readable/java/staticjsmethodswithclassnamespace/StaticJsMethodsWithClassNamespace.java | /*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package staticjsmethodswithclassnamespace;
import jsinterop.annotations.JsMethod;
import jsinterop.annotations.JsType;
@JsType(namespace = "woo")
public class StaticJsMethodsWithClassNamespace {
@JsMethod(name = "replacedName")
public static void originalName() {}
public void test() {
StaticJsMethodsWithClassNamespace.originalName();
originalName();
}
}
class ExternalCaller {
public void test() {
StaticJsMethodsWithClassNamespace.originalName();
}
}
|
google/j2cl | 1,118 | benchmarking/java/com/google/j2cl/benchmarks/jre/ArrayListObjectAddBenchmark.java | /*
* Copyright 2015 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.j2cl.benchmarks.jre;
import com.google.j2cl.benchmarking.framework.AbstractBenchmark;
import java.util.ArrayList;
/** Benchmark array set performance. */
public class ArrayListObjectAddBenchmark extends AbstractBenchmark {
private ArrayList<Object> arrayList;
@Override
public Object run() {
var value = "test";
for (int i = 0; i < 1000; i++) {
arrayList.add(value);
}
return arrayList;
}
@Override
public void setup() {
arrayList = new ArrayList<Object>();
}
}
|
google/j2objc | 1,137 | jre_emul/Classes/javax/lang/model/type/TypeKind.java | /*
* 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 javax.lang.model.type;
public enum TypeKind {
BOOLEAN(true),
BYTE(true),
SHORT(true),
INT(true),
LONG(true),
CHAR(true),
FLOAT(true),
DOUBLE(true),
VOID(false),
NONE(false),
NULL(false),
ARRAY(false),
DECLARED(false),
ERROR(false),
TYPEVAR(false),
WILDCARD(false),
PACKAGE(false),
EXECUTABLE(false),
OTHER(false),
UNION(false),
INTERSECTION(false);
private final boolean isPrimitive;
TypeKind(boolean isPrimitive) {
this.isPrimitive = isPrimitive;
}
public boolean isPrimitive() {
return isPrimitive;
}
}
|
google/nogotofail | 1,097 | nogotofail/test/android/app/src/main/java/net/nogotofail/mitmtester/util/AcceptAllX509TrustManager.java | /*
* Copyright 2014 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.nogotofail.mitmtester.util;
import java.security.cert.X509Certificate;
import javax.net.ssl.X509TrustManager;
public class AcceptAllX509TrustManager implements X509TrustManager {
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType) {}
@Override
public void checkServerTrusted(X509Certificate[] chain, String authType) {}
@Override
public X509Certificate[] getAcceptedIssuers() {
return new X509Certificate[0];
}
}
|
google/u2f-ref-code | 1,123 | u2f-ref-code/java/src/com/google/u2f/server/messages/U2fSignRequest.java | // Copyright 2014 Google Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
package com.google.u2f.server.messages;
import java.util.List;
import com.google.gson.JsonArray;
public class U2fSignRequest {
/** The websafe-base64-encoded challenge. */
private final String challenge;
/** List of registered keys */
private List<RegisteredKey> registeredKeys;
public U2fSignRequest(String challenge, List<RegisteredKey> registeredKeys) {
this.challenge = challenge;
this.registeredKeys = registeredKeys;
}
public String getChallenge() {
return challenge;
}
public List<RegisteredKey> getRegisteredKeys() {
return registeredKeys;
}
public JsonArray getRegisteredKeysAsJson(String defaultAppId) {
if (registeredKeys == null) {
return null;
}
JsonArray result = new JsonArray();
for (RegisteredKey registeredKey : registeredKeys) {
result.add(registeredKey.getJson(defaultAppId));
}
return result;
}
}
|
googleapis/google-cloud-java | 1,039 | java-recaptchaenterprise/proto-google-cloud-recaptchaenterprise-v1/src/main/java/com/google/recaptchaenterprise/v1/ReorderFirewallPoliciesResponseOrBuilder.java | /*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* 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.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto
// Protobuf Java Version: 3.25.8
package com.google.recaptchaenterprise.v1;
public interface ReorderFirewallPoliciesResponseOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesResponse)
com.google.protobuf.MessageOrBuilder {}
|
hibernate/hibernate-ogm | 1,101 | core/src/main/java/org/hibernate/ogm/persister/impl/EntityDiscriminator.java | /*
* Hibernate OGM, Domain model persistence for NoSQL datastores
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.ogm.persister.impl;
import org.hibernate.type.Type;
/**
* Recognizes the class of an entity in a hierarchy.
*
* @author "Davide D'Alto" <davide@hibernate.org>
*/
interface EntityDiscriminator {
String provideClassByValue(Object value);
String getSqlValue();
String getColumnName();
String getAlias();
Type getType();
Object getValue();
/*
* NOTE: At the moment OGM is not using this value since the discriminator is used only to create the right class.
* This might change in the future if we decide to filter the tuple result when the expected discriminator is
* different. When that will be the case, isForced() will needed in conjunction with isInherited() (check
* org.hibernate.persister.entity.SingleTableEntityPersister#needsDiscriminator()).
*/
boolean isForced();
boolean isNeeded();
}
|
hibernate/hibernate-ogm | 1,109 | core/src/main/java/org/hibernate/ogm/type/impl/DoubleType.java | /*
* Hibernate OGM, Domain model persistence for NoSQL datastores
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.ogm.type.impl;
import org.hibernate.MappingException;
import org.hibernate.engine.spi.Mapping;
import org.hibernate.ogm.type.descriptor.impl.PassThroughGridTypeDescriptor;
import org.hibernate.type.descriptor.java.DoubleTypeDescriptor;
/**
* Represents a Double type
*
* @author Emmanuel Bernard
*/
public class DoubleType extends AbstractGenericBasicType<Double> {
public static final DoubleType INSTANCE = new DoubleType();
public DoubleType() {
super( PassThroughGridTypeDescriptor.INSTANCE, DoubleTypeDescriptor.INSTANCE );
}
@Override
public String getName() {
return "double";
}
@Override
public String[] getRegistrationKeys() {
return new String[] { getName(), double.class.getName(), Double.class.getName() };
}
@Override
public int getColumnSpan(Mapping mapping) throws MappingException {
return 1;
}
}
|
hibernate/hibernate-orm | 1,056 | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/cascade/multicircle/jpa/identity/EntityC.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.annotations.cascade.multicircle.jpa.identity;
import java.util.Set;
/**
* No Documentation
*/
@jakarta.persistence.Entity
public class EntityC extends AbstractEntity {
private static final long serialVersionUID = 1226955752L;
@jakarta.persistence.OneToMany(mappedBy = "c")
private Set<EntityB> bCollection = new java.util.HashSet<EntityB>();
@jakarta.persistence.OneToMany(cascade = {
jakarta.persistence.CascadeType.MERGE, jakarta.persistence.CascadeType.PERSIST, jakarta.persistence.CascadeType.REFRESH}
, mappedBy = "c")
private Set<EntityD> dCollection = new java.util.HashSet<EntityD>();
public Set<EntityB> getBCollection() {
return bCollection;
}
public void setBCollection(Set<EntityB> bCollection) {
this.bCollection = bCollection;
}
public Set<EntityD> getDCollection() {
return dCollection;
}
public void setDCollection(Set<EntityD> dCollection) {
this.dCollection = dCollection;
}
}
|
hibernate/hibernate-orm | 1,064 | hibernate-core/src/test/java/org/hibernate/orm/test/jpa/orphan/onetomany/Product.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.jpa.orphan.onetomany;
import java.util.ArrayList;
import java.util.List;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.OneToMany;
import jakarta.persistence.Table;
@Entity
@Table(name="product")
public class Product {
@Id
@GeneratedValue(strategy= GenerationType.AUTO)
private Long id;
@OneToMany(mappedBy = "product", orphanRemoval = true)
//, cascade ={CascadeType.PERSIST}
private List<Feature> features = new ArrayList<Feature>();
private String name;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<Feature> getFeatures() {
return features;
}
public void setFeatures(List<Feature> features) {
this.features = features;
}
}
|
hibernate/hibernate-orm | 1,067 | hibernate-core/src/test/java/org/hibernate/orm/test/jpa/collection/Parent.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.jpa.collection;
import java.util.HashSet;
import java.util.Set;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.Id;
import jakarta.persistence.OneToMany;
import jakarta.persistence.PostLoad;
import jakarta.persistence.Transient;
@Entity
public class Parent {
private Integer id;
private Set<Child> children = new HashSet<Child>();
private int nrOfChildren;
public Parent() {
}
@Id
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@OneToMany(mappedBy="daddy", fetch=FetchType.EAGER, cascade=CascadeType.ALL)
public Set<Child> getChildren() {
return children;
}
public void setChildren(Set<Child> children) {
this.children = children;
}
@PostLoad
public void postLoad() {
nrOfChildren = children.size();
}
@Transient
public int getNrOfChildren() {
return nrOfChildren;
}
}
|
hibernate/hibernate-orm | 1,074 | hibernate-core/src/test/java/org/hibernate/orm/test/annotations/cid/ChildPk.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.annotations.cid;
import java.io.Serializable;
import jakarta.persistence.Embeddable;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
/**
* Child Pk with many to one inside
*
* @author Emmanuel Bernard
*/
@Embeddable
public class ChildPk implements Serializable {
public int nthChild;
@ManyToOne
@JoinColumn(name = "parentLastName", referencedColumnName = "p_lname", nullable = false)
@JoinColumn(name = "parentFirstName", referencedColumnName = "firstName", nullable = false)
public Parent parent;
public boolean equals(Object o) {
if ( this == o ) return true;
if ( !( o instanceof ChildPk ) ) return false;
final ChildPk childPk = (ChildPk) o;
if ( nthChild != childPk.nthChild ) return false;
if ( !parent.equals( childPk.parent ) ) return false;
return true;
}
public int hashCode() {
int result;
result = nthChild;
result = 29 * result + parent.hashCode();
return result;
}
}
|
hibernate/hibernate-orm | 1,075 | hibernate-core/src/test/java/org/hibernate/orm/test/jpa/cdi/NoCdiAvailableTestDelegate.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.jpa.cdi;
import java.util.Map;
import jakarta.persistence.EntityManagerFactory;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.jpa.HibernatePersistenceProvider;
import org.hibernate.testing.orm.jpa.PersistenceUnitInfoAdapter;
import org.hibernate.testing.util.ServiceRegistryUtil;
/**
* @author Steve Ebersole
*/
public class NoCdiAvailableTestDelegate {
public static EntityManagerFactory passingNoBeanManager() {
return new HibernatePersistenceProvider().createContainerEntityManagerFactory(
new PersistenceUnitInfoAdapter(),
ServiceRegistryUtil.createBaseSettings()
);
}
public static void passingBeanManager() {
Map<String, Object> settings = ServiceRegistryUtil.createBaseSettings();
settings.put( AvailableSettings.JAKARTA_CDI_BEAN_MANAGER, new Object() );
new HibernatePersistenceProvider().createContainerEntityManagerFactory(
new PersistenceUnitInfoAdapter(),
settings
).close();
}
}
|
hibernate/hibernate-orm | 1,101 | hibernate-core/src/main/java/org/hibernate/event/spi/EntityCopyObserver.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.event.spi;
/**
* An observer for detection of multiple entity representations for a persistent entity being merged.
*
* @see MergeContext
*
* @author Gail Badner
*/
public interface EntityCopyObserver {
/**
* Called when more than one representation of the same persistent entity is being merged.
*
* @param managedEntity The managed entity in the persistence context (the merge result).
* @param mergeEntity1 A managed or detached entity being merged; must be non-null.
* @param mergeEntity2 A different managed or detached entity being merged; must be non-null.
* @param session The session.
*/
void entityCopyDetected(Object managedEntity, Object mergeEntity1, Object mergeEntity2, EventSource session);
/**
* Called when the toplevel merge operation is complete.
*
* @param session The session
*/
void topLevelMergeComplete(EventSource session);
/**
* Called to clear any data stored in this {@code EntityCopyObserver}.
*/
void clear();
}
|
hibernate/hibernate-orm | 1,111 | hibernate-core/src/main/java/org/hibernate/tool/schema/spi/Exporter.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.tool.schema.spi;
import org.hibernate.boot.Metadata;
import org.hibernate.boot.model.relational.Exportable;
import org.hibernate.boot.model.relational.SqlStringGenerationContext;
import org.hibernate.internal.util.collections.ArrayHelper;
/**
* Defines a contract for exporting of database objects (tables, sequences, etc)
* for use in SQL {@code CREATE} and {@code DROP} scripts.
*
* @apiNote This is an ORM-centric contract.
*
* @author Steve Ebersole
*/
public interface Exporter<T extends Exportable> {
String[] NO_COMMANDS = ArrayHelper.EMPTY_STRING_ARRAY;
/**
* Get the commands needed for creation.
*
* @return The commands needed for creation scripting.
*/
String[] getSqlCreateStrings(T exportable, Metadata metadata, SqlStringGenerationContext context);
/**
* Get the commands needed for dropping.
*
* @return The commands needed for drop scripting.
*/
String[] getSqlDropStrings(T exportable, Metadata metadata, SqlStringGenerationContext context);
}
|
openjdk/jdk8 | 1,132 | langtools/test/tools/javac/diags/examples/NotDefAccessClassIntfCantAccess/p/C.java | /*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package p;
public class C {
class Nested { }
public Nested[] array;
}
|
openjdk/jdk8 | 1,147 | langtools/test/com/sun/javadoc/testTopOption/pkg/AnnotationType.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg;
import java.lang.annotation.*;
@Documented public @interface AnnotationType {
}
|
openjdk/jdk8 | 1,148 | langtools/test/com/sun/javadoc/testProfiles/pkg1/Class1Pkg1.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg1;
/**
* A test class.
*
* @author Bhavesh Patel
*/
public class Class1Pkg1 {
}
|
openjdk/jdk8 | 1,148 | langtools/test/com/sun/javadoc/testProfiles/pkg1/Class2Pkg1.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg1;
/**
* A test class.
*
* @author Bhavesh Patel
*/
public class Class2Pkg1 {
}
|
openjdk/jdk8 | 1,148 | langtools/test/com/sun/javadoc/testProfiles/pkg1/Class3Pkg1.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg1;
/**
* A test class.
*
* @author Bhavesh Patel
*/
public class Class3Pkg1 {
}
|
openjdk/jdk8 | 1,148 | langtools/test/com/sun/javadoc/testProfiles/pkg3/Class1Pkg3.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg3;
/**
* A test class.
*
* @author Bhavesh Patel
*/
public class Class1Pkg3 {
}
|
openjdk/jdk8 | 1,148 | langtools/test/com/sun/javadoc/testProfiles/pkg3/Class2Pkg3.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg3;
/**
* A test class.
*
* @author Bhavesh Patel
*/
public class Class2Pkg3 {
}
|
openjdk/jdk8 | 1,148 | langtools/test/com/sun/javadoc/testProfiles/pkg5/Class1Pkg5.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package pkg5;
/**
* A test class.
*
* @author Bhavesh Patel
*/
public class Class1Pkg5 {
}
|
openjdk/jdk8 | 1,151 | langtools/test/tools/javac/diags/examples/IllegalInitializer.java | /*
* Copyright (c) 2010, 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.
*/
// key: compiler.err.illegal.initializer.for.type
class IllegalInitializer {
int i = { 1 };
}
|
openjdk/jdk8 | 1,153 | langtools/test/tools/javac/generics/inference/5044646/p1/C.java | /*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package p1;
public class C extends B<String,String> {
// indirect overrider f(String) from A1
}
|
openjdk/jdk8 | 1,154 | langtools/test/tools/javac/diags/examples/NoInterfaceHere.java | /*
* Copyright (c) 2010, 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.
*/
// key: compiler.err.no.intf.expected.here
interface I { }
class InterfaceNotExpected extends I { }
|
openjdk/jdk8 | 1,160 | langtools/test/tools/javac/depOverrides/annotation/B2.java | /* /nodynamiccopyright/ */
// combinations of methods defined in an interface
// and overridden in subtypes
// class should compile with deprecation warnings as shown
abstract class B2 extends A implements I {
@Deprecated public void iDep_aDep_bDep() { }
public void iDep_aDep_bUnd() { } // warn x 2, because of I and A
// public void iDep_aDep_bInh() { }
@Deprecated public void iDep_aUnd_bDep() { }
public void iDep_aUnd_bUnd() { } // warn
// public void iDep_aUnd_bInh() { } // warn
@Deprecated public void iDep_aInh_bDep() { }
public void iDep_aInh_bUnd() { } // warn
// public void iDep_aInh_bInh() { }
@Deprecated public void iUnd_aDep_bDep() { }
public void iUnd_aDep_bUnd() { } // warn
// public void iUnd_aDep_bInh() { }
@Deprecated public void iUnd_aUnd_bDep() { }
public void iUnd_aUnd_bUnd() { }
// public void iUnd_aUnd_bInh() { }
@Deprecated public void iUnd_aInh_bDep() { }
public void iUnd_aInh_bUnd() { }
// public void iUnd_aInh_bInh() { }
}
|
openjdk/jdk8 | 1,161 | langtools/test/tools/javac/generics/bridges/Bridge.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.lang.annotation.Repeatable;
@Repeatable(Bridges.class)
@interface Bridge {
String value();
}
|
openjdk/jtreg | 1,173 | test/libs-build-implicit/lib/LibA.java | /*
* Copyright (c) 2025, 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 LibA {
public static void name() {
// do nothing
throw new RuntimeException();
}
}
|
openjdk/jtreg | 1,186 | test/junit/std/Test.java | /*
* Copyright (c) 2012, 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.
*/
/*
* @test
*/
public class Test {
public static void main(String... args) {
System.out.println("hello!");
}
}
|
oracle/coherence | 1,118 | prj/test/unit/coherence-tests/src/test/java/com/tangosol/util/SafeServiceTest.java | /*
* Copyright (c) 2000, 2022, 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.util;
import com.tangosol.coherence.component.util.SafeService;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.CoreMatchers.sameInstance;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
/**
* @author jk 2015.11.17
*/
public class SafeServiceTest
{
@Test
public void shouldReturnNullImplementationResourceRegistryIfServiceIsNull() throws Exception
{
SafeService safeService = new SafeService();
safeService.setInternalService(null);
ResourceRegistry registry = safeService.getResourceRegistry();
assertThat(registry, is(notNullValue()));
assertThat(registry, is(instanceOf(SimpleResourceRegistry.class)));
}
}
|
apache/commons-lang | 1,133 | src/main/java/org/apache/commons/lang3/function/ByteSupplier.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.lang3.function;
import java.util.function.IntSupplier;
/**
* A functional interface like {@link IntSupplier}, but for a byte.
*
* @since 3.19
*/
@FunctionalInterface
public interface ByteSupplier {
/**
* Supplies a byte.
*
* @return a result.
*/
byte getAsByte();
}
|
apache/commons-text | 1,144 | src/main/java/org/apache/commons/text/translate/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
*
* 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.
*/
/**
* <p> An API for creating text translation routines from a set of smaller building blocks. Initially created to make it
* possible for the user to customize the rules in the StringEscapeUtils class.</p>
* <p>These classes are immutable, and therefore thread-safe.</p>
*
* @since 1.0
*/
package org.apache.commons.text.translate;
|
apache/ctakes | 1,116 | ctakes-preprocessor/src/main/java/org/apache/ctakes/preprocessor/PreProcessor.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ctakes.preprocessor;
/**
*
* @author Mayo Clinic
*/
public interface PreProcessor
{
/**
* Process a document to retrieve meta data about the document.
* @param document
* @return
* @throws Exception
*/
public DocumentMetaData process(String document) throws Exception;
}
|
apache/dolphinscheduler | 1,097 | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/resources/visitor/Visitor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.api.dto.resources.visitor;
import org.apache.dolphinscheduler.api.dto.resources.ResourceComponent;
/**
* Visitor
*/
public interface Visitor {
/**
* visit
* @return resource component
*/
ResourceComponent visit(String rootPath);
}
|
apache/druid | 1,063 | extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/sql/ThetaSketchSetIntersectOperatorConversion.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.query.aggregation.datasketches.theta.sql;
public class ThetaSketchSetIntersectOperatorConversion extends ThetaSketchSetBaseOperatorConversion
{
@Override
public String getSetOperationName()
{
return "INTERSECT";
}
}
|
apache/druid | 1,107 | processing/src/test/java/org/apache/druid/segment/join/filter/rewrite/JoinFilterRewriteConfigTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.segment.join.filter.rewrite;
import nl.jqno.equalsverifier.EqualsVerifier;
import org.junit.Test;
public class JoinFilterRewriteConfigTest
{
@Test
public void testEquals()
{
EqualsVerifier.forClass(JoinFilterRewriteConfig.class).usingGetClass().verify();
}
}
|
apache/druid | 1,121 | server/src/main/java/org/apache/druid/curator/discovery/NoopServiceAnnouncer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.curator.discovery;
import org.apache.druid.server.DruidNode;
/**
* Does nothing.
*/
@Deprecated
public class NoopServiceAnnouncer implements ServiceAnnouncer
{
@Override
public void announce(DruidNode node)
{
}
@Override
public void unannounce(DruidNode node)
{
}
}
|
apache/druid | 1,133 | processing/src/test/java/org/apache/druid/segment/TestLongColumnSelector.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.segment;
import org.apache.druid.query.monomorphicprocessing.RuntimeShapeInspector;
public abstract class TestLongColumnSelector implements LongColumnSelector
{
@Override
public void inspectRuntimeShape(RuntimeShapeInspector inspector)
{
// Don't care about runtime shape in tests
}
}
|
apache/dubbo-samples | 1,058 | 4-governance/dubbo-samples-tracing/dubbo-sample-api-tracing-otel-zipkin/src/main/java/org/apache/dubbo/tracing/provider/GreetingsServiceImpl.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.tracing.provider;
import org.apache.dubbo.tracing.api.GreetingsService;
public class GreetingsServiceImpl implements GreetingsService {
@Override
public String sayHi(String name) {
return "hi, " + name;
}
}
|
apache/dubbo-samples | 1,092 | online_bontique_demo/common/src/main/java/org/apache/dubbo/shop/common/dto/response/AdResponse.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.shop.common.dto.response;
import org.apache.dubbo.shop.common.pojo.Ad;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class AdResponse implements Serializable {
/**
* 广告列表
*/
private List<Ad> ads;
}
|
apache/dubbo | 1,115 | dubbo-common/src/main/java/org/apache/dubbo/rpc/executor/DefaultIsolationExecutorSupportFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.executor;
import org.apache.dubbo.common.URL;
public class DefaultIsolationExecutorSupportFactory implements IsolationExecutorSupportFactory {
@Override
public ExecutorSupport createIsolationExecutorSupport(URL url) {
return new DefaultExecutorSupport(url);
}
}
|
apache/dubbo | 1,120 | dubbo-common/src/main/java/org/apache/dubbo/common/url/component/param/IgnoredParam.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.common.url.component.param;
import java.util.HashSet;
public class IgnoredParam {
private static final HashSet<String> IGNORED = new HashSet<>();
static {
IGNORED.add("timestamp");
}
static boolean ignore(String key) {
return IGNORED.contains(key);
}
}
|
apache/eagle | 1,088 | eagle-core/eagle-metadata/eagle-metadata-jdbc/src/test/java/org/apache/eagle/metadata/store/jdbc/TestStaticApplication.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eagle.metadata.store.jdbc;
import org.apache.eagle.app.StaticApplicationProvider;
import org.junit.Test;
public class TestStaticApplication {
public static class Provider extends StaticApplicationProvider {
}
@Test
public void f() {
}
} |
apache/eventmesh | 1,091 | eventmesh-common/src/main/java/org/apache/eventmesh/common/config/connector/rdb/mongodb/SinkConnectorConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eventmesh.common.config.connector.rdb.mongodb;
import lombok.Data;
@Data
public class SinkConnectorConfig {
private String connectorName;
private String connectorType;
private String url;
private String database;
private String collection;
}
|
apache/fineract | 1,080 | fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/attendance/service/AttendanceDropdownReadPlatformService.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.portfolio.meeting.attendance.service;
import java.util.List;
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
public interface AttendanceDropdownReadPlatformService {
List<EnumOptionData> retrieveAttendanceTypeOptions();
}
|
apache/fineract | 1,096 | fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ImageDataURLNotValidException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.core.exception;
public class ImageDataURLNotValidException extends AbstractPlatformDomainRuleException {
public ImageDataURLNotValidException() {
super("error.msg.dataURL.save", "Only GIF, PNG and JPEG Data URL's are allowed");
}
}
|
apache/fineract | 1,107 | fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/RepaymentFrequencyType.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.test.data;
public enum RepaymentFrequencyType {
DAYS(0), //
WEEKS(1), //
MONTHS(2); //
public final Integer value;
RepaymentFrequencyType(Integer value) {
this.value = value;
}
public Integer getValue() {
return value;
}
}
|
apache/fineract | 1,117 | fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/domain/TaxComponentRepository.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.portfolio.tax.domain;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
public interface TaxComponentRepository extends JpaRepository<TaxComponent, Long>, JpaSpecificationExecutor<TaxComponent> {
}
|
apache/fineract | 1,119 | fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/domain/FundRepository.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.portfolio.fund.domain;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
public interface FundRepository extends JpaRepository<Fund, Long>, JpaSpecificationExecutor<Fund> {
// no added behaviour
}
|
apache/flink | 1,096 | flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecNode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.table.planner.plan.nodes.exec.stream;
import org.apache.flink.annotation.Internal;
import org.apache.flink.table.planner.plan.nodes.exec.ExecNode;
/** Base class for stream {@link ExecNode}. */
@Internal
public interface StreamExecNode<T> extends ExecNode<T> {}
|
apache/flink | 1,114 | flink-formats/flink-csv/src/test/java/org/apache/flink/formats/csv/CsvFileCompactionITCase.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.formats.csv;
import org.apache.flink.table.planner.runtime.stream.sql.FileCompactionITCaseBase;
/** Compaction it case for csv. */
public class CsvFileCompactionITCase extends FileCompactionITCaseBase {
@Override
protected String format() {
return "csv";
}
}
|
apache/geaflow | 1,104 | geaflow/geaflow-core/geaflow-api/src/main/java/org/apache/geaflow/api/function/base/ReduceFunction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.geaflow.api.function.base;
import org.apache.geaflow.api.function.Function;
@FunctionalInterface
public interface ReduceFunction<T> extends Function {
/**
* Reduce new value with old value, and then return a new T.
*/
T reduce(T oldValue, T newValue);
}
|
apache/grails-core | 1,126 | grails-web-common/src/main/groovy/grails/web/pages/GrailsRenderViewMutator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package grails.web.pages;
import java.util.Locale;
import org.springframework.web.servlet.View;
/**
* Interface to customize the view when rendering
*/
public interface GrailsRenderViewMutator {
View mutateView(boolean renderWithLayout, String templateUri, Locale locale, View exisitngView);
}
|
apache/groovy | 1,141 | src/main/java/org/codehaus/groovy/runtime/memoize/ProtectionStorage.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.runtime.memoize;
/**
* Protects stored resources from eviction from memory following the LRU (Last Recently Used) strategy.
* The touch method can be used to renew an element and move it to the from the LRU queue.
*/
interface ProtectionStorage<K, V> {
void touch(K key, V value);
}
|
apache/hadoop-common | 1,046 | hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/job/JobStateInternal.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.mapreduce.v2.app.job;
public enum JobStateInternal {
NEW,
SETUP,
INITED,
RUNNING,
COMMITTING,
SUCCEEDED,
FAIL_WAIT,
FAIL_ABORT,
FAILED,
KILL_WAIT,
KILL_ABORT,
KILLED,
ERROR,
REBOOT
}
|
apache/hadoop-common | 1,102 | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/PathIsNotDirectoryException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.fs;
/** ENOTDIR */
public class PathIsNotDirectoryException extends PathExistsException {
static final long serialVersionUID = 0L;
/** @param path for the exception */
public PathIsNotDirectoryException(String path) {
super(path, "Is not a directory");
}
} |
apache/hadoop | 1,083 | hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/nodelabels/event/NodeLabelsStoreEvent.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.yarn.nodelabels.event;
import org.apache.hadoop.yarn.event.AbstractEvent;
public class NodeLabelsStoreEvent extends
AbstractEvent<NodeLabelsStoreEventType> {
public NodeLabelsStoreEvent(NodeLabelsStoreEventType type) {
super(type);
}
} |
apache/hadoop | 1,106 | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/wrappedio/impl/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/testing support for wrapped IO.
*/
@InterfaceAudience.LimitedPrivate("testing")
@InterfaceStability.Unstable
package org.apache.hadoop.io.wrappedio.impl;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
|
apache/harmony | 1,106 | classlib/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/MisprintBean.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT 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 Maxim V. Berkultsev
*/
package org.apache.harmony.beans.tests.support;
/**
* @author Maxim V. Berkultsev
*/
public class MisprintBean {
// public void addMisprintListener(MisprintListenerr ml) {}
public void removeMisprintListener(MisprintListenerr ml) {
}
}
|
apache/hbase | 1,113 | hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/ExclusiveOperationException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.backup.impl;
import java.io.IOException;
import org.apache.yetus.audience.InterfaceAudience;
@InterfaceAudience.Private
@SuppressWarnings("serial")
public class ExclusiveOperationException extends IOException {
public ExclusiveOperationException() {
super();
}
}
|
apache/helix | 1,110 | zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/exception/ZkInterruptedException.java | package org.apache.helix.zookeeper.zkclient.exception;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
public class ZkInterruptedException extends ZkException {
private static final long serialVersionUID = 1L;
public ZkInterruptedException(InterruptedException e) {
super(e);
Thread.currentThread().interrupt();
}
}
|
apache/hive | 1,125 | beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineSiteParseException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.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.hive.beeline.hs2connection;
@SuppressWarnings("serial")
public class BeelineSiteParseException extends BeelineConfFileParseException {
public BeelineSiteParseException(String msg, Exception e) {
super(msg, e);
}
public BeelineSiteParseException(String msg) {
super(msg);
}
}
|
apache/hive | 1,136 | service/src/java/org/apache/hive/service/server/HiveServer2HAInstanceSet.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hive.service.server;
import org.apache.hadoop.hive.registry.ServiceInstanceSet;
public interface HiveServer2HAInstanceSet extends ServiceInstanceSet<HiveServer2Instance> {
/**
* In Active/Passive setup, returns current active leader.
*
* @return leader instance
*/
HiveServer2Instance getLeader();
}
|
apache/ignite-3 | 1,131 | modules/bytecode/src/main/java/com/facebook/presto/bytecode/BytecodeNode.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.facebook.presto.bytecode;
import java.util.List;
import org.objectweb.asm.MethodVisitor;
public interface BytecodeNode
{
List<BytecodeNode> getChildNodes();
void accept(MethodVisitor visitor, MethodGenerationContext generationContext);
<T> T accept(BytecodeNode parent, BytecodeVisitor<T> visitor);
}
|
apache/ignite | 1,076 | modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalFlushFsyncWithMmapBufferSelfTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.processors.cache.persistence.db.wal;
/**
*
*/
public class IgniteWalFlushFsyncWithMmapBufferSelfTest extends IgniteWalFlushFsyncSelfTest {
/** {@inheritDoc} */
@Override protected boolean mmap() {
return true;
}
}
|
apache/ignite | 1,081 | modules/core/src/test/java/org/apache/ignite/internal/managers/communication/IgniteCommunicationBalanceMultipleConnectionsTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.managers.communication;
/**
*
*/
public class IgniteCommunicationBalanceMultipleConnectionsTest extends IgniteCommunicationBalanceTest {
/** {@inheritDoc} */
@Override protected int connectionsPerNode() {
return 5;
}
}
|
apache/ignite | 1,081 | modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteCacheGroupsSqlSegmentedIndexMultiNodeSelfTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.internal.processors.query;
/**
*
*/
public class IgniteCacheGroupsSqlSegmentedIndexMultiNodeSelfTest extends IgniteCacheGroupsSqlSegmentedIndexSelfTest {
/** {@inheritDoc} */
@Override protected int nodesCount() {
return 4;
}
}
|
apache/ignite | 1,105 | modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CachePojoStoreXmlWithSqlEscapeSelfTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.cache.store.jdbc;
/**
* Tests for {@link CacheJdbcPojoStore} created via XML.
*/
public class CachePojoStoreXmlWithSqlEscapeSelfTest extends CachePojoStoreXmlSelfTest {
/** {@inheritDoc} */
@Override protected boolean sqlEscapeAll() {
return true;
}
}
|
apache/ignite | 1,120 | modules/commons/src/main/java/org/apache/ignite/internal/util/GridSerializableIterator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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;
import java.io.Serializable;
import java.util.Iterator;
/**
* Makes {@link Iterator} as {@link Serializable} and is
* useful for making anonymous serializable iterators.
*/
public interface GridSerializableIterator<E> extends Iterator<E>, Serializable {
// No-op.
}
|
apache/incubator-kie-drools | 1,106 | drools-kiesession/src/main/java/org/drools/kiesession/debug/RightMemorySizeComparator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.kiesession.debug;
import java.util.Comparator;
public class RightMemorySizeComparator implements Comparator<NodeInfo>{
public int compare(NodeInfo o1,
NodeInfo o2) {
return (int) ( o2.getFactMemorySize() - o1.getFactMemorySize()) ;
}
}
|
apache/incubator-kie-drools | 1,107 | drools-kiesession/src/main/java/org/drools/kiesession/debug/LeftMemorySizeComparator.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.kiesession.debug;
import java.util.Comparator;
public class LeftMemorySizeComparator implements Comparator<NodeInfo>{
public int compare(NodeInfo o1,
NodeInfo o2) {
return (int) ( o2.getTupleMemorySize() - o1.getTupleMemorySize()) ;
}
}
|
apache/incubator-kie-drools | 1,108 | kie-memory-compiler/src/main/java/org/kie/memorycompiler/KieMemoryCompilerException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.memorycompiler;
public class KieMemoryCompilerException extends RuntimeException {
public KieMemoryCompilerException(String message, Throwable cause) {
super(message, cause);
}
public KieMemoryCompilerException(String message) {
super(message);
}
}
|
apache/incubator-kie-drools | 1,110 | kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/api/InformationRequirement.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.dmn.model.api;
public interface InformationRequirement extends DMNElement {
DMNElementReference getRequiredDecision();
void setRequiredDecision(DMNElementReference value);
DMNElementReference getRequiredInput();
void setRequiredInput(DMNElementReference value);
}
|
apache/incubator-kie-drools | 1,115 | kie-api/src/test/java/org/kie/api/internal/utils/MockChildAssemblerService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.internal.utils;
import org.kie.api.internal.assembler.KieAssemblerService;
import org.kie.api.io.ResourceType;
public class MockChildAssemblerService implements KieAssemblerService {
@Override
public ResourceType getResourceType() {
return ResourceType.DRL;
}
}
|
apache/incubator-kie-drools | 1,131 | kie-api/src/main/java/org/kie/api/event/KieRuntimeEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.event;
import org.kie.api.runtime.KieRuntime;
/**
* An event that is generated by the KIE runtime.
*/
public interface KieRuntimeEvent {
/**
* {@link org.kie.api.runtime.KieRuntime} that generated the event.
*
* @return the KIE runtime
*/
KieRuntime getKieRuntime();
}
|
apache/incubator-kie-kogito-apps | 1,094 | data-index/data-index-common/src/main/java/org/kie/kogito/index/json/DataIndexParsingException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.kogito.index.json;
public class DataIndexParsingException extends RuntimeException {
private static final long serialVersionUID = 2205334685545385623L;
public DataIndexParsingException(String message, Throwable cause) {
super(message, cause);
}
}
|
apache/incubator-kie-kogito-runtimes | 1,082 | kogito-workitems/kogito-jackson-utils/src/main/java/org/kie/kogito/jackson/utils/ListenerAwareUtils.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.kie.kogito.jackson.utils;
import com.fasterxml.jackson.databind.node.NullNode;
class ListenerAwareUtils {
static Object handleNull(Object value) {
return value == null ? NullNode.instance : value;
}
private ListenerAwareUtils() {
}
}
|
apache/incubator-kie-kogito-runtimes | 1,091 | jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/impl/FeelReturnValueEvaluatorException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jbpm.process.instance.impl;
public class FeelReturnValueEvaluatorException extends RuntimeException {
private static final long serialVersionUID = 2323430157674272027L;
public FeelReturnValueEvaluatorException(String message) {
super(message);
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.