Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
package org.apache.http.impl.client.execchain; public class ProtocolExec implements ClientExecChain {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbutils/src/java/org/apache/commons/dbutils/ResultSetIterator.java,v 1.2 2003/11/28 19:32:10 dgraham Exp $ * $Revision: 1.2 $ * $Date: 2003/11/28 19:32:10 $ private RowProcessor convert = new BasicRowProcessor();
0
private boolean rawVariable; if (rawVariable) { return expanded; } rawVariable = true;
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.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; import static org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables.getOnlyElement;
0
* Job success on Dataflow means that it handled transient errors (if any) successfully * by retrying failed bundles. */ @Test public void testRunBatchJobThatSucceedsDespiteTransientErrors() throws Exception { Pipeline p = Pipeline.create(options); PCollection<Integer> pc = p.apply(Create.of(1, 2, 3...
0
import org.xml.sax.ContentHandler; import org.xml.sax.SAXException; * @version CVS $Id: PlainDecimalConvertor.java,v 1.2 2004/04/10 13:40:27 bruno Exp $ public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException { // intentionally empty }
0
import java.io.File;
0
public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { public static <T> Predicate<T> anyPredicate(final Collection<? extends Predicate<T>> predicates) { final Predicate<? super T>[] preds = FunctorUtils.validate(predicates); public AnyPredicate(final Predicate<? sup...
0
import org.apache.felix.ipojo.test.composite.service.CheckService; Factory fact1 = Utils.getFactoryByName(sc2, "COMPO-SimpleCheckServiceProvider"); Factory fact2 = Utils.getFactoryByName(sc2, "COMPO-FooProviderType-1");
0
void setActivator(String activator); void setCategory(String category); void setContactAddress(String contactAddress); void setCopyright(String copyright); void setDocURI(URI docURI); void addExport(IPackageExport packageExport); void removeExport(IPackageExport packageExport); void addI...
0
@Override
0
public class JobTest {
0
package com.twitter.mesos.executor.httphandlers; import com.google.inject.Inject; import com.twitter.common.base.Closure; import com.twitter.common.net.http.handlers.StringTemplateServlet; import com.twitter.mesos.executor.ExecutorCore; import org.antlr.stringtemplate.StringTemplate; import javax.servlet.ServletExcep...
0
public PCollection<T> expand(PBegin input) {
0
Object o = new JsonSerializer().serialize(result).toString().replace("\r", ""); Object o = new JsonSerializer().serialize(result).toString().replace("\r", ""); Object o = new JsonSerializer().serialize(result).toString().replace("\r", "");
0
import org.apache.sshd.server.Command; import org.apache.sshd.server.Environment; import org.apache.sshd.server.ExitCallback; * when the command is not known, as it is supposed to always public class UnknownCommand implements Command { public void setExitCallback(ExitCallback callback) { public void start(Envi...
0
import java.util.Collections; import java.util.Optional; import org.apache.beam.model.pipeline.v1.RunnerApi.CombinePayload; import org.apache.beam.model.pipeline.v1.RunnerApi.Components; import org.apache.beam.sdk.runners.AppliedPTransform; addCoders(getAccumulatorCoder(node.toAppliedPTransform(getPipeline(...
0
.apply(WithKeys.of(value -> Arrays.hashCode(value.getId()) % NUM_RESHARD_KEYS))
0
* @version $Id$
0
* @author <a href="mailto:rolandw at apache.org">Roland Weber</a>
0
private final AbstractCustomBinding wrappedBinding; * public CustomJXPathBinding(CommonAttributes commonAtts, String widgetId, String xpath, AbstractCustomBinding wrappedBinding) { * * @param frmModel the narrowed widget-scope from the parent binding * @para...
0
FtpRandomAccessContent(final FtpFileObject fileObject, final RandomAccessMode mode) public void seek(final long pos) throws IOException final int ret = super.read(); public int read(final byte[] b) throws IOException final int ret = super.read(b); public i...
1
import org.apache.commons.text.WordUtils;
0
for (final File privateKeyFile : identities)
0
Map<String,Variant> variants = impl.getVariantCacheEntriesWithEtags(host, request); Map<String,Variant> variants = impl.getVariantCacheEntriesWithEtags(host, req1);
0
import org.apache.beam.runners.core.ActiveWindowSet;
0
return remove(expression) != null;
0
import com.google.common.base.Optional; // in case this is called directly from TopologyManager there's no HostRoleCommand .withRequestId(getHostRoleCommand() != null ? getHostRoleCommand().getRequestId() : -1) .withTaskId(getHostRoleCommand() != null ? getHostRoleCommand().getTaskId() : -1)
0
setLocation(repeaterElement, repeaterDefinition);
0
/** * The temporary file prefix. */ private String prefix; /** * The temporary file suffix. */ private String suffix; /** * The directory to use for temporary files. */ private File directory; /** * Constructs an instance of this class which will trigger...
0
* Copyright (C) 2015 Google Inc.
0
public class NativeMapIT extends ConfigurableMacIT {
0
import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl;
0
import org.junit.Assert; Assert.assertTrue("waiting for server 1 being up", Assert.assertTrue("waiting for server 2 being up", Assert.assertEquals(new String(zk.getData("/foo_q1", null, null)), "foobar1"); Assert.assertEquals(new String(zk.getData("/foo_q2", null, null)), "foobar2"); ...
0
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
0
* @version $Revision$
0
Write write = (Write) application.getTransform(); return write.getSharding() == null && write.getNumShards() == null;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/core/CoreTagLibrary.java,v 1.14 2002/07/15 15:06:19 jstrachan Exp $ * $Revision: 1.14 $ * $Date: 2002/07/15 15:06:19 $ * $Id: CoreTagLibrary.java,v 1.14 2002/07/15 15:06:19 jstrachan E...
0
package org.apache.commons.codec.digest; import org.junit.Assert; import org.junit.Test; /** * Test class for PureJavaCrc32C. * Test data was derived from * https://tools.ietf.org/html/rfc3720#appendix-B.4 */ public class PureJavaCrc32CTest { private final PureJavaCrc32C crc = new PureJavaCrc32C(); ...
0
/** * Gets the used comparator name. * Null if no comparator (i.e. OSGi one is used). * @return the comparator class name or null if the dependency doesn't use a comparator. */ public String getComparator() { if (m_comparator != null) { return m_comparator.getClass()...
0
* @see org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect#toSAX(org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext, org.apache.cocoon.portal.om.Layout, org.xml.sax.ContentHandler) super.toSAX(rendererContext, layout, handler); ContentHandler ha...
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
/** * 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 javax.annotation.concurrent.Immutable; @Immutable
0
Predicate<Object> predicate = new Predicate<Object>() { Set<Object> set = SetUtils.predicatedSet(new HashSet<Object>(), predicate); assertTrue("returned object should be a PredicatedSet", set instanceof PredicatedSet); set = SetUtils.predicatedSet(new HashSet<Object>(), null); ...
0
protected List<String> createType(String typesAsJSON) throws Exception { return serviceClient.createType(TypesSerialization.fromJson(typesAsJSON));
0
import java.nio.charset.StandardCharsets; this(AddressUtil.parseAddress(new String(address.get(), StandardCharsets.UTF_8), false), session.toString()); return new Value(getLocation().toString().getBytes(StandardCharsets.UTF_8));
0
for (String actualClassificationName : actualClassifications) { entityStore.deleteClassification(dbEntityGuid, actualClassificationName); } entityStore.deleteClassification(dbEntityGuid, TAG_NAME); entityStore.deleteClassification(tblEntityGuid, TAG_NAME);
0
HttpRequestHandlerMapper handlerResolver = Mockito.mock(HttpRequestHandlerMapper.class); HttpRequestHandlerMapper handlerResolver = Mockito.mock(HttpRequestHandlerMapper.class); HttpRequestHandlerMapper handlerResolver = Mockito.mock(HttpRequestHandlerMapper.class); HttpRequestHandlerMap...
0
import org.apache.cocoon.components.flow.FlowHelper; public class JavaScriptFlow extends FlowHelper { public static final String PACKAGES_OBJECT = "cocoon.flow.js.packages"; public static final String JAVA_PACKAGE_OBJECT = "cocoon.flow.js.packages.java"; return (Scriptable)reque...
0
renderContext); //selectionNode = source;
0
buffer.append(element.getValue()); //@@@ quoting? BasicHeaderValueFormatter.DEFAULT.formatNameValuePair (buffer, params[i], false);
0
new PoolableManagedConnection(transactionRegistry, conn, getPool(), getDisconnectionSqlCodes(), isFastFailValidation());
0
import org.apache.accumulo.test.randomwalk.Environment; public void visit(State state, Environment env, Properties props) throws Exception { Connector conn = env.getConnector(); WalkingSecurity ws = new WalkingSecurity(state,env); String targetUser = WalkingSecurity.get(state,env).getSysUserName();
0
import org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator; setZooKeeperInstance(job, new ClientConfiguration().withInstance(instanceName).withZkHosts(zooKeepers)); *
0
return "INSERT INTO ds_jobimpl_" + id + " values (?,'','','','','default',?,0,'','','',?,?,?,'','job','','',?,?,'','Worksheet')"; return "INSERT INTO ds_jobimpl_" + id + " values (?,'','','','','default',?,0,'','','','',?,?,?,'','job','','',?,?,'','Worksheet')";
0
import java.awt.Color; import java.awt.Graphics2D; import java.awt.RenderingHints;
0
/* Copyright 2003 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...
0
/** * Write the bytes to both streams. * @param b the bytes to write * @throws IOException if an I/O error occurs */ /** * Write the specified bytes to both streams. * @param b the bytes to write * @param off The start offset * @param len The number of bytes to write ...
0
* @version CVS $Id$
0
* the settings of the {@link DynamicSettings} object are mutable.
0
import jline.console.ConsoleReader; reader.println(itopts.getDescription()); reader.flush(); reader.println(); reader.println(Shell.repeat("-", 10) + "> entering options: " + desc); reader.flush(); reader.println(); reader.println("invalid options ...
0
public static AccumulationMode fromProto(RunnerApi.AccumulationMode.Enum proto) { public static RunnerApi.AccumulationMode.Enum toProto(AccumulationMode accumulationMode) { return RunnerApi.AccumulationMode.Enum.DISCARDING; return RunnerApi.AccumulationMode.Enum.ACCUMULATING; public static RunnerA...
0
package org.apache.xml.security.stax.ext; import org.apache.xml.security.stax.crypto.Crypto; import org.apache.xml.security.stax.crypto.MerlinBase; decryptionCryptoClass = org.apache.xml.security.stax.crypto.Merlin.class; encryptionCryptoClass = org.apache.xml.security.stax.crypto.Merlin.class; ...
0
import java.util.Collection; Handle open(String path, Collection<OpenMode> options) throws IOException;
0
* Repository.setRepository method.
0
HttpClient httpclient = new DefaultHttpClient(cm); try { // create an array of URIs to perform GETs on String[] urisToGet = { "http://hc.apache.org/", "http://hc.apache.org/httpcomponents-core-ga/", "http://hc.apache.org/httpcompone...
0
* Portion of a file that must be replication to the given target: peer and some identifying * location on that peer, e.g. remote table ID checkArgument(BYTE_SEQ_NAME.equals(k.getColumnFamilyData()), "Given replication work key with incorrect colfam"); checkArgument(BYTE_SEQ_NAME.equals(k.get...
0
import com.twitter.mesos.scheduler.base.JobKeys; public static final Function<TwitterTaskInfo, String> INFO_TO_STRING_JOB_KEY = public static final Function<AssignedTask, String> ASSIGNED_TO_STRING_JOB_KEY = Functions.compose(INFO_TO_STRING_JOB_KEY, ASSIGNED_TO_INFO); public static final Function<Scheduled...
0
* Tries to obtain an instance from a null parameters map. */ @Test(expected = IllegalArgumentException.class) public void testFromParametersNull() { FileBasedBuilderParametersImpl.fromParameters(null); } /**
0
import org.apache.accumulo.cloudtrace.thrift.TInfo;
0
private static class MaxFn<T> extends BinaryCombineFn<T> { private static class MaxIntegerFn extends Combine.BinaryCombineIntegerFn { private static class MaxLongFn extends Combine.BinaryCombineLongFn { private static class MaxDoubleFn extends Combine.BinaryCombineDoubleFn {
0
r1.setStackVersion("HDP-1.2.0"); Assert.assertEquals("HDP-1.2.0", r1.getStackVersion());
0
import org.apache.avalon.framework.configuration.DefaultConfiguration; component.setConfiguration(new DefaultConfiguration("-")); component.setConfiguration(new DefaultConfiguration("-")); component.setConfiguration(new DefaultConfiguration("-")); component.setConfigurati...
0
4. The names "Apache Cocoon" and "Apache Software Foundation" must not be Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. * @version $Id: EventImpl.java,v 1.2 2004/03/01 20:11:17 joerg Exp $ /** * @see Object#equals(O...
0
@QueryParam("format") String format, .request("databases", searchId, false, fromBeginning, count, format, new Callable<Cursor>() { @Override public Cursor call() throws Exception { TSessionHandle sessio...
0
import static net.sf.ehcache.config.PersistenceConfiguration.Strategy; import org.apache.ambari.server.configuration.Configuration; import org.slf4j.Logger; import org.slf4j.LoggerFactory;
0
import org.apache.beam.sdk.transforms.windowing.TimestampCombiner; private static final StateTag<Object, WatermarkHoldState> watermarkHoldTag = "hold", TimestampCombiner.LATEST)); WatermarkHoldState holdState =
0
String sym = m_felix.getBundleSymbolicName(this); if (sym != null) { return m_felix.getBundleSymbolicName(this) + " [" + getBundleId() +"]"; } return "[" + getBundleId() +"]";
1
import org.apache.beam.sdk.annotations.Experimental; @Experimental(Experimental.Kind.SOURCE_SINK)
0
import java.util.List; private List<ProxyConfiguration> proxyConfigurations; public OSGiCredentialsProvider(final List<ProxyConfiguration> proxyConfigurations) { this.proxyConfigurations = proxyConfigurations; for (final ProxyConfiguration proxyConfiguration : proxyConfigurations) { ...
0
import org.apache.http.ProtocolException; message.addHeader("Transfer-Encoding", "chunked"); @Test(expected=ProtocolException.class) lenStrategy.determineLength(message); @Test(expected=ProtocolException.class) lenStrategy.determineLength(message); @Test(expected=ProtocolException.cl...
0
updateHook(reg.getReference()); hooks = new TreeSet<ServiceReference<?>>(Collections.reverseOrder()); private void updateHook(ServiceReference ref) { // We maintain the hooks sorted, so if ranking has changed for example, // we need to ensure the order remains cor...
0
import org.apache.commons.jelly.test.BaseJellyTest;
0
import java.util.ArrayList; import java.util.Arrays; import org.apache.zookeeper.server.ServerMetrics; ArrayList<Field> fields = new ArrayList<>(Arrays.asList( new Field("version", String.class), new Field("avg_latency", Long.class), new Field("max_latency", Long....
0
import org.apache.hc.core5.util.Timeout; public final void onTimeout(final Timeout timeout) throws HttpException, IOException { "Setting timeout (" + timeout + ")"); "Timeout due to inactivity (" + timeout + ")"); stream.reset(new H2StreamResetExce...
0
* Copyright (c) 2003-2004 The Apache Software Foundation. All rights
0
import org.apache.beam.sdk.coders.IterableCoder; private final byte[] values; private final IterableCoder<T> iterableCoder; this.iterableCoder = IterableCoder.of(coder); this.values = encode(values, iterableCoder); private byte[] encode(Iterable<T> values, IterableCoder<T> coder) { ByteArrayOutputStre...
0
null, /* addFinishFunction */ null /* splitListener */); null, /* addFinishFunction */ null /* splitListener */);
0
import org.apache.http.annotation.Immutable; import org.apache.http.client.params.ClientPNames; import org.apache.http.params.HttpParams; @Immutable @SuppressWarnings("deprecation") HttpParams params = request.getParams(); HttpHost virtualHost = (HttpHost) params.getParameter(ClientPNames.VIRTUAL_HOST);
0
import com.google.common.collect.ImmutableSet; import org.apache.atlas.type.AtlasTypeRegistry; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import javax.inject.In...
0
private final int frame_type;
0
* http://www.apache.org/licenses/LICENSE-2.0
0
* @version CVS $Id: DefaultAuthenticationManager.java,v 1.25 2004/03/19 14:16:55 cziegeler Exp $ AuthenticationContext authContext = new AuthenticationContext(this.context, this.xpathProcessor, this.resolver);
0
LOG.debug("Got an event: {}", stateChange.toString());
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger logger = LoggerFactory
0
* @version CVS $Id: XMLResourceBundleFactory.java,v 1.10 2004/01/16 15:55:38 kpiroumian Exp $ XMLResourceBundle bundle = selectCached(fileName); bundle = selectCached(fileName); protected XMLResourceBundle selectCached(String fileName) { XMLResourceBundle bundle = null; ...
0
import java.util.Vector; * @version CVS $Id: CommandLineRequest.java,v 1.13 2004/07/12 13:27:57 cziegeler Exp $ /* (non-Javadoc) * @see org.apache.cocoon.environment.Request#get(java.lang.String) */ public Object get(String name) { String[] values = this.getParameterValues(name); if ...
0
// Find the first class on the call stack that is not from // the class loader that loaded the Felix classes or is not // a class loader or class itself, because we want to ignore // calls to ClassLoader.loadClass() and Class.forName() since // we are trying t...
0