Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
PCollection<String> testFilenames = pipeline .apply("Generate sequence", GenerateSequence.from(0).to(numberOfTextLines)) .apply( "Produce text lines", ParDo.of(new FileBasedIOITHelper.DeterministicallyConstructTestTextLineFn())) .apply("Wri...
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
if (sl.length() == 0) // SVG spec says empty returns false return false; String rf = elt.getAttributeNS(null, if (rf.length() == 0) // SVG spec says empty returns false return false; StringTokenizer st = new StringTokenizer(rf, " "); ...
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ComparisonChain; import org.apache.beam.v...
0
package com.twitter.nexus.scheduler.persistence; import org.apache.thrift.TBase; import org.apache.thrift.TDeserializer; import org.apache.thrift.TException; import org.apache.thrift.TSerializer; /** * Codec that works for thrift objects. Must be extended to provide instances of target type. * * @author wfarner ...
0
* <pre><code> class SomeDoFn extends{@literal DoFn<String, String>} { * {@literal @}ProcessElement * }</code></pre>
0
public WidgetDefinition getDefinition() {
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
package org.apache.accumulo.server;
0
/** * PREFIX_DIR is shared in ambari-agent.ini and should only be called by unit tests. * For all server-side processing, it should be retrieved from <code>HostImpl.getPrefix()</code> */ public static final String PREFIX_DIR = "/var/lib/ambari-agent/data";
1
protected static final StringMap values = new StringMap();
0
SessionRequest connect( SocketAddress remoteAddress, SocketAddress localAddress, Object attachment, SessionRequestCallback callback);
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
Buffer buffer = session.createBuffer(SshConstants.SSH_MSG_USERAUTH_REQUEST);
0
// create external tables assertEquals(0, statement.executeUpdate("CREATE EXTERNAL TABLE test (id INTEGER) TYPE 'text'")); .executeUpdate("CREATE EXTERNAL TABLE person (id BIGINT, name VARCHAR) TYPE 'test'"); connection .createStatement() .executeUpdate("CREATE EXTERNAL TABLE test (t...
0
import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.Module; protected static final String ROLE_A = "roleA"; protected static final String ROLE_B = "roleB"; protected static final IResourceAggregate QUOTA_A = ResourceTestUtil.aggregate(1.0, 2, 3); protected static final IR...
0
import static org.apache.zookeeper.ZooDefs.Perms.ALL; public void testSupportsWildcard() throws Exception { // Given path("/abc123"); path("/abcdef/efg"); path("/abc/123"); path("/x"); path("/y/a"); path("/ab"); // When setAcls("/abc*", "ip:127.0.0.1:r"); // Then assertHasA...
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
index = args[0].lastIndexOf('@');
0
final int i = (l + r) >>> 1;
0
Map<String, DesiredConfig> configMap = new HashMap<>(); final Map<String, String> properties = new HashMap<>(); Map<String, String> checkProperties = new HashMap<>();
0
topologyManager.onHostHeartBeatLost(host);
0
/** {@inheritDoc} */
0
return null;
0
* * package org.apache.commons.vfs2.test; import org.apache.commons.vfs2.FilesCache; import org.apache.commons.vfs2.cache.SoftRefFilesCache; import org.apache.commons.vfs2.impl.DefaultFileSystemManager; * A partial {@link org.apache.commons.vfs2.test.ProviderTestConfig} implementation.
1
/** Return a query name with query language (if applicable). */ static String fullQueryName(String queryLanguage, String query) { return queryLanguage != null ? query + "_" + queryLanguage : query; } return String.format( "%s:%s.%s", options.getProject(), options.getBigQueryDatase...
0
public int defaultTimeoutSeconds() { return 2 * 60; } @Override
0
import org.apache.accumulo.core.security.thrift.Credential; public static synchronized TabletLocator getInstance(Instance instance, Credential credentials, Text tableId) {
1
assertEqual( load(outputURI), generate(JX, inputURI, EMPTY_PARAMS) ); public void testJXDynamicMacro() throws Exception { String inputURI = docBase + "jxDynamicMacro.xml"; String outputURI = docBase + "jxDynamicMacro-output.xml"; assertEqual(load(outputURI), generate(JX, inputURI, E...
0
@com.fasterxml.jackson.annotation.JsonProperty("kerberosCommandParams")
0
import org.apache.beam.sdk.values.Row; public Row asRow(DoFn<InputT, OutputT> doFn) { throw new UnsupportedOperationException("Schemas are not supported by DoFnTester"); } @Override
0
* Copyright 2002-2005 The Apache Software Foundation.
0
import java.util.List; ListDataSink<WindowedPair<Long, String, Long>> output = ListDataSink.get(2); Pair.of("one", 1), Pair.of("aaa", 1), // ~ this one goes to a different partition than the rest Pair.of("one", 2), Pair.of("two", 3), ...
0
final Set<SelectionKey> selectedKeys = this.selector.selectedKeys(); for (final SelectionKey key : selectedKeys) { final ServerSocketChannel serverChannel = (ServerSocketChannel) key.channel(); } catch (final IOException ex) { } catch (final IO...
0
public void close() {
0
public void testVALIDATOR_315() { assertFalse(validator.isValid("me@at&t.net")); assertTrue(validator.isValid("me@att.net")); // Make sure TLD is not the cause of the failure } /**
0
package org.apache.bcel.data;
1
customCommands = new ArrayList<>(definitions.size());
0
import org.apache.felix.framework.util.SecurityManagerEx; import org.osgi.framework.AdaptPermission; // No one should use this field directly, use getFramework() instead. private static final SecurityManagerEx m_smEx = new SecurityManagerEx(); private static final ClassLoader m_classloader = Felix.class.get...
1
/** * TODO Add javadoc * * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> * @version $Rev$, $Date$ */
0
public class VfsClassLoaderTests extends AbstractProviderTestCase { protected Capability[] getRequiredCaps() { return new Capability[] { Capability.READ_CONTENT, Capability.URI }; private VFSClassLoader createClassLoader() throws FileSystemException { public void testLoadClass() throws Exception { ...
1
true);
0
ErrorListenerTestImpl lstRead = new ErrorListenerTestImpl(source); ErrorListenerTestImpl lstWrite = new ErrorListenerTestImpl(source); ErrorListenerTestImpl lstAll = new ErrorListenerTestImpl(source); source.addEventListener(ConfigurationErrorEvent.READ, lstRead); source.addEvent...
0
package org.apache.batik.ext.awt.image.renderable; import org.apache.batik.ext.awt.image.rendered.CachableRed; import org.apache.batik.ext.awt.image.rendered.BufferedImageCachableRed; public class ComponentTransferRable8Bit public ComponentTransferRable8Bit(Filter src, return new BufferedImageCachableRed(...
0
Preconditions .checkArgument(bucket.isEmpty() || bucket.matches("[a-z0-9][-_a-z0-9.]+[a-z0-9]"), "GCS bucket names must contain only lowercase letters, numbers, " + "dashes (-), underscores (_), and dots (.). Bucket names " + "must start and end wi...
0
* Autogenerated by Thrift Compiler (0.11.0) @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
0
import com.google.cloud.dataflow.sdk.util.common.worker.NativeReader; public NativeReader<?> create(
0
package org.apache.felix.ipojo.runtime.core.test.components.whiteboard; import org.apache.felix.ipojo.annotations.Component; import org.apache.felix.ipojo.whiteboard.Whiteboards; import org.apache.felix.ipojo.whiteboard.Wbp; import org.osgi.framework.ServiceReference; @Component @Whiteboards(whiteboards={ @Wbp(filt...
0
private Option noWrapOpt; int numColumns = shellState.getReader().getTermwidth(); if (cl.hasOption(noWrapOpt.getOpt())) numColumns = Integer.MAX_VALUE; if (numColumns < 40) throw new IllegalArgumentException("numColumns must be at least 40 (was " + numColumns + ")"); if (!(c i...
0
import org.apache.hc.core5.http.impl.bootstrap.HttpAsyncRequester; import org.apache.hc.core5.http.impl.bootstrap.PooledClientEndpoint;
0
* <p> * This class is Serializable from Commons Collections 3.1. * @version $Revision: 1.4 $ $Date: 2004/06/02 22:02:34 $
0
import org.apache.beam.runners.core.PerKeyCombineFnRunner;
0
import org.apache.batik.css.engine.value.ValueManager;
1
package org.apache.commons.ognl.test; import org.apache.commons.ognl.MethodFailedException; import org.apache.commons.ognl.NoSuchPropertyException; import org.apache.commons.ognl.test.objects.IndexedSetObject; import org.apache.commons.ognl.test.objects.Root;
0
import java.awt.geom.Dimension2D; * Returns the default size of the viewport of this user agent. */ public Dimension2D getViewportSize() { return canvas.getSize(); } /**
0
protected QuorumPeer quorumPeer;
0
getConnector().securityOperations().grantTablePermission(getAdminPrincipal(), MetadataTable.NAME, TablePermission.WRITE); Credentials credentials = new Credentials(getAdminPrincipal(), getAdminToken());
0
private static final long CREATE_TIME = Calendar.getInstance().getTime().getTime();
0
* limitations under the License.
0
* * <p>TODO: Provide support for schemas registered via a ServiceLoader interface. This will allow * optional modules to register schemas as well.
0
import org.apache.http.annotation.Immutable;
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.zookeeper.server.util.JvmPauseMonitor; JvmPauseMonitor jvmPauseMonitor = null; if(config.jvmPauseMonitorToRun) { jvmPauseMonitor = new JvmPauseMonitor(config); } final ZooKeeperServer zkServer = new ZooKeeperServer(jvmPauseMonitor, txnLog...
0
while (lastVisited.size() > 0 && lastVisited.size() > (maxVisitedURIs-1)) { lastVisited.removeElementAt(0); }
0
* <p> * <b>This keep-alive feature is optional; if it does not help or causes problems then don't use it.</b> * <p> * <p> * See the class Javadoc section "Control channel keep-alive feature:" * Get the time to wait between sending control connection keepalive messages * when processing file uploa...
0
import static org.junit.Assert.assertTrue; public class BaltimoreEncTest {
0
* Just a test class used to invoke {@link org.apache.sshd.client.scp.DefaultScpClient#main(String[])} in public final class ScpCommandMain { private ScpCommandMain() { throw new UnsupportedOperationException("No instance"); }
0
import java.util.ArrayList; import java.util.Collections; * Transfers can be several per task, so they're passed in as a json-ified list of * objects. */ public static final String PARAMETER_TRANSFERS = "configure-task-transfers"; /** @XmlElement(name = "transfer") private List<Transfer> transfers; ...
0
return super.getDependencyRegion(srcIndex, outputRgn); return super.getDirtyRegion(srcIndex, inputRgn);
0
* @version $Revision: 1.12 $ $Date: 2003/06/28 10:52:30 $ addTests( LastModifiedTests.class );
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists;
0
import org.apache.http.io.SessionInputBuffer; import org.apache.http.io.SessionOutputBuffer; * using arbitrary {@link SessionInputBuffer} and {@link SessionOutputBuffer} private SessionInputBuffer inbuffer = null; private SessionOutputBuffer outbuffer = null; final SessionInputBuffer inbuffer, ...
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
job.setInputFormat(org.apache.accumulo.core.client.mapred.AccumuloRowInputFormat.class); org.apache.accumulo.core.client.mapred.AccumuloRowInputFormat.setZooKeeperInstance(job, ci.getInstanceName(), ci.getZooKeepers()); org.apache.accumulo.core.client.mapred.AccumuloRowInputFormat.setConnect...
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.sshd.common.kex.KexState; kexState.set(KexState.INIT); if (kexState.compareAndSet(KexState.DONE, KexState.INIT)) { if (KexState.DONE.equals(kexState.get()) && authFuture.isFailure()) {
0
import org.apache.xml.security.exceptions.XMLSecurityException;
0
import org.apache.http.protocol.HttpCoreContext; when(context.getAttribute(HttpCoreContext.HTTP_REQUEST)).thenReturn(request); when(context.getAttribute(HttpCoreContext.HTTP_REQUEST)).thenReturn(request); when(context.getAttribute(HttpCoreContext.HTTP_REQUEST)).thenReturn(request); when(...
0
* @param type Data is type to which this value should be converted * @param value is the input object to be converted * @param pattern is the pattern is used for the conversion; if null is * passed then the default pattern associated with the converter object * will be used.
0
// do nothing
0
import org.apache.zookeeper.common.PathUtils; String dynamicConfigFilePath = PathUtils.normalizeFileSystemPath(dynamicFile.getCanonicalPath()); .concat(dynamicConfigFilePath)
0
* * * /** * * @version $Revision: 1.28 $ /** * as the given variable name. /** * as the given variable name. //------------------------------------------------------------------------- try { //------------------------------------------------------------------------- * ...
1
* Implements the JEXL ScriptEngineFactory for JSF-223.
1
* @deprecated This block is deprecated and will be removed in future versions.
0
int columnPosition = 0; colReferenceable.set(HiveDataModelGenerator.POSITION, columnPosition++);
0
import org.apache.aurora.scheduler.base.TaskTestUtil; /** * TODO(wfarner): Data store constraints (not null, valid relations) have made this test of little * value other than for coverage. Rethink. */ // By default, only the mesos container is allowed by ConfigurationManager. private static final IScheduledTask...
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.util.Collection; void addSignalListener(SignalListener listener, Collection<Signal> signals);
0
private static class TestOption extends Option { public TestOption(String opt, boolean hasArg, String description) throws IllegalArgumentException { super(opt, hasArg, description); } public boolean addValue(String value) { addValueForProcessing(value); ret...
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 applicable la...
0
if (!tpi.visible) return null; if (!tpi.visible) return;
0
* * * By this interface, a {@link ServletServiceContext} provides absolute information * about a mounted servlet service. URI absolutizeURI(URI uri) throws URISyntaxException; /** * Get the fully qualified servlet service name of a connected service. * * @param connectionName * @return ...
0
/* * Copyright 2001-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 appl...
0
public ServiceConfigVersionRequest(String clusterName, String serviceName, Long version, Long createTime, Long applyTime, String userName, Boolean isCurrent) { this.isCurrent = isCurrent;
0
if (verbose) { System.err.println("Attribute: " + element.getName()); } if (element.getName().equals(name)) { chosenAttrsList.add(element); } if (verbose) { System.err.println("Attribute: " + element.getName()); } if (elemen...
0
import java.nio.ByteBuffer; import org.apache.http.HttpRequest; /** * Default implementation of {@link IOEventDispatch} interface for plain * (unencrypted) server-side HTTP connections. * * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a> * * @version $Revision$ */ /** * Creates a new i...
0
* is present.
0
public void testParseTimestampWithSlop() { Calendar cal = Calendar.getInstance(); int timeZoneOffset = cal.getTimeZone().getRawOffset(); cal.add(Calendar.HOUR_OF_DAY, 1); cal.set(Calendar.SECOND,0); cal.set(Calendar.MILLISECOND,0); Date anHourFromNow = cal.getTime(); cal.add(Calendar.DATE, 1); Date anH...
0
public void setValue(Object object) { throw new RuntimeException("Cannot set the value of widget " + getFullyQualifiedId()); }
0
import org.apache.accumulo.core.client.BatchWriterConfig; BatchWriterConfig bwc = new BatchWriterConfig(); BatchDeleter ibd = state.getConnector().createBatchDeleter(indexTableName, Constants.NO_AUTHS, 8, bwc); BatchDeleter dbd = state.getConnector().createBatchDeleter(dataTableName, Constants.NO_AUTHS, 8, ...
0