Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
* @version $Revision: 1.19 $ $Date: 2004/05/10 20:09:53 $ public UrlFileProvider() super(); fs = new UrlFileSystem(rootName, fileSystemOptions);
0
* @version $Revision$ $Date$
0
* @version $Id$ * Constructs a new {@code ConversionException} without specified * Constructs a new {@code ConversionException} with specified * Constructs a new {@code ConversionException} with specified * nested {@code Throwable}. * Constructs a new {@code ConversionException} with specified...
0
import com.google.common.base.Charsets; import java.io.Writer; String line = new String(encodedElem, Charsets.UTF_8); try (Writer writer = Files.newBufferedWriter(tmpFile.toPath(), UTF_8)) { prepareSource(file.getBytes(Charsets.UTF_8)) .createReader(PipelineOptionsFactory.c...
0
import org.apache.sshd.server.ServerFactoryManager; URL moduli; String moduliStr = session.getFactoryManager().getProperties().get(ServerFactoryManager.MODULI_URL); if (moduliStr != null) { moduli = new URL(moduliStr); } else { moduli = getClass().getResource("/or...
0
/** * @since 2.0 **/ * @since 2.0 * @since 2.0
0
*/ package org.apache.batik.dom.events;
1
StringBuilder tmp = new StringBuilder(uname.length() + realm.length() + pwd.length() + 2); StringBuilder tmp3 = new StringBuilder(tmp2.length() + nonce.length() + cnonce.length() + 2); StringBuilder tmp2 = new StringBuilder(md5a1.length() + nonce.length() + md5a2.length()); S...
0
final Header transferEncodingHeader = message.getFirstHeader(HTTP.TRANSFER_ENCODING); } catch (final ParseException px) { final int len = encodings.length; final Header contentLengthHeader = message.getFirstHeader(HTTP.CONTENT_LEN); final Header[] headers = message.ge...
0
@Override @Override @Override @Override
0
void execute(DBAccessor dbAccessor) throws SQLException; void verify(DBAccessor dbAccessor) throws SQLException;
0
* this script</a>, which publishes traffic sensor data to a PubSub topic. * After you've started this pipeline, start
0
package org.apache.felix.fileinstall.internal;
0
// Set the module's wires. If the module is a resolved // fragment, then we must actually append any new host // wires to the existing ones. if (Util.isFragment(module) && module.isResolved()) { w...
1
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
0
.apply(View.asList()); p.apply("singletonCreate", Create.<Object>of(1, 2, 3)).apply(View.asSingleton()); Matchers.containsInAnyOrder(listView, singletonView)); Matchers.containsInAnyOrder( Matchers.containsInAnyOrder(graph.getProducer(empty))); assertThat(onlyRoot.getTran...
0
TriggerContext c, OnElementEvent<IntervalWindow> e) throws Exception { TriggerContext c, OnMergeEvent<IntervalWindow> e) throws Exception { TriggerContext c, OnTimerEvent<IntervalWindow> e) throws Exception {
0
import org.apache.beam.runners.dataflow.worker.DataflowOperationContext.DataflowExecutionState; import org.apache.beam.runners.dataflow.worker.TestOperationContext.TestDataflowExecutionState; private final ExecutionStateTracker tracker = new ExecutionStateTracker(sampler); DataflowExecutionState state = n...
0
TreeMap<Key,Value> tm = new TreeMap<>(); ArrayList<Pair<Key,Value>> testData = new ArrayList<>(); testData.add(new Pair<>(k, v));
1
/* * Copyright (c) OSGi Alliance (2012, 2014). 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 re...
0
final String scheme = UriParser.extractScheme(name.getURI(), buf); return new URL(scheme, "", -1,
0
import org.apache.accumulo.server.ServerConstants; public static enum FileType { TABLE(ServerConstants.TABLE_DIR), WAL(ServerConstants.WAL_DIR), RECOVERY(ServerConstants.RECOVERY_DIR); private String dir; FileType(String dir) { this.dir = dir; } public String getDirector...
1
@Test public void testCalculateSummaryStatus() { Collection<HostRoleStatus> hostRoleStatuses = new LinkedList<HostRoleStatus>(); hostRoleStatuses.add(HostRoleStatus.PENDING); hostRoleStatuses.add(HostRoleStatus.PENDING); hostRoleStatuses.add(HostRoleStatus.PENDING); hostRoleStatuses.add(HostRo...
0
/** * @author <a href="mailto:julien@julienviet.com">Julien Viet</a> * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> */ public static Readable asReadable(ByteBuf buffer) {
1
final HttpCoreContext corecontext = HttpCoreContext.adapt(context); final int status = response.getStatusLine().getStatusCode(); final Header explicit = response.getFirstHeader(HTTP.CONN_DIRECTIVE); final HttpEntity entity = response.getEntity(); final ProtocolVersion ver = r...
0
public static synchronized void clearCache() {
0
* * * * * * * * * * * * * * * * * * * * * * * * * * *
0
import org.apache.accumulo.core.client.mock.MockInstance; private static MockInstance inst; inst = new MockInstance(); * This is a test to ensure the string literal in {@link ConnectorImpl#ConnectorImpl(org.apache.accumulo.core.client.impl.ClientContext)} is kept up-to-date * if we move the {@link SystemTo...
1
* @version $Revision: 1.3 $, $Date: 2004/06/24 14:01:03 $ public ConversionException() { super(); }
0
// Digest algorithms // Signature algorithms // Encryption algorithms
0
* Key used to retrieve the value of the server identification string. If not set then * a default is sent - consists of &quot;SSH-2.0-&quot; plus the current SSHD core * artifact name and version in uppercase - e.g., &quot;SSH-2.0-SSHD-CORE-1.0.0&quot; * @return A valid {@link CommandFactory} object...
0
import org.apache.atlas.typesystem.types.utils.TypesUtil; return TypesUtil.getTypesDef(getEnumTypeDefinitions(), getStructTypeDefinitions(), getTraitTypeDefinitions(),
0
public static byte[] convertASN1toXMLDSIG(byte[] asn1Bytes) throws IOException { public static byte[] convertXMLDSIGtoASN1(byte[] xmldsigBytes) throws IOException {
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. * @version $Id: ASTExpression.java,v 1.2 2003/10/09 21:28:55 rd...
0
* Attempts to discover a ListGetExecutor. * * @param clazz the class to find the get method from * @param identifier the key to use as an argument to the get method * @return the executor if found, null otherwise public static ListGetExecutor discover(Introspector is, Class<?> clazz, Obje...
0
@Override public void update( Dictionary<String, ?> properties ) throws IOException @Override public Dictionary<String, Object> getProperties()
0
import java.io.InputStream; import org.apache.felix.ipojo.test.helpers.IPOJOHelper; import org.apache.felix.ipojo.test.helpers.OSGiHelper; import org.ops4j.pax.exam.Customizer; InputStream service = TinyBundles.newBundle() .add(CheckService.class) .add(Foo.class) .set(Constan...
0
import javax.net.ssl.SSLContext; import org.apache.http.conn.ssl.SSLContexts; SSLContext sslcontext = SSLContexts.custom() .loadTrustMaterial(trustStore) .build(); SSLSocketFactory sslsf = new SSLSocketFactory(sslcontext, SSLSocketFactory.BROWSER_COMPATI...
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...
1
* is extensively used and tested in AbstractSortedBagTest.
0
/* * Copyright 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 appl...
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
* If {@code null} {@link org.apache.http.nio.util.HeapByteBufferAllocator#INSTANCE} * If {@code null} simple type cast will be used for byte to char conversion. * If {@code null} simple type cast will be used for char to byte conversion. * @param constraints Message constraints. If {@code null...
0
* Returns the size of a px CSS unit in millimeters. public float getPixelUnitToMillimeter() { return ctx.getUserAgent().getPixelUnitToMillimeter(); * Returns the size of a px CSS unit in millimeters. * This will be removed after next release. * @see #getPixelUnitT...
0
Set<String> propertyIds = new HashSet<>();
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/SimpleRegexMatcher.java,v 1.3 2003/10/05 15:06:50 rdonkin Exp $ * $Revision: 1.3 $ * $Date: 2003/10/05 15:06:50 $ * * Copyright (c) 2001-2003 The Apache Software Foundation. All ri...
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import org.junit.ClassRule; import org.junit.rules.TemporaryFolder; public class RegexFileFilterTestCase { @ClassRule public static TemporaryFolder temporaryFolder = new TemporaryFolder(); private static File getTestDirecto...
0
.addTransition(State.INSTALLED, .addTransition(State.INSTALLED, State.INSTALLED, ServiceComponentHostEventType.HOST_SVCCOMP_OP_IN_PROGRESS, new ServiceComponentHostOpInProgressTransition()) .addTransition(State.INSTALLED, State.STARTED, ServiceComponentHo...
0
import org.apache.accumulo.core.client.ClientInfo; * @deprecated since 2.0.0, replaced by {{@link #getClientInfo()}} public ClientInfo getClientInfo() { return impl.getClientInfo();
0
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
1
/** * Return an {@code Object} to use as a key in a cache. * * <p>Different namespaces may use the same key in order to be treated as a unit in the cache. * The {@code Object}'s {@code hashCode} and {@code equals} methods will be used to determine * equality. */ Object getCacheKey();
0
public Base32(final boolean useHex) { public Base32(final int lineLength) { public Base32(final int lineLength, final byte[] lineSeparator) { public Base32(final int lineLength, final byte[] lineSeparator, final boolean useHex) { final String sep = StringUtils.newStringUtf8(lineSeparator...
1
* Copyright (C) 2015 Google Inc.
0
* Implementation of the {@link org.apache.beam.runners.dataflow.DataflowRunner}.
0
import org.apache.http.TokenIterator;
0
package org.apache.beam.sdk.util; import org.apache.beam.sdk.coders.AvroCoder; import org.apache.beam.sdk.coders.DefaultCoder; import org.apache.beam.sdk.util.AvroUtils.AvroMetadata;
0
package org.apache.hc.core5.benchmark;
0
public long isReady(long tid, Master environment) { public Repo<Master> call(long id, Master env) { public void undo(long tid, Master env) {}
0
import org.apache.accumulo.core.client.sample.SamplerConfiguration;
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
import java.util.Collections; @SuppressWarnings({ "rawtypes" }) private static final ImmutableMap EMPTY_MAP = new ImmutableMap(); @SuppressWarnings("unchecked") return entries.length == 0 ? EMPTY_MAP : new ImmutableMap<K, V>(entries); @SuppressWarnings("unchecked") return entries.is...
0
import java.util.HashSet; import org.apache.aurora.gen.Constraint; .setJobName(job) .setEnvironment(env) .setConstraints(new HashSet<Constraint>()));
0
* </p>
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; public class TransformCanonicalizerTest { fail("unexpected call to transform(XMLSecEvent"); assertEquals(554, byteArrayOutputStream.size()); fail("unexpected call to transform(XMLSecEvent"); ...
0
import org.apache.hc.client5.http.ssl.DefaultClientTlsStrategy; .setTlsStrategy(new DefaultClientTlsStrategy(SSLTestContexts.createClientSSLContext()))
0
broadcast() - network() > 1 ? network() + 1 : 0); private int high() { broadcast() - network() > 1 ? broadcast() -1 : 0); * * public int getAddressCount() {
0
boolean ignoreNS = parent.getNamespaceResolver().isDefaultNamespaceIgnored(); return DOMNodePointer.testNode(child, nodeTest, ignoreNS);
0
package org.apache.commons.ognl; import org.apache.commons.ognl.enhance.ExpressionCompiler; import org.apache.commons.ognl.enhance.UnsupportedCompilationException;
0
* @since 1.0
0
// evaluate body as it may contain a <destination> or message tag getBody().run(context, output);
0
import org.apache.sshd.util.test.CommonTestSupportUtils; CommonTestSupportUtils.detectTargetFolder(RootedFileSystemProviderTest.class), "Failed to detect target folder").toPath();
0
final Instant inputDataWatermark,
0
* Autogenerated by Thrift Compiler (0.11.0) @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)")
0
package com.twitter.aurora.scheduler.http; import com.twitter.aurora.gen.Quota; import com.twitter.aurora.scheduler.storage.Storage; import com.twitter.aurora.scheduler.storage.Storage.StoreProvider; import com.twitter.aurora.scheduler.storage.Storage.Work;
1
/** * @deprecated since 1.4 * @use org.apache.accumulo.core.iterators.user.SummingCombiner with SummingCombiner.Type.STRING */
0
if (actual != null && formal.isAssignableFrom(actual) && actual.isArray() == formal.isArray()) {
0
import org.apache.http.util.Asserts; Asserts.notNull(state, "HTTP exchange state"); Asserts.notNull(requestConsumer, "Request consumer"); Asserts.check(!this.completed, "Response already submitted"); Asserts.check(!this.completed, "Response already submitted");
0
DataSet<BatchElement> wAssigned = BatchElement wel = (BatchElement) i; c.collect(new BatchElement<>( .returns(BatchElement.class) DataSet<BatchElement<?, Pair>> reduced = (BatchElement<?, Pair> we) -> (Comparable) we.getElement().getFirst(), ...
0
if (Files.exists(folder, options)) { assertTrue("Target is an existing file instead of a folder: " + folder, Files.isDirectory(folder, options)); } else { if (folder.exists()) { assertTrue("Target is an existing file instead of a folder: " + folder.getAbsolutePath(), fold...
0
package org.apache.beam.sdk.extensions.kryo; import static org.junit.Assert.assertSame; /** A set of unit {@link KryoState} tests. */ public class KryoStateTest { public void testSameKryoAfterDeserialization() throws IOException, ClassNotFoundException { final KryoCoder<?> coder = KryoCoder.of(k -> k.register(Te...
0
List<String> columns = new ArrayList<>(numColumns); iterators = new ArrayList<>(numIterators); this.fetchedColumns = new HashSet<>();
1
import java.util.Set; private volatile Map<PropertyInfo.PropertyType, Set<String>> propertiesTypes; propertiesTypes = cluster.getConfigPropertiesTypes(type); propertiesTypes = cluster.getConfigPropertiesTypes(type); public Map<PropertyInfo.PropertyType, Set<String>> getPropertiesTypes() { readWriteLock....
0
protected static String getPrefix(final NodePointer pointer, String namespaceURI) { currentPointer = currentPointer.getParent();
0
/** A {@link CoderProviderRegistrar} for standard types used with {@link BigQueryIO}. */
1
private static final Logger LOG = LoggerFactory.getLogger(TranslationContext.class); return getCoder( ((TypeAwareUnaryFunction<InputT, OutputT>) unaryFunction).getTypeDescriptor()); return getCoder(((TypeAwareUnaryFunctor<InputT, OutputT>) unaryFunctor).getTypeDescriptor()); ((TypeAwa...
0
import org.apache.sshd.common.session.Session; log.debug("Send SSH_MSG_CHANNEL_REQUEST shell on {}", this); Session session = getSession();
0
private String servicePrincipalName; public WindowsNegotiateSchemeFactory(final String servicePrincipalName) { super(); this.servicePrincipalName = servicePrincipalName; } return new WindowsNegotiateScheme(AuthSchemes.SPNEGO, servicePrincipalName);
0
if (isClosed()) { return false; }
0
/* public void testMultipleThreads1() throws Exception { ds.setMaxWaitMillis(-1); ds.setMaxTotal(5); ds.setMaxOpenPreparedStatements(-1); multipleThreads(5, false, false, -1, 3, 100, 10000); } */
0
* Please note access to the internal structures of this class is not * synchronized and therefore this class may be thread-unsafe.
0
import com.google.common.util.concurrent.AbstractIdleService; class JobUpdateEventSubscriber extends AbstractIdleService implements PubsubEvent.EventSubscriber { // TODO(ksweeney): Investigate letting this exception propagate up. @Override protected void startUp() { @Override protected void shutDown() { ...
0
import java.util.concurrent.ConcurrentSkipListSet; private final CompactionWaitInfo compactionWaitInfo = new CompactionWaitInfo(); log.debug("Writing updated status to metadata table for " + logEntry.filename + " " + ProtobufUtil.toString(status)); ReplicationTableUtil.updateFiles(tabletServer...
0
* @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
0
// Check if the boot package is wildcarded. if (m_bootPkgWildcards[i]) // A wildcarded boot package will be in the form "foo.", // so a matching subpackage will start with "foo.", e.g., // "foo.bar". if (pkgN...
0
/** * Delay the Observer's participation in a leader election upon disconnect * so as to prevent unexpected additional load on the voting peers during * the process. Default value is 200. */ public static final String OBSERVER_ELECTION_DELAY_MS = "zookeeper.observer.election.Dela...
0
final int start = entryPath.lastIndexOf( '/' ) + 1 + fileName.length(); // path, slash and base name
0
import org.apache.aurora.scheduler.mesos.Driver;
0
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/SetNextRule.java,v 1.19 2004/01/10 17:38:19 rdonkin Exp $ * $Revision: 1.19 $ * $Date: 2004/01/10 17:38:19 $ * Copyright (c) 2001-2004 The Apache Software Foundation. All rights * ...
0
* Output stream that cuts off after a defined number of bytes. This class * is used to send content of HTTP messages where the end of the content entity * is determined by the value of the <code>Content-Length header</code>. * Entities transferred using this stream can be maximum {@link Long#MAX_VALUE} * long.
0