Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.commons.dbcp.SQLNestedException;
catch (SQLNestedException e)
Throwable t = e.getCause();
if (!t.getMessage().startsWith("x is not the correct password")) | 0 |
import static java.util.Arrays.asList;
import static java.util.Collections.singletonList;
import com.amazonaws.services.kinesis.model.ExpiredIteratorException;
import java.io.IOException;
import java.util.Collections; | 0 |
* @see #startTServer(ThriftServerType, TimedProcessor, TProtocolFactory, String, String, int, int, long, long, SslConnectionParams,
* SaslServerConnectionParams, long, HostAndPort...) | 0 |
import org.apache.accumulo.core.client.AccumuloClient;
final AccumuloClient c = getClient(); | 0 |
package org.apache.beam.sdk.extensions.sql.meta.provider.kafka;
import static org.apache.beam.sdk.extensions.sql.impl.schema.BeamTableUtils.beamRecord2CsvLine;
import static org.apache.beam.sdk.extensions.sql.impl.schema.BeamTableUtils.csvLine2BeamRecord;
return new CsvRecorderDecoder(beamRecordSqlType, csvFormat)... | 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 |
Storage.Util.weaklyConsistentFetchTasks(storage, Query.slaveScoped(offer.getHostname())); | 0 |
import cz.seznam.euphoria.core.client.dataset.Partitioning;
import cz.seznam.euphoria.core.client.functional.UnaryFunction;
import cz.seznam.euphoria.core.client.util.Pair;
import cz.seznam.euphoria.core.client.util.Sums;
keyExtractor, valueExtractor, windowing, Sums.ofLongs()); | 0 |
public Core(Context c) { | 0 |
FileTxnSnapLog ftxn = new FileTxnSnapLog(config.dataLogDir, config.dataDir); | 0 |
Sum.ofLongs());
Sum.ofLongs()); | 0 |
import static com.google.common.base.Charsets.UTF_8;
return authString == null ? Constants.NO_AUTHS : new Authorizations(authString.getBytes(UTF_8));
rangeStrings.add(new String(Base64.encodeBase64(baos.toByteArray()), UTF_8));
ByteArrayInputStream bais = new ByteArrayInputStream(Base64.decodeBase64(... | 0 |
super("char *", " ::std::string", "string", "String", "String", "String", "string"); | 0 |
* @param port The port on which to listen, or 0 to use any free port.
* @param port The port on which to listen, or 0 to use any free port.
* @param port The port on which to listen, or 0 to use any free port. | 0 |
* Copyright 2001-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 |
public URL getResourceFromContent(String name); | 0 |
* @version $Id: AbstractTestSuite.java,v 1.3 2004/06/23 18:17:44 imario Exp $
manager.setFilesCache(providerConfig.getFilesCache()); | 0 |
import java.net.ConnectException;
public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeLayeredSocketFactory,
final Socket sock = socket != null ? socket : createSocket(context);
if (localAddress != null) {
sock.bind(localAddress);
}
try {
... | 0 |
try
// export SCR metadata files from OSGI-INF/
Map<String, Resource> scrDir = jar.getDirectories().get("OSGI-INF");
if (scrDir != null) {
for (Map.Entry<String, Resource> entry : scrDir.entrySet()) {
String path = entry.getKey();
Resourc... | 0 |
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a> | 0 |
* @version CVS $Id: JavaLanguage.java,v 1.3 2003/10/07 15:13:20 tcurdt Exp $
return XSLTExtension.escapeJavaString(constant); | 0 |
import org.apache.http.annotation.NotThreadSafe; | 0 |
public boolean consistentWithEquals() {
return keyCoder.consistentWithEquals() && valueCoder.consistentWithEquals();
}
@Override
public Object structuralValue(KV<K, V> kv) throws Exception {
if (consistentWithEquals()) {
return kv;
} else {
return KV.of(getKeyCoder().structuralValue(kv.... | 0 |
assertFalse( file.isHidden() );
assertTrue( file.isReadable() );
assertTrue( file.isWriteable() );
assertFalse( file.getParent().isHidden() );
assertFalse( file.getParent().getParent().isHidden() );
assertTrue( file.exists() );
assertTrue( file.i... | 0 |
import javax.xml.parsers.DocumentBuilder;
/** Field db */
DocumentBuilder db;
public Canonicalizer20010315ExclusiveTest() throws ParserConfigurationException {
this.db = XMLUtils.createDocumentBuilder(false);
}
Document doc = this.db.parse(fileIn);
this.db.parse(
... | 0 |
public void encode(Mutation mutation, OutputStream outStream) throws IOException {
public Mutation decode(InputStream inStream) throws IOException { | 0 |
this.staticallyBound = bundleLocation != null; | 0 |
/** The property solving jexl engine. */
/** The object serving as context provider. */
* @param engine the jexl engine to use to solve properties
* @param wrapped the object to wrap in this context
public ObjectContext(JexlEngine engine, T wrapped) {
this.jexl = engine;
this.objec... | 0 |
*
*
*
"x-mac-roman",
"csMacintosh",
"mac",
"macintosh", | 0 |
import cz.seznam.euphoria.core.annotation.audience.Audience;
@Audience(Audience.Type.INTERNAL) | 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 |
/* Used by XmlIOIT */
@Description("Xml file charset name")
@Default.String("UTF-8")
String getCharset();
void setCharset(String charset); | 0 |
if (verbose)
System.out.println(msg);
if (zapMaster)
ZooReaderWriter.getInstance().recursiveDelete(tserversPath + "/" + child, NodeMissingPolicy.SKIP); | 1 |
import org.apache.accumulo.core.util.shell.Shell;
import org.apache.accumulo.core.util.shell.Shell.Command; | 0 |
* @version $Revision$ $Date$ | 0 |
import java.net.UnknownHostException;
log.error("problem getting default file system.", e);
} catch (IllegalArgumentException exception) {
/* Hadoop throws a wrapped UHE in some edge cases of DNS trouble */
if (exception.getCause() instanceof UnknownHostException) {
log.error("pr... | 0 |
*
* @since 0.1
/**
* Set the verbosity of the logging message of the bundle
*
* @since 0.1
*/
/**
* If equal to "true" enables the CyberDomo UPnP SDK debugging messages
*
* @since 0.1
*/
/**
* If equal to "true" enables Exporter facility of the UPnP Base Driver
*
* @since 0... | 0 |
* @version CVS $Id: AbstractAspectalizableDescription.java,v 1.3 2003/05/22 12:32:47 cziegeler Exp $
public void addAspectDescription(AspectDescription aspect) { | 0 |
import static javax.servlet.http.HttpServletResponse.*;
if (getContext().handleSecurity(req, res))
this.filter.doFilter(req, res, chain);
// FELIX-3988: If the response is not yet committed and still has the default
// status, we're going to override this and send an error i... | 0 |
private final String filePattern;
* @param filePattern path or glob of files to include
public NumberedShardedFile(String filePattern) {
this(filePattern, DEFAULT_SHARD_TEMPLATE);
* @param filePattern path or glob of files to include
public NumberedShardedFile(String filePattern, Pattern shardTemplate) ... | 0 |
import org.apache.aurora.gen.JobUpdateKey;
import org.apache.aurora.scheduler.storage.entities.IJobKey;
import org.apache.aurora.scheduler.storage.entities.IJobUpdateKey;
private static final IJobKey JOB = JobKeys.from("role", "env", "job");
IInstanceKey.build(new InstanceKey(JOB.newBuilder(), 0));
private st... | 0 |
expect(mockStatement.executeQuery("select c.cluster_name,type_name from clusterconfigmapping ccm " +
"join clusters c on ccm.cluster_id=c.cluster_id " +
"group by c.cluster_name,type_name " +
"having sum(selected) > 1")).andReturn(mockResultSet); | 0 |
public class DefaultThreadPoolTestCase extends AbstractTestCase
// We cannot mock the DefaultThreadFactory as the underlying
// PooledExecutor of the DefaultThreadPool will again wrapp it into a
// Using a easymocked DefaultThreadFactory will prevent the
// We cannot mock the DefaultTh... | 0 |
/*
* Copyright 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 appl... | 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 |
* 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 |
saveNoLoad(obj);
return this.load(obj);
}
public <T extends AtlasBaseModelObject> void saveNoLoad(T obj) throws AtlasBaseException { | 0 |
private boolean noDelay;
@Override
@Override
throw new SshException("write(len=" + l + ") channel already closed");
throw new SshException("flush(length=" + bufferLength + ") - stream is already closed");
buf.wpos((cmd == SshConstants.SSH_MSG_CHANNEL_EXTENDED_DATA) ... | 0 |
opts.setClientProperties(getClientProperties());
vopts.setClientProperties(getClientProperties()); | 0 |
* @version $Id: BaseConfiguration.java,v 1.10 2004/12/02 22:05:52 ebourg Exp $
Object o = getProperty(key);
public Object getProperty(String key) | 0 |
protected void deployMonolithicCocoonApp(final String blocksdir) throws MojoExecutionException {
String id = artifact.getArtifactId();
if(files.containsKey(id)) {
throw new MojoExecutionException("There are at least two artifacts with the ID '" + id + "'.");
}
MonolithicCo... | 0 |
public SingleClientConnManager(final HttpParams params,
final SchemeRegistry schreg) {
createConnectionOperator(final SchemeRegistry schreg) {
final long timeout, final TimeUnit tunit) {
public ManagedClientConnection getConnection(final HttpRoute r... | 0 |
import org.apache.accumulo.core.util.LocalityGroupUtil;
for (String lgName : localityGroupCF.keySet()) {
LocalityGroupUtil.seek(iter, new Range(), lgName, localityGroupCF); | 0 |
* Copyright 2001-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 |
* feComponentTransfer filter, as defined in chapter 15, section 11 of the SVG
* specification.
* @version $Id$ | 0 |
public enum TypeCategory {
PRIMITIVE, ARRAY, MAP, ENTITY, STRUCT, CLASSIFICATION, OBJECT_ID_TYPE
}
private final TypeCategory typeCategory;
protected AtlasType(String typeName, TypeCategory category) {
this.typeCategory = category;
public TypeCategory getTypeCategory() {
re... | 0 |
* <p>An {@link ActiveWindowSet} considers a window to be in one of the following states:
*
* <li><b>NEW</b>: The initial state for a window on an incoming element; we do not yet know
* if it should be merged into an ACTIVE window, or whether it is already present as an
* ACTIVE window, since we have ... | 0 |
if ( null == param ) {
if (param.getClass().isArray()) {
return (String[]) param;
}
return new String[] {(String) param};
if (scheme==null) {
return scheme.equalsIgnoreCase("HTTPS");
if (cookies.isEmpty()) {
Cookie[] cookieArray = ne... | 0 |
String truststorePassword =
primarySiteConfig.get(Property.RPC_SSL_TRUSTSTORE_PASSWORD.getKey());
String credProvider =
primarySiteConfig.get(Property.GENERAL_SECURITY_CREDENTIAL_PROVIDER_PATHS.getKey());
final Set<String> filesNeedingReplication =
connMaster.replicationOpera... | 0 |
private static org.slf4j.Logger log =
org.slf4j.LoggerFactory.getLogger(BobKeyResolver.class); | 1 |
* {@link org.apache.commons.dbcp2.PoolableConnection PoolableConnection}s. | 0 |
import org.apache.felix.http.base.internal.runtime.dto.FailedDTOHolder;
import org.osgi.service.http.runtime.dto.ServletContextDTO;
/**
* Create all DTOs for servlets, filters, resources and error pages
* @param dto The servlet context DTO
* @param failedDTOHolder The container for all failed DTOs
... | 0 |
import org.apache.hc.core5.annotation.NotThreadSafe; | 1 |
storageUtil.expectOperations(); | 0 |
package org.apache.xml.security.stax.test;
import org.apache.xml.security.stax.impl.XMLSecurityEventWriter; | 0 |
import com.google.gson.Gson;
* serializer used to convert json to map
*/
private static final Gson jsonSerializer = new Gson();
/**
createResources(getCreateCommand(properties, request.getRequestInfoProperties()));
* @param properties request properties
* @param requestInfoProps request i... | 0 |
import org.apache.http.util.Args;
Args.notNull(dst, "Byte buffer"); | 0 |
PCollection<String> inputWords = p.apply(Create.timestamped(WORDS, TIMESTAMPS)
.withCoder(StringUtf8Coder.of()));
PCollection<String> inputWords = p.apply(Create.timestamped(WORDS, TIMESTAMPS)
.withCoder(StringUtf8Coder.of())); | 0 |
import java.math.BigInteger;
eid = new BigInteger(sa[1], 16).longValue(); | 1 |
import org.apache.accumulo.core.client.AccumuloClient;
AccumuloClient conn = EasyMock.createMock(AccumuloClient.class);
EasyMock.expect(shellState.getAccumuloClient()).andReturn(conn);
AccumuloClient conn = EasyMock.createMock(AccumuloClient.class);
EasyMock.expect(shellState.getAccumuloClient()).andRet... | 0 |
import org.apache.hc.core5.http.io.entity.HttpEntityWithTrailers;
import org.apache.hc.core5.http.io.entity.StringEntity; | 1 |
encryptionPartDef.setSymmetricKey(securityTokenProvider.getSecurityToken().getSecretKey(getSecurityProperties().getEncryptionSymAlgorithm(), null, null));
getSecurityProperties().getEncryptionKeyTransportAlgorithm(), null, null);
getSecurit... | 0 |
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> | 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 |
private static final String PREFIX = AccumuloFileOutputFormatTest.class.getSimpleName();
private static final String INSTANCE_NAME = PREFIX + "_mapreduce_instance";
private static final String BAD_TABLE = PREFIX + "_mapreduce_bad_table";
private static final String TEST_TABLE = PREFIX + "_mapreduce_test_table";... | 0 |
private ConnectionThread(final DataSource ds) { | 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 |
return CalciteUtils.toCalciteRowType(this.beamTable.getSchema(), typeFactory); | 0 |
Lists.newArrayList(outputReceiverNodes).stream() | 0 |
public void testTransformingSourceUnsplittable() throws Exception {
int numElements = 10000;
@SuppressWarnings("deprecation")
BoundedSource<Long> longSource =
SourceTestUtils.toUnsplittableSource(CountingSource.upTo(numElements));
SerializableFunction<Long, String> toStringFn =
new Ser... | 0 |
private static final int DEFAULT_BUFSIZE = 8 * 1024;
final HttpMessageWriterFactory<HttpRequest> requestWriterFactory,
this(DEFAULT_BUFSIZE, requestWriterFactory, responseParserFactory);
final HttpMessageParserFactory<HttpResponse> responseParserFactory) {
this(null, respons... | 0 |
* @since 6.0 | 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 |
* @throws NullPointerException if either argument is null
* @throws NullPointerException if either argument is null
* @throws NullPointerException if the method name is null
* @throws NullPointerException if the method name is null
* @throws NullPointerException if the closures array is null
... | 0 |
package org.apache.commons.configuration;
* @version $Id: TestNonStringProperties.java,v 1.4 2005/01/03 16:35:04 ebourg Exp $
public void setUp() throws Exception
{
conf = new PropertiesConfiguration(testProperties);
nonStringTestHolder.setConfiguration(conf); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/impl/Attic/DynaTagScript.java,v 1.2 2002/05/15 06:25:48 jstrachan Exp $
* $Revision: 1.2 $
* $Date: 2002/05/15 06:25:48 $
* $Id: DynaTagScript.java,v 1.2 2002/05/15 06:25:48 jstrachan Exp $... | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
if (this.execRuntime.isEndpointConnected()) {
this.execRuntime.disconnectEndpoint();
this.execRuntime.discardEndpoint();
this.execRuntime.discardEndpoint();
this.execRuntime.releaseEndpoint();
final boolean open = execRuntime != null && execRun... | 0 |
import org.apache.http.annotation.NotThreadSafe;
@NotThreadSafe | 0 |
/**
* Check the validity of a public key.
*
* @param username the username
* @param key the key
* @param session the server session
* @return a non null identity object or <code>null</code if authentication fail
*/
Object hasKey(String username, PublicKey key, ServerSession se... | 0 |
final List<Object> testList = new ArrayList<>(size);
final TreeMap<String, Object> map = new TreeMap<>();
final List<Object> collection = new ArrayList<>();
final HashMap<String, Object> elem = new HashMap<>(); | 0 |
public static Set<String> getPropertyIds(Predicate predicate) { | 1 |
private static final List<Set<Integer>> TEST_VALUES =
Arrays.asList(
Collections.emptySet(),
Collections.singleton(13),
new HashSet<>(Arrays.asList(31, -5, 83))); | 0 |
import java.util.Set;
Map<PropertyInfo.PropertyType, Set<String>> getPropertiesTypes();
void setPropertiesTypes(Map<PropertyInfo.PropertyType, Set<String>> propertiesTypes); | 0 |
import java.sql.SQLException;
import org.apache.ambari.server.H2DatabaseCleaner;
H2DatabaseCleaner.resetSequences(injector);
public void teardown() throws AmbariException, SQLException {
H2DatabaseCleaner.clearDatabaseAndStopPersistenceService(injector);
} | 0 |
* <p>
* </p>
* <p>
* </p>
* <p>
* </p> | 0 |
existingMetric.setMetricValues(new TreeMap<>()); | 0 |
* @version $Id$ | 0 |
Buffer buffer = session.createBuffer(SshConstants.SSH_MSG_CHANNEL_OPEN, 0);
out = new ChannelOutputStream(this, remoteWindow, log, SshConstants.SSH_MSG_CHANNEL_DATA); | 0 |
package aQute.bnd.build;
import java.io.*;
import java.util.*;
import aQute.lib.osgi.*;
public class ProjectBuilder extends Builder {
Project project;
boolean initialized;
public ProjectBuilder(Project project) {
super(project);
this.project = project;
}
public ProjectBuilder(Pr... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.