Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
* Find the scheme for the provider of a layered file system.
* <p>
* This will check the FileContentInfo or file extension.
* @return Scheme supporting the file type or null (if unknonw).
// no specific mime-type - if it is a file also check the extension
if (!file.isFile())
... | 0 |
import org.apache.http.conn.params.ConnPerRouteBean;
HttpConnectionManagerParams.setMaxConnectionsPerRoute(params, new ConnPerRouteBean(1)); | 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... | 0 |
package org.apache.accumulo.test.randomwalk.shard;
import org.apache.accumulo.test.randomwalk.State;
import org.apache.accumulo.test.randomwalk.Test; | 0 |
@Timed("db_storage_fetch_job")
@Override
public JobConfiguration fetchJob(final String managerId, final String jobKey) {
MorePreconditions.checkNotBlank(managerId);
MorePreconditions.checkNotBlank(jobKey);
return transactionTemplate.execute(new TransactionCallback<JobConfiguration>() {
@Overrid... | 0 |
import com.google.common.base.Preconditions;
import org.apache.beam.model.pipeline.v1.RunnerApi;
Preconditions.checkState(
environment.getUrn().equals(RunnerApi.StandardEnvironments.Environments.DOCKER.toString()),
"The passed environment does not contain a DockerPayload.");
final RunnerApi.Doc... | 0 |
@NamedQuery(name = "repositoryVersionByStackNameAndVersion", query = "SELECT repoversion FROM RepositoryVersionEntity repoversion WHERE repoversion.stack.stackName=:stackName AND repoversion.version=:version")
/**
* Determine if the version belongs to the stack.
* Right now, this is only applicable for ... | 0 |
* @author <a href="mailto:haul@apache.org">Christian Haul</a>
* @version CVS $Id: ValidatorActionHelper.java,v 1.3 2004/02/15 21:30:00 haul Exp $ | 0 |
* @param charDecoder decoder to be used for decoding HTTP protocol elements.
* @param charEncoder encoder to be used for encoding HTTP protocol elements.
final CharsetDecoder charDecoder,
final CharsetEncoder charEncoder,
super(h1Config, charDecoder, charEncoder);
f... | 0 |
import static org.elasticsearch.test.ESIntegTestCase.Scope.SUITE;
// use cluster of 1 node that has data + master roles
@ESIntegTestCase.ClusterScope(scope = SUITE, numDataNodes = 1, supportsDedicatedMasters = false) | 0 |
ResolverState state,
Set<BundleRevision> mandatoryRevisions,
Set<BundleRevision> optionalRevisions,
Set<BundleRevision> ondemandFragments);
Set<BundleRevision> ondemandFragments); | 0 |
import com.google.cloud.dataflow.sdk.options.PipelineOptions;
return null; // TODO | 0 |
import org.apache.beam.vendor.grpc.v1_13_1.com.google.protobuf.NullValue;
import org.apache.beam.vendor.grpc.v1_13_1.com.google.protobuf.Struct;
import org.apache.beam.vendor.grpc.v1_13_1.com.google.protobuf.Value; | 0 |
import org.apache.hc.core5.io.ShutdownType;
conn.shutdown(ShutdownType.GRACEFUL);
conn.shutdown(ShutdownType.GRACEFUL); | 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 org.apache.beam.sdk.values.WindowingStrategy; | 0 |
* This is based on {@link org.apache.beam.runners.dataflow.DataflowPipelineTranslator} | 0 |
return allEvents
.apply(Filter.by(IS_BID))
.apply(getName() + ".SelectEvent", new SelectEvent(Type.BID))
.apply(QUERY)
.apply(Convert.fromRows(Bid.class)); | 0 |
import org.apache.flink.api.java.operators.DataSink;
DataSink<T> dataSink = inputDataSet.writeAsText(filenamePrefix);
if (numShards > 0) {
dataSink.setParallelism(numShards);
} | 0 |
import org.apache.commons.vfs.FileName;
FileName parseURI(String uri) throws FileSystemException;
| 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 ... | 0 |
* @version $Revision$ $Date$ | 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 |
assertTrue(uuid.createNewFile());
assertTrue(instanceId.mkdir() || instanceId.isDirectory());
assertTrue(uuid.createNewFile()); | 0 |
processFn.setStateInternalsFactory(key -> (StateInternals) stepContext.stateInternals());
processFn.setTimerInternalsFactory(key -> stepContext.timerInternals());
return (options,
fn,
sideInputs,
sideInputReader,
outputManager,
mainOutputTag,
additionalOutputT... | 0 |
package org.apache.felix.gogo.runtime; | 0 |
Copyright 2001,2003 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... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/SetRootRule.java,v 1.9 2003/10/05 15:06:50 rdonkin Exp $
* $Revision: 1.9 $
* $Date: 2003/10/05 15:06:50 $
*
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
*... | 0 |
import org.apache.felix.sigil.eclipse.internal.repository.manager.RepositoryMap;
import org.apache.felix.sigil.eclipse.model.project.IRepositoryMap.RepositoryCache; | 0 |
@Mock JobInvoker invoker;
@Mock JobInvocation invocation;
JobApi.PrepareJobRequest.newBuilder() | 1 |
import org.apache.sshd.common.session.SessionContext;
SessionContext session, String resourceKey,
String beginMarker, String endMarker,
FilePasswordProvider passwordProvider,
InputStream stream)
PrivateKey prvKey = decodePEMPrivateKeyPKCS8(oidAlgorithm, encBytes);... | 0 |
this(pipeline, ImmutableList.of()); | 0 |
* @param buffer the buffer from which to parse
* @param indexFrom where to start parsing in the buffer
* @param indexTo where to stop parsing in the buffer
* | 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
... | 0 |
map.put(Integer.valueOf(20), "Five"); | 0 |
private static final int DEFAULT_MAXIMUM_CACHE_SIZE = 20;
private transient Node<E> firstCachedNode;
private transient int cacheSize;
private int maximumCacheSize; | 1 |
* @param params the configuration parameters
final File workDir = (File) m_context.get(Constants.CONTEXT_WORK_DIR);
| 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... | 0 |
@Test
public void testAgainstURI() throws Exception {
// Check that the URI generated by URI builder agrees with that generated by using URI directly
final String scheme="https";
final String host="localhost";
final String specials="/abcd!$&*()_-+.,=:;'~@[]?<>|#^%\"{}\\`xyz"; // ... | 0 |
import java.io.OutputStream;
import org.apache.sshd.util.TeeOutputStream;
OutputStream pipedIn = channel.getInvertedIn(); | 0 |
* <p>
* <p>
* See <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/package-summary.html"
* <p>The result is the (possibly empty) set of specifications that match. | 0 |
import org.apache.http.client.protocol.HttpClientContext;
public synchronized final HttpContext getDefaultContext() {
populateContext(defaultContext);
context = new HttpClientContext(getDefaultContext());
context = new HttpClientContext(getDefaultContext()); | 0 |
package org.apache.accumulo.shell.commands;
import org.apache.accumulo.shell.Shell;
import org.apache.accumulo.shell.Token;
import org.apache.accumulo.shell.Shell.Command; | 0 |
QuorumPeer peer = new QuorumPeer(peers, tmpdir[1], tmpdir[1], port[1], 3, 1, 1000, 2, 2, 2);
QuorumPeer peer = new QuorumPeer(peers, tmpdir[0], tmpdir[0], port[0], 3, 0, 1000, 2, 2, 2); | 0 |
import org.apache.accumulo.core.conf.ClientConfiguration;
AccumuloOutputFormat.setZooKeeperInstance(job, ClientConfiguration.loadDefault().withInstance(instance).withZkHosts(zookeepers)); | 0 |
import com.twitter.mesos.gen.GetJobsResponse;
public GetJobsResponse getJobs(String ownerRole) {
return schedulerController.getJobs(ownerRole);
}
@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... | 1 |
package org.apache.cocoon.spring.configurator.impl;
import org.apache.cocoon.spring.configurator.ResourceUtils; | 0 |
LOG.debug("Calculated Digest: {}", calculatedDigest);
LOG.debug("Calculated Digest: {}", calculatedDigest); | 1 |
package org.apache.accumulo.core.util.shell.commands;
import java.io.File;
import org.apache.accumulo.core.util.shell.Shell;
import org.apache.accumulo.core.util.shell.Shell.Command;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
public class ... | 1 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
* @version $Id$ | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/MappedPropertyDescriptor.java,v 1.13 2002/12/09 22:33:03 rwaldhoff Exp $
* $Revision: 1.13 $
* $Date: 2002/12/09 22:33:03 $
* @version $Revision: 1.13 $ $Date: 2002/12/09 22:33:03 $... | 0 |
import java.io.IOException;
if (argv.length != 1) {
System.out.println("Usage: BCELifier classname");
System.out.println("\tThe class must exist on the classpath");
return;
}
JavaClass java_class = getJavaClass(argv[0]);
BCELifier bcelifier = new BCELi... | 0 |
content = updateLuceneMatchVersion(content, "7.3.1");
content = updateLuceneMatchVersion(content,"7.3.1"); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestCommonsLinkedList.java,v 1.7 2003/10/06 21:02:50 scolebourne Exp $
* @version $Revision: 1.7 $ $Date: 2003/10/06 21:02:50 $
return "3"; | 0 |
* @version CVS $Id: DefaultSelectionListBuilder.java,v 1.3 2004/03/28 20:51:24 antonio Exp $
if (source != null) {
}
if (resolver != null) {
} | 0 |
AgentCommand scheduledCommand = ac.get(0);
assertTrue(scheduledCommand instanceof ExecutionCommand);
assertEquals("1-977", ((ExecutionCommand) scheduledCommand).getCommandId());
assertEquals(clusterHostInfo, ((ExecutionCommand) scheduledCommand).getClusterHostInfo());
ac = waitForQueueSize(hostname,... | 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... | 1 |
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may... | 0 |
private final ArrayList<InputStream> inputStreamList = new ArrayList<>();
private final ArrayList<RandomAccessContent> randomAccessContentList = new ArrayList<>();
private DefaultFileContent.FileContentOutputStream outputStream;
void addInstr(final InputStream inputStream)
this.inputStreamList.a... | 0 |
Document doc = XMLUtils.newDocument(true, false);
Document doc = XMLUtils.newDocument(false); | 0 |
getListIterator().add(object);
getListIterator().set(object); | 0 |
rounds = Integer.parseInt(m.group(3)); | 0 |
}
if (Throwable.class.isAssignableFrom(actualType)) {
Throwable t = GenericUtils.peelException((Throwable) value);
if (t != value) {
value = t;
actualType = value.getClass();
}
if (IOException.class.isAssignableFrom(actual... | 0 |
}, false); | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Lists;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Sets; | 0 |
*
*
* @param session The {@link ServerSession} attempting the authentication | 1 |
private Object[] getJobReturns;
private transient int getJobCallsCount;
this.getJobReturns = new Object[0];
this.getJobCallsCount = 0;
* Sets the return values to mock {@link JobService#getJob}.
*
* <p>Throws if the {@link Object} is a {@link InterruptedException}, returns otherwise.
... | 0 |
import org.apache.http.conn.routing.HttpRoutePlanner; | 0 |
*
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
public class ObjectClassDefinitionImpl implements ObjectClassDefinition {
public ObjectClassDefinitionImpl(String id, String name, String description, List propertiesMetaData, Resource resource) {
public AttributeDefinition[] getAttribu... | 0 |
public static final String EXT_SPACE_AVAILABLE = "space-available"; | 0 |
* @deprecated (4.3) use {@link org.apache.http.conn.socket.ConnectionSocketFactory}
* Please note that {@link org.apache.http.conn.HttpInetSocketAddress} class should
* be used in order to pass the target remote address along with the original
* {@link org.apache.http.HttpHost} value used to resolve the... | 0 |
private InetAddress[] translateIp(final String ip) throws UnknownHostException { | 0 |
import org.apache.ambari.server.AmbariException; | 0 |
additionalInputs.put(sideInput.getTagInternal(), sideInput.getPCollection());
additionalInputs.put(sideInput.getTagInternal(), sideInput.getPCollection()); | 0 |
/** Map decorator for this DynaBean */
private transient Map mapDecorator;
/**
* Return a Map representation of this DynaBean.
* </p>
* This, for example, could be used in JSTL in the following way to access
* a DynaBean's <code>fooProperty</code>:
* <ul><li><code>${myDynaBean.<b>m... | 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 |
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> | 0 |
public static final String USE_GROUPBY_AGGREGATOR_QUERIES =
"timeline.metrics.service.use.groupBy.aggregators";
public static final String HANDLER_THREAD_COUNT =
"timeline.metrics.service.handler.thread.count";
public int getTimelineMetricsServiceHandlerThreadCount() {
if (metricsConf != null) {
... | 0 |
PCollection<KV<String, Long>> leftCollection = p
.apply("CreateLeft", Create.of(leftListOfKv));
PCollection<KV<String, String>> rightCollection = p
.apply("CreateRight", Create.of(listRightOfKv));
PCollection<KV<String, Long>> leftCollection = p
.apply("CreateLeft", Create.of(leftLis... | 0 |
* dynaClass.add("orders", java.util.TreeMap.class); // add mapped property
* dynaClass.add("myMap", java.util.TreeMap.class); // add mapped property | 0 |
target.addEventListener(SVG_EVENT_CLICK,
target.addEventListener(SVG_EVENT_MOUSEOVER,
target.addEventListener(SVG_EVENT_MOUSEOUT,
false);
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/NonSerializableLongCollectionCollection.java,v 1.3 2003/11/07 20:07:51 rwaldhoff Exp $
*
* @deprecated This code has been moved to Jakarta Commons Prim... | 0 |
* Copyright (C) 2015 Google Inc. | 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 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestCircularFifoBuffer.java,v 1.3 2003/08/31 17:28:43 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may app... | 0 |
import java.util.Collections;
import java.util.List;
public class RangeExpression extends AbstractFunctionExpression {
private TraversalStepType stepType;
private int startIndex;
private int endIndex;
public RangeExpression(TraversalStepType stepType, GroovyExpression parent, int offset, int count) {
... | 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 |
import com.google.common.collect.Sets; | 0 |
List<BundleCapability> capList =
new ArrayList<BundleCapability>(m_revision.getDeclaredCapabilities(null));
List<BundleRequirement> reqList =
new ArrayList(m_revision.getDeclaredRequirements(null)); | 0 |
* @version $Revision: 1.5 $ $Date: 2002/10/21 01:40:38 $
throw new FileSystemException( "vfs.impl/init-replicator.error", null, e );
throw new FileSystemException( "vfs.impl/replicate-file.error", new Object[]{srcFile.getName()}, e ); | 0 |
impl = new DefaultHostnameVerifier();
impl.verify("\u82b1\u5b50.foo.com", x509);
impl.verify("\u82b1\u5b50.bar.com", x509); | 0 |
Copyright 2000-2001,2003 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 applica... | 0 |
public MetricDefinition(String type, Map<String, String> properties, Map<String, Map<String, Metric>> metrics) {
this.type = type;
this.properties = properties;
this.metrics = metrics;
}
| 0 |
/*
* Copyright 1999-2005 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 |
this(file.readUnsignedShort(), file.readUnsignedShort());
* @param name_index the name index of this constant
* @param signature_index the signature index in the constant pool of this type | 0 |
import static org.junit.Assert.assertEquals;
import com.google.cloud.dataflow.sdk.util.common.worker.StateSampler.ScopedState;
@Test
public void reuseStateByNameTest() throws Exception {
StateSampler stateSampler = new StateSampler("test-",
new CounterSet().getAddCounterMutator(), 200);
int state1 ... | 0 |
@Test
public void testStartClientComponent() {
// FIXME write test after meta data integration
// start should fail
}
@Test
public void testStartClientHostComponent() {
// FIXME write test after meta data integration
// start should fail
}
| 0 |
exchangeHandler.failed(new ConnectionClosedException()); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.