Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; public class HMACSignatureAlgorithmTest { assertNotNull(elementToSign); assertNotNull(sigElement); assertNotNull(sigElement); assertNotNull(signedElement); assertTrue(signature.c...
0
TabletLocationState result = new TabletLocationState(RootTable.EXTENT, futureSession, currentSession, lastSession, null, logs, false); public void setFutureLocations(Collection<Assignment> assignments) throws DistributedStoreException { throw new DistributedStoreException( ...
0
import java.util.Arrays; assertSortOrder(new UUIDLexicoder(), Arrays.asList(UUID.randomUUID(), UUID.randomUUID(), UUID.randomUUID(), UUID.randomUUID(), UUID.randomUUID(), UUID.randomUUID())); assertSortOrder(new UUIDLexicoder(), uuids);
0
* @version CVS $ID$
0
String[] pids = getServicePids( serviceRef ); if ( pids != null ) if ( isService( serviceRef, MANAGED_SERVICE ) ) addSingletonMetaTypeProvider( pids, mtp ); ungetService = false; } if ( isService( serviceRef...
0
public class AdapterServiceBuilder extends AbstractBuilder public void build(MetaData srvMeta, List<MetaData> depsMeta, Bundle b, DependencyManager dm)
0
@Override public void dropTable(String tableName) { // empty }
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.sshd.common.util.ValidateUtils; ValidateUtils.checkTrue(!Streaming.Async.equals(streaming), "Asynchronous streaming isn't supported yet on this channel"); invertedIn = new ChannelOutputStream(this, remoteWindow, log, SshConstants.SSH_MSG_CHANNEL_DATA, true);
0
return new Gson().fromJson(new InputStreamReader(this.getClass().getResourceAsStream(path)), HiveLineage.class);
0
import org.apache.http.conn.scheme.HostNameResolver; private final HostNameResolver nameResolver; final SecureRandom random, final HostNameResolver nameResolver) this.nameResolver = nameResolver; this(TLS, keystore, keystorePassword, truststore, null, null); this(TLS, keysto...
0
import java.io.Serializable;
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 u...
0
fillAttributedStringBuffer(ctx, element, true, null, null, asb); Integer bidiLevel, boolean stripFirst = !preserve; boolean stripLast = !preserve; Map map = getAttributeMap(ctx, element, textPath, bidiLevel); Object o = map.get(TextAttribute.BI...
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 ma...
0
package org.apache.beam.sdk.util; import org.apache.beam.sdk.options.PipelineOptions; import org.apache.beam.sdk.transforms.DoFn; import org.apache.beam.sdk.util.DoFnRunners.OutputManager; import org.apache.beam.sdk.util.ExecutionContext.StepContext; import org.apache.beam.sdk.util.common.CounterSet.AddCounterMutator; ...
0
import org.apache.beam.runners.core.construction.SerializablePipelineOptions; private final SerializablePipelineOptions options; * @param options The {@link SerializablePipelineOptions}. SerializablePipelineOptions options, this.options = options; options.get(),
0
import org.apache.batik.bridge.resources.Messages; import org.apache.batik.ext.awt.image.renderable.ClipRable8Bit; import org.apache.batik.ext.awt.image.renderable.Filter; import org.apache.batik.gvt.filter.GraphicsNodeRableFactory; Viewport oldViewport = ctx.getViewport(); ctx.setViewport(new Objec...
0
import java.util.function.IntUnaryOperator; public static final IntUnaryOperator RESPONSE_BUFFER_GROWTH_FACTOR = Int2IntFunction.add(Byte.SIZE);
0
AccumuloConfiguration aconf = serverConfig.getSystemConfiguration(); DistributedTrace.enable(hostname, app, conf.getSystemConfiguration());
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(StorageBackfill.class);
0
public void verifyCompatibility(WindowFn<?, ?> other) throws IncompatibleWindowException { if (!this.isCompatible(other)) { throw new IncompatibleWindowException( other, "WindowOddEvenBuckets is only compatible with WindowOddEvenBuckets."); } } @Override
0
fail("Unexpected success: " + NamedResource.getNames(manager.getCipherFactories())); fail("Unexpected success: " + NamedResource.getNames(manager.getSignatureFactories())); fail("Unexpected success: " + NamedResource.getNames(manager.getMacFactories())); return initProperties(key, NamedR...
0
* int remainder = calculateModulus(code, true); int modulusResult = calculateModulus(code, false); int charValue = (modulus - modulusResult) % modulus; protected int calculateModulus(String code, boolean includesCheckDigit) throws CheckDigitException { /** * Add together the in...
0
* <p>Thread-safe. * <p>If a counter with the same name already exists, it will be * <p>If a counter with the same name already exists, it will be
0
@Nullable abstract String getConnectionProperties(); abstract Builder setConnectionProperties(String connectionProperties); /** * Sets the connection properties passed to driver.connect(...). * Format of the string must be [propertyName=property;]* * * <p>NOTE - The "user" and "passwor...
0
import org.mortbay.jetty.security.SslSelectChannelConnector; if (m_useNIO) { SslSelectChannelConnector s_listener = new SslSelectChannelConnector(); s_listener.addLifeCycleListener(new ConnectorListener(m_httpsPortProperty)); s_listener.setPort(m_httpsPort); s_lis...
0
import org.apache.felix.ipojo.metadata.Attribute; import org.apache.felix.ipojo.metadata.Element; * * * Check if the handler is valid. public boolean isValid() { return m_isValid; } * Get the handler name. public String getHandlerName() { return m_handlerName; } * ...
0
Copyright 2001 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...
0
import org.apache.commons.io.testtools.TestUtils; import org.junit.Before;
0
// TODO - we should add the processor to each container // This would avoid the hacky getting of the current container in the tree processor /* ComponentInfo processorInfo = (ComponentInfo) parentInfo.getComponents().get(Processor.ROLE); if ( processorI...
0
public class ArrayIterator<E> implements ResettableIterator<E> { @SuppressWarnings("unchecked") public E next() { return (E) Array.get(array, index++);
0
this.routeToPool = new HashMap<>(); this.leasingRequests = new LinkedList<>(); this.pending = new HashSet<>(); this.leased = new HashSet<>(); this.available = new LinkedList<>(); this.completedRequests = new ConcurrentLinkedQueue<>(); this.maxPerRoute = new HashMa...
0
/** Unit tests for {@link RowCoder}. */ .addByteField("f_byte") .addInt16Field("f_int16") .addInt32Field("f_int32") .addInt64Field("f_int64") .addDecimalField("f_decimal") .addFloatField("f_float") .addDoubleField("f_double") .addStringField("f_string") ...
0
else { // just set the configured location (FELIX-2034) this.webManagerRoot = newWebManagerRoot; }
0
/** A DAG of operators. */
0
package org.apache.beam.runners.core; import org.apache.beam.sdk.util.state.AccumulatorCombiningState; import org.apache.beam.sdk.util.state.BagState; import org.apache.beam.sdk.util.state.State; import org.apache.beam.sdk.util.state.StateBinder; import org.apache.beam.sdk.util.state.StateSpec; import org.apache.beam.s...
0
* {@code TimeDomain} specifies whether an operation is based on * timestamps of elements or current "real-world" time as reported while processing. */ public enum TimeDomain { /** * The {@code EVENT_TIME} domain corresponds to the timestamps on the elemnts. Time advances * on the system waterma...
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
package org.apache.felix.sigil.common.junit.server.impl;
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Throwables.getStackTraceAsString; import org.apache.beam.vendor.guava.v20_0.com.google.common.base.MoreObjects; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap;
0
//Producer: Role PRESTART_SUCCESS, //Producer: Role PRESTART_FAILURE,
0
package org.apache.accumulo.examples.simple.shard;
0
import org.apache.accumulo.core.client.BatchWriterConfig; BatchWriter bw = connector.createBatchWriter(table_name, new BatchWriterConfig());
0
.createExpression("if ((x * 2) == 5) true"); .createExpression("if ((x * 2) == 5) {y = 1} else {y = 2;}"); jexl.setCache(64); debuggerCheck(jexl); jexl.setCache(64); debuggerCheck(jexl);
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import org.apache.beam.vendor.grpc.v1p21p0.com.google.protobuf.InvalidProtocolBufferException; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap; import org.apache.beam.vendor.guav...
0
import org.apache.commons.configuration.builder.ConfigurationBuilderEvent; import org.apache.commons.configuration.event.EventListener; import org.apache.commons.configuration.event.EventType; public <T extends ConfigurationBuilderEvent> void addEventListener( EventType<T> eventType, EventListen...
0
public static Method getReadMethod( Class<?> target, String name )
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Throwables; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList;
0
* $Id$ this.eventManager = (DefaultEventManager)this.getBeanFactory().getBean(EventManager.class.getName()); component.setRole(EventManager.class.getName());
0
public static final String REPOSITORY_VERSION_DEFINITION_ID_PROPERTY_ID = PropertyHelper.getPropertyId("Repositories", "version_definition_id"); add(REPOSITORY_VERSION_DEFINITION_ID_PROPERTY_ID); put(Resource.Type.VersionDefinition, REPOSITORY_VERSION_DEFINITION_ID_PROPERTY_ID); if (null != respon...
0
package org.apache.beam.runners.flink.translation.functions;
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; static private final Logger log = LoggerFactory.getLogger(LargeSplitRowIT.class);
0
Shell.log.debug("Authorization label will be set to: " + le); lines.add("\t\t" + cvs);
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
throw new IllegalArgumentException("classname null");
1
import static org.apache.beam.sdk.transforms.Contextful.Fn.Context.wrapProcessContext; Contextful<Growth.PollFn<InputT, OutputT>> pollFn) { /** Watches the growth of the given poll function. See class documentation for more details. */ public static <InputT, OutputT> Growth<InputT, OutputT> growthOf( Gr...
0
import java.io.DataInput; * @param input Input stream RuntimeInvisibleParameterAnnotations(int name_index, int length, DataInput input, super(Constants.ATTR_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS, name_index, length, input,
0
import org.osgi.service.component.runtime.dto.ComponentDescriptionDTO; final ComponentDescriptionDTO main = findComponentDescriptorByName( "org.apache.felix.scr.integration.components.felix3680.Main" ); enableAndCheck(main); disableAndCheck( main );
0
import org.apache.ambari.server.state.MaintenanceState; * Gets the effective maintenance state for a host component * @return the maintenance state public MaintenanceState getEffectiveMaintenanceState(ServiceComponentHost sch) throws AmbariException;
0
package org.apache.accumulo.test.categories; public interface PerformanceTests {}
0
import java.util.Collection; import com.google.common.collect.Sets; public static String VALIDATE_ONLY_DIRECTIVE = "validate_only"; @Override public Collection<String> getCreateDirectives() { return Sets.newHashSet(VALIDATE_ONLY_DIRECTIVE); }
0
import org.apache.http.message.BasicLineParser; this.allocator = allocator != null ? allocator : HeapByteBufferAllocator.INSTANCE; this.responseParserFactory = new DefaultHttpResponseParserFactory( BasicLineParser.INSTANCE, responseFactory != null ? responseFactory : Defa...
0
import org.apache.accumulo.core.Constants; this(s.getBytes(Constants.UTF8)); return new String(data, offset, length, Constants.UTF8);
0
package org.apache.commons.jexl2.internal;
0
private int first, last; first = -1; if (glyphIdArray[i] > 0) { if (first == -1) first = i; last = i; } public int getFirst() { return first; } public int getLast() { return last; }
0
import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;
0
waitTime = waitFor * 10L;
0
import org.apache.hc.core5.util.Timeout; private final Timeout handshakeTimeout; final TlsStrategy tlsStrategy, final Timeout handshakeTimeout) { this.handshakeTimeout = handshakeTimeout; attachment, handshakeTimeout);
0
* The specified deletion strategy is used. * The specified deletion strategy is used. * loader it was started from terminates. This can constitute a memory leak.
0
import org.apache.hadoop.metrics2.sink.timeline.MetricClusterAggregate; import org.apache.hadoop.metrics2.sink.timeline.MetricHostAggregate;
0
package org.apache.felix.karaf.gshell.features.completers; import org.apache.felix.karaf.gshell.features.management.ManagedFeature; import org.apache.felix.karaf.gshell.features.management.ManagedFeaturesRegistry;
0
package org.apache.hadoop.metadata.typesystem.types;
0
this(Utils.readIndex(index), packageDir, bundleContext, deploymentAdmin);
0
* mutation with an exception.<br> * {@link TimeUnit#MICROSECONDS} or {@link TimeUnit#NANOSECONDS} will be truncated to the nearest {@link TimeUnit#MILLISECONDS}.<br>
0
package org.apache.beam.sdk.transforms.windowing; import static org.apache.beam.sdk.testing.WindowFnTestUtils.runWindowFn; import static org.apache.beam.sdk.testing.WindowFnTestUtils.set;
0
package org.apache.accumulo.monitor.servlets.trace;
1
final static int NUM_GC=60; System.err.println(">>>>> Objects not cleared: " + objStr); // System.err.println("Waiting for heap dump..."); // try { Thread.sleep(60000); } catch (InterruptedException ie) { } sb.append("'"); sb.append("'"); System.err.pr...
0
return logPath; } public Path getPath() { return new Path(logPath);
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
/** * Generated data to check that the wire format has not changed. To regenerate, see * {@link com.google.cloud.dataflow.sdk.coders.PrintBase64Encodings}. */ private static final List<String> TEST_ENCODINGS = Arrays.asList( "9f___w8", "_f___w8", "_____w8", "AA", "AQ", ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestFastArrayList1.java,v 1.5 2003/08/31 17:28:43 scolebourne Exp $ * $Revision: 1.5 $ * $Date: 2003/08/31 17:28:43 $ * any, must include the following acknowledgement: * ...
0
/** * Returns the String to be used as the PID of the service PID for the * {@link TargetedPID pid} retrieved from the configuration. * <p> * This method will return {@link TargetedPID#getServicePid()} most of * the time except if the service PID used for the consumer's service * regis...
0
import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.apache.flink.contrib.streaming.state.RocksDBStateBackend; import org.junit.After; static String path; super(s -> { path = "/tmp/.flink-test" + System.currentTimeMillis(); try { RocksDBSta...
0
import org.apache.http.annotation.ThreadSafe;
0
allResponse.add(new ClusterResponse(100L, "Cluster100", State.INSTALLED, null, null, null, null)); allResponse.add(new ClusterResponse(101L, "Cluster101", State.INSTALLED, null, null, null, null)); allResponse.add(new ClusterResponse(102L, "Cluster102", State.INSTALLED, null, null, null, null)); allResp...
0
* @version $Id: TestHierarchicalConfiguration.java,v 1.5 2004/03/13 17:04:04 epugh Exp $ conf = config.subset("tables.table.fields.field.name"); assertTrue("subset is not empty", conf.isEmpty());
0
protected AbstractPooledConnAdapter(final ClientConnectionManager manager, final AbstractPoolEntry entry) { public void open(final HttpRoute route, final HttpContext context, final HttpParams params) public void tunnelTarget(final boolean secure, ...
0
// Open some connection and make sure final CountDownLatch requestConns = new CountDownLatch(connNo); final AtomicInteger closedServerConns = new AtomicInteger(0); final AtomicInteger openServerConns = new AtomicInteger(0); final AtomicInteger closedClientConns = new AtomicInteg...
0
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly; return Tables.getTableState(tabletServer.getInstance(), extent.getTableId()) == TableState.DELETING; ProblemReports.getInstance(tabletServer).deleteProblemReport(getExtent().getTableId(), ProblemType.FILE_WRITE, ou...
0
Map<String, String> properties = new HashMap<>(); List<ServiceComponentHost> components = new ArrayList<>();
0
import org.apache.atlas.query.IntSequence;
0
import java.security.SecureRandom; /** AES 128 GCM Cipher */ public static final String AES_128_GCM = EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES128_GCM; /** AES 256 GCM Cipher */ public static final String AES_256_GCM = EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES256_GCM; ...
1
import java.util.ArrayList; List<String> messageJson = new ArrayList<>(); AbstractNotification.createNotificationMessages(message1, messageJson); AbstractNotification.createNotificationMessages(message2, messageJson); AbstractNotification.createNotificationMessages(message3, messageJson)...
0
import org.apache.cocoon.portal.aspect.Aspectalizable; * @version CVS $Id: ChangeAspectDataEvent.java,v 1.1 2003/05/23 14:20:09 cziegeler Exp $ public final class ChangeAspectDataEvent private Aspectalizable target; public ChangeAspectDataEvent(Aspectalizable target, String aspectName, Object data) { publi...
0
import org.apache.aurora.scheduler.base.TaskTestUtil; executor.clearResources().addAllResources(overhead.toResourceList(TaskTestUtil.DEV_TIER));
0
import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibil...
0
package org.apache.beam.sdk.metrics;
0
PCollection.createPrimitiveOutputInternal( firstSideInput.getPipeline(), firstSideInput.getWindowingStrategy(), firstSideInput.isBounded(), firstSideInput.getCoder());
0
import org.apache.beam.sdk.extensions.sql.SqlTransform; SqlTransform.query( customersFromWonderland.apply(SqlTransform.query("SELECT COUNT(id) FROM PCOLLECTION")); SqlTransform.query(
0