repo_id stringclasses 875
values | size int64 974 38.9k | file_path stringlengths 10 308 | content stringlengths 974 38.9k |
|---|---|---|---|
apache/skywalking-java | 1,046 | apm-sniffer/optional-plugins/shenyu-2.4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shenyu/v24x/Constant.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.plugin.shenyu.v24x;
public class Constant {
public static final String SKYWALKING_CONTEXT_SNAPSHOT = "SKYWALKING_CONTEXT_SNAPSHOT";
public static final String PROXY_RPC_SPAN = "PROXY_RPC_SPAN";
}
|
apache/skywalking | 1,046 | oap-server/server-query-plugin/promql-plugin/src/main/java/org/apache/skywalking/oap/query/promql/entity/MetricInstantData.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.oap.query.promql.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
public class MetricInstantData extends MetricData {
private TimeValuePair value;
}
|
apache/storm | 1,086 | external/storm-autocreds/src/main/java/org/apache/storm/common/CredentialKeyProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.storm.common;
/**
* Provider interface for credential key.
*/
public interface CredentialKeyProvider {
/**
* The lookup key for the config key string.
*
* @return the config key string
*/
String getCredentialKey(String configKey);
}
|
apache/stratos | 1,024 | components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/listener/cluster/status/ClusterStatusClusterTerminatingEventListener.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.stratos.messaging.listener.cluster.status;
import org.apache.stratos.messaging.listener.EventListener;
public abstract class ClusterStatusClusterTerminatingEventListener extends EventListener {
}
|
apache/stratos | 1,043 | components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/initializer/CompleteTopologyRequestEvent.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.stratos.messaging.event.initializer;
import java.io.Serializable;
public class CompleteTopologyRequestEvent extends InitializerEvent implements Serializable {
public CompleteTopologyRequestEvent() {
}
}
|
apache/struts | 1,051 | plugins/convention/src/test/java/org/apache/struts2/convention/actions/action/ClassLevelAnnotationDefaultMethodAction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.struts2.convention.actions.action;
import org.apache.struts2.convention.annotation.Action;
@Action("class6")
public class ClassLevelAnnotationDefaultMethodAction {
public String execute() {
return "boo";
}
}
|
apache/systemds | 1,084 | src/main/java/org/apache/sysds/runtime/compress/workload/OpMetadata.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.sysds.runtime.compress.workload;
import org.apache.sysds.hops.Hop;
public class OpMetadata extends Op {
final Hop parent;
public OpMetadata(Hop op, Hop parent) {
super(op);
this.parent = parent;
}
public Hop getParent(){
return parent;
}
}
|
apache/tapestry-5 | 1,071 | tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormFragmentOutput.java | // Copyright 2008 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.integration.app1.pages;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.integration.app1.data.SubscribeData;
public class FormFragmentOutput
{
@Persist
private SubscribeData subscribe;
FormFragmentOutput initialize(SubscribeData subscribe)
{
this.subscribe = subscribe;
return this;
}
public SubscribeData getSubscribe()
{
return subscribe;
}
}
|
apache/tapestry-5 | 1,079 | tapestry-spring/src/test/java/org/example/testapp/services/SymbolValueHolder.java | // Copyright 2010 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.example.testapp.services;
public class SymbolValueHolder
{
private String value;
private String anotherValue;
public String getValue()
{
return value;
}
public void setValue(String value)
{
this.value = value;
}
public String getAnotherValue()
{
return anotherValue;
}
public void setAnotherValue(String anotherValue)
{
this.anotherValue = anotherValue;
}
}
|
apache/tapestry-5 | 1,080 | tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/test/StringHolderImpl.java | // Copyright 2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.ioc.test;
import org.apache.tapestry5.ioc.test.internal.services.SimpleAnnotation;
/**
*
*/
@SimpleAnnotation("StringHolderImpl")
public class StringHolderImpl implements StringHolder
{
private String value;
@Override
@SimpleAnnotation("StringHolderImpl#getValue()")
public String getValue()
{
return value;
}
@Override
public void setValue(String value)
{
this.value = value;
}
}
|
apache/tapestry-5 | 1,094 | tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/BaseLocatable.java | // Copyright 2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.ioc;
import org.apache.tapestry5.commons.Locatable;
import org.apache.tapestry5.commons.Location;
/**
* Base implementation of {@link org.apache.tapestry5.commons.Locatable}.
*/
public class BaseLocatable implements Locatable
{
private final Location location;
protected BaseLocatable(Location location)
{
this.location = location;
}
@Override
public final Location getLocation()
{
return location;
}
}
|
apache/teaclave-java-tee-sdk | 1,071 | test/common/src/main/java/org/apache/teaclave/javasdk/test/common/ConcurrencyCalculate.java | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.teaclave.javasdk.test.common;
import org.apache.teaclave.javasdk.common.annotations.EnclaveService;
@EnclaveService
public interface ConcurrencyCalculate {
void add(int delta);
long sum();
void addSync(int delta);
long sumSync();
}
|
apache/tez | 1,093 | tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventLaunched.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package org.apache.tez.dag.app.rm.container;
import org.apache.hadoop.yarn.api.records.ContainerId;
public class AMContainerEventLaunched extends AMContainerEvent {
public AMContainerEventLaunched(ContainerId containerId) {
super(containerId, AMContainerEventType.C_LAUNCHED);
}
}
|
apache/tomee | 1,086 | container/openejb-loader/src/main/java/org/apache/openejb/loader/LoaderRuntimeException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.loader;
public class LoaderRuntimeException extends RuntimeException {
public LoaderRuntimeException(final String str, final Throwable e) {
super(str, e);
}
public LoaderRuntimeException(final Exception e) {
super(e);
}
}
|
apache/tomee | 1,101 | container/openejb-jee/src/main/java/org/apache/openejb/jee/Invokable.java | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.jee;
import java.util.List;
/**
* @version $Rev$ $Date$
*/
public interface Invokable {
List<AroundInvoke> getAroundInvoke();
void addAroundInvoke(String method);
List<AroundTimeout> getAroundTimeout();
void addAroundTimeout(String method);
}
|
apache/wicket | 1,078 | wicket-core-tests/src/test/java/org/apache/wicket/markup/html/basic/RedirectPage.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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;
/**
* @author jcompagner
*/
public class RedirectPage extends WebPage
{
private static final long serialVersionUID = 1L;
/**
* Construct.
*/
public RedirectPage()
{
}
}
|
apache/zookeeper | 1,084 | zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/ServerMXBean.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.zookeeper.server.quorum;
/**
* A quorum server MBean.
*/
public interface ServerMXBean {
/**
* @return name of the server MBean
*/
String getName();
/**
* @return the start time the server
*/
String getStartTime();
}
|
google-developer-training/android-advanced | 1,064 | ClippingExample/app/src/main/java/com/example/clippingexample/MainActivity.java | /*
* Copyright (C) 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES 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.example.clippingexample;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
/**
* Demonstrates how setting different clipping paths affects the
* drawing of rectangles, lines, text, and circles.
*/
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(new ClippedView(this));
}
}
|
google/android-classyshark | 1,074 | ClassySharkWS/src/com/google/classyshark/gui/panel/toolbar/ToolbarController.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.classyshark.gui.panel.toolbar;
import com.google.classyshark.gui.panel.ArchiveDisplayer;
public interface ToolbarController extends ArchiveDisplayer {
void onChangedTextFromTypingArea(String text);
void openArchive();
void onGoBackPressed();
void onViewTopClassPressed();
void onMappingsButtonPressed();
void onExportButtonPressed();
void onChangeLeftPaneVisibility(boolean selected);
void onSettingsButtonPressed();
}
|
google/auto | 1,093 | factory/src/test/resources/expected/SimpleClassImplementingMarkerFactory.java | /*
* Copyright 2013 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package tests;
import java.util.RandomAccess;
import javax.annotation.processing.Generated;
import javax.inject.Inject;
@Generated(
value = "com.google.auto.factory.processor.AutoFactoryProcessor",
comments = "https://github.com/google/auto/tree/main/factory"
)
final class SimpleClassImplementingMarkerFactory implements RandomAccess {
@Inject
SimpleClassImplementingMarkerFactory() {}
SimpleClassImplementingMarker create() {
return new SimpleClassImplementingMarker();
}
}
|
google/auto | 1,099 | factory/src/test/resources/expected/CustomAnnotationsFactory.java | /*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package tests;
import com.google.errorprone.annotations.Immutable;
import javax.annotation.processing.Generated;
import javax.inject.Inject;
@Generated(
value = "com.google.auto.factory.processor.AutoFactoryProcessor",
comments = "https://github.com/google/auto/tree/main/factory"
)
@Immutable
@SuppressWarnings({"unchecked", "Immutable"})
final class CustomAnnotationsFactory {
@Inject
CustomAnnotationsFactory() {}
CustomAnnotations create() {
return new CustomAnnotations();
}
}
|
google/binnavi | 1,059 | src/main/java/com/google/security/zynamics/binnavi/Gui/FilterPanel/FilterExpressions/Wrappers/IWrapperCreator.java | // Copyright 2011-2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.binnavi.Gui.FilterPanel.FilterExpressions.Wrappers;
/**
* Interface for classes that want to create wrapper objects for filtering.
*
* @param <T> Type of the wrapped objects.
*/
public interface IWrapperCreator<T> {
/**
* Creates a new wrapper object that wraps a given object.
*
* @param element The object to wrap.
*
* @return The wrapper for the given object.
*/
IFilterWrapper<T> wrap(T element);
}
|
google/binnavi | 1,069 | src/main/java/com/google/security/zynamics/binnavi/Gui/CriteriaDialog/Conditions/IAbstractCriterium.java | // Copyright 2011-2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions;
import com.google.security.zynamics.binnavi.yfileswrap.zygraph.NaviNode;
/**
* Base interface for normal and cached criteria classes.
*/
public interface IAbstractCriterium {
/**
* Evaluates whether a given node matches the criterium.
*
* @param node The node to check.
*
* @return True, if the node matches the criterium. False, otherwise.
*/
boolean matches(NaviNode node);
}
|
google/binnavi | 1,081 | src/test/java/com/google/security/zynamics/binnavi/API/debug/MockBookmarkListener.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 com.google.security.zynamics.binnavi.API.debug;
import com.google.security.zynamics.binnavi.API.debug.Bookmark;
import com.google.security.zynamics.binnavi.API.debug.IBookmarkListener;
public final class MockBookmarkListener implements IBookmarkListener {
public String events = "";
@Override
public void changedDescription(final Bookmark bookmark, final String description) {
events += "changedDescription/" + bookmark.getAddress().toHexString() + "/" + description + ";";
}
}
|
google/cel-java | 1,091 | validator/src/main/java/dev/cel/validator/validators/TimestampLiteralValidator.java | // Copyright 2023 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 dev.cel.validator.validators;
import com.google.protobuf.Timestamp;
/** TimestampLiteralValidator ensures that timestamp literal arguments are valid. */
public final class TimestampLiteralValidator extends LiteralValidator {
public static final TimestampLiteralValidator INSTANCE =
new TimestampLiteralValidator("timestamp", Timestamp.class);
private TimestampLiteralValidator(String functionName, Class<?> expectedResultType) {
super(functionName, expectedResultType);
}
}
|
google/closure-compiler | 1,082 | src/com/google/javascript/jscomp/parsing/parser/trees/DoWhileStatementTree.java | /*
* Copyright 2011 The Closure Compiler 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.javascript.jscomp.parsing.parser.trees;
import com.google.javascript.jscomp.parsing.parser.util.SourceRange;
public class DoWhileStatementTree extends ParseTree {
public final ParseTree body;
public final ParseTree condition;
public DoWhileStatementTree(
SourceRange location, ParseTree body, ParseTree condition) {
super(ParseTreeType.DO_WHILE_STATEMENT, location);
this.body = body;
this.condition = condition;
}
}
|
google/closure-compiler | 1,085 | src/com/google/javascript/jscomp/parsing/parser/trees/DefaultParameterTree.java | /*
* Copyright 2011 The Closure Compiler 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.javascript.jscomp.parsing.parser.trees;
import com.google.javascript.jscomp.parsing.parser.util.SourceRange;
public class DefaultParameterTree extends ParseTree {
public final ParseTree lhs;
public final ParseTree defaultValue;
public DefaultParameterTree(SourceRange location, ParseTree lhs,
ParseTree defaultValue) {
super(ParseTreeType.DEFAULT_PARAMETER, location);
this.lhs = lhs;
this.defaultValue = defaultValue;
}
}
|
google/closure-compiler | 1,090 | src/com/google/javascript/jscomp/parsing/parser/trees/ArrayPatternTree.java | /*
* Copyright 2011 The Closure Compiler 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.javascript.jscomp.parsing.parser.trees;
import com.google.common.collect.ImmutableList;
import com.google.javascript.jscomp.parsing.parser.util.SourceRange;
public class ArrayPatternTree extends ParseTree {
public final ImmutableList<ParseTree> elements;
public ArrayPatternTree(SourceRange location,
ImmutableList<ParseTree> elements) {
super(ParseTreeType.ARRAY_PATTERN, location);
this.elements = elements;
}
}
|
google/copybara | 1,103 | java/com/google/copybara/remotefile/RemoteArchiveVersion.java | /*
* Copyright (C) 2022 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.copybara.remotefile;
import javax.annotation.Nullable;
/** A class to represent Version for RemoteArchive Endpoints */
public final class RemoteArchiveVersion {
private final String fullUrl;
private final String version;
public RemoteArchiveVersion(String fullUrl, String version) {
this.version = version;
this.fullUrl = fullUrl;
}
public String getFullUrl() {
return this.fullUrl;
}
@Nullable
public String getVersion() {
return this.version;
}
}
|
google/domaintest | 1,100 | domaintest-war/src/main/java/foo/domaintest/util/Sleeper.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 foo.domaintest.util;
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
import foo.domaintest.metrics.Metrics;
import java.util.concurrent.TimeUnit;
import javax.inject.Inject;
/** Mockable utility object for sleeping. */
public class Sleeper {
@Inject Metrics metrics;
public void sleep(int seconds) {
if (seconds > 0) {
metrics.addActivity("sleep");
}
sleepUninterruptibly(seconds, TimeUnit.SECONDS);
}
}
|
google/filament | 1,074 | android/filament-utils-android/src/main/java/com/google/android/filament/utils/Bookmark.java | /*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.filament.utils;
public class Bookmark {
private long mNativeObject;
Bookmark(long nativeObject) {
mNativeObject = nativeObject;
}
long getNativeObject() {
return mNativeObject;
}
@Override
protected void finalize() throws Throwable {
nDestroyBookmark(mNativeObject);
super.finalize();
}
private static native void nDestroyBookmark(long nativeObject);
}
|
google/google-ctf | 1,069 | 2019/quals/reversing-android/project/desktop/src/com/google/ctf/game/desktop/DesktopLauncher.java | // Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.ctf.game.desktop;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.google.ctf.game.FlaggyBirdGame;
public class DesktopLauncher {
public static void main (String[] arg) {
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.width = 1920;
config.height = 1080;
new LwjglApplication(new FlaggyBirdGame(null), config);
}
}
|
google/j2cl | 1,074 | transpiler/javatests/com/google/j2cl/readable/java/jstypecastsinstanceof/CastToTypeVariable.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 jstypecastsinstanceof;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
@JsType(isNative = true, name = "Object", namespace = JsPackage.GLOBAL)
public class CastToTypeVariable<T extends CastToTypeVariable<T>> {
@SuppressWarnings({"unused", "unchecked"})
@JsOverlay
public final T setField(int index, boolean value) {
Object o = new Object();
T[] a = (T[]) o;
return (T) this;
}
}
|
google/nomulus | 1,105 | core/src/test/java/google/registry/whois/WhoisTestComponent.java | // Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package google.registry.whois;
import dagger.Component;
import google.registry.config.RegistryConfig.ConfigModule;
import google.registry.request.RequestModule;
import google.registry.util.UtilsModule;
import jakarta.inject.Singleton;
@Singleton
@Component(
modules = {
ConfigModule.class,
RequestModule.class,
UtilsModule.class,
WhoisModule.class,
})
interface WhoisTestComponent {
WhoisHttpAction whoisHttpAction();
WhoisAction whoisAction();
}
|
google/oss-fuzz | 1,118 | projects/apache-commons-compress/ArchiverCpioFuzzer.java | // Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////////
import org.apache.commons.compress.archivers.cpio.CpioArchiveInputStream;
import java.io.ByteArrayInputStream;
import java.io.IOException;
public class ArchiverCpioFuzzer extends BaseTests {
public static void fuzzerTestOneInput(byte[] data) {
try {
fuzzArchiveInputStream(new CpioArchiveInputStream(new ByteArrayInputStream(data)));
} catch (IllegalArgumentException | IOException ignored) {
}
}
}
|
google/thread-weaver | 1,091 | test/com/google/testing/threadtester/SimpleClass4.java | /*
* Copyright 2009 Weaver 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.testing.threadtester;
/**
* Simple class used by ScripterTest.
*
* @author alasdair.mackintosh@gmail.com (Alasdair Mackintosh)
*/
public class SimpleClass4 {
volatile int position = 0;
SimpleClass4() {
}
int method1() {
return 1;
}
int method2() {
return 2;
}
int method3() {
return 3;
}
int method4() {
return 4;
}
int methodThatThrows() {
int x = 1;
int y = 0;
int result = x / y;
return result;
}
}
|
google/thread-weaver | 1,102 | test/com/google/testing/threadtester/SimpleSubclass.java | /*
* Copyright 2009 Weaver 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.testing.threadtester;
/**
* Subclass of SimpleClass. Used to test Breakpoints and CodePositions in
* subclasses.
*
* @author alasdair.mackintosh@gmail.com (Alasdair Mackintosh)
*/
public class SimpleSubclass extends SimpleClass {
volatile int subPosition;
@Override
public int add(int a, int b) {
subPosition = 1;
int result = super.add(a, b);
subPosition = 2;
return result;
}
public int subclassMethod() {
subPosition = 3;
return 0;
}
}
|
google/tsunami-security-scanner | 1,081 | plugin/src/main/java/com/google/tsunami/plugin/LanguageServerException.java | /*
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.tsunami.plugin;
import com.google.tsunami.common.ErrorCode;
import com.google.tsunami.common.TsunamiException;
/** Exception for language server errors. */
public final class LanguageServerException extends TsunamiException {
public LanguageServerException(String message) {
super(ErrorCode.LANGUAGE_SERVER_ERROR, message);
}
public LanguageServerException(String message, Throwable cause) {
super(ErrorCode.LANGUAGE_SERVER_ERROR, message, cause);
}
}
|
googlesamples/glass-enterprise-samples | 1,074 | WebRTCSample/app/src/org/appspot/apprtcstandalone/CaptureOptionsPicker.java | package org.appspot.apprtcstandalone;
import android.widget.SeekBar;
/**
* Picker for the resolution and framerate values. It sets the minimum and maximum values for
* {@link SeekBar} and then scales it's position to proper values.
*/
public class CaptureOptionsPicker {
private Resolution[] resolutions;
private int[] framerates;
public CaptureOptionsPicker(Resolution[] resolutions, int[] framerates) {
this.resolutions = resolutions;
this.framerates = framerates;
}
public CaptureOptions pickCaptureOptions(int currentValue) {
int resolutionIndex = currentValue / framerates.length;
int framerateIndex = currentValue % framerates.length;
return new SimpleCaptureOptions(resolutions[resolutionIndex], framerates[framerateIndex]);
}
public void setSeekbarValues(SeekBar seekbar) {
seekbar.setMin(0);
seekbar.setMax((resolutions.length * framerates.length) - 1);
}
public interface CaptureOptions {
Resolution getResolution();
int getFramerate();
}
}
|
hibernate/hibernate-ogm | 1,037 | infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/options/navigation/impl/InfinispanPropertyContextImpl.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.datastore.infinispan.options.navigation.impl;
import org.hibernate.ogm.datastore.infinispan.options.navigation.InfinispanEntityContext;
import org.hibernate.ogm.datastore.infinispan.options.navigation.InfinispanPropertyContext;
import org.hibernate.ogm.datastore.keyvalue.options.navigation.spi.BaseKeyValueStorePropertyContext;
import org.hibernate.ogm.options.navigation.spi.ConfigurationContext;
/**
* Converts Infinispan property-level options.
*
* @author Gunnar Morling
*/
public abstract class InfinispanPropertyContextImpl extends BaseKeyValueStorePropertyContext<InfinispanEntityContext, InfinispanPropertyContext> implements
InfinispanPropertyContext {
public InfinispanPropertyContextImpl(ConfigurationContext context) {
super( context );
}
}
|
hibernate/hibernate-ogm | 1,075 | core/src/main/java/org/hibernate/ogm/type/impl/FloatType.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.WrappedGridTypeDescriptor;
import org.hibernate.type.descriptor.java.FloatTypeDescriptor;
/**
* Represents a Float type
*
* @author Ajay Bhat
*/
public class FloatType extends AbstractGenericBasicType<Float> {
public static FloatType INSTANCE = new FloatType();
public FloatType() {
super( WrappedGridTypeDescriptor.INSTANCE, FloatTypeDescriptor.INSTANCE );
}
@Override
public String[] getRegistrationKeys() {
return new String[] {getName(), float.class.getName(), Float.class.getName()};
}
@Override
public int getColumnSpan(Mapping mapping) throws MappingException {
return 1;
}
@Override
public String getName() {
return "float";
}
}
|
hibernate/hibernate-ogm | 1,082 | core/src/test/java/org/hibernate/ogm/utils/SkipByDatastoreProvider.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.utils;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.hibernate.ogm.datastore.impl.DatastoreProviderType;
/**
* Allows to skip specific tests for certain datastore providers. If given on a test method and the containing test
* class at the same time, the annotation declared on the method takes precedence.
*
* @author Gunnar Morling
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.METHOD, ElementType.TYPE })
public @interface SkipByDatastoreProvider {
/**
* The datastore provider(s) on which to skip the test.
*/
DatastoreProviderType[] value();
/**
* Optional comment describing the reason for skipping the test.
*/
String comment() default "";
}
|
hibernate/hibernate-orm | 1,037 | hibernate-core/src/test/java/org/hibernate/orm/test/mapping/naturalid/cid/HbmCompositeIdAndNaturalIdTest.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.mapping.naturalid.cid;
import org.hibernate.testing.orm.junit.DomainModel;
import org.hibernate.testing.orm.junit.ServiceRegistry;
import org.hibernate.testing.orm.junit.SessionFactory;
import org.hibernate.testing.orm.junit.Setting;
import static org.hibernate.cfg.AvailableSettings.GENERATE_STATISTICS;
import static org.hibernate.cfg.AvailableSettings.USE_QUERY_CACHE;
import static org.hibernate.cfg.AvailableSettings.USE_SECOND_LEVEL_CACHE;
/**
* @author Donnchadh O Donnabhain
*/
@ServiceRegistry(
settings = {
@Setting( name = USE_SECOND_LEVEL_CACHE, value = "false" ),
@Setting( name = USE_QUERY_CACHE, value = "false" ),
@Setting( name = GENERATE_STATISTICS, value = "false" )
}
)
@DomainModel( xmlMappings = "org/hibernate/orm/test/mapping/naturalid/cid/Account.hbm.xml" )
@SessionFactory
public class HbmCompositeIdAndNaturalIdTest extends AbstractCompositeIdAndNaturalIdTest {
}
|
hibernate/hibernate-orm | 1,063 | hibernate-core/src/main/java/org/hibernate/query/UnknownSqlResultSetMappingException.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.query;
import org.hibernate.MappingException;
import jakarta.persistence.NamedNativeQuery;
/**
* Indicates a request for named ResultSet mapping which could not be found
*
* @see NamedNativeQuery#resultSetMapping()
* @see org.hibernate.Session#createNativeQuery(String, String)
* @see org.hibernate.Session#createNativeQuery(String, String, Class)
* @see org.hibernate.Session#getNamedNativeQuery(String, String)
*
* @author Steve Ebersole
*/
public class UnknownSqlResultSetMappingException extends MappingException {
private final String unknownSqlResultSetMappingName;
public UnknownSqlResultSetMappingException(String unknownSqlResultSetMappingName) {
super( "The given SqlResultSetMapping name [" + unknownSqlResultSetMappingName + "] is unknown" );
this.unknownSqlResultSetMappingName = unknownSqlResultSetMappingName;
}
public String getUnknownSqlResultSetMappingName() {
return unknownSqlResultSetMappingName;
}
}
|
hibernate/hibernate-reactive | 1,041 | hibernate-reactive-core/src/main/java/org/hibernate/reactive/session/impl/ReactiveExceptionConverter.java | /* Hibernate, Relational Persistence for Idiomatic Java
*
* SPDX-License-Identifier: Apache-2.0
* Copyright: Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.reactive.session.impl;
import org.hibernate.HibernateException;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.hibernate.internal.ExceptionConverterImpl;
/**
* Handle exceptions and convert them following the logic used in Hibernate ORM.
* <p>
* It converts the exception to a {@link HibernateException} or a
* {@link jakarta.persistence.PersistenceException}.
*
* @see org.hibernate.engine.spi.ExceptionConverter
*/
public class ReactiveExceptionConverter extends ExceptionConverterImpl {
public ReactiveExceptionConverter(SharedSessionContractImplementor sharedSessionContract) {
super( sharedSessionContract );
}
@Override
public RuntimeException convert(RuntimeException e) {
if ( !( e instanceof HibernateException ) ) {
return super.convert( new HibernateException( e ) );
}
return super.convert( e );
}
}
|
hibernate/hibernate-search | 1,030 | backend/lucene/src/main/java/org/hibernate/search/backend/lucene/lowlevel/query/impl/FuzzyQueryBuilder.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.backend.lucene.lowlevel.query.impl;
import static org.apache.lucene.search.BoostAttribute.DEFAULT_BOOST;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.BoostQuery;
import org.apache.lucene.search.FuzzyQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.util.QueryBuilder;
public final class FuzzyQueryBuilder extends QueryBuilder {
private final int maxEditDistance;
private final int prefixLength;
public FuzzyQueryBuilder(Analyzer analyzer, int maxEditDistance, int prefixLength) {
super( analyzer );
this.maxEditDistance = maxEditDistance;
this.prefixLength = prefixLength;
}
@Override
protected Query newTermQuery(Term term, float boost) {
Query q = new FuzzyQuery( term, maxEditDistance, prefixLength );
if ( boost == DEFAULT_BOOST ) {
return q;
}
return new BoostQuery( q, boost );
}
}
|
hibernate/hibernate-search | 1,034 | lucene-next/backend/lucene/src/main/java/org/hibernate/search/backend/lucene/search/aggregation/impl/AggregationExtractContext.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.backend.lucene.search.aggregation.impl;
import org.hibernate.search.backend.lucene.lowlevel.collector.impl.CollectorKey;
import org.hibernate.search.backend.lucene.lowlevel.join.impl.NestedDocsProvider;
import org.hibernate.search.backend.lucene.search.predicate.impl.PredicateRequestContext;
import org.hibernate.search.engine.backend.types.converter.runtime.FromDocumentValueConvertContext;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.Collector;
import org.apache.lucene.search.Query;
public interface AggregationExtractContext {
PredicateRequestContext toPredicateRequestContext(String absolutePath);
IndexReader getIndexReader();
FromDocumentValueConvertContext fromDocumentValueConvertContext();
<C extends Collector, T> T getCollectorResults(CollectorKey<C, T> key);
NestedDocsProvider createNestedDocsProvider(String nestedDocumentPath, Query nestedFilter);
}
|
hibernate/hibernate-search | 1,056 | engine/src/main/java/org/hibernate/search/engine/search/predicate/definition/PredicateDefinition.java | /*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.engine.search.predicate.definition;
import org.hibernate.search.engine.search.predicate.SearchPredicate;
import org.hibernate.search.engine.search.predicate.dsl.TypedSearchPredicateFactory;
import org.hibernate.search.util.common.annotation.Incubating;
/**
* A component able to define a predicate using the Hibernate Search Predicate DSL.
* <p>
* This definition takes advantage of provided metadata
* to pick, configure and create a {@link SearchPredicate}.
* <p>
* Used in particular for named predicates,
* where the definition is given a name and assigned to an element in the index schema.
*
* @see SearchPredicate
*
*/
@Incubating
public interface PredicateDefinition {
/**
* Creates a predicate.
* @param context The context, exposing in particular a {@link TypedSearchPredicateFactory}.
* @return The created {@link SearchPredicate}.
*/
SearchPredicate create(PredicateDefinitionContext context);
}
|
hibernate2011/RosClient | 1,099 | app/src/main/java/com/jilk/ros/rosbridge/indication/Base64Encoded.java | /**
* Copyright (c) 2014 Jilk Systems, Inc.
*
* This file is part of the Java ROSBridge Client.
*
* The Java ROSBridge Client is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Java ROSBridge Client 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 for more details.
*
* You should have received a copy of the GNU General Public License
* along with the Java ROSBridge Client. If not, see http://www.gnu.org/licenses/.
*
*/
package com.jilk.ros.rosbridge.indication;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Base64Encoded {
}
|
openjdk/jdk8 | 1,100 | langtools/test/tools/javac/diags/examples/SunApiPluralAdditional/SunApiFilename.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.
*/
class SunApiFilename {
sun.misc.Unsafe x;
}
|
openjdk/jdk8 | 1,122 | langtools/test/tools/javac/PackageClassAmbiguity/util.java | /*
* Copyright (c) 1998, 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package java;
import java.util.Set;
class util {
Set x;
}
|
oracle/coherence | 1,085 | prj/coherence-core/src/main/java/com/tangosol/dev/assembler/Iflt.java | /*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
*/
package com.tangosol.dev.assembler;
import java.io.IOException;
import java.io.DataInput;
import java.io.DataOutput;
/**
* The IFLT op branches to the label if the top integer on the stack is less
* than zero.
* <p><code><pre>
* JASM op : IFLT (0x9b)
* JVM byte code(s): IFLT (0x9b)
* Details :
* </pre></code>
*
* @version 0.50, 06/14/98, assembler/dis-assembler
* @author Cameron Purdy
*/
public class Iflt extends OpBranch implements Constants
{
// ----- constructors ---------------------------------------------------
/**
* Construct the op.
*
* @param label the label to branch to
*/
public Iflt(Label label)
{
super(IFLT, label);
}
// ----- data members ---------------------------------------------------
/**
* The name of this class.
*/
private static final String CLASS = "Iflt";
}
|
oracle/nosql | 1,105 | kvmain/src/main/java/oracle/kv/impl/monitor/AdminDirectHandler.java | /*-
* Copyright (C) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This file was distributed by Oracle as part of a version of Oracle NoSQL
* Database made available at:
*
* http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html
*
* Please see the LICENSE file included in the top-level directory of the
* appropriate version of Oracle NoSQL Database for a copy of the license and
* additional information.
*/
package oracle.kv.impl.monitor;
import java.util.logging.LogRecord;
import oracle.kv.impl.measurement.LoggerMessage;
/**
* Takes logging output on the Admin and sends it directly to the Monitor.
*/
public class AdminDirectHandler extends LogToMonitorHandler {
private final MonitorKeeper admin;
public AdminDirectHandler(MonitorKeeper admin) {
super();
this.admin = admin;
}
@Override
public void publish(LogRecord record) {
final Monitor monitor = admin.getMonitor();
if (monitor != null) {
monitor.publish(new LoggerMessage(record));
}
}
}
|
apache/commons-imaging | 1,098 | src/main/java/org/apache/commons/imaging/common/BufferedImageFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.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.imaging.common;
import java.awt.image.BufferedImage;
public interface BufferedImageFactory {
BufferedImage getColorBufferedImage(int width, int height, boolean hasAlpha);
BufferedImage getGrayscaleBufferedImage(int width, int height, boolean hasAlpha);
}
|
apache/commons-jcs | 1,089 | commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/Times.java | package org.apache.commons.jcs3.jcache;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.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.
*/
public class Times
{
public static long now(final boolean ignore)
{
if (ignore)
{
return -1;
}
return System.nanoTime() / 1000;
}
private Times()
{
// no-op
}
}
|
apache/cxf | 1,066 | rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OOBResponseDeliverer.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.rs.security.oauth2.provider;
import jakarta.ws.rs.core.Response;
import org.apache.cxf.rs.security.oauth2.common.OOBAuthorizationResponse;
public interface OOBResponseDeliverer {
Response deliver(OOBAuthorizationResponse response);
}
|
apache/cxf | 1,089 | tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/SchemaDeferredAction.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.cxf.tools.corba.processors.idl;
import org.apache.cxf.binding.corba.wsdl.CorbaTypeImpl;
import org.apache.ws.commons.schema.XmlSchemaType;
public interface SchemaDeferredAction extends DeferredAction {
void execute(XmlSchemaType stype, CorbaTypeImpl ctype);
}
|
apache/directory-server | 1,057 | kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
/**
* Provides support for Kerberos CipherText operations.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
package org.apache.directory.server.kerberos.shared.crypto.encryption;
|
apache/drill | 1,105 | exec/rpc/src/main/java/org/apache/drill/exec/rpc/RpcConnectionHandler.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.drill.exec.rpc;
public interface RpcConnectionHandler<T extends RemoteConnection> {
enum FailureType {CONNECTION, HANDSHAKE_COMMUNICATION, HANDSHAKE_VALIDATION, AUTHENTICATION}
void connectionSucceeded(T connection);
void connectionFailed(FailureType type, Throwable t);
}
|
apache/druid | 1,075 | processing/src/main/java/org/apache/druid/segment/historical/SingleValueHistoricalDimensionSelector.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.historical;
import org.apache.druid.query.monomorphicprocessing.CalledFromHotLoop;
public interface SingleValueHistoricalDimensionSelector extends HistoricalDimensionSelector
{
@CalledFromHotLoop
int getRowValue(int offset);
}
|
apache/dubbo | 1,085 | dubbo-metrics/dubbo-tracing/src/main/java/org/apache/dubbo/tracing/tracer/TracerProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.tracer;
import io.micrometer.tracing.Tracer;
public interface TracerProvider {
/**
* Tracer of Micrometer. The real tracer will come from tracer implementation (OTel / Brave)
*
* @return Tracer
*/
Tracer getTracer();
}
|
apache/dubbo | 1,095 | dubbo-common/src/test/java/org/apache/dubbo/common/extension/ext6_inject/Ext6.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.extension.ext6_inject;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.Adaptive;
import org.apache.dubbo.common.extension.SPI;
/**
* No default
*/
@SPI
public interface Ext6 {
@Adaptive
String echo(URL url, String s);
}
|
apache/eagle | 1,056 | eagle-core/eagle-alert-parent/eagle-alert/alert-devtools/src/main/java/org/apache/eagle/alert/tools/KafkaConsumerOffset.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.alert.tools;
import java.util.Map;
public class KafkaConsumerOffset {
public Map<String, String> topology;
public Long offset;
public Long partition;
public Map<String, String> broker;
public String topic;
}
|
apache/eagle | 1,079 | eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/partition/Bucket.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.security.partition;
public class Bucket {
Integer bucketNum;
Double value;
public Bucket(Integer bucketNum, Double value) {
this.bucketNum = bucketNum;
this.value = value;
}
}
|
apache/eagle | 1,096 | eagle-core/eagle-common/src/test/java/org/apache/eagle/common/TestBase64.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.eagle.common;
import org.junit.Assert;
import org.junit.Test;
/**
* @Since 11/22/16.
*/
public class TestBase64 {
@Test
public void testBase64() {
String salted = "eagle";
Assert.assertEquals(salted, Base64.decode(Base64.encode(salted)));
}
}
|
apache/falcon | 1,096 | common/src/main/java/org/apache/falcon/persistence/ResultNotFoundException.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.falcon.persistence;
import org.apache.falcon.FalconException;
/**
* Exception to be through by the bean classes.
*/
public class ResultNotFoundException extends FalconException {
public ResultNotFoundException(String message) {
super(message);
}
}
|
apache/falcon | 1,109 | oozie/src/main/java/org/apache/falcon/service/FalconPathFilter.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.falcon.service;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.PathFilter;
/**
* Path filter for considering jars for inclusion / exclusion while staging lib in oozie.
*/
public interface FalconPathFilter extends PathFilter {
String getJarName(Path path);
}
|
apache/felix-dev | 1,027 | ipojo/runtime/core-it/ipojo-core-service-dependency-policies/src/main/java/org/apache/felix/ipojo/runtime/core/test/components/inner/C1.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.ipojo.runtime.core.test.components.inner;
import org.apache.felix.ipojo.runtime.core.test.services.Call;
public class C1 implements Call {
public String callMe() {
return "called";
}
}
|
apache/felix-dev | 1,074 | ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/LifecycleQueueService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.ipojo.extender.internal;
import org.apache.felix.ipojo.extender.queue.QueueService;
/**
* An interface composing {@link QueueService} and {@link Lifecycle}.
*/
public interface LifecycleQueueService extends QueueService, Lifecycle {
}
|
apache/fineract | 1,072 | fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodStatus.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.survey.data;
/**
* Created by Cieyou on 3/12/14.
*/
public final class LikelihoodStatus {
private LikelihoodStatus() {
}
public static final long ENABLED = 200;
public static final long DISABLED = 100;
}
|
apache/geaflow | 1,056 | geaflow/geaflow-core/geaflow-engine/geaflow-cluster/src/main/java/org/apache/geaflow/cluster/common/IEventListener.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.cluster.common;
import org.apache.geaflow.cluster.protocol.IEvent;
public interface IEventListener {
/**
* Handle input event if the listener register to driver.
*/
void handleEvent(IEvent event);
}
|
apache/geaflow | 1,073 | geaflow/geaflow-core/geaflow-api/src/main/java/org/apache/geaflow/api/function/base/MapFunction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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 MapFunction<T, O> extends Function {
/**
* Process input value to produce a new record.
*/
O map(T value);
}
|
apache/geaflow | 1,074 | geaflow-console/app/biz/shared/src/main/java/org/apache/geaflow/console/biz/shared/ClusterManager.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 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.console.biz.shared;
import org.apache.geaflow.console.biz.shared.view.ClusterView;
import org.apache.geaflow.console.common.dal.model.ClusterSearch;
public interface ClusterManager extends NameManager<ClusterView, ClusterSearch> {
}
|
apache/gobblin | 1,040 | gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/source/extractor/extract/kafka/StartOffsetOutOfRangeException.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.gobblin.source.extractor.extract.kafka;
@SuppressWarnings("serial")
public class StartOffsetOutOfRangeException extends Exception {
public StartOffsetOutOfRangeException(String message) {
super(message);
}
}
|
apache/hadoop-mapreduce | 1,094 | src/test/mapred/org/apache/hadoop/mapred/TestLocalMRNotification.java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.mapred;
import java.io.IOException;
/**
* Tests Job end notification in local mode.
*/
public class TestLocalMRNotification extends NotificationTestCase {
public TestLocalMRNotification() throws IOException {
super(HadoopTestCase.LOCAL_MR);
}
}
|
apache/hadoop | 1,084 | hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/commit/magic/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This is the "Magic" committer and support.
*/
@InterfaceAudience.Private
@InterfaceStability.Unstable
package org.apache.hadoop.fs.s3a.commit.magic;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
|
apache/harmony | 1,059 | classlib/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/AnotherSamplePropertyEditor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT 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;
import java.beans.PropertyEditorSupport;
/**
* @author Maxim V. Berkultsev
*/
public class AnotherSamplePropertyEditor extends PropertyEditorSupport {
}
|
apache/harmony | 1,072 | classlib/modules/beans/src/main/java/java/beans/AwtFontTextAttributePersistenceDelegate.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package java.beans;
import java.awt.font.TextAttribute;
class AwtFontTextAttributePersistenceDelegate extends
StaticFieldPersistenceDelegate {
public AwtFontTextAttributePersistenceDelegate() {
super();
}
static {
init(TextAttribute.class);
}
}
|
apache/hbase | 1,081 | hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/GlobalProcedureInterface.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.master.procedure;
import org.apache.yetus.audience.InterfaceAudience;
/**
* Procedure interface for global operations, such as migration.
*/
@InterfaceAudience.Private
public interface GlobalProcedureInterface {
String getGlobalId();
}
|
apache/hbase | 1,106 | hbase-http/src/main/java/org/apache/hadoop/hbase/http/jmx/package-info.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This package provides access to JMX primarily through the
* {@link org.apache.hadoop.hbase.http.jmx.JMXJsonServlet} class.
* <p>
* Copied from hadoop source code.<br>
* See https://issues.apache.org/jira/browse/HADOOP-10232 to know why.
* </p>
*/
package org.apache.hadoop.hbase.http.jmx;
|
apache/hertzbeat | 1,079 | hertzbeat-common/src/main/java/org/apache/hertzbeat/common/constants/ImExportTaskConstant.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.common.constants;
/**
* Import/Export task constants
*/
public interface ImExportTaskConstant {
/**
* If the number of tasks exceeds 100, progress information will broadcast
*/
Integer IMPORT_TASK_PROCESS_THRESHOLD = 100;
}
|
apache/hive | 1,110 | ql/src/java/org/apache/hadoop/hive/ql/udf/generic/LeadLagBuffer.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hive.ql.udf.generic;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.AggregationBuffer;
interface LeadLagBuffer extends AggregationBuffer {
void initialize(int leadAmt);
void addRow(Object leadExprValue, Object defaultValue);
Object terminate();
}
|
apache/hop | 1,116 | engine/src/main/java/org/apache/hop/core/HopVersionProvider.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hop.core;
import picocli.CommandLine.IVersionProvider;
public class HopVersionProvider implements IVersionProvider {
private static final String[] VERSION = {
HopEnvironment.class.getPackage().getImplementationVersion()
};
public String[] getVersion() {
return VERSION;
}
}
|
apache/ignite | 1,068 | modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDynamicIndexAtomicPartitionedNearSelfTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.jdbc.thin;
/** */
public class JdbcThinDynamicIndexAtomicPartitionedNearSelfTest extends JdbcThinDynamicIndexAtomicPartitionedSelfTest {
/** {@inheritDoc} */
@Override protected boolean nearCache() {
return true;
}
}
|
apache/ignite | 1,074 | modules/extdata/p2p/src/main/java/org/apache/ignite/tests/p2p/CacheDeploymentAlwaysTruePredicate2.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.tests.p2p;
import org.apache.ignite.lang.IgnitePredicate;
/**
*
*/
public class CacheDeploymentAlwaysTruePredicate2 implements IgnitePredicate<Object> {
/** */
@Override public boolean apply(Object o) {
return true;
}
}
|
apache/ignite | 1,075 | modules/core/src/main/java/org/apache/ignite/internal/processors/tracing/messages/TraceableMessage.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.tracing.messages;
/**
* Interface for messages that contain trace context for an operation.
*/
public interface TraceableMessage {
/**
* @return Span Container.
*/
public SpanContainer spanContainer();
}
|
apache/ignite | 1,081 | modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/SwitchSegmentRecord.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS 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.pagemem.wal.record;
/**
* Record is needed to mark end of segment.
*/
public class SwitchSegmentRecord extends WALRecord {
/** {@inheritDoc} */
@Override public RecordType type() {
return RecordType.SWITCH_SEGMENT_RECORD;
}
}
|
apache/incubator-brooklyn | 1,048 | brooklyn-library/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseSyncGatewayDriver.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.brooklyn.entity.nosql.couchbase;
import org.apache.brooklyn.entity.software.base.SoftwareProcessDriver;
public interface CouchbaseSyncGatewayDriver extends SoftwareProcessDriver {
public String getOsTag();
} |
apache/incubator-crail | 1,104 | client/src/main/java/org/apache/crail/rpc/RpcCreateFile.java | /*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.crail.rpc;
import org.apache.crail.metadata.BlockInfo;
import org.apache.crail.metadata.FileInfo;
public interface RpcCreateFile extends RpcResponse {
public FileInfo getFile();
public FileInfo getParent();
public BlockInfo getFileBlock();
public BlockInfo getDirBlock();
}
|
apache/incubator-hugegraph | 1,065 | hugegraph-store/hg-store-test/src/main/java/org/apache/hugegraph/store/raftcore/RaftSuiteTest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hugegraph.store.raftcore;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
BytesCarrierTest.class,
ZeroByteStringHelperTest.class
})
public class RaftSuiteTest {
}
|
apache/incubator-hugegraph | 1,071 | hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/Transaction.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hugegraph.backend;
public interface Transaction {
void commit() throws BackendException;
void commitIfGtSize(int size) throws BackendException;
void rollback() throws BackendException;
boolean autoCommit();
void close();
}
|
apache/incubator-kie-kogito-runtimes | 1,034 | quarkus/addons/messaging/common/src/main/java/org/kie/kogito/addon/quarkus/messaging/common/QuarkusEmitterController.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.addon.quarkus.messaging.common;
public interface QuarkusEmitterController {
boolean resume(String channelName);
boolean stop(String channelName);
boolean isEnabled(String channelName);
}
|
apache/incubator-kie-kogito-runtimes | 1,069 | jbpm/jbpm-flow/src/main/java/org/jbpm/process/instance/event/SignalManagerFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR 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.event;
import org.drools.core.common.InternalKnowledgeRuntime;
import org.kie.kogito.signal.SignalManager;
public interface SignalManagerFactory {
SignalManager createSignalManager(InternalKnowledgeRuntime kruntime);
}
|
apache/incubator-kie-optaplanner | 1,030 | core/optaplanner-core-impl/src/test/java/org/optaplanner/core/impl/testdata/domain/clone/lookup/TestdataObjectEqualsSubclass.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.optaplanner.core.impl.testdata.domain.clone.lookup;
public class TestdataObjectEqualsSubclass extends TestdataObjectEquals {
public TestdataObjectEqualsSubclass(Integer id) {
super(id);
}
}
|
apache/incubator-seata-samples | 1,045 | at-sample/springboot-mybatis-seata/src/main/java/org/apache/seata/service/AccountService.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seata.service;
/**
* The interface Account service.
*/
public interface AccountService {
/**
* 余额扣款
*
* @param userId 用户ID
* @param money 扣款金额
*/
void debit(String userId, int money);
}
|
apache/iotdb-extras | 1,087 | mybatis-generator/src/main/java/org/apache/iotdb/mybatis/plugin/util/DateUtil.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.iotdb.mybatis.plugin.util;
import java.text.SimpleDateFormat;
import java.util.Date;
public class DateUtil {
public static String date2Str(Date date) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(date);
}
}
|
apache/jackrabbit-filevault | 1,080 | vault-diff/src/main/java/org/apache/jackrabbit/vault/util/diff/ElementsFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jackrabbit.vault.util.diff;
/**
* The elements factory provides elements for a document
*/
public interface ElementsFactory {
/**
* Provides the elements
* @return an array of elements
*/
public Document.Element[] getElements();
}
|
apache/jackrabbit-oak | 1,070 | oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/EstimationStrategy.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.jackrabbit.oak.segment.file;
interface EstimationStrategy {
interface Context {
long getSizeDelta();
long getCurrentSize();
GCJournal getGCJournal();
}
EstimationResult estimate(Context context);
}
|
apache/jena | 1,113 | jena-arq/src/main/java/org/apache/jena/atlas/json/JsonVisitor.java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jena.atlas.json;
public interface JsonVisitor
{
void visit(JsonObject jsonObject) ;
void visit(JsonArray jsonArray) ;
void visit(JsonString jsonString) ;
void visit(JsonNumber jsonNumber) ;
void visit(JsonBoolean jsonBoolean) ;
void visit(JsonNull jsonNull) ;
}
|
apache/jmeter | 1,110 | src/core/src/main/java/org/apache/jmeter/samplers/Clearable.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jmeter.samplers;
/**
* Identifies an object which supports the clearing of run-time data
* using the clearData() method.
*
* Intended for implementation by Listeners.
*/
public interface Clearable {
/**
* Clears the current data of the object.
*/
void clearData();
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.