Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
Copyright 2000 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 a... | 0 |
log.debug("Configuration DistributedWorkQueue with delay and period of {} and {}", delay,
period);
workQueue = new DistributedWorkQueue(
ZooUtil.getRoot(inst) + ReplicationConstants.ZOO_WORK_QUEUE, conf, delay, period);
workQueue = new DistributedWorkQueue(
Zo... | 0 |
package org.apache.beam.sdk.extensions.sql;
import org.apache.beam.sdk.extensions.sql.schema.BeamSqlRow;
import org.apache.beam.sdk.extensions.sql.schema.BeamSqlRowType;
import org.apache.beam.sdk.extensions.sql.schema.BeamSqlUdaf;
import org.apache.beam.sdk.extensions.sql.schema.BeamSqlUdf;
public static class Cubic... | 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 |
static TransformerFactory transformerFactory = TransformerFactory.newInstance();
static Map<URL,Templates> cache = new ConcurrentHashMap<URL,Templates>();
public static void transform(TransformerFactory transformerFactory, URL xslt, InputStream in, OutputStream out)
throws Exception {
if (xslt == null)
... | 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 |
* Decorates another {@link Bag} to transform objects that are added.
* @version $Id$ | 0 |
public class NOPTransformer<T> implements Transformer<T, T>, Serializable {
public static final Transformer<Object, Object> INSTANCE = new NOPTransformer<Object>();
@SuppressWarnings("unchecked")
public static <T> Transformer<T, T> getInstance() {
return (Transformer<T, T>) INSTANCE;
public T tr... | 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... | 0 |
* @param storageKey storage key under which the entry will
} | 0 |
@Override
@Override
@Override
@Override
@Override
@Override | 0 |
@Override
@Override | 0 |
/**
* Interface to control runtime properties of a connection pool such as
* maximum total number of connections or maximum connections per route
* allowed.
*
* @param <T> route
*/ | 0 |
* {@code true} if manual verification tasks should be automatically skipped.
*/
private boolean m_autoSkipManualVerification = false;
/**
* @param autoSkipComponentFailures
/**
* Gets whether manual verification tasks can be automatically skipped.
*
* @return the skipManualVerification
*/
... | 0 |
import org.apache.hc.core5.http.HttpHost; | 0 |
package org.apache.beam.sdk.util;
import static org.apache.beam.sdk.util.CoderUtils.decodeFromByteArray;
import static org.apache.beam.sdk.util.CoderUtils.encodeToByteArray;
import org.apache.beam.sdk.coders.Coder;
import org.apache.beam.sdk.coders.CoderException; | 0 |
* Copyright 2001-2005 The Apache Software Foundation | 0 |
this.remove( event.getTarget() ); | 0 |
import org.junit.experimental.categories.Category;
@Category({ category.KerberosTest.class}) | 0 |
BeamFnControlGrpc.newStub(channelFactory.forDescriptor(apiServiceDescriptor))::control, | 0 |
Collectors.toMap(kv -> kv.getKey().toString(), kv -> kv.getValue().get(), Long::sum));
private final SerializableFunction<InputT, OutputT> transformFn;
private final String outputDirPath;
private final Class<?> keyClass;
private final Class<?> valueClass; | 0 |
import org.apache.sshd.common.kex.KexFactoryManager;
extends KexFactoryManager,
SessionListenerManager, | 0 |
fail("Expected IllegalStateException");
fail("Expected IllegalStateException"); | 0 |
import org.apache.accumulo.harness.AccumuloClusterHarness;
public class BatchScanSplitIT extends AccumuloClusterHarness { | 0 |
import org.apache.felix.scr.impl.helper.ActivatorParameter;
private boolean createComponent(ComponentContextImpl<S> componentContext)
}, componentContext );
protected S createImplementationObject( Bundle usingBundle, SetImplementationObject<S> setter, ComponentContextImpl<S> componentContext )
... | 0 |
identifier.setSymbol(register.intValue(), image);
identifier.setSymbol(register.intValue(), image);
* @param identifier the parameter name
public void declareParameter(String identifier) {
frame.declareParameter(identifier); | 1 |
@Override
public AsyncExecRuntime fork() {
return new InternalHttpAsyncExecRuntime(log, manager, connectionInitiator, versionPolicy);
}
| 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterators;
// Say for Row R, there are m instances on left and n instances on right,
// EXCEPT ALL outputs MAX(m - n, 0) instances of R.
} else if (leftRows.iterator().hasNext() && rightRows.iterator().hasNext()) {
... | 0 |
assertTrue(rei.validateOptions(is.getOptions()));
assertTrue(rei.validateOptions(is.getOptions()));
assertTrue(rei.validateOptions(is.getOptions()));
assertTrue(rei.validateOptions(is.getOptions())); | 0 |
package org.apache.xml.security.stax.impl.stax;
import org.apache.xml.security.stax.ext.stax.XMLSecCharacters;
import org.apache.xml.security.stax.ext.stax.XMLSecStartElement; | 0 |
* <li>Else treat as BigInteger, perform operation and attempt to narrow result:
* <ol>
* <li>if both arguments can be narrowed to Integer, narrow result to Integer</li>
* <li>if both arguments can be narrowed to Long, narrow result to Long</li>
* <li>Else return result as BigInteger</li>
* </ol>
* Given a Bi... | 0 |
.withSvc(Sequencer.class, srv->srv.autoConfig("m_sequencer"))
.withSvc(ServiceInterface.class, srv->srv.filter("(foo=bar)").autoConfig("m_service")));
.withSvc(Sequencer.class, srv->srv.autoConfig("m_sequencer"))
.withSvc(ServiceProvider2.class, srv->srv.a... | 0 |
import org.apache.http.util.Args;
Args.notNull(dateValue, "Date value");
Args.notNull(date, "Date");
Args.notNull(pattern, "Pattern"); | 0 |
final LocalFileName rootName = (LocalFileName)name;
return new LocalFileSystem( rootName, rootName.getRootFile() ); | 0 |
entity.setHomeId(GraphHelper.getHomeId(entityVertex));
| 0 |
JSONObject response = atlasClientV1.callAPIWithBody(AtlasClient.API_V1.CREATE_TYPE, typesAsJSON);
JSONObject response = atlasClientV1.callAPIWithBodyAndParams(AtlasClient.API_V1.LIST_TYPES, null, typeDefinition.typeName);
JSONObject response = atlasClientV1.callAPIWithBodyAndParams(A... | 0 |
return new SmbFileSystem( name ); | 0 |
if ((size < maxFree) && (maxFree - size > packetSize * 3 || size < maxFree / 2)) { | 0 |
import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
import org.apache.accumulo.server.security.AuditedSecurityOperation;
import org.apache.accumulo.server.security.SystemCredentials;
// remove any permissions associated with this table namespace
try {
AuditedSecurityOperation.getIn... | 0 |
IOUtils.copy(null, writer, "UTF8");
IOUtils.copy(in, null, "UTF8");
IOUtils.copy(null, out, "UTF16");
IOUtils.copy(reader, null, "UTF16"); | 1 |
Map<String, String> properties = new HashMap<>();
Map<String, Map<String, String>> propertiesAttributes = new HashMap<>();
Map<String, String> attributes = new HashMap<>();
Map<String, Config> configs = new HashMap<>();
Map<Long, Host> hosts = new HashMap<>();
Map<String, String> properties = ne... | 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 not... | 0 |
import org.apache.batik.util.SVGTypes;
* Implements {@link ValueManager#isAnimatableProperty()}.
*/
public boolean isAnimatableProperty() {
return true;
}
/**
* Implements {@link ValueManager#isAdditiveProperty()}.
*/
public boolean isAdditiveProperty() {
return fa... | 1 |
import org.apache.sshd.util.test.NoIoTestCase;
import org.junit.experimental.categories.Category;
@Category({ NoIoTestCase.class }) | 0 |
import org.apache.aurora.scheduler.storage.Storage.MutateWork.NoResult;
return storage.write(storeProvider -> {
LockStore.Mutable lockStore = storeProvider.getLockStore();
Optional<ILock> existingLock = lockStore.fetchLock(lockKey);
if (existingLock.isPresent()) {
throw new LockException... | 0 |
try (ZipFile zip = new ZipFile(zipFile)) { | 0 |
//TODO: RFC 6265 requires cookies to track their creation time; add #getCreationDate()
| 0 |
package org.apache.hc.client5.http.classic.methods; | 0 |
import org.apache.ambari.server.utils.RetryHelper;
RetryHelper.init(configs.getApiOperationsRetryAttempts(), configs.getBlueprintsOperationsRetryAttempts()); | 0 |
final String action = request.getParameter( "action");
if ( "setStartLevel".equals( action ))
{
StartLevel sl = getStartLevel();
if ( sl != null )
{
int bundleSL = WebConsoleUtil.getParameterInt( request, "bundleStartLevel", -1 );
... | 0 |
private ClientResponse.Status expectedStatus;
{baseZnode, ClientResponse.Status.OK },
{baseZnode + "dkdk38383", ClientResponse.Status.NOT_FOUND }
public ExistsTest(String path, ClientResponse.Status status) {
&& expectedStatus == ClientResponse.Status.OK) {
assertEquals(C... | 0 |
public abstract Class<? extends DoFn<?, ?>> fnClass();
abstract Builder setFnClass(Class<? extends DoFn<?, ?>> fnClass); | 0 |
import org.apache.accumulo.core.data.impl.KeyExtent; | 1 |
import java.util.concurrent.FutureTask;
final FutureTask<Boolean> task = httpAsyncClientWithFuture.execute(
final FutureTask<Boolean> task = httpAsyncClientWithFuture.execute(
final FutureTask<Boolean> task = httpAsyncClientWithFuture.execute( | 0 |
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> | 0 |
* Current TickTime of server in milliseconds
* Set TickTime of server in milliseconds
/** Current maxClientCnxns allowed from a particular host */
public int getMaxClientCnxnsPerHost();
/** Set maxClientCnxns allowed from a particular host */
public void setMaxClientCnxnsPerHost(int max);
... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/ShortIteratorIterator.java,v 1.3 2003/11/07 20:12:15 rwaldhoff Exp $
*
* @deprecated This code has been moved to Jakarta Commons Primitives (http://jak... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestCollection.java,v 1.10 2003/04/26 10:25:35 scolebourne Exp $
* $Revision: 1.10 $
* $Date: 2003/04/26 10:25:35 $
* @author Neil O'Toole
* @version $Id: TestCollection.... | 0 |
/**
* Copyright 2013 Apache Software Foundation | 0 |
final InstructionList il = new InstructionList();
final MethodGen method = new MethodGen(Const.ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] { }, "<init>",
final InstructionHandle ih_0 = il.append(InstructionFactory.createLoad(Type.OBJECT, 0));
final InstructionHandle ih_4 = il.append(InstructionFa... | 1 |
* Returns a {@link PTransformMatcher} that matches a {@link PTransform} if the URN of the {@link
* PTransform} is equal to the URN provided ot this matcher.
return MoreObjects.toStringHelper(this).add("urn", urn).toString();
* A {@link PTransformMatcher} that matches a {@link ParDo} transform by URN and ... | 1 |
assertNull("Got a global separator", layout.getGlobalSeparator());
* Tests setting the global separator. This separator should override the
* separators for all properties.
*/
public void testSetGlobalSeparator() throws ConfigurationException
{
final String sep = "=";
conf... | 0 |
* @author Robert Burrell Donkin | 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 |
* @version CVS $Id: OutputStreamListener.java,v 1.5 2003/10/06 12:40:14 upayavira Exp $
private long siteSize = 0L;
private int sitePages = 0;
this.siteSize += pageSize;
this.sitePages++;
this.print(pad(12, "* [" + pagesComplete + "/" + pagesRemaining + "] ") +
... | 0 |
Copyright 2002-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 |
import org.apache.beam.sdk.annotations.Experimental;
import org.apache.beam.sdk.util.ExecutableTrigger;
import org.joda.time.Instant; | 0 |
Connection conn = connections.pop();
protected Stack<Connection> connections = new Stack<>();
Hashtable<Connection, String> hash = new Hashtable<>(); | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.annotations.VisibleForTesting; | 0 |
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
subSet = set.getClass().getDeclaredConstructor(set.getClass()).newInstance(set);
} catch (final InstantiationException
| IllegalAccessException
| InvocationTarget... | 0 |
listNodes = new HashSet<>(); | 0 |
import static org.junit.Assert.assertEquals;
@Test
public void testValuesGetName() {
assertEquals("Values", Values.<Integer>create().getName());
} | 0 |
/**
* Returns the class name of the XML parser.
*/
public String getXMLParserClassName() {
return "org.apache.crimson.parser.XMLReaderImpl";
} | 0 |
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
@Test
public void testGetCreateDirectives() {
ResourceDefinition resourceDefinition =
new SimpleResourceDefinition(Resource.Type.Stage, "stage", "stages", Resource.Type.Task);
assertEquals(Collections.EMPTY_SET, reso... | 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 |
/*
* 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 ... | 0 |
public @Nullable ExecutableTriggerStateMachine firstUnfinishedSubTrigger() { | 0 |
clonedOptions.setUserAgent(pipelineOptions.getUserAgent()); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/collection/UnmodifiableCollection.java,v 1.3 2003/12/03 12:27:37 scolebourne Exp $
* @version $Revision: 1.3 $ $Date: 2003/12/03 12:27:37 $
public final class UnmodifiableCollecti... | 0 |
import javax.annotation.Nullable;
import org.apache.beam.sdk.coders.Coder;
import org.apache.beam.sdk.extensions.euphoria.beam.window.BeamWindowing; | 0 |
import static org.junit.Assert.assertNotEquals;
Resource res = new ResourceImpl();
CapabilityImpl c = new CapabilityImpl(Mockito.mock(Resource.class), "org.foo.bar", dirs, attrs);
assertNotNull(c.getResource());
Map<String, Object> attrs = new HashMap<>();
CapabilityImpl c1 = n... | 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.commons.jelly.JellyTagException;
protected void setBeanProperties(Object bean, Map attributes) throws JellyTagException {
protected void processBean(String var, Object bean) throws JellyTagException { | 0 |
* Copyright 2016-2017 Seznam.cz, a.s. | 0 |
protected byte[] receiveKexInit(Buffer buffer) throws Exception {
byte[] seed = super.receiveKexInit(buffer);
/*
* Check if the session has delayed its KEX-INIT until the
* server's one was received in order to support KEX
* extension negotiation (RFC 8308).
*/
... | 0 |
package org.apache.bcel.generic;
super(org.apache.bcel.Const.IADD); | 1 |
package org.apache.commons.net.examples.ntp; | 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... | 0 |
import org.apache.aurora.scheduler.storage.TaskStore;
import static org.apache.aurora.scheduler.base.TaskTestUtil.makeTask;
IJobKey missingKey = JobKeys.from("missing-role", "missing-env", "missing-name");
IJobUpdateDetails update1 = makeAndSave(makeKey("u1"), ROLLING_BACK, 123L, 123L, true);
IJobUpdateDeta... | 0 |
import org.apache.sshd.common.util.io.DirectoryScanner; | 0 |
@Rule public final TestPipeline pipeline = TestPipeline.create();
PCollection<String> input = pipeline.apply(Create.<String>of(ImmutableList.of("a", "b")));
pipeline.run();
pipeline.enableAbandonedNodeEnforcement(false);
pipeline.getOptions().setStableUniqueNames(CheckEnabled.OFF);
pipeline.apply... | 0 |
import java.util.Arrays;
import org.apache.accumulo.core.client.summary.Summarizer;
import org.apache.accumulo.core.client.summary.SummarizerConfiguration;
import org.apache.accumulo.core.summary.SummarizerConfigurationUtil;
private Map<String,String> properties = Collections.emptyMap();
private Map<String,String> ... | 1 |
* @version CVS $Id: FOM_JavaScriptInterpreter.java,v 1.8 2003/09/23 22:46:44 vgritsenko Exp $
boolean refresh)
} catch (Exception e) {
public void put(String name, Scriptable start, Object value) {
public void put(int index, Scriptable start, Object value) { | 0 |
Copyright 2000-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 |
SiteConfiguration siteConfig = new SiteConfiguration(); | 0 |
import org.apache.commons.configuration.builder.fluent.FileBasedBuilderParameters;
/** A helper object for creating builder parameters. */
protected Parameters parameters;
parameters = new Parameters();
protected FileBasedBuilderParameters createParameters()
return parameters.fileBased();
... | 0 |
this.uri = uri; | 0 |
import org.apache.batik.bridge.CursorManager;
SVGAElementBridge.CursorHolder ch;
ch = new SVGAElementBridge.CursorHolder
(CursorManager.DEFAULT_CURSOR);
new SVGAElementBridge.AnchorListener(ua, ch),
... | 0 |
import org.apache.beam.sdk.io.synthetic.SyntheticSourceOptions.ProgressShape;
* SyntheticSourceOptions}.
* options. See {@link SyntheticSourceOptions} for how to construct an instance. An example is
* below: | 0 |
public AtlasMetrics getMetrics(@QueryParam("ignoreCache") boolean ignoreCache) {
AtlasMetrics metrics = metricsService.getMetrics(ignoreCache); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.