Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import org.junit.BeforeClass; import java.io.FileOutputStream; @BeforeClass public static void beforeClass() throws IOException { String sm = "grant { permission java.security.AllPermission; };"; File tmp = File.createTempFile("batik", "sm"); FileOutputStream fos = new FileOutputStream(...
0
/* replay(fileToUpload, compressedFile); S3Uploader s3Uploader = new S3Uploader(s3OutputConfiguration, true, LOG_TYPE) { protected void uploadFileToS3(String bucketName, String s3Key, File localFile, String accessKey, String secretKey) { } replay(fileToUpload, compressedFile); S3Uploader s3U...
0
DefaultSshFuture future = new DefaultSshFuture(getCurrentTestName(), null); Object expected = new Object(); DefaultSshFuture future = new DefaultSshFuture(getCurrentTestName(), null); AtomicInteger listenerCount = new AtomicInteger(0); Object expected = new Object(); SshF...
0
package org.apache.bcel.generic; super(org.apache.bcel.Const.I2B);
1
Capture<Watcher> cw = new Capture<>(); Capture<Watcher> cw = new Capture<>();
0
* Supports translation between a Beam transform, and Spark's operations on DStreams. throw new UnsupportedOperationException("Beam transformation " + clazz // In Beam it depends on the PTransform's Input and Output class * Translator matches Beam transformation with the appropriate Spark streaming eva...
0
HelperNodeList contextNodes = null; if (contextChild != null) { contextNodes = new HelperNodeList(); XMLUtils.addReturnToElement(doc, contextNodes); contextNodes.appendChild(contextChild); XMLUtils.addReturnToElement(doc, contextNodes); ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/map/AbstractTestOrderedMap.java,v 1.2 2003/12/01 22:34:54 scolebourne Exp $ import org.apache.commons.collections.OrderedMap; * @version $Revision: 1.2 $ $Date: 2003/12/01 22:34:5...
0
KerberosServiceDescriptor(Map<?, ?> data) { KerberosServiceDescriptor(String name, Map<?, ?> data) {
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
* Returns {@code true} if the specified * @return {@code true} if the specified * Returns {@code true} if the specified * @return {@code true} if the specified
0
* or more contributor license agreements. See the NOTICE file * regarding copyright ownership. The ASF licenses this file * with the License. You may obtain a copy of the License at * KIND, either express or implied. See the License for the
0
index = (bytes.getIndex() + bytes.readShort() - 1); int end = (start + vars[j].getLength());
0
final StringBuilder nameBuf = new StringBuilder(); final StringBuilder sb = new StringBuilder(); final StringBuilder buf = new StringBuilder();
0
import java.util.Collection; import org.junit.Assume; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; @RunWith(Parameterized.class) // see https://github.com/junit-team/junit/wiki/Parameterized-tests private final BuiltinDHFactories facto...
0
expected.offer.offerSetModule = NoopModule.class; "-offer_set_module=org.apache.aurora.scheduler.config.CommandLineTest$NoopModule",
0
this.setMimeTypeForSerializer(environment);
0
import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.UUID; import org.apache.atlas.typesystem.types.utils.TypesUtil; import com.google.common.annotations.VisibleForTesting; import com.google.common.co...
0
if (startRow == null && endRow == null && size < 0) { shellState.getReader().flushConsole(); String line = shellState.getReader().readLine("Merge the entire table { " + tableName + " } into one tablet (yes|no)? "); if (line == null) return 0; if (!line.equalsIgnoreCase("y") && !line....
1
import static org.apache.felix.http.base.internal.util.UriUtils.compactPath; import static org.apache.felix.http.base.internal.util.UriUtils.concat; import static org.apache.felix.http.base.internal.util.UriUtils.decodePath; import static org.apache.felix.http.base.internal.util.UriUtils.relativePath; import static org...
0
import com.google.inject.Inject; import com.thinkaurelius.titan.core.util.TitanCleanup; import org.apache.atlas.RepositoryMetadataModule; import org.testng.annotations.Guice; @Guice(modules = RepositoryMetadataModule.class) @Inject GraphProvider<TitanGraph> graphProvider; @Inject TypeSystem.getInst...
0
public void testClearProperty() throws Exception public void testRegisterEntityId() throws Exception public void testAddNodesToSubnodeConfiguration() throws Exception
0
import com.google.common.collect.ImmutableMap; public BeamSqlPrimitive evaluate( Row inputRow, BoundedWindow window, ImmutableMap<Integer, Object> correlateEnv) { paras.add(e.evaluate(inputRow, window, correlateEnv).getValue());
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
private int m_state = STOPPED; if(m_state != STOPPED) { return; } // Instance already started if(m_state == STOPPED) { return; } // Instance already stopped m_state = STOPPED; if (state == INVALID) { m_factory.getLogger().log(Logger.INFO, "[" + m_className + "] St...
0
case UpgradeSummary: resourceDefinition = new SimpleResourceDefinition( Resource.Type.UpgradeSummary, "upgrade_summary", "upgrade_summary"); break;
0
* * * * @version $Revision: 1.5 $ //------------------------------------------------------------------------- * Sets the subject as a String which is used to create the //------------------------------------------------------------------------- }
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
private I18n() { // we don't allow instantiation }
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/test/org/apache/commons/digester/plugins/TestDeclaration.java,v 1.2 2003/10/05 15:29:37 rdonkin Exp $ * $Revision: 1.2 $ * $Date: 2003/10/05 15:29:37 $ * ==============================================================...
0
private static byte[] ROW_PREFIX = "row_".getBytes(UTF_8); private static byte[] COL_PREFIX = "col_".getBytes(UTF_8); public static byte[] genRandomValue(Random random, byte[] dest, int seed, int row, int col) { byte[] randomValue = new byte[opts.dataSize]; byte[] value; byte[] value;
0
import org.apache.beam.sdk.testing.NeedsRunner; @Category(NeedsRunner.class) @Category(RunnableOnService.class) @Category(RunnableOnService.class)
0
package org.apache.http.impl.nio.reactor; import org.apache.http.nio.reactor.IOSession; import javax.net.ssl.SSLException; import javax.net.ssl.SSLSession; import java.net.SocketAddress; /** * This is an extended interface of the SSLIOSessionHandler - to maintain backwards compatibility but yet solve HTTPCORE-217 ...
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...
0
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Collections;
0
/** Get the bound {@link DoFn}. */ DoFn<InputT, OutputT> getFn();
0
public class INIConfiguration extends BaseHierarchicalConfiguration implements FileBasedConfiguration public INIConfiguration() * Creates a new instance of {@code INIConfiguration} with the public INIConfiguration(HierarchicalConfiguration c) * to the storage scheme used by {@code INIConfigura...
0
@Deprecated
1
return input .apply( ParDo.of( new DoFn<T, T>() { @ProcessElement public void processElement(ProcessContext c) { if (predicate.apply(c.element())) { c.output(c.element()); } ...
0
import com.google.cloud.dataflow.sdk.transforms.windowing.Trigger; import com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.TimeDomain; import com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.TriggerContext; import com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.TriggerId; import com.googl...
0
assertEquals(Double.valueOf(0.0), reader.getFractionConsumed()); assertEquals(Double.valueOf(0.0), reader.getFractionConsumed());
0
* {@link HttpServerRequestHandler} implementation that delegates request processing * to a {@link HttpServerFilterChainElement}. *
0
import org.apache.cocoon.portal.LayoutException;
0
* The interface(s) to use when registering adapters. By default, directly implemented * interfaces will be registered in the OSGi registry. */ Class<?>[] provides() default {}; /** * Adapter Service properties. Notice that public factory configuration is also registered in service properti...
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Joiner;
0
// System.out.println("GetBounds2D called"); // System.out.println("Rendering called"); // System.out.println("R2d: " + r2d); // System.out.println("AOI: " + aoiR2d);
0
public static final String AGGREGATORS_SKIP_BLOCK_CACHE = "timeline.metrics.aggregators.skip.blockcache.enabled";
0
* The parent element of a used element is the &lt;use&gt; element
0
final HttpHost target = authority != null ? new HttpHost(scheme, authority) : route.getTargetHost();
0
/** LeftJoin builder which adds input {@link Dataset} to operator under build. */ /** LeftJoin builder which adds key extractors to operator under build. */ /** LeftJoin builder which adds joining function to operator under build. */
0
* @param uriInfo the host info, with no SSL key information
0
import org.apache.sshd.sftp.subsystem.SftpConstants; public class SshFxpMkdirRequest extends BaseRequest { public SftpConstants.Type getMessage() { return SftpConstants.Type.SSH_FXP_MKDIR; } return getName() + "[path=" + path + "]";
0
cfg.setSiteConfig(siteConfig);
0
public T from(File f) throws Exception { IO.copy(f, this); return digest(); } public T from(byte[] f) throws Exception { IO.copy(f, this); return digest(); }
0
LOG.warn("Ignore the error and retry the request.", e);
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Predicates; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList; import org.apache.beam.vendor.guava.v20_0.com.google.common...
0
import cz.seznam.euphoria.shadow.com.google.common.collect.Iterables;
0
* @author William Farner // TODO(John Sirois): XXX verify reads are behind barriers // TODO(William Farner): Might have to be smarter here so as to not be burned by different
0
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
0
@Deprecated @Deprecated
0
import org.osgi.service.command.CommandSession; import org.osgi.service.command.Converter; import org.osgi.service.threadio.ThreadIO;
0
log.trace("next({})[{}][K_S]: {}", this, session, BufferUtils.toHex(k_s)); log.trace("next({})[{}][f]: {}", this, session, BufferUtils.toHex(f)); log.trace("next({})[{}][sigH]: {}", this, session, BufferUtils.toHex(sigH));
0
/** * Wrapper class for TAB completion to service names. */ public class Service extends AbstractCompletion { super(name);
0
* with {@link org.apache.commons.net.DatagramSocketClient#open open } * and call {@link #send send } to send the datagram that will * call {@link #receive receive }, and you're done. For netstat and * {@link org.apache.commons.net.DatagramSocketClient#close close() }
0
import java.util.Iterator; Iterator<ChangeRecord> iter = zks.outstandingChanges.descendingIterator(); while (iter.hasNext()) { ChangeRecord c = iter.next(); long firstZxid = zks.outstandingChanges.peek().zxid;
0
* @since 1.7 * @since 1.7
0
+ "(\\S*)\\s*" // 12 + "(\\S+)\\s*" // 13 + "(\\S*)\\s*" // 14 user + "(\\d*)\\s*" // 15 group + "(\\d*)\\s*" // 16 filesize + MONTHS // 17 month + "\\s*" // TODO should the space be optional? // TODO \\d* should be \\d? surely ? Otherwise 0111...
0
for (byte element : arrayOctet) { if (isBase64(element)) {
0
import com.google.common.collect.Lists; import com.google.common.collect.Sets;
0
LOG.info("==> AtlasTypeDefGraphStoreV1.init()"); LOG.info("<== AtlasTypeDefGraphStoreV1.init()");
0
import org.apache.ambari.logsearch.solr.SolrConstants; import org.apache.commons.lang.StringUtils; import org.springframework.data.solr.core.query.SimpleFacetQuery; @Override public void appendFacetQuery(SimpleFacetQuery facetQuery, FieldAuditLogRequest request) { addInFiltersIfNotNullAndEnabled(facetQuery, req...
0
+ " sessionId=" + Long.toHexString(sessionId)
0
import org.apache.batik.bridge.Mark;
0
package org.apache.felix.sigil.ui.eclipse.ui.editors.project; import org.apache.felix.sigil.eclipse.SigilCore; import org.apache.felix.sigil.eclipse.model.project.ISigilProjectModel; import org.apache.felix.sigil.model.eclipse.ISigilBundle; import org.apache.felix.sigil.ui.eclipse.ui.SigilUI; import org.apache.felix.si...
0
import org.slf4j.LoggerFactory; sleep = Math.max(sleep, (AddressUtil.getAddressCacheNegativeTtl((UnknownHostException) (exception.getCause())) + 1) * 1000);
0
PCollection<OutputT> output = (PCollection<OutputT>) context.getOutput(); context.getInput()); context.setOutputStream(context.getOutput(), outputStream);
0
repeater.clear();
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...
0
static final String ERROR_CONTEXT_NULL = public DefaultImageHandler() { public void handleImage(Image image, Element imageElement, SVGGeneratorContext generatorContext) { handleHREF(image, imageElement, generatorContext); public void handleImage(RenderedImage image, E...
0
/* * $Id$ * 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...
0
TreeSet<Long> rows = new TreeSet<>();
1
import java.net.URL; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import org.apache.batik.dom.svg.SAXSVGDocumentFactory;
0
try (SshServer sshd = new SshServer()) { try (SshServer sshd = createTestServer()) { try (SshServer sshd = createTestServer()) { try (SshServer sshd = createTestServer()) {
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...
0
import org.apache.accumulo.core.util.shell.Token;
0
ExitCodeException ece = new ExitCodeException(e.getExitCode(), "stderr: " + e.getMessage() + ", stdout: " + output); log.error("Failed to run command", ece); return Maps.immutableEntry(e.getExitCode(), output);
0
import org.apache.accumulo.core.util.SslConnectionParams; return getTransport(String.format("%s:%d", addr.getHostText(), addr.getPort()), conf.getTimeInMillis(Property.GENERAL_RPC_TIMEOUT), SslConnectionParams.forClient(conf)); public TTransport getTransport(String location, long milliseconds, SslConnectionParams...
0
import com.google.common.collect.ImmutableList; public static TriggerStateMachine inOrder(Iterable<? extends TriggerStateMachine> triggers) { return new AfterEachStateMachine(ImmutableList.copyOf(triggers)); }
0
* Copyright 2000-2009 The Apache Software Foundation
0
* Returns snapshot of all knows routes * * @since 4.4 */ public Set<T> getRoutes() { this.lock.lock(); try { return new HashSet<T>(routeToPool.keySet()); } finally { this.lock.unlock(); } } /**
0
import org.apache.sshd.client.UserInteraction; if (cmd == SshConstants.Message.SSH_MSG_USERAUTH_BANNER) { String welcome = buffer.getString(); String lang = buffer.getString(); log.debug("Welcome banner: " + welc...
0
@Override @Override
0
* Extension of {@link AbstractTestSet} for exercising the
0
import org.apache.beam.runners.core.metrics.MetricsContainerImpl; MetricsContainerImpl container = new MetricsContainerImpl("any"); MetricsEnvironment.setCurrentContainer(container); long droppedValues = container.getCounter( droppedValues = container.getCounter(
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
import static org.junit.Assert.assertTrue;
0
* * * /** //-------------------------------------------------------------------------
1
/** * @deprecated (4.1) do not use */
0
import org.apache.beam.model.fnexecution.v1.BeamFnApi;
0
boolean caughtException = false;
0