Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.commons.configuration2.ConfigurationDecoder;
ConfigurationDecoder decoder = EasyMock.createMock(ConfigurationDecoder.class);
.setListDelimiterHandler(listHandler)
.setConfigurationDecoder(decoder));
assertEquals("Wrong decoder", decoder, cc2.getConfigura... | 0 |
StringBuilder buffer = new StringBuilder(); | 0 |
/**
* Start the resolution process and return whether the constraints have
* been successfully met or not.
* The resolution can be interrupted by a call to Thread.interrupt() at any
* time. The result will be to stop the resolver and throw an InterruptedException.
*
* @return <code>tr... | 0 |
import java.io.DataOutputStream;
public void dump(DataOutputStream dos) throws IOException
{
super.dump(dos);
dos.writeByte(parameter_annotation_table.length);
for (int i = 0; i < parameter_annotation_table.length; i++) {
parameter_annotation_table[i].dump(dos);
... | 0 |
@Test
public void equalityTest() {
PipelineOptions options = PipelineOptionsFactory.create();
SerializablePipelineOptions serializablePipelineOptions =
new SerializablePipelineOptions(options);
String json = serializablePipelineOptions.toString();
SerializablePipelineOptions serializablePip... | 0 |
package org.apache.accumulo.hadoopImpl.mapreduce.lib.partition; | 0 |
* Simple test cases. | 0 |
import java.io.DataOutputStream;
import java.io.IOException; | 0 |
import org.apache.beam.sdk.transforms.DoFn;
import org.apache.beam.sdk.transforms.ParDo;
import org.apache.beam.sdk.values.KV;
import org.joda.time.Instant;
PCollection<KV<Long, Byte>> output = p.apply(Read.from(source))
.apply(ParDo.of(new ExtractIndexFromTimestamp()));
ArrayList<KV<Long, Byte>> expect... | 0 |
import org.apache.sshd.common.util.AbstractLoggingBean;
public class ScpCommand extends AbstractLoggingBean implements Command, Runnable, FileSystemAware {
String argVal=args[i];
if (argVal.charAt(0) == '-') {
for (int j = 1; j < argVal.length(); j++) {
char ... | 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... | 0 |
import org.apache.felix.sigil.eclipse.ui.util.DefaultTableProvider;
import org.apache.felix.sigil.eclipse.ui.util.ResourcesDialogHelper; | 0 |
import org.apache.excalibur.source.Source;
} else if ( obj instanceof Source ) {
return ((Source)obj).getInputStream(); | 0 |
@CmdLine(name = "require_contact_email",
help = "If true, reject jobs that do not specify a contact email address.")
public static final Arg<Boolean> REQUIRE_CONTACT_EMAIL = Arg.create(true);
if (REQUIRE_CONTACT_EMAIL.get()
&& (!config.isSetContactEmail()
|| !config.getContactEm... | 0 |
import org.apache.beam.sdk.transforms.SerializableFunction;
public static TypeInformation forGetter(
Method method, SerializableFunction<String, String> fieldNamePolicy) {
name = fieldNamePolicy.apply(name);
| 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 |
* @version $Id$ | 0 |
private static int ping(ClientContext context, List<String> args) {
InstanceOperations io = context.instanceOperations();
private static void flushAll(final ClientContext context) {
Runnable flushTask = () -> {
try {
Set<String> tables = context.tableOperations().tableIdMap().keySet();
... | 0 |
field,
name | 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 |
public String getDefaultPassword() {
return defaultPassword;
}
| 0 |
GraphicsNodeRenderContext rc =
= CSSUtilities.getComputedStyle(filterElement);
= CSSUtilities.getComputedStyle(filterElement); | 0 |
public BufferedHeader(final CharArrayBuffer buffer)
return BasicHeaderValueParser.DEFAULT
.parseElements(this.buffer, cursor); | 0 |
dbAccessor.addColumn("clusters", new DBAccessor.DBColumnInfo("resource_id",
Long.class, 1, 1, false)); | 0 |
* <p>{@code CURRENT_BATCH_TIME - TIME_OF_BATCH_WHICH_SET_THE_WATERMARK <= BATCH_DURATION }
public WatermarkSyncedDStream(
final Queue<JavaRDD<WindowedValue<T>>> rdds,
final Long batchDuration,
final StreamingContext ssc) {
LOG.trace(
"BEFORE waiting for watermark sync, "
+ "... | 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 m... | 0 |
@Override | 0 |
import java.util.Properties;
import org.apache.cocoon.portal.PortalException;
import org.apache.commons.lang.BooleanUtils;
* @see org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect#prepareConfiguration(java.util.Properties)
public Object prepareConfiguration(Properties configuration)
throws Por... | 0 |
return params.get("charset"); | 0 |
return (other instanceof MockMemKey) && super.equals(other)
&& count == ((MockMemKey) other).count;
MockTable(MockNamespace namespace, boolean limitVersion, TimeType timeType, String tableId,
Map<String,String> properties) {
public MockTable(MockNamespace namespace, TimeType timeType, String t... | 0 |
import org.apache.hc.core5.http.EntityDetails;
public interface AsyncEntityProducer extends AsyncDataProducer, EntityDetails { | 0 |
import org.junit.Test;
import static org.junit.Assert.*;
public class LoopingIteratorTest {
@Test
@Test
@Test
@Test
@Test
@Test
@Test
@Test | 0 |
protected Path detectTargetFolder() throws IllegalArgumentException {
| 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
... | 0 |
final String s = BasicLineFormatter.formatProtocolVersion
} catch (final IllegalArgumentException ex) {
} catch (final IllegalArgumentException ex) {
final RequestLine requestline = new BasicRequestLine("GET", "/stuff", HttpVersion.HTTP_1_1);
final String s = BasicLineFormatter.f... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/DoubleTest.java,v 1.9 2003/08/03 17:39:11 dgraham Exp $
* $Revision: 1.9 $
* $Date: 2003/08/03 17:39:11 $
* @version $Revision: 1.9 $ $Date: 2003/08/03 17:39:11 $
* validator-nu... | 0 |
public void failed(final SessionRequest request, final Exception ex) {
future.failed(ex); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/iterators/TestSingletonListIterator.java,v 1.5 2003/08/31 17:28:40 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, this acknowledgement ... | 0 |
package org.apache.atlas.typesystem;
import org.apache.atlas.typesystem.persistence.Id; | 0 |
//Cannot be instantiated | 0 |
public static long getSnapSizeInBytes() {
long size = Long.getLong("zookeeper.snapSizeLimitInKb", 4194304L); // 4GB by default
if (size <= 0) {
LOG.info("zookeeper.snapSizeLimitInKb set to a non-positive value {}; disabling feature", size);
}
return size * 1024; // Conver... | 0 |
result += counts.unassigned() + counts.assignedToDeadServers() + counts.assigned(); | 0 |
* @version CVS $Id: DOMStreamer.java,v 1.8 2003/03/17 10:44:07 bruno Exp $
// the following lines enable the creation of explicit xmlns attributes
//String pr1 = pr.equals("") ? "xmlns" : pr;
//String qn = pr.equals("") ? "xmlns" : "xm... | 0 |
ZooReaderWriter zk = new ZooReaderWriter(conn.info().getZooKeepers(),
conn.info().getZooKeepersSessionTimeOut(), ""); | 0 |
StackId getDesiredStackId();
/**
* Gets the repository for the desired version of this service by consulting
* the repository states of all known components.
*/
RepositoryVersionState getRepositoryState();
| 0 |
import com.twitter.mesos.executor.Task;
Task task = executor.getTask(taskId);
template.setAttribute("taskState", task.getScheduleStatus());
TwitterTaskInfo taskInfo = task.getTaskInfo();
template.setAttribute("leasedPorts", task.getResourceConsumption().getLeasedPorts());
templat... | 0 |
// FIXME - Due to a bug in castor, we have to allow null ids for now
if ( id == null ) {
this.id = null;
return;
} | 0 |
package com.twitter.aurora.scheduler;
import com.twitter.aurora.gen.TwitterTaskInfo;
import com.twitter.aurora.scheduler.Driver.DriverImpl;
import com.twitter.aurora.scheduler.PulseMonitor.PulseMonitorImpl;
import com.twitter.aurora.scheduler.SchedulerLifecycle.DriverReference;
import com.twitter.aurora.scheduler.event... | 1 |
*
@Parameter(names = "--maxColF", description = "maximum column family value to use", converter = ShortConverter.class)
@Parameter(names = "--maxColQ", description = "maximum column qualifier value to use", converter = ShortConverter.class)
* | 0 |
import org.apache.accumulo.core.security.tokens.UserPassToken;
final boolean valid = shellState.getConnector().securityOperations().authenticateUser(new UserPassToken(user, password)); | 0 |
if (failures != null && failures.length > 0) {
throw new Exception(failures.length + " failure files found importing files from " + dir);
} | 0 |
final StringBuilder sb = new StringBuilder();
for (final ElementValue evalue : evalues) {
final StringBuilder sb = new StringBuilder(); | 1 |
import org.junit.Ignore;
@Ignore("TODO(BEAM-5070) Test is flaky. Fix before reenabling.") | 0 |
Collection<Supplier<Iterable<String>>> suppliers = new ArrayList<>(providers.size()); | 0 |
* Bridge class for the <radialGradient> element. | 0 |
private static final TableRow row1 =
new TableRow().set("corpus", "king_lear").set("word", "snuffleupaguses");
private static final TableRow row2 =
new TableRow().set("corpus", "macbeth").set("word", "antidisestablishmentarianism");
private static final TableRow row3 =
new TableRow().set("corpus... | 1 |
package org.apache.felix.dependencymanager.test2.integration.api;
import org.ops4j.pax.exam.junit.PaxExam;
import org.apache.felix.dependencymanager.test2.components.Ensure;
import org.apache.felix.dependencymanager.test2.integration.common.TestBase;
@RunWith(PaxExam.class)
public class FELIX3057_EmptyServiceReference... | 0 |
import org.apache.sshd.common.Factory;
import org.apache.sshd.common.util.threads.ExecutorService;
this(null);
protected DefaultIoServiceFactoryFactory(Factory<ExecutorService> factory) {
super(factory);
Factory<ExecutorService> executorServiceFactory = getExecutorServiceFactory();
... | 1 |
os.close();
| 0 |
import org.apache.avalon.framework.logger.Logger;
* @version CVS $Id: DateSelector.java,v 1.3 2003/10/24 08:49:49 cziegeler Exp $
DateSelectorContext csc = new DateSelectorContext(this.getLogger());
Logger logger;
public DateSelectorContext(Logger logger) {
this.logger = logger;
... | 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 |
x1Str = SVG_LINEAR_GRADIENT_X1_DEFAULT_VALUE;
y1Str = SVG_LINEAR_GRADIENT_Y1_DEFAULT_VALUE;
x2Str = SVG_LINEAR_GRADIENT_X2_DEFAULT_VALUE;
y2Str = SVG_LINEAR_GRADIENT_Y2_DEFAULT_VALUE; | 0 |
import cz.seznam.euphoria.flink.accumulators.FlinkAccumulatorFactory;
import org.apache.flink.api.common.functions.RichGroupReduceFunction;
private StorageProvider stateStorageProvider;
private void loadConfig(Settings settings, ExecutionEnvironment env) {
loadConfig(context.getSettings(), context.getExecutionE... | 0 |
*
*
*/
protected String localizedDecimalPattern;
protected String localizedIntegerPattern;
protected String defaultDecimalPattern;
protected String defaultIntegerPattern;
// Set the Default Locale back to the original value | 0 |
import java.security.PrivilegedAction;
import org.apache.hadoop.security.UserGroupInformation;
private void parseSpans(Scanner scanner, Map<String,Stats> summary) {
for (Entry<Key,Value> entry : scanner) {
RemoteSpan span = TraceFormatter.getRemoteSpan(entry);
Stats stats = summary.get(span.descriptio... | 0 |
import javax.inject.Inject; | 1 |
* A constraint that checks the visibility of columns against the actor's authorizations. Violation codes:
| 0 |
import com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn;
private final WindowingStrategy<?, W> windowingStrategy;
public WatermarkHold(WindowingStrategy<?, W> windowingStrategy) {
this.windowingStrategy = windowingStrategy;
* <p>If the value was not late, then the input watermark must be less than... | 0 |
serverSession.shudownOutputStream(); | 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 |
*
read(in, row);
read(in, cf);
read(in, cq);
read(in, cv);
ts = WritableUtils.readVLong(in);
}
| 0 |
*
* Checks whether a tryInvoke return value indicates a failure or not.
* <p>Usage is : <code>Object r = tryInvoke(...); if (tryFailed(r) {...} else {...}</code>
* | 1 |
* @version CVS $Id: AbstractEnvironment.java,v 1.23 2004/05/29 17:39:38 cziegeler Exp $
protected String prefix = ""; | 0 |
response.setCode(toStatusCode(ex, response));
String message = ex.getMessage();
if (message == null) {
message = ex.toString();
}
response.setEntity(new StringEntity(message, ContentType.TEXT_PLAIN));
}
protected int toStatusCode(final Exception ex, final Cla... | 0 |
import org.apache.http.HttpRequestInterceptor;
import org.apache.http.params.SyncBasicHttpParams;
import org.apache.http.protocol.HttpProcessor;
import org.apache.http.protocol.ImmutableHttpProcessor;
private final HttpProcessor httpproc;
this.params = new SyncBasicHttpParams();
this.httpproc = new ... | 0 |
/*
* Copyright 2013 Twitter, 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 t... | 0 |
import org.apache.beam.sdk.transforms.DoFn;
import org.apache.beam.sdk.transforms.windowing.BoundedWindow;
.of(new DoFn<KV<String, Integer>, KV<String, Integer>>() {
@ProcessElement
private static class UserSessionInfoFn extends DoFn<KV<String, Integer>, Integer> {
@ProcessElement
... | 0 |
import org.apache.commons.vfs.util.FileObjectUtils;
FileObject fo =
getFileSystem()
((SftpFileObject) FileObjectUtils.getAbstractFileObject(fo)).setStat(stat.getAttrs());
return (FileObject[]) children.toArray(new FileObject[children | 0 |
private static final String COMMAND_PARAM_STRUCT_OUT = "structured_out";
MasterHostResolver resolver = Direction.UPGRADE == direction ?
new MasterHostResolver(cluster) : new MasterHostResolver(cluster, version);
UpgradeContext ctx = new UpgradeContext(resolver, version, direction);
actionContext.... | 0 |
public boolean handleUpdate(AlertDefinitionEventType eventType, AlertCluster update) {
changed = !alertDefinitions.keySet().containsAll(update.alertDefinitions.keySet());
if (changed) {
alertDefinitions.putAll(update.alertDefinitions);
} else {
for (Map.Entry<Long, AlertDef... | 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 |
/**
* Copyright 2013 Apache Software Foundation | 0 |
Scanner s = new ScannerImpl(context, new Table.ID("foo"), Authorizations.EMPTY);
Scanner s = new ScannerImpl(context, new Table.ID("foo"), Authorizations.EMPTY);
Scanner s = new ScannerImpl(context, new Table.ID("foo"), expected);
new ScannerImpl(context, new Table.ID("foo"), null); | 1 |
if (null == context.getSaslParams()) {
checkArgument(password != null, "password is null");
}
if (null == context.getSaslParams()) {
client.createLocalUser(Tracer.traceInfo(), context.rpcCreds(), principal, ByteBuffer.wrap(password.getPassword()));
} else {
client.creat... | 0 |
package org.apache.commons.beanutils2.bugs;
import org.apache.commons.beanutils2.PropertyUtils; | 1 |
private static final long serialVersionUID = -7355623307528443725L;
| 0 |
public final class HttpConnectionManagerParams implements ConnManagerPNames {
/** The default maximum number of connections allowed per host */
private static ConnPerRoute DEFAULT_CONN_PER_ROUTE = new ConnPerRoute() {
public int getMaxForRoute(HttpRoute route) {
return ConnPerRouteB... | 0 |
import org.osgi.framework.Bundle;
import org.ow2.chameleon.testing.helpers.Dumps;
CheckService checker = osgiHelper.waitForService(CheckService.class, null, 1000); | 0 |
public Object structuralValue(@Nullable T value) { | 0 |
import org.apache.ambari.annotations.ApiIgnore;
@POST @ApiIgnore // until documented
@GET @ApiIgnore // until documented
@GET @ApiIgnore // until documented
@PUT @ApiIgnore // until documented | 0 |
import org.apache.batik.gvt.GraphicsNodeRenderContext;
public void buildGraphicsNode(GraphicsNode node,
BridgeContext ctx, | 0 |
public SocketHttpDataReceiver(final Socket socket, int buffersize) throws IOException {
if (buffersize < 0) {
buffersize = socket.getReceiveBufferSize();
}
if (buffersize < 1024) {
buffersize = 1024; | 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 |
"cluster1", "HDFS"); | 0 |
super(HTraceConfiguration.fromMap(Collections
.singletonMap(CountSampler.SAMPLER_FREQUENCY_CONF_KEY, Long.toString(frequency)))); | 0 |
import org.apache.commons.jxpath.ri.compiler.NodeTest;
NodeIterator it = getNodeIterator(context, parentPointer, step);
NodeIterator it = getNodeIterator(context, parent, step);
NodeIterator it = getNodeIterator(context, parent, step);
EvalContext context,
NodeTest no... | 0 |
* @version $Revision$ | 1 |
package org.apache.beam.sdk.transforms.join;
import org.apache.beam.sdk.util.common.Reiterable;
import org.apache.beam.sdk.util.common.Reiterator;
import org.apache.beam.sdk.values.TupleTag;
import org.apache.beam.sdk.values.TupleTagList; | 0 |
* Deprecated since 2.1.
*
* @deprecated Use {@link #Bzip2FileObject(AbstractFileName, FileObject, Bzip2FileSystem)} instead. | 0 |
buf.append("<FONT COLOR=\"#00FF00\">").append(Constants.getTypeName(bytes.readByte())).append(
if (Constants.getNoOfOperands(opcode) > 0) {
+ Constants.getAttributeName(tag) + "</A></LI>\n");
+ Constants.getAttributeName(tag) + ... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.