Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.commons.dbcp.SQLNestedException;
throw new SQLNestedException("RegisterPool failed", e);
throw new SQLNestedException(
"Could not retrieve connection info from pool", e); | 0 |
private final boolean exactMatchOverride;
this(true);
}
public UriPatternMatcher(final boolean exactMatchOverride) {
this.exactMatchOverride = exactMatchOverride;
T obj = exactMatchOverride ? this.map.get(path) : null; | 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 |
@Override
public void open(Configuration parameters) throws Exception {
this.doFn.startBundle(context);
}
@Override
public void close() throws Exception {
this.doFn.finishBundle(context);
if (this.context == null) {
this.context = new DoFnProcessContext(doFn, out);
} | 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 |
LOG.info("Consumer property: auto.commit.enable: {}", consumerProperties.getProperty("auto.commit.enable")); | 0 |
/** Classes providing graph representation. */ | 0 |
hostAttributes.put("os_release_version", "6.4");
hostAttributes.put("os_release_version", "6.4"); | 0 |
final HttpResponse response = new BasicHttpResponse(200, "OK"); | 0 |
import java.util.List;
import org.apache.commons.jelly.Script;
/**
* Create an instance.
*/
/**
* Trim the body of the script.
* In this case, trim the whitespace from the start of the first element
* and from the end of the last element.
*/
public void trimWhitespa... | 0 |
import org.apache.accumulo.core.client.Accumulo;
try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) { | 0 |
List<ServiceTestInvocation> listInvocations = new ArrayList<>(); | 0 |
@Nullable Lock lock,
@AuthorizingParam @Nullable JobKey job,
@Nullable Set<Integer> instances) throws TException; | 0 |
* The base bridge class for SVG graphics node. By default, the namespace URI is
* the SVG namespace. Override the <tt>getNamespaceURI</tt> if you want to add
* custom <tt>GraphicsNode</tt> with a custom namespace.
public abstract class AbstractGraphicsNodeBridge extends AbstractSVGBridge
implements GraphicsNodeB... | 0 |
@Override
public FTPClientConfig getDefaultConfiguration() { | 0 |
}
if (i != -1) {
mi.setToolTipText(uri); | 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 m... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestUnsignedIntArrayList.java,v 1.5 2002/10/12 22:36:21 scolebourne Exp $
* $Revision: 1.5 $
* $Date: 2002/10/12 22:36:21 $
* @version $Revision: 1.5 $ $Date: ... | 0 |
import org.apache.batik.dom.events.NodeEventTarget;
* Implements {@link
* org.apache.batik.dom.events.NodeEventTarget#getParentNodeEventTarget()}.
*/
public NodeEventTarget getParentNodeEventTarget() {
return (NodeEventTarget)
HiddenChildElementSupport.getParentElement(this);
... | 0 |
private final ReaderRegistry registry;
private ConcatReaderFactory(ReaderRegistry registry) {
* {@link ReaderRegistry} to create sub-{@link NativeReader} instances.
return withRegistry(ReaderRegistry.defaultRegistry());
* {@link ReaderRegistry} to create sub-{@link NativeReader} instances.
public static... | 0 |
import java.util.concurrent.TimeUnit;
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
sleepUninterruptibly(5, TimeUnit.MILLISECONDS); | 1 |
//
// A service can be deleted if all it's components
// can be removed, irrespective of the state of
// the service itself.
// | 0 |
import com.google.common.collect.ImmutableMap;
import java.util.Map;
private final Map<TupleTag<?>, BroadcastHelper<?>> sideInputs;
this(fn, ImmutableMap.<TupleTag<?>, BroadcastHelper<?>>of());
}
public DoFnFunction(DoFn<I, O> fn, Map<TupleTag<?>, BroadcastHelper<?>> sideInputs) {
this.sideInputs = sideI... | 0 |
import org.apache.cocoon.ProcessingException;
//not yet implemented
public boolean setVersioned(final String uri, final boolean versioned) {
try {
if(!versioned) // FIXME: Implement this via delete and create
throw new UnsupportedOperationException(); ... | 0 |
import org.w3c.dom.Element;
/**
* Notifies the UserAgent that the input element
* has been found in the document. This is sometimes
* called, for example, to handle <a> or
* <title> elements in a UserAgent-dependant
* way.
*/
public voi... | 0 |
import org.apache.sshd.common.cipher.AES128CTR;
import org.apache.sshd.common.cipher.AES256CTR;
import org.apache.sshd.common.cipher.ARCFOUR128;
import org.apache.sshd.common.cipher.ARCFOUR256;
avail.add(new AES128CTR.Factory());
avail.add(new AES256CTR.Factory());
avail.add(new ARCFOUR128.Facto... | 0 |
/*
* Copyright 2000-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 applic... | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList; | 0 |
import org.apache.http.client.protocol.HttpClientContext;
final HttpRoute route = (HttpRoute) context.getAttribute(HttpClientContext.HTTP_ROUTE); | 0 |
* @return The results of a query | 0 |
int index = bitIndex / LENGTH;
int bit = bitIndex % LENGTH; | 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 applicable law o... | 0 |
this.iterator = new ListIteratorWrapper<>(iterator); | 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 use... | 0 |
* {@link org.apache.commons.net.tftp.TFTPClient} class
* {@link org.apache.commons.net.tftp.TFTPClient#receiveFile receiveFile()}
* {@link org.apache.commons.net.tftp.TFTPClient#sendFile sendFile()}
* the {@link org.apache.commons.net.tftp.TFTPClient} | 0 |
import org.apache.accumulo.test.randomwalk.Environment;
public void visit(State state, Environment env, Properties props) throws Exception {} | 0 |
private boolean calledFinish = false;
this.outputIterator = getOutputIterator();
if (outputIterator.hasNext()) {
} else if (inputIterator.hasNext()) {
// no more input to consume, but finishBundle can produce more output
if (!calledFinish) {
clearOutput();
... | 0 |
new ThreadLocal<Supplier<Boolean>>() {
@Override
@Override
@VisibleForTesting ByteString encodeKey(StateNamespace namespace, StateTag<?> address) {
try {
// Use a StringBuilder rather than concatenation and String.format. We build these keys
// a lot, and this leads to better... | 0 |
@JsonProperty("componentStatus")
public List<ComponentStatus> getComponentStatus() {
return componentStatus;
}
@JsonProperty("componentStatus")
public void setComponentStatus(List<ComponentStatus> componentStatus) {
this.componentStatus = componentStatus;
}
@Override
public String toString() ... | 1 |
/* ====================================================================
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
* @version $Revision: 1.5 $ $Date: 2004/01/14 21:34:25 $ | 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 |
* @version $Id$ | 0 |
* @version $Revision: 1.10 $ $Date: 2003/11/03 17:58:57 $
this.getRandom().nextBytes(data);
byte[] data = new byte[this.getRandom().nextInt(10000)+1];
this.getRandom().nextBytes(data);
/**
* @return Returns the _random.
*/
public Random getRandom() {
return... | 0 |
*
* <p>More precisely, suppose:
* <p><b>This class is NOT thread safe.</b>
* <p><b> For better performance, it uses the input array provided (not a copy).
* <p>It works with the input array,
*
* <p>Note that the specified long is treated like a uint64, e.g.
*
* <p>Note that the specified long is tr... | 0 |
/** A {@link OldDoFn} that publishes non-empty lines to Google Cloud PubSub. */ | 0 |
port = Utils.getFreePort(); | 0 |
throw new StreamClosedException();
throw new StreamClosedException(); | 0 |
rest = (rest == null ? null : rest.next)) | 0 |
import java.io.Serializable;
public interface ResourceId extends Serializable { | 0 |
package com.twitter.mesos.scheduler.app;
import com.twitter.mesos.scheduler.DriverFactory;
import com.twitter.mesos.scheduler.MesosTaskFactory.ExecutorConfig; | 0 |
* <p>
synchronized (initializationStateLock) {
if (isFinished()) {
LOG.warn("Iterator is in the Finished state, returning null stop position.");
synchronized (sourceIteratorLock) {
if (readerIterator == null) {
LOG.warn("Iterator has not been initialized, returning null stop p... | 0 |
/** Minimum number of characters around exception location. */
private static final int MIN_EXCHARLOC = 5;
/** Maximum number of characters around exception location. */
private static final int MAX_EXCHARLOC = 10;
int end = begin + MIN_EXCHARLOC;
begin -= MIN_EXCHARLOC;
... | 0 |
import org.apache.accumulo.core.security.Authorizations;
import org.apache.accumulo.core.util.ByteBufferUtil;
Connector conn = new MockConnector(user, acu);
conn.securityOperations().createUser(user, pass, new Authorizations());
return conn;
return getConnector(user, ByteBufferUtil.toBytes(pass)); | 0 |
Collection<Text> actualSplits = getConnector().tableOperations().listSplits("foo");
actualSplits = getConnector().tableOperations().listSplits("foo"); | 0 |
Pipeline pipeline = pipelineRule.createPipeline();
PCollection<String> pCollection = pipeline.apply(Create.of("foo"));
pipeline.run(); | 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 |
import org.apache.hc.core5.http2.HttpVersionPolicy;
.setVersionPolicy(HttpVersionPolicy.FORCE_HTTP_2)
HttpHost target = new HttpHost("nghttp2.org");
String[] requestUris = new String[] {"/httpbin/ip", "/httpbin/user-agent", "/httpbin/headers"}; | 0 |
import org.apache.felix.upnp.basedriver.controller.DevicesInfo;
import org.apache.felix.upnp.basedriver.controller.DriverController; | 0 |
import static java.util.Map.Entry;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonProperty; | 0 |
manager.add(createComponent() | 0 |
/*
* Copyright 1999-2005 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 |
* Demonstration of the use of protocol interceptors to transparently
* In this particular case HTTP client is made capable of transparent content
* protocol interceptors makes content compression completely transparent to
final HttpRequest request,
final HttpResponse respon... | 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 |
Optional.absent())) | 0 |
config.setSocketTimeoutMillis(Integer.parseInt(t)); | 0 |
implements Serviceable, Contextualizable, ConfigurableInterpreter, | 0 |
import org.apache.accumulo.core.client.AccumuloClient;
InstanceOperations iops = getAccumuloClient().instanceOperations();
InstanceOperations iops = getAccumuloClient().instanceOperations();
final AccumuloClient c = getAccumuloClient();
private int countFiles(AccumuloClient c) throws Exception { | 0 |
import org.apache.beam.runners.dataflow.DataflowRunner.GroupByKeyAndSortValuesOnly;
DataflowRunner runner,
* with the {@link DataflowRunner}, including reading and writing the
private final DataflowRunner runner;
public Translator(Pipeline pipeline, DataflowRunner runner) { | 0 |
@Override
public Command create() {
return new SftpSubsystem(getExecutorService(), isShutdownOnExit(), getUnsupportedAttributePolicy()) {
@Override
protected SpaceAvailableExtensionInfo doSpaceAvailable(int id, String path) throws IOExcepti... | 1 |
* @see org.apache.commons.vfs2.provider.AbstractFileSystem#createFile(org.apache.commons.vfs2.provider.AbstractFileName) | 0 |
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.WritableRaster;
import org.apache.batik.ext.awt.image.GraphicsUtil;
import org.apache.batik.ext.awt.image.rendered.FormatRed;
dr.setBounds(new Rectangle2D.Double
... | 0 |
* takes any custom properties that a view wants to be included into the config
* @param context
* @param customViewProperties
* @return
* @throws HdfsApiException
*/
public static synchronized HdfsApi connectToHDFSApi(ViewContext context, Map<String, String> customViewProperties)
throws HdfsApiE... | 0 |
return new IfTransformer<>(predicate, trueTransformer, falseTransformer);
return new IfTransformer<>(predicate, trueTransformer, NOPTransformer.<T>nopTransformer()); | 1 |
import java.util.HashMap;
import org.apache.http.util.Args;
Args.check(status >= 100 && status < 700, "Unknown category for status code " + status); | 0 |
spds.setDefaultMaxWaitMillis(-1);
spds.setDefaultMaxIdle(10);
spds.setDefaultTimeBetweenEvictionRunsMillis(10000);
spds.setDefaultNumTestsPerEvictionRun(-1);
spds.setDefaultTestWhileIdle(true);
spds.setDefaultTestOnBorrow(true);
spds.setDefaultTestOnReturn(false); | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 0 |
CombiningValueState<Instant, Instant> delayUntilState = c.state().access(DELAYED_UNTIL_TAG);
c.timers().setTimer(delayUntil, TimeDomain.EVENT_TIME);
if (c.trigger().finishedInAnyMergingWindow()) {
c.state().accessAcrossMergingWindows(DELAYED_UNTIL_TAG);
c.timers().setTimer(earliest... | 0 |
import java.net.URISyntaxException;
Assert.fail("URISyntaxException expected");
} catch (final URISyntaxException expected) {
Assert.fail("URISyntaxException expected");
} catch (final URISyntaxException expected) { | 0 |
import org.apache.commons.configuration.builder.FileBasedBuilderParametersImpl;
import org.apache.commons.configuration.builder.combined.CombinedConfigurationBuilder;
CombinedConfigurationBuilder builder =
new CombinedConfigurationBuilder();
builder.configure(new FileBasedBuilderParamete... | 0 |
} else if ("init".equals(invocation.getMethod().getName())) {
// The embedded servlet is initialized by this factory bean, ignore other containers
return null;
} else if ("destroy".equals(invocation.getMethod().getName())) {
// The ... | 0 |
* Copyright (C) 2015 Google Inc. | 0 |
public abstract static class Write<T> extends PTransform<PCollection<T>, WriteResult> {
public WriteResult expand(PCollection<T> input) { | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
if (clazzName == null)
clazzName = DefaultLoadBalancer.class.getName();
if (tops == null)
try {
tops = HdfsZooInstance.getInstance().getConnector(SecurityConstants.getSystemCredentials()).tableOperations();
} catch (AccumuloException e) {
log.error("Unable to access table opera... | 1 |
import org.apache.ambari.server.state.Cluster;
| 0 |
* Copyright (c) 2002 The Apache Software Foundation. All rights | 0 |
import org.apache.beam.sdk.values.TypeDescriptor;
class UnionTranslator<InputT> implements OperatorTranslator<InputT, InputT, Union<InputT>> {
public PCollection<InputT> translate(Union<InputT> operator, PCollectionList<InputT> inputs) {
final TypeDescriptor<InputT> outputType = operator.getOutputType().orElse(nu... | 0 |
*
public class FileNotFolderException extends FileSystemException {
public FileNotFolderException(final Object info0) {
public FileNotFolderException(final Object info0, final Throwable throwable) { | 1 |
supportedSchemes.register(new Scheme("http",
supportedSchemes.register(new Scheme("https",
HttpRequest connect = new BasicHttpRequest("CONNECT", authority, | 0 |
if (key.getColumnFamily()
.equals(MetadataSchema.TabletsSection.CurrentLocationColumnFamily.NAME)) {
} else if (MetadataSchema.TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN
.hasColumns(key)) {
System.out.println(
"Average " + average + " count " + hostCoun... | 0 |
package org.apache.aurora.scheduler.config.validators;
import com.beust.jcommander.IValueValidator;
import com.beust.jcommander.ParameterException;
public class PositiveNumber implements IValueValidator<Number> {
public void validate(String name, Number value) throws ParameterException {
if (value.longValue() <=... | 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 |
* A composite {@link Trigger} that fires once after at least one of its sub-triggers have fired. | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger log = LoggerFactory.getLogger(AccumuloReloadingVFSClassLoader.class); | 0 |
import org.apache.felix.service.command.CommandSession; | 0 |
public int[] getPorts() {
public String getCommentURL() {
public boolean isPersistent() {
public boolean isExpired(final Date date) { | 0 |
List<Object> newContent = new ArrayList<Object>();
newContent.add(unmarshalX509Certificate(childElem));
newContent.add(new DOMX509IssuerSerial(childElem));
newContent.add(childElem.getFirstChild().getNodeValue());
newContent.add... | 0 |
Collections.unmodifiableList(
Arrays.<NamedFactory<Channel>>asList(
ChannelAgentForwardingFactory.OPENSSH,
ChannelAgentForwardingFactory.IETF)); | 0 |
* A data transmitter using a Java {@link Socket} and traditional IO.
* | 0 |
@Override
public String toString() {
return "PrivilegeEntity{" +
"id=" + id +
", permission=" + permission +
", resource=" + resource +
", principal=" + principal +
'}';
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.