Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
/* * Copyright (c) 2000 World Wide Web Consortium, * (Massachusetts Institute of Technology, Institut National de * Recherche en Informatique et en Automatique, Keio University). All * Rights Reserved. This program is distributed under the W3C's Software * Intellectual Property License. This program is distributed...
1
import static org.hamcrest.Matchers.greaterThan; import java.util.concurrent.atomic.AtomicLong; private static final AtomicLong TEARDOWN_CALL = new AtomicLong(-1); @Test public void tearsDownFnsBeforeFinishing() { TEARDOWN_CALL.set(-1); final Pipeline pipeline = getPipeline(); pipeline.apply(Create.o...
0
/** * @since 4.3 */ public DefaultHttpRequestWriter(final SessionOutputBuffer buffer) { super(buffer, null); }
0
DocumentBuilder builder = XMLUtils.createDocumentBuilder(false); DocumentBuilder builder = XMLUtils.createDocumentBuilder(false); DocumentBuilder builder = XMLUtils.createDocumentBuilder(false); DocumentBuilder builder = XMLUtils.createDocumentBuilder(false);
0
@Test public void properArgumentsInUnlimitedRetry() { long startWait = 50l, maxWait = 5000l, waitIncrement = 500l; RetryFactory factory = new RetryFactory(startWait, waitIncrement, maxWait); Retry retry = factory.create(); Assert.assertEquals(Retry.MAX_RETRY_DISABLED, retry.getMaxRetries()); As...
0
/** Tests for {@link WriteWithShardingFactory}. */ assertThat(outputs, containsInAnyOrder(1)); assertThat(outputs, containsInAnyOrder(1)); PCollectionView<Long> elementCountView = inputCount.apply(View.<Long>asSingleton().withDefaultValue(countValue)); int shardNumber, int numShards, FileBas...
1
public PeerNotFoundException(String peer, String message, Throwable cause) { super("Peer '" + peer + "' not found " + message, cause); }
0
@Path("/{parameter: master|monitor}") model.put("redirect", null);
0
(elt, w, h); (elt, w, h);
0
import static org.junit.Assert.assertTrue; public class PKSignatureAlgorithmTest {
0
public <R,P> R accept(NodeVisitor<? extends R, ? super P> visitor, P data) { return visitor.visit(this, data); }
0
package org.apache.accumulo.core.clientImpl; import org.apache.accumulo.core.dataImpl.KeyExtent;
0
import org.apache.ambari.server.actionmanager.Request; public class AmbariCustomCommandExecutionHelperTest { @Captor ArgumentCaptor<Request> requestCapture; Mockito.verify(am, Mockito.times(1)).sendActions(requestCapture.capture(), any(ExecuteActionRequest.class)); Request request = requestCapture.ge...
0
if ( "file".equals( l.getScheme() ) ) { b.setLocation( new Path( new File( l ).getAbsolutePath() ) ); } else { b.setLocation( cachePath( info ) ); }
0
import org.apache.aurora.scheduler.TierManager; bind(TierManager.class).to(TierManager.TierManagerImpl.class); bind(TierManager.TierManagerImpl.class).in(Singleton.class);
0
import org.apache.hc.core5.reactor.ProtocolIOSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; final HttpConnection eventHandler = (HttpConnection) ((ProtocolIOSession) session).getHandler();
0
* @return int
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
/** * @since 6.0 */
0
import org.apache.beam.sdk.extensions.sql.meta.store.InMemoryMetaStore; private BeamSqlEnv(TableProvider tableProvider) { public static BeamSqlEnv withTableProvider(TableProvider tableProvider) { return new BeamSqlEnv(tableProvider); } public static BeamSqlEnv inMemory(TableProvider... tableProviders) { ...
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
* @param source An object ot encode Object encode(Object source) throws EncoderException;
0
/* * Copyright (C) 2015 Google Inc. * * 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 ...
0
private static final String LIST_FILE = "/suffixlist.txt";
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
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/decorators/Attic/TestBaseProxyIntList.java,v 1.2 2003/08/31 17:28:45 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this ack...
0
final int hash = MurmurHash2.hash32(input[i], input[i].length, 0x71b4954d); final int hash = MurmurHash2.hash32(input[i], input[i].length); final int hash = MurmurHash2.hash32(text); final int hash = MurmurHash2.hash32(text, 2, text.length() - 4); final long hash = MurmurHash2.hash64(input[i], input[i].len...
0
return prepareSingleTimelineMetric(startTime, host, null, metricName, val); } public static TimelineMetrics prepareSingleTimelineMetric(long startTime, String host, String instanceId, ...
0
* @version $Id$ * @since 2.2 */
0
* @param mode The new running mode. public void setRunningMode(String mode) { this.runningMode = mode;
0
keyType, getValueType(), getHints(), outputType);
0
/** * Pipeline runner registrar. */ /** * Pipeline options registrar. */
0
import org.apache.commons.dbcp2.PoolableConnection; protected PoolingDataSource<PoolableConnection> ds = null; private GenericObjectPool<PoolableConnection> pool = null; pool = new GenericObjectPool<>(factory); ds = new ManagedDataSource<>(pool, xaConnectionFactory.getTransactionRegistry());
0
import org.apache.accumulo.core.conf.SiteConfiguration; AccumuloConfiguration conf = SiteConfiguration.getInstance();
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
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestByteCollectionCollection.java,v 1.4 2003/11/16 22:15:08 scolebourne Exp $ import org.apache.commons.collections.primitives.RandomAccessByteList; * @v...
0
package org.apache.cocoon.core.container.spring.avalon;
0
import static org.apache.beam.sdk.values.RowType.toRowType; import org.apache.beam.sdk.extensions.sql.RowSqlType; import org.apache.beam.sdk.values.Row; import org.apache.beam.sdk.values.RowType; private static final RowType ROW_TYPE = RowSqlType.builder() protected PCollection<Row> getTestPCollection() { ...
0
CSSPrimitiveValue.CSS_NUMBER, CSSPrimitiveValue.CSS_NUMBER, CSSPrimitiveValue.CSS_NUMBER, CSSPrimitiveValue.CSS_NUMBER,
0
// TODO Remove deprecation warning suppression when Hadoop1 support is dropped
0
/* * Copyright 2002, 2003,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 requi...
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
public class Titan0GraphDatabase implements GraphDatabase<Titan0Vertex, Titan0Edge> { private static final Logger LOG = LoggerFactory.getLogger(Titan0GraphDatabase.class); private static volatile Titan0Graph atlasGraphInstance = null; private static volatile TitanGraph graphInstance = null; sync...
1
public static class LoggedInvokeMethod extends InvokeMethod {
0
import org.apache.sshd.common.PropertyResolverUtils; PropertyResolverUtils.updateProperty(sshd, FactoryManager.IDLE_TIMEOUT, TIMEOUT); PropertyResolverUtils.updateProperty(client, ClientFactoryManager.HEARTBEAT_INTERVAL, HEARTBEAT);
0
* Helper to gather statistics for an {@link HttpBenchmark HttpBenchmark}. * * <!-- empty lines above to avoid 'svn diff' context problems -->
0
* Custom {@link Windowing} can be set, otherwise values from input operator are used. super(name, flow, input, e -> B_ZERO, windowing); windowing, reducer);
0
* @version CVS $Id$ String format = (String) this.settings.get("format",name); try { return new SimpleDateFormat(format).format(new Date()); } catch (Exception e) { return new Date(); }
0
import java.io.OutputStream; import java.util.Arrays; import com.jcraft.jsch.JSch; import com.jcraft.jsch.Logger; import com.jcraft.jsch.UserInfo; import org.apache.sshd.common.Cipher; import org.apache.sshd.common.NamedFactory; import org.apache.sshd.common.Random; import org.apache.sshd.common.keyprovider.FileKeyPair...
0
import java.io.FilePermission; import java.security.AccessControlContext; import java.security.AccessController; import java.security.CodeSource; import java.security.Permission; import java.security.PermissionCollection; import java.security.Permissions; import java.security.Policy; import java.security.PrivilegedActi...
1
add(new JScrollPane(getNodeXmlArea()));
0
private static final Logger log = Logger.getLogger(RoundRobinLoggerStrategy.class); final List<String> preferences = new ArrayList<String>(); final String myHostName; public RoundRobinLoggerStrategy(TabletServer tserver) { String address = tserver.getClientAddressString(); myHostName = address.spl...
1
boolean isDS13 = m_componentMetadata.getDSVersion().isDS13();
0
String hadoopVal = getSensitiveFromHadoop(property); if (hadoopVal != null) { return hadoopVal; private String getSensitiveFromHadoop(Property property) { org.apache.hadoop.conf.Configuration hadoopConf = getHadoopConfiguration(); if (null != hadoopConf) { // Try to find the sensitiv...
0
import com.twitter.mesos.scheduler.storage.Storage.MutableStoreProvider; import com.twitter.mesos.scheduler.storage.Storage.MutateWork; public final MutableStoreProvider mutableStoreProvider; this.mutableStoreProvider = easyMock.createMock(MutableStoreProvider.class); private <T> IExpectationSetters<T> expectTr...
0
FlinkSingleOutputProcessContext<InputT, OutputT> context = new FlinkSingleOutputProcessContext<>( sideInputs, out ); context.setWindowedValue(value); context.setWindowedValue(explodedValue); context.setWindowedValue(null);
0
final int numericTableId = Integer.parseInt(tableId);
0
private int name_index; // Name of field/method private int signature_index; // and its signature. * @param name_index the name index of this constant */ public final void setNameIndex( int name_index ) { this.name_index = name_index; } /** * @param signature_index the signa...
0
* @param requestTimeout lease request timeout. Timeout requestTimeout,
0
final FailedServletDTO dto = (FailedServletDTO)ServletDTOBuilder.build((ServletInfo) info, failureCode); final FailedFilterDTO dto = (FailedFilterDTO)FilterDTOBuilder.build((FilterInfo) info, failureCode);
0
import org.apache.hc.core5.http.impl.bootstrap.AsyncRequesterBootstrap; import org.apache.hc.core5.http.impl.bootstrap.HttpAsyncRequester; import org.apache.hc.core5.http.impl.bootstrap.PooledClientEndpoint; final HttpAsyncRequester requester = AsyncRequesterBootstrap.bootstrap()
0
import javax.swing.Action;
0
import org.apache.commons.jxpath.JXPathAbstractFactoryException; throw new JXPathAbstractFactoryException( "Factory could not create a child node for path: " + asPath() + "/" + name + "[" + (index + 1) + "]");
0
* @version CVS $Id: EP_Left.java,v 1.2 2003/03/11 19:05:01 vgritsenko Exp $
0
assert(predicate != null); @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof UnaryPredicate)) return false; UnaryPredicate that = (UnaryPredicate) o; return predicate.equals(that.predicate); } @Override public int hashCode() { return predicat...
0
import org.apache.cocoon.components.source.SourceInspector; import org.apache.cocoon.components.source.helpers.SourceProperty; import org.apache.cocoon.util.AbstractLogEnabled; * * @version $Id$ public abstract class AbstractImageSourceInspector extends AbstractLogEnabled ...
0
private Map<String,Long> classifications = new HashMap<>(); private Map<String,Long> columnFamilies = new HashMap<>(); private Map<String,Long> columnQualifiers = new HashMap<>(); classifications = new HashMap<>(); columnFamilies = new HashMap<>(); columnQualifiers = new HashMap<>();
1
import org.apache.beam.sdk.coders.StringUtf8Coder; .apply(Read.from(UnboundedFlinkSource.of(kafkaConsumer))).setCoder(StringUtf8Coder.of()) .setCoder(AvroCoder.of(MyType.class))
0
@Override
0
import java.util.stream.Collectors; ListDataSink<Set<String>> out = ListDataSink.get(); .reduceBy(s -> s.collect(Collectors.toSet()))
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/BeanUtilsTestCase.java,v 1.27 2003/10/09 20:40:07 rdonkin Exp $ * $Revision: 1.27 $ * $Date: 2003/10/09 20:40:07 $ * Alternately, this acknowledgement may appear in the software ...
0
public Object escapeList(final List<?> values, final ValueTransformer transformer) protected Collection<String> splitString(final String s, final boolean trim) final Collection<String> result = new ArrayList<>(1); protected String escapeString(final String s)
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.accumulo.fate; import org.apache.accumulo.fate.TStore.TStatus; import org.apache.accumulo.fate.util.Daemon; import org.apache.accumulo.fate.util.LoggingRunnable;
1
import org.apache.beam.sdk.io.fs.MatchResult.Metadata; import org.apache.beam.sdk.options.ValueProvider.StaticValueProvider; super(StaticValueProvider.of(fileOrPatternSpec), minBundleSize); public BlockBasedSource(Metadata metadata, long minBundleSize, long startOffset, long endOffset) { super(metadata, minBu...
0
import org.apache.sshd.common.util.buffer.Buffer; import org.apache.sshd.common.util.buffer.ByteArrayBuffer; @Override @Override messageReceived(new ByteArrayBuffer(buf, 0, result)); @Override
0
import org.junit.Assume; import org.junit.BeforeClass; import java.io.File; import java.net.URISyntaxException; import java.net.URL; import static org.apache.ambari.metrics.alertservice.prototype.TestRFunctionInvoker.getTS; private static double[] ts; private static String fullFilePath; @BeforeClass public st...
0
import org.codehaus.jackson.annotate.JsonProperty; private int responseId = -1; @JsonProperty("responseId") public int getResponseId() { @JsonProperty("responseId") public void setResponseId(int responseId) {
1
* Copyright 2001-2005 The Apache Software Foundation
0
@SqlOperatorTest(name = "POSITION", kind = "POSITION")
0
public void setStatusLine(final StatusLine statusline) { public void setStatusLine(final ProtocolVersion ver, final int code) { public void setStatusLine(final ProtocolVersion ver, final int code, final String reason) { public void setStatusCode(final int code) throws IllegalStateException { public ...
0
try (FileOutputStream out = new FileOutputStream(file)) {
0
extends RestrictionTracker<SomeRestriction, Void> {} abstract class SomeDefaultTracker extends RestrictionTracker<RestrictionWithDefaultTracker, Void> {}
0
* @version $Id$
0
file.println("<P><TT>" + Class2HTML.toHTML(constant_pool.constantToString(index, tag)) + "</TT>\n");
0
if (nextComma == -1) { break; } if (!isTokenChar(src.charAt(offs))) { parseError(); } if (!isTokenChar(src.charAt(offs))) { break; } if (!m.find()) { parseError(); } if (m.start() != 0) { parseError(); } if (src.charAt(offs) != '...
0
public int deleteAll() throws FileSystemException { return decoratedFileObject.deleteAll(); }
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.hc.client5.http.impl.classic; import org.apache.hc.client5.http.classic.ExecRuntime;
0
AfterPane.elementCountAtLeast(2), AfterPane.elementCountAtLeast(100)), Repeatedly.forever(AfterPane.elementCountAtLeast(2)), AfterPane.elementCountAtLeast(100)), AfterPane.elementCountAtLeast(5) .orFinally(AfterWatermark.pastEndOfWindow()), ...
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
if (source.implies(target))
0
import javax.inject.Inject;
1
class Context { void encode(T value, OutputStream outStream, Context context) T decode(InputStream inStream, Context context) List<? extends Coder<?>> getCoderArguments(); CloudObject asCloudObject(); void verifyDeterministic() throws Coder.NonDeterministicException; boolean consistentWithEquals(); Obje...
0
KEY_PROPERTY_IDS.put(Resource.Type.Cluster, ALERT_CLUSTER_NAME); KEY_PROPERTY_IDS.put(Resource.Type.Service, ALERT_SERVICE); KEY_PROPERTY_IDS.put(Resource.Type.Host, ALERT_HOST);
0
import java.util.List; private static final List<String> NAMES = Arrays.asList("JEXL", "Jexl", "jexl", "JEXL2", "Jexl2", "jexl2"); private static final List<String> EXTENSIONS = Arrays.asList("jexl", "jexl2"); private static final List<String> MIMES = Arrays.asList("application/x-jexl", "application/x-jexl2...
0
if (!outbuf.hasData() && outputRequests.compareAndSet(pendingOutputRequests, 0)) { ioSession.clearEvent(SelectionKey.OP_WRITE); } else { outputRequests.addAndGet(-pendingOutputRequests); }
0
import org.apache.http.nio.impl.reactor.SessionInputBuffer;
0
public void setTemporalInfo(Map<PropertyId, TemporalInfo> mapTemporalInfo);
0
c.securityOperations().revokeNamespacePermission(u1, n2, NamespacePermission.DROP_NAMESPACE);
0