Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
/**
* Returns the state cell for the given {@link StateId}.
*/
State state(String stateId);
/**
* Returns the timer for the given {@link TimerId}.
*/
Timer timer(String timerId);
@Override
public State state(String stateId) {
return null;
}
@Override
publ... | 0 |
import com.google.common.collect.Iterables; | 0 |
import org.apache.sshd.util.test.BaseTestSupport;
public class WindowAdjustTest extends BaseTestSupport {
sshServer = setupTestServer();
try (SshClient client = setupTestClient()) { | 0 |
* $Id: BugsTest.java,v 1.12 2002/11/25 23:43:41 jkeyes Exp $
public void test14786() {
Option o = OptionBuilder.isRequired().withDescription("test").create("test");
Options opts = new Options();
opts.addOption(o);
opts.addOption(o);
CommandLineParser parser = new GnuParser... | 0 |
public FileTxnSnapLog(File dataDir, File snapDir) {
this.dataDir.mkdirs();
this.snapDir.mkdirs(); | 0 |
assertEquals((Integer) 1, ds.getPerUserDefaultTransactionIsolation("key"));
assertEquals((Integer) 0, ds.getPerUserDefaultTransactionIsolation("key"));
assertEquals(null, ds.getPerUserDefaultTransactionIsolation("key"));
assertEquals((Integer) 0, ds.getPerUserDefaultTransactionIsolation(... | 0 |
import org.apache.accumulo.core.clientImpl.Tables;
import org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException; | 0 |
* Copyright 2007-2009 The Apache Software Foundation.
tf.newTransformer(); | 0 |
package org.apache.beam.examples.cookbook;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.io.BigQueryIO;
import org.apache.beam.sdk.io.TextIO;
import org.apache.beam.sdk.options.Description;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
... | 0 |
* Copyright 2002,2004 The Apache Software Foundation.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... | 0 |
* This is a simple example of validating an XML
* validate the signature is contained in a KeyValue KeyInfo.
NodeList nl =
// Create a DOM XMLSignatureFactory that will be used to unmarshal the
// document containing the XMLSignature
boolean coreValidity = signature.validate(valContex... | 1 |
/** Tests for {@link NameUtils}. */
@Rule public ExpectedException thrown = ExpectedException.none();
/** Inner class for simple name test. */
AnonymousClass anonymousClassObj =
new AnonymousClass() {
class NamedInnerClass extends PTransform<PBegin, PDone> {
@Override
p... | 1 |
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
* permission of the Apache Software Foundation. | 0 |
System.out.println("Configuring sample components ... please consult log messages to see example output, like this:");
System.out.println("\"log warn\""); | 0 |
final ConcurrentMap<
KV<String, BeamFnApi.Target>, CompletableFuture<Consumer<BeamFnApi.Elements.Data>>>
consumers;
KV<String, BeamFnApi.Target> key) {
(KV<String, BeamFnApi.Target> providedKey) -> new CompletableFuture<>());
KV<String, BeamFnApi.Target> key = | 0 |
package org.apache.commons.vfs2.provider.res;
import org.apache.commons.vfs2.Capability;
import org.apache.commons.vfs2.FileObject;
import org.apache.commons.vfs2.FileSystem;
import org.apache.commons.vfs2.FileSystemConfigBuilder;
import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.FileSy... | 1 |
byte[] ret = new byte[escapeCount + in.length];
byte[] ret = new byte[in.length - escapeCount];
byte[] ret = new byte[len + fields.length - 1]; | 0 |
* @version CVS $Id: PipelineNode.java,v 1.15 2004/03/18 15:08:13 cziegeler Exp $
if (!externalRequest && !env.isInternalRedirect()) { | 0 |
import org.apache.accumulo.core.util.Pair;
Pair<Text,Text> pcic = ColumnSet.decodeColumns(column);
if (pcic.getSecond() == null) {
addObject(pcic.getFirst(), clazz.newInstance());
addObject(pcic.getFirst(), pcic.getSecond(), clazz.newInstance()); | 0 |
contents.compareAndSet(null, Collections.emptyList()); | 0 |
import org.apache.accumulo.core.security.Credentials;
Credentials credentials = new Credentials("root", new PasswordToken("")); | 0 |
public String toString()
{
return resource + ":" + capability;
} | 0 |
@com.fasterxml.jackson.annotation.JsonProperty("status")
@com.fasterxml.jackson.annotation.JsonProperty("status")
@com.fasterxml.jackson.annotation.JsonProperty("cause")
@com.fasterxml.jackson.annotation.JsonProperty("cause") | 1 |
* @throws ArrayIndexOutOfBoundsException if either of the parameters is out of range | 0 |
PropertyHelper.replaceAll(globalSitemapVariables, settings);
PropertyHelper.replaceAll(properties, parent); | 0 |
BeanFactory factory = beanFactories.get(factoryName); | 0 |
import static java.util.Arrays.asList;
import com.google.common.collect.Iterables;
import java.util.Iterator;
import java.util.List; | 0 |
logger.log(
owner.getBundle(),
Logger.LOG_WARNING,
"Only R4 bundles can be fragments: " + s); | 1 |
LOG.debug("Found group responses matching get group request, groupRequestSize={}, groupResponseSize={}", requests.size(), responses.size()); | 1 |
import org.apache.felix.ipojo.test.scenarios.ps.service.CheckService;
import org.apache.felix.ipojo.test.scenarios.ps.service.FooService; | 0 |
import org.apache.beam.sdk.annotations.Experimental;
@Experimental(Experimental.Kind.SOURCE_SINK)
public class FakeDatasetService implements DatasetService, Serializable {
public List<TableRow> getAllRows(String projectId, String datasetId, String tableId) | 0 |
getLog().warn(
"Ignoring project type " + projectType + " - supportedProjectTypes = " + supportedProjectTypes );
if ( !properties.containsKey( Analyzer.EXPORT_PACKAGE ) && !properties.containsKey( Analyzer.PRIVATE_PACKAGE ) )
String combinedResource = StringUtils
... | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; | 0 |
* Copyright 1999-2009 The Apache Software Foundation. | 0 |
import org.junit.FixMethodOrder;
import org.junit.runners.MethodSorters;
@FixMethodOrder(MethodSorters.NAME_ASCENDING) | 0 |
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
* permission of the Apache Software Foundation. | 0 |
package org.apache.commons.ognl;
return "org.apache.commons.ognl.OgnlOps.less"; | 0 |
BCFile.Writer _cbw = new BCFile.Writer(dos, null, "gz", conf, | 0 |
import org.apache.beam.sdk.values.Row;
* which can be evaluated against the {@link Row}.
public List<Object> execute(Row inputRow, BoundedWindow window) { | 0 |
@Override | 0 |
/*
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | 0 |
@Override
public void waitForBalance() throws AccumuloException {
} | 0 |
@Deprecated | 0 |
import com.google.common.net.InetAddresses;
private static final Protos.MasterInfo MASTER = Protos.MasterInfo.newBuilder()
.setId("master-id")
.setIp(InetAddresses.coerceToInteger(InetAddresses.forString("1.2.3.4"))) //NOPMD
.setPort(5050).build();
MASTER); | 0 |
private Long clusterId;
public Long getClusterId() {
public void setClusterId(Long clusterId) {
private Long requestId;
public Long getRequestId() {
public void setRequestId(Long requestId) {
private Long stageId = 0L;
public Long getStageId() {
public void setStageId(Long stageId) { | 1 |
host = new HttpHost("foo.example.com", 80); | 0 |
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not... | 0 |
import java.io.DataInput;
ConstantClass(DataInput file) throws IOException { | 0 |
public abstract class NexmarkQueryModel<T extends KnownSize> implements Serializable {
public abstract AbstractSimulator<?, T> simulator();
Iterable<TimestampedValue<T>> relevantResults(Iterable<TimestampedValue<T>> results) {
protected abstract Collection<String> toCollection(Iterator<TimestampedValue<T>> itr);
... | 0 |
if (!getComponentMetadata().isPersistentFactoryComponent())
if ( instance == null || (!getComponentMetadata().isPersistentFactoryComponent() && instance.getInstance() == null) )
if ( getComponentMetadata().isPersistentFactoryComponent() )
return new SingleComponentManager<S>( getActivat... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/Digester.java,v 1.83 2003/10/09 21:09:46 rdonkin Exp $
* $Revision: 1.83 $
* $Date: 2003/10/09 21:09:46 $
* Alternately, this acknowledgement may appear in the software itself,
* ... | 0 |
import org.apache.hc.core5.annotation.Contract;
import org.apache.hc.core5.annotation.ThreadingBehavior;
@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL) | 0 |
/* $Id: FinderFromDfltClass.java,v 1.5 2004/05/10 06:34:01 skitching Exp $
* Copyright 2004 The Apache Software Foundation. | 0 |
import aQute.bnd.osgi.Analyzer;
import aQute.bnd.osgi.Builder;
import aQute.bnd.osgi.Constants;
import aQute.bnd.osgi.EmbeddedResource;
import aQute.bnd.osgi.FileResource;
import aQute.bnd.osgi.Jar;
import aQute.bnd.osgi.Processor; | 0 |
* @version CVS $Id: PlainIntegerConvertorBuilder.java,v 1.3 2004/02/11 09:53:45 antonio Exp $ | 0 |
import java.io.IOException;
* @throws java.io.IOException if something bad happens while trying to read the body from the original entry
public CacheEntry updateCacheEntry(
CacheEntry entry,
Date requestDate,
Date responseDate,
HttpResponse response) throws IOExc... | 0 |
public void addElement(E element);
public void addElements(Collection<? extends E> elements); | 0 |
/**
* Try to find class source via getResourceAsStream()
* @return JavaClass object for given runtime class
*/
public static JavaClass lookupClass(Class clazz) {
String class_name = clazz.getName();
JavaClass j_class = (JavaClass)classes.get(class_name);
if(j_class == null) {
String nam... | 0 |
* Copyright (c) 2002, 2003 The Apache Software Foundation. All rights
* @version $Revision: 1.3 $ $Date: 2003/02/12 07:56:13 $ | 0 |
package org.apache.commons.cli;
import junit.framework.TestCase;
| 0 |
public class AvalonServiceSelector
implements BeanFactoryAware, ServiceSelector { | 0 |
import com.google.cloud.dataflow.sdk.options.PipelineOptions;
import com.google.cloud.dataflow.sdk.transforms.windowing.BoundedWindow;
import com.google.cloud.dataflow.sdk.values.PCollectionView;
import org.joda.time.Instant;
import java.util.Collection;
fn.startBundle(ctxt);
fn.finishBundle(ctxt);
public <... | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.util.concurrent.ForwardingExecutorService; | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables; | 0 |
Configuration hadoopConf) {
this.conf = new SerializableWritable<>(Objects.requireNonNull(hadoopConf)); | 0 |
import org.apache.accumulo.core.security.thrift.TCredentials;
public MetaDataTableScanner(Instance instance, TCredentials auths, Range range, CurrentState state) {
public MetaDataTableScanner(Instance instance, TCredentials auths, Range range) { | 1 |
/** {@inheritDoc} */
@Override
protected boolean isConstant(boolean literal) {
return true;
} | 0 |
// Create the instance creator if needed.
if (outsiders.length > 0) {
m_creator = new InstanceCreator(m_bundleContext, outsiders);
} | 0 |
import org.apache.hadoop.hive.shims.Utils;
import org.apache.hadoop.security.UserGroupInformation;
final UserGroupInformation ugi = hookContext.getUgi() == null ? Utils.getUGI() : hookContext.getUgi();
super.notifyEntities(event.getNotificationMessages(), ugi); | 0 |
import com.google.cloud.dataflow.sdk.testing.PAssert;
PAssert.that(output).containsInAnyOrder(ARBITRARY_KVS);
PAssert.that(output).containsInAnyOrder(GROUPED_TESTABLE_KVS);
PAssert.that(output).containsInAnyOrder(GROUPED_TESTABLE_KVS);
PAssert.that(output).containsInAnyOrder(GROUPED_TESTABLE_KVS);
P... | 0 |
ComponentServiceTest.class, HostComponentServiceTest.class, ReadHandlerTest.class, | 0 |
private static final Map<ListDataSink<?>, List<List<?>>> storage =
public synchronized void commit() throws IOException {
@SuppressWarnings("unchecked")
storage.put((ListDataSink) this, (List) outputs);
return (List) storage.get(this); | 0 |
+ request.getRequestURL(); | 1 |
Set<String> allClusterSet = new HashSet<String>();
allClusterSet.add(hostRequest.getClusterName());
for (String clusterName : allClusterSet) {
clusters.getCluster(clusterName).recalculateAllClusterVersionStates();
}
if (null != request.getClusterName() && !request.getClusterName().isEm... | 0 |
import java.util.concurrent.TimeUnit;
import org.apache.sshd.util.test.BaseTestSupport;
import org.apache.sshd.util.test.JSchLogger;
import org.apache.sshd.util.test.SimpleUserInfo;
Thread.sleep(TimeUnit.SECONDS.toMillis(1L)); | 0 |
import org.apache.http.auth.CredentialsProvider;
* Attribute name of a {@link CredentialsProvider} | 0 |
import org.xml.sax.Attributes;
public List<Rule> match( String namespaceURI, String pattern, String name, Attributes attributes )
if ( namespaceURI != null )
if ( nsUri != null && !nsUri.equals( namespaceURI ) ) | 0 |
package org.apache.beam.sdk.transforms;
import static org.apache.beam.sdk.testing.SystemNanoTimeSleeper.sleepMillis;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.testing.TestPipeline; | 0 |
package org.apache.felix.sigil.eclipse.install; | 0 |
@SuppressWarnings("deprecation")
private final Collection<? extends Header> defaultHeaders;
/**
* @since 4.3
*/
public RequestDefaultHeaders(final Collection<? extends Header> defaultHeaders) {
this.defaultHeaders = defaultHeaders;
}
public RequestDefaultHeaders() {
this(... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMAttributeIterator.java,v 1.5 2003/10/09 21:31:41 rdonkin Exp $
* $Revision: 1.5 $
* $Date: 2003/10/09 21:31:41 $
* any, must include the following acknowledgement:
*... | 0 |
import org.apache.accumulo.core.Constants;
log.error(" saw = " + new String(entry.getValue().get()) + " expected = " + new String(value, Constants.UTF8)); | 0 |
if (doTimestamps) {
if (showTimestamps) {
protected Date initialValue() {
| 0 |
value = getParentInterpolator().lookup(name);
value = getParentInterpolator().lookup(var); | 0 |
* @throws org.apache.commons.beanutils.ConversionException if conversion cannot be performed | 0 |
return type == Constants.ITEM_Object || type == Constants.ITEM_NewObject; | 0 |
package org.apache.hc.core5.http.io.support;
import org.apache.hc.core5.http.io.HttpRequestHandler; | 0 |
/**
* 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
* distribu... | 0 |
import org.apache.commons.vfs.provider.TemporaryFileStore;
public FileObject toFileObject( File file )
/**
* Locates a temporary file store for the provider to use.
*/
public TemporaryFileStore getTemporaryFileStore() throws FileSystemException
{
return manager.getTemporaryFileStore()... | 0 |
AccumuloConfiguration configuration = SiteConfiguration.getInstance(); | 0 |
* When a property name contains dots ("."), then since it's not possible to declare a lambda parameter with some dots, you can
* encode the dots using some underscores. A single underscore is then converted to a dot, unless is it followed by another
* underscore in which case the two consecutive underscores ("__") a... | 0 |
import org.apache.cocoon.portal.services.aspects.RequestProcessorAspect;
import org.apache.cocoon.portal.services.aspects.ResponseProcessorAspect;
void register(ResponseProcessorAspect aspect);
void register(RequestProcessorAspect aspect); | 0 |
Iterable<WindowedValue<InputT>> concatElements = Iterables.concat(windowsExpandedElements);
// Bump the counter separately since we don't want multiple iterations to
// increase it multiple times.
for (WindowedValue<InputT> input : concatElements) {
BoundedWindow window = Iterables.getO... | 0 |
import java.nio.charset.Charset;
import org.apache.http.Consts;
public static final Charset DEF_CONTENT_CHARSET = Consts.ISO_8859_1;
public static final Charset DEF_PROTOCOL_CHARSET = Consts.ASCII;
@Deprecated
@Deprecated
@Deprecated
@Deprecated
@Deprecated
@Deprecated
public s... | 0 |
try (BatchWriter bw = context.createBatchWriter(ReplicationTable.NAME, | 0 |
public synchronized boolean updateState(
final ScheduleStatus status, | 0 |
protected Iterator<String> getKeysInternal(String prefix)
@Override
protected Iterator<String> getKeysInternal() | 0 |
try {
_createUser(credentials, creds, Authorizations.EMPTY);
} catch (ThriftSecurityException e) {
if (SecurityErrorCode.USER_EXISTS != e.getCode()) {
// For Kerberos, a user acct is automatically created because there is no notion of a password
... | 0 |
package org.apache.ambari.view.huetoambarimigration.model;
public class PojoHive { | 0 |
private Map<String, BackgroundJob> jobs = new HashMap<String, BackgroundJob>();
public void startJob(final String key, Runnable runnable) {
interrupt(key);
jobs.get(key).getJobThread().join();
} catch (BackgroundJobException e) {
t.setUncaughtExceptionHandler(new Thread.UncaughtExceptionH... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.