Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import java.nio.charset.StandardCharsets;
import org.apache.hc.core5.http.HeaderElement;
import org.apache.hc.core5.http.HttpHost;
import org.apache.hc.core5.http.HttpRequest;
import org.apache.hc.core5.http.ParseException;
import org.apache.hc.core5.http.entity.InputStreamEntity;
import org.apache.hc.core5.http.entity... | 0 |
import org.apache.accumulo.core.conf.SiteConfiguration;
new SplitRecoveryIT().run(new ServerContext(SiteConfiguration.create())); | 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 |
public boolean isFinished(ExecutableTrigger trigger);
public void setFinished(ExecutableTrigger trigger, boolean value);
public void clearRecursively(ExecutableTrigger trigger); | 0 |
import net.jcip.annotations.Immutable;
@Immutable | 0 |
builder.put(View.AsMap.class, BatchViewOverrides.BatchViewAsMap.class);
builder.put(View.AsMultimap.class, BatchViewOverrides.BatchViewAsMultimap.class);
builder.put(View.AsSingleton.class, BatchViewOverrides.BatchViewAsSingleton.class);
builder.put(View.AsList.class, BatchViewOverrides.... | 0 |
public NIOSocketHttpDataTransmitter(final Socket socket) throws SocketException { | 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 |
/** Internal state implementation of the Beam runner for Apache Flink. */ | 1 |
package org.apache.http.nio.entity;
public class ContentOutputStream extends OutputStream { | 0 |
private final boolean overwrite;
/**
* Default constructor. The <code>Content-Length</code> or <code>Transfer-Encoding</code>
* will cause the interceptor to throw {@link ProtocolException} if already present in the
* response message.
*/
this(false);
}
/**
* Construct... | 0 |
p.apply(
"Runtime", Create.ofProvider(p.newProvider("runtimeFoo"), StringUtf8Coder.of())))
.containsInAnyOrder("runtimeFoo");
p.run(); | 0 |
assertNotNull(cluster.getService(serviceName));
assertNotNull(cluster.getService(serviceName)); | 0 |
private static final int DEFAULT_PORT = 2181;
servers = "[2001:db8:1::242:ac11:2]";
assertChrootPath(chrootPath,
new ConnectStringParser(servers+chrootPath));
servers = "[2001:db8:1::242:ac11:2]:2181,[2001:db8:85a3:8d3:1319:8a2e:370:7348]:5678";
asser... | 0 |
return "merges tablets in a table";
} | 0 |
try (ClientSession session = createNativeSession()) {
String expected = getCurrentTestName();
byte[] bytes = expected.getBytes(StandardCharsets.UTF_8);
byte[] buf = new byte[bytes.length + Long.SIZE];
try (Socket s = new Socket(new Proxy(Proxy.Type.SOCKS, new ... | 1 |
import org.apache.accumulo.core.clientImpl.Table;
import org.apache.accumulo.core.dataImpl.KeyExtent; | 0 |
public interface RPattern { | 0 |
interface PipelineExecutor { | 0 |
private final ArrayDeque<XMLSecEvent> xmlSecEventList = new ArrayDeque<>(); | 0 |
* This applies the behavior that a trigger that has finished in any of the merged windows is | 0 |
import org.apache.ambari.server.orm.entities.PermissionEntity;
import org.apache.ambari.server.orm.entities.PrivilegeEntity;
boolean admin = false;
for (PrivilegeEntity privilegeEntity: userEntity.getPrincipal().getPrivileges()) {
if (privilegeEntity.getPermission().getPermissionName().equals(PermissionEnti... | 0 |
*
/**
*
* @param makedir
*/
void setMakedir(final boolean makedir);
/**
*
* @param recirsive
*/
void setRecursive(final boolean recirsive); | 0 |
SolrClient getSolrClient(String solrUrl, String zkConnectString, int count) throws Exception, MalformedURLException {
public void testOutputToSolr_noUrlOrZkConnectString() throws Exception {
LOG.info("testOutputToSolr_noUrlOrZkConnectString()");
expectedException.expectMessage("For solr output, either u... | 0 |
private void copyToClipboard(final Object o) {
//
// HACK: getSystemClipboard sometimes deadlocks on linux when called
// from the AWT Thread. The Thread creation prevents that.
//
new Thread() {
public void run() {
// first see if we can access the clipboard
SecurityManager securityManager = System.g... | 0 |
private final ListeningExecutorService executor;
private final ServerConfiguration configuration;
private final ServerFactory serverFactory;
LOG.error("Unable to parse command line arguments.", e); | 1 |
import cz.seznam.euphoria.core.annotation.operator.StateComplexity;
@Derived(
state = StateComplexity.ZERO,
repartitions = 1
) | 0 |
public class Shell extends ShellOptions {
protected int exitCode = 0;
protected Instance instance;
protected ConsoleReader reader;
protected boolean configError = false;
protected boolean exit = false;
protected String execFile = null;
protected String execCommand = null;
protected boolean verbose = tru... | 0 |
import org.xml.sax.SAXException;
import org.xml.sax.Attributes;
import org.xml.sax.helpers.AttributesImpl;
* Text serializer converts XML into plain text.
* It omits all XML tags and writes only character events to the output.
* Internally, text serializer uses XML serializer with {@link OutputKeys#METHOD}
* set t... | 0 |
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
private ExecutorService healthCheckE... | 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 n... | 0 |
@Test(timeout = 60 * 1000) | 0 |
package org.apache.commons.vfs2.util; | 1 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/Attic/ProxyListIterator.java,v 1.4 2002/08/15 23:13:51 pjack Exp $
* $Revision: 1.4 $
* $Date: 2002/08/15 23:13:51 $
* @version $Revision: 1.4 $ $Date: 2002/08/15 23:13:51 $
* ... | 0 |
import org.apache.cocoon.forms.event.CreateEvent;
((AbstractWidgetDefinition)getDefinition()).widgetCreated(this);
public abstract WidgetDefinition getDefinition();
throw new UnsupportedOperationException("Widget " + toString() + " has no value, at " + getLocation());
throw new UnsupportedOp... | 0 |
* @param filter BufferedImageOp filter to be converted | 1 |
component.resolve(parentComponent, Collections.<String, StackModule>emptyMap(), Collections.<String, ServiceModule>emptyMap(), Collections.<String, ExtensionModule>emptyMap()); | 0 |
} else {
try {
// Sleep for a little bit to ensure that *-windmill-read state-sampled counters show up.
Thread.sleep(500);
} catch (InterruptedException e) {} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/parser/XMLParser.java,v 1.40 2002/11/10 11:02:48 vmassol Exp $
* $Revision: 1.40 $
* $Date: 2002/11/10 11:02:48 $
* $Id: XMLParser.java,v 1.40 2002/11/10 11:02:48 vmassol Exp $
* @version ... | 0 |
public <T, E extends Exception> T consistentRead(Work<T, E> work) throws StorageException, E {
return storage.consistentRead(work);
public <T, E extends Exception> T write(MutateWork<T, E> work)
return storage.write(work); | 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 ... | 1 |
Copyright 2000-2001,2003,2006 The Apache Software Foundation
import org.apache.batik.anim.values.AnimatableValue;
import org.apache.batik.util.SVGTypes;
// ExtendedTraitAccess ///////////////////////////////////////////////////
/**
* Returns whether the given XML attribute is animatable.
*/
... | 1 |
super(operands, operands.get(0).getOutputType()); | 0 |
* configuration. This field is only <code>null</code> once all components
* held by this holder have been disposed off by
* {@link #disposeComponents(int)} and is first created in the constructor.
* As factory configurations are provided this instance may be configured
* or "deconfigured".
... | 0 |
* This method can be used to log I/O exception thrown while closing
* {@link java.io.Closeable} objects (such as
* {@link org.apache.http.HttpConnection}).
* @param ex I/O exception thrown by {@link java.io.Closeable#close()} | 0 |
import org.apache.batik.css.parser.ExtendedParser;
* Indicates whether or not the CSS parser supports methods with String.
*/
protected boolean isExtendedParser;
/**
isExtendedParser = (parser instanceof ExtendedParser);
isExtendedParser = (parser instanceof ExtendedParser);
LexicalUnit lu;
... | 0 |
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 0 |
protected String resolveSessionKexProposal(String hostKeyTypes) throws IOException {
return NamedResource.getNames(
ValidateUtils.checkNotNullAndNotEmpty(getKeyExchangeFactories(), "No KEX factories"));
}
* @throws IOException If internal problem - e.g., KEX extensions negotiation issu... | 0 |
import com.google.common.base.Supplier;
import com.twitter.common.base.CachingSupplier;
import com.twitter.common.quantity.Amount;
import com.twitter.common.quantity.Time;
// Handles exporting of stats related to task counts for each job by status.
private final Supplier<Set<ScheduledTask>> taskCache = new CachingS... | 0 |
final StringBuilder buffer = new StringBuilder();
private final Random random = new Random();
private void testWithSingleByteWrite(final String testString, final String charsetName) throws IOException {
final byte[] bytes = testString.getBytes(charsetName);
final StringWriter writer = ne... | 1 |
* @version CVS $Id: CachingProcessingPipeline.java,v 1.3 2003/08/07 08:52:15 cziegeler Exp $
this.cache.store(this.toCacheKey,
this.cache.store(this.toCacheKey, | 0 |
private static final long serialVersionUID = 1L; | 0 |
import java.util.Set;
import com.google.common.collect.Sets;
public Set<String> getApplicableServices() {
return Sets.newHashSet(serviceName); | 0 |
long taskDiskMB = config.getExecutorOverhead().getDisk().as(Data.MB)
+ TASK.getTask().getDiskMb()
- MIN_THERMOS_RESOURCES.getDisk().as(Data.MB);
assertTrue(taskDiskMB > 0);
Resources.makeMesosResource(Resources.DISK_MB, taskDiskMB),
long taskDiskMB = config.getExecutorOverhead()... | 0 |
dontSkipInstallForComponents, skipFailure, true);
return getHostComponentResourceProvider().start(clusterName, hostName, installOnlyComponents, skipFailure, true); | 0 |
@Override
public void execute() { | 0 |
this.checkEncodingVariations("B650", new String[]{
"BYRUM"});
this.checkEncodingVariations("O165", new String[]{
"OBrien'"});
this.checkEncodingVariations("K525", new String[]{
"KINGSMITH-"});
this.checkEncodingVariations("S460", new String[]{
... | 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 ap... | 0 |
import org.apache.commons.jelly.JellyTagException;
protected void processBean(String var, Object bean) throws JellyTagException {
throw new JellyTagException( "This tag must be nested within a <tableModel> tag" ); | 0 |
* at the moment. For instance, ZKFC has the same version as NameNode, while AMBARI_METRICS and KERBEROS do not have a mechanism. | 0 |
return (OutputT) Pipeline.applyTransform((PBegin) input, Create.of());
private static class StreamingBoundedRead<T> extends PTransform<PBegin, PCollection<T>> {
public final PCollection<T> apply(PBegin input) { | 0 |
/**
* @since 3.0
*/ | 0 |
* @throws IllegalArgumentException
* @throws IllegalArgumentException | 0 |
import org.apache.zookeeper.common.X509Exception.SSLContextException;
private String sendRequest(String cmd) throws IOException, SSLContextException {
private void verify(String cmd, String expected) throws IOException, SSLContextException { | 0 |
import org.apache.ambari.server.security.authorization.UserType;
public UserEntity findUserByNameAndType(String userName, UserType userType) {
TypedQuery<UserEntity> query = entityManagerProvider.get().createQuery("SELECT user FROM UserEntity user WHERE " +
"user.userType=:type AND user.userName=:name", U... | 0 |
import org.apache.cocoon.environment.internal.EnvironmentHelper;
* @version CVS $Id: JavaScriptJXPathBinding.java,v 1.14 2004/05/25 07:28:26 cziegeler Exp $
Map objectModel = EnvironmentHelper.getCurrentEnvironment().getObjectModel();
Map objectModel = EnvironmentHelper.getCurrentEnvironmen... | 0 |
public void addRelativeValueResolver(RelativeValueResolver rvr) { | 0 |
*
*
*
public final static Credentials CREDS1 =
public final static Credentials CREDS2 =
public final static AuthScope SCOPE1 =
public final static AuthScope SCOPE2 =
public final static AuthScope BOGUS =
public final static AuthScope DEFSCOPE =
| 0 |
private final ResourceConsumption resourceConsumption = new ResourceConsumption();
private int pid = -1;
/**
* Gets the OS process ID.
*
* @return The process ID for this task, or -1 if the process ID is not yet known.
*/
public int getProcessId() {
return pid;
}
return resourceConsumpti... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/set/TestTransformedSortedSet.java,v 1.2 2003/11/16 22:15:10 scolebourne Exp $
* @version $Revision: 1.2 $ $Date: 2003/11/16 22:15:10 $ | 0 |
/**
* An {@link AccumuloConfiguration} which holds a flat copy of properties
* defined in another configuration
*/
/**
* Creates a new configuration.
*
* @param config configuration property key/value pairs to copy
*/
/**
* Creates a new configuration.
*
* @param config configuration propert... | 0 |
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger log = LoggerFactory.getLogger(CopyFailed.class);
} | 0 |
import org.apache.mesos.Protos.MasterInfo;
import org.apache.mesos.Protos.TaskInfo;
private final AtomicLong frameworkDisconnects =
Stats.exportLong("scheduler_framework_disconnects");
private final AtomicLong frameworkReregisters =
Stats.exportLong("scheduler_framework_reregisters");
private final At... | 0 |
import org.apache.commons.lang.StringUtils;
private final String displayName;
displayName = sInfo.getDisplayName();
displayName = sInfo.getDisplayName();
public String getDisplayName() {
return StringUtils.isBlank(displayName) ? serviceName : displayName;
}
@Override | 0 |
* also avoid the necessity to pass around a Configuration.
* @param p The suffix to use
* @return A Path for this Volume with the provided suffix
* @param p The suffix to use
* @return A Path for this Volume with the provided suffix | 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 |
for(int i=0; configs != null && i<configs.length; i++) | 0 |
ContentType.APPLICATION_FORM_URLENCODED.withCharset(StandardCharsets.UTF_8)); | 0 |
StringBuilder buffer = new StringBuilder(); | 0 |
public String tableName; | 1 |
import org.apache.sshd.common.ForwardingAcceptorFactory;
| 0 |
return new Credentials(opts.getPrincipal(), opts.getToken()); | 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 |
private static class OrderByLength implements Comparator<String>, Serializable { | 0 |
@Deprecated | 0 |
* @see <a href="http://www.ietf.org/rfc/rfc4122.txt"> RFC 4122: A Universally Unique IDentifier
* (UUID) URN Namespace, "Rules for Lexical Equivalence" in Section 3.</a>
// This concrete implementation is provided for binary compatibility with 1.6; it can be removed
// in 2.0. See ACCUMULO-3789. | 0 |
return stripLeadingZeroes(myKeyAgree.generateSecret()); | 0 |
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their name without prior
* @version $Id: EncoderException.java,v 1.8 2004/01/02 07:01:47 ggregory Exp $ | 0 |
return false;
return CSSConstants.CSS_FILTER_PROPERTY;
switch (lu.getLexicalUnitType()) {
case LexicalUnit.SAC_INHERIT:
return SVGValueConstants.INHERIT_VALUE;
if (lu.getStringValue().equalsIgnoreCase
return SVGValueConstants.NONE_VALUE;
... | 1 |
import org.apache.hc.core5.concurrent.ComplexFuture;
import org.apache.hc.core5.http.nio.AsyncClientEndpoint;
import org.apache.hc.core5.util.TimeValue;
final TimeValue connectTimeout,
connectTimeout,
connectTimeout,
endpoint.execut... | 1 |
}
Bundle[] bundles = m_context.getBundles();
for (int i = 0; i < bundles.length; i++) {
if (bundles[i].getState() == Bundle.ACTIVE) {
if (m_bundleSet.add(bundles[i])) {
addedBundle(bundles[i]);
} | 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 |
private String xpathStr = null;
private XPath xpath = null;
if (!str.equals(xpathStr) || xpath == null) {
XPathFactory xpf = XPathFactory.newInstance();
xpath = xpf.newXPath();
xpath.setNamespaceContext(new DOMNamespaceContext(namespaceNode));
xpathS... | 0 |
return new AutoValue_ElasticsearchIO_ConnectionConfiguration.Builder()
.setAddresses(Arrays.asList(addresses))
.setIndex(index)
.setType(type)
.build(); | 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 |
private interface CloseCheck {
expectClosed(c::tableOperations);
public void testAccumuloClientBuilder() throws Exception { | 0 |
import org.apache.sshd.common.FactoryManager;
public ClientSessionImpl(FactoryManager client, IoSession session) throws Exception { | 0 |
return m_setForeignKeys == null ? Collections.emptySet() : m_setForeignKeys; | 0 |
* A logical file system, made up of set of junctions, or links, to files from other file systems.
public class VirtualFileSystem extends AbstractFileSystem {
public VirtualFileSystem(final AbstractFileName rootName, final FileSystemOptions fileSystemOptions) {
protected void addCapabilities(final Collection<Ca... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.