Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
@SuppressWarnings("rawtypes") | 0 |
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class TestJNDIConfi... | 0 |
/**
* Add the following resource to the resolution.
*
* The resource will be part of the output and all its requirements
* will be satisfied.
*
* It has the same effect has adding a requirement that will match
* this resource by symbolicname and version.
*
* The current ... | 0 |
return true;
return CSSConstants.CSS_FONT_SIZE_PROPERTY;
switch (lu.getLexicalUnitType()) {
case LexicalUnit.SAC_INHERIT:
return ValueConstants.INHERIT_VALUE;
case LexicalUnit.SAC_IDENT: | 1 |
import static org.junit.Assume.assumeFalse;
import org.apache.accumulo.test.mrit.IntegrationTestMapReduce;
import org.junit.BeforeClass;
@BeforeClass
static public void checkMR() {
assumeFalse(IntegrationTestMapReduce.isMapReduce());
}
| 0 |
private static final String[] goodsamplesDatasetList = {
/* Note, if the string begins with SAVE, the parsed entry is stored in the List saveftpfiles */
private static final String[] goodsamplesMemberList = {
/* Note, if the string begins with SAVE, the parsed entry is stored in the List... | 0 |
import org.apache.commons.vfs.Capability;
public abstract Collection<Capability> getCapabilities(); | 0 |
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibil... | 0 |
* Gets the stroke used to draw the outline of the shape.
*/
public Stroke getStroke() {
return stroke;
}
/**
* Gets the paint used to draw the outline of the shape.
*/
public Paint getPaint() {
return paint;
}
/** | 0 |
import java.lang.reflect.InvocationTargetException;
import org.apache.commons.jelly.JellyException;
protected void processBean(String var, Object bean) throws JellyException {
throws JellyException {
try {
// lets first see if there's a field available
... | 0 |
import org.apache.accumulo.core.security.Credentials;
public void changePassword(TCredentials credentials, Credentials newInfo) throws ThriftSecurityException {
public void createUser(TCredentials credentials, Credentials newUser, Authorizations authorizations) throws ThriftSecurityException { | 0 |
import org.osgi.service.coordinator.CoordinationPermission;
this.owner.checkPermission(name, CoordinationPermission.PARTICIPATE);
catch (final Exception e)
LogWrapper.getLogger()
.log(LogWrapper.LOG_ERROR, "Participant threw exception during call to fa... | 0 |
* @since 3.0 | 0 |
import static org.mockito.Matchers.any;
service =
InMemoryJobService.create(stagingServiceDescriptor, session -> "token", null, invoker);
verify(invocation, times(1)).addStateListener(any());
verify(invocation, times(1)).start(); | 1 |
* A 'generic' URI, as per RFC 2396. Consists of a scheme, userinfo (typically
* username and password), hostname, port, and path.
* @version $Revision: 1.1 $ $Date: 2002/10/31 10:40:57 $
public class GenericUri
extends Uri
public void setUserInfo( final String userInfo )
public void setHostName( final S... | 0 |
/** Authentication data supported by this provider. */
public static final UserAuthenticationData.Type[] AUTHENTICATOR_TYPES = new UserAuthenticationData.Type[]
static final Collection<Capability> capabilities =
Collections.unmodifiableCollection(Arrays.asList(new Capability[]
{
... | 0 |
* Copyright 2002,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.beam.sdk.extensions.sql.SqlTypeCoder.SqlRowCoder;
if (SqlTypeCoder.isArray(coder)) {
return SqlTypeName.ARRAY;
}
if (SqlTypeCoders.isRow(coder)) {
return SqlTypeName.ROW;
}
return BEAM_TO_CALCITE_TYPE_MAPPING.get(coder);
if (SqlTypeName.ROW.equals(fieldTypeName... | 0 |
public static class CountdownWatcher implements Watcher {
synchronized public boolean isConnected() {
synchronized public void waitForConnected(long timeout)
throws InterruptedException, TimeoutException
{
synchronized public void waitForDisconnected(long timeout)
... | 0 |
* @version $Id$ | 0 |
/** A direct implementation of {@link Query1}. */
/** Simulator for query 1. */ | 1 |
* Processes a COMMAND.
*
* @param command - option code to be set.
**/
void _processCommand(int command)
{
if (debugoptions)
{
System.err.println("RECEIVED COMMAND: " + command);
}
if (__notifhand != null)
{
__notifhand.receiv... | 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 BaseIOReactor(long selectTimeout, boolean interestOpsQueueing) throws IOReactorException {
super(selectTimeout, interestOpsQueueing); | 0 |
/**
* Gets the system property for the given name.
*
* @param name The name to lookup combined with the prefix.
* @return a system property.
*/
private String getProperty(String name)
{
return System.getProperty(toPropertyKey(name));
}
return hasParam(opts, nam... | 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 |
package org.apache.commons.ognl.test;
import org.apache.commons.ognl.OgnlException;
import org.apache.commons.ognl.test.objects.Simple;
private static Simple SIMPLE = new Simple();
{ SIMPLE, "floatValue", new Float(10f), "x10x", OgnlException.class }, | 0 |
import org.apache.accumulo.core.client.sample.SamplerConfiguration; | 0 |
SystemLogger.info("Started jetty " + Server.getVersion() + " at port " + this.config.getHttpPort()); | 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 |
.setRequestedPorts(ImmutableSet.<String>of()) | 0 |
p.run().waitUntilFinish(); | 0 |
import java.util.concurrent.atomic.AtomicBoolean;
} else if (val instanceof AtomicBoolean) {
return ((AtomicBoolean) val).get() ? Boolean.FALSE : Boolean.TRUE;
} else if (val instanceof AtomicBoolean) {
return ((AtomicBoolean) val).get();
} else if (val instanceof AtomicB... | 0 |
String exMain = "g.V().has('__typeName', 'Table').as('t').has('Table.createTime', eq('%s')).has('Table.name').has('Table.owner').limit(local, 25).limit(25).toList()";
verify("Table as t where t.createTime = \"2017-12-12T02:35:58.440Z\" select t.name, t.owner", getExpected(exSel, String.format(exMain, "1... | 0 |
/**
* TODO Add javadoc
*
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
* @version $Rev$, $Date$
*/ | 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 |
* @version $Revision$ $Date$ | 0 |
import com.twitter.aurora.scheduler.base.JobKeys;
formatLockKey(lockKey),
formatLockKey(context)));
throw new LockException(
String.format("Invalid operation context: %s", formatLockKey(context)));
private static String formatLockKey(ILockKey lockKey) {
switch (lockK... | 0 |
* @version $Id: AbstractConfiguration.java,v 1.2 2003/12/24 14:28:22 epugh Exp $
* Then you will end up with a List like the following:
* Returns a List of Strings built from the supplied
* String, simply returns a List with the String as its
* object that is not a String/List.
* object that i... | 0 |
* Copyright 2006-2009 The Apache Software Foundation. | 0 |
public static final String CHARSET = "ISO-8859-1";
public int getExitCode() {
return exitCode;
}
public void resetExitCode() {
exitCode = 0;
}
| 0 |
for (char c = 'a'; c <= 'z'; c++) {
}
for (char c = '0'; c <= '9'; c++) {
}
if (regex != null && !val.matches(regex)) {
}
Set<ByteSequence> es = Set.of(); | 0 |
import org.slf4j.LoggerFactory;
case DEBUG:
return log.isDebugEnabled();
case INFO:
return log.isInfoEnabled();
case WARN:
return log.isWarnEnabled();
case ERROR:
return log.isErrorEnabled();
case... | 1 |
this.range = range.bound(this.options.fetchedColumns.first(), this.options.fetchedColumns.last()); | 0 |
/**
* A configuration drawn from an XML configuration file specified by the system property
* org.apache.accumulo.config.file, which points to the file as a resource. The default value is
* "accumulo-site.xml". <b>Note</b>: Client code should not use this class, and it may be deprecated in the
* future.
*/ | 0 |
private static final int BUFFER_SIZE = 80;
StringBuilder buf = new StringBuilder(BUFFER_SIZE); | 0 |
/** Socket listen backlog. Value of -1 indicates unset */
protected int listenBacklog = -1;
int minSessionTimeout, int maxSessionTimeout, int clientPortListenBacklog,
ZKDatabase zkDb) {
this.listenBacklog = clientPortListenBacklog;
+ " clientPortListenBacklog " +... | 0 |
import org.apache.sshd.common.session.Session;
protected boolean isFileUploadAllowed(Session session, Path path) throws IOException {
protected boolean isFileDownloadAllowed(Session session, Path path) throws IOException {
public void startFileEvent(
Session session, FileOperatio... | 0 |
} catch (ThreadDeath td) {
exception = new Exception(td.getMessage());
fireEvent(failedDispatcher, ev);
throw td; | 0 |
* Copyright (c) 2002 The Apache Software Foundation. All rights | 0 |
// we don't have an option specified.
* @return true if successful | 0 |
public void setup() throws IOException {
internalCluster().ensureAtMostNumDataNodes(1); | 0 |
/*
* Copyright 2008, Yahoo! 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 to... | 0 |
@Override | 0 |
@Override
public void onEntitiesDeleted(Collection<ITypedReferenceableInstance> entities) throws AtlasException {
notifyOfEntityEvent(entities, EntityNotification.OperationType.ENTITY_DELETE);
}
| 0 |
return o instanceof String; | 0 |
sleep(200);
sleep(200); | 0 |
import static org.apache.accumulo.core.file.blockfile.cache.impl.ClassSize.CONCURRENT_HASHMAP;
import static org.apache.accumulo.core.file.blockfile.cache.impl.ClassSize.CONCURRENT_HASHMAP_ENTRY;
import static org.apache.accumulo.core.file.blockfile.cache.impl.ClassSize.CONCURRENT_HASHMAP_SEGMENT;
long entryPart =... | 0 |
final HttpRequest request = new BasicHttpRequest("GET", "/");
final HttpRequest request = new BasicHttpRequest("GET", "/");
final HttpRequest request = new BasicHttpRequest("GET", "/");
final HttpRequest request = new BasicHttpRequest("GET", "/"); | 0 |
import org.apache.accumulo.core.client.BatchWriterConfig;
BatchWriter bw = this.getConnector().createBatchWriter(table, new BatchWriterConfig()); | 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 |
* 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... | 1 |
* @version CVS $Id$
public interface XMLDeserializer extends XMLProducer { | 0 |
private int validateAfterInactivity = 2000;
* Sets period after inactivity in milliseconds after which persistent
* connections must be checked to ensure they are still valid.
* <p>
* Please note this value can be overridden by the {@link #setConnectionManager(
*HttpClientConnectionManager)... | 0 |
Assume
.assumeFalse("Compaction successfully occurred due to weird timing but we hoped it would cancel.", HardListIterator.allEntriesToInject.equals(actual)); | 0 |
b.setHost(host.toLowerCase(Locale.ROOT)); | 0 |
* @param rx the x radius of the ellipse
* @param ry the y radius of the ellipse
* @param angle the angle from the x-axis of the current
* @param x the absolute x coordinate of the final point of the arc.
* @param y the absolute y coordinate of the final point of the arc. | 1 |
/*
* 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 applicable la... | 0 |
public PCollection<String> expand(PCollection<String> in) { | 0 |
public static final String PROPERTY_HDFS_ADDRESS = "hdfs.address";
public static final String PROPERTY_YARN_RM_ADDRESS = "yarn.resourcemanager.address";
public static final String PROPERTY_YARN_RM_SCHEDULER_ADDRESS = "yarn.resourcemanager.scheduler.address";
public static final String PROPERTY_ZK_QUOROM = "zook... | 0 |
/*
* $HeadURL$
* $Revision$
* $Date$
*
* ====================================================================
* 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... | 0 |
this.log.debug("Connection manager is shutting down");
this.pool.shutdown();
this.log.debug("I/O exception shutting down connection manager", ex);
this.log.debug("Connection manager shut down"); | 0 |
mavenBundle("org.apache.felix", "org.apache.felix.eventadmin", "1.2.10"),
for (Bundle bundle : bc.getBundles()) {
System.out.println("Bundle " + bundle.getSymbolicName() + " - " + bundle.getState());
} | 0 |
static public <T extends TServiceClient> T getClientNoTimeout(TServiceClientFactory<T> factory, String address) throws TTransportException {
return createClient(factory, ThriftTransportPool.getInstance().getTransport(address, 0));
}
long timeout = configuration.getTimeInMillis(prop... | 0 |
protected Trigger getContinuationTrigger(List<Trigger> continuationTriggers) { | 0 |
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> | 0 |
import java.io.InputStream; | 0 |
import java.io.Serializable;
public class CookieIdentityComparator implements Serializable, Comparator<Cookie> {
private static final long serialVersionUID = 4466565437490631532L; | 0 |
List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(oldTableName.getBytes(Constants.UTF8)), ByteBuffer.wrap(newTableName.getBytes(Constants.UTF8))); | 0 |
sb.append("<p><table class=\"noborder\">\n"); | 0 |
public class CountByKey<
IN, KEY, WLABEL, W extends WindowContext<?, WLABEL>,
PAIROUT extends Pair<KEY, Long>>
WLABEL, W, CountByKey<IN, KEY, WLABEL, W, PAIROUT>> { | 0 |
return hostStateEntity != null ? hostStateEntity.getAvailableMem() : 0; | 1 |
* @deprecated (4.4) use standard {@link java.net.IDN}.
*
@Deprecated | 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 applicable la... | 0 |
import org.apache.accumulo.core.conf.ClientConfiguration;
* <li>{@link AccumuloOutputFormat#setZooKeeperInstance(Job, ClientConfiguration)} OR {@link AccumuloOutputFormat#setMockInstance(Job, String)}
* @deprecated since 1.6.0; Use {@link #setZooKeeperInstance(Job, ClientConfiguration)} instead.
@Deprecated
* ... | 0 |
byte[] defaultVisibility, AccumuloConfiguration conf) throws IOException {
SortedKeyValueIterator<Key,Value> delIter = DeletingIterator.wrap(source, false,
DeletingIterator.getBehavior(conf)); | 0 |
import org.apache.felix.http.base.internal.logger.SystemLogger;
import org.osgi.framework.Constants;
extends ServiceTracker<T, T>
public AbstractTracker(final BundleContext context, final Filter filter)
public AbstractTracker(final BundleContext context, final Class<T> clazz)
protected void logDeprecati... | 0 |
import java.util.Optional;
import com.google.inject.AbstractModule;
import com.google.inject.TypeLiteral;
if (mechanism == HttpAuthenticationMechanism.NONE) {
// TODO(ksweeney): Use an OptionalBinder here once we're on Guice 4.0.
bind(new TypeLiteral<Optional<Subject>>() { }).toInstance(Optional.empty()... | 0 |
* A content aggregator is a special generator used to implement <map:aggregate>.
* @version $Id$
public interface ContentAggregator extends Generator {
public void setRootElement(String element, String namespace, String prefix);
String prefix); | 0 |
if (!security.canCreateTable(c, tableName))
if (!security.canRenameTable(c, tableId, oldTableName, newTableName))
if (!security.canCloneTable(c, srcTableId, tableName))
if (!security.canOnlineOfflineTable(c, tableId, op))
if (!security.canOnlineOfflineTable(c, tableId, ... | 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... | 0 |
*
*
* Note: the return can be cast to a {@link BufferedReader}
/**
* Note: the return can be cast to a {@link BufferedReader}
* Same as <code> retrieveArticleHeader(articleId, (ArticleInfo) null) </code>
* Same as <code> retrieveArticleBody(articleId, (ArticleInfo) null) </code>
*... | 0 |
package examples;
import org.apache.commons.net.nntp.*;
import org.apache.commons.io.*; | 0 |
* <code>GENERIC</code> NameType should work reasonably well for non-name words. The other encodings are
* specifically tuned to family names, and may not work well at all for general text. | 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 |
import org.apache.sshd.common.util.GenericUtils;
SocketAddress service = GenericUtils.head(boundAddresses.keySet());
listener.connectionAccepted(NettyIoAcceptor.this, local, remote, service);
NettyIoSession nettyIoSession = new NettyIoSession(N... | 0 |
* Test that the generic dump() methods work on the JDK classes Reads each class into an instruction list and then dumps
* the instructions. The output bytes should be the same as the input.
private static final String KEY_JDK_9 = "SOFTWARE\\JavaSoft\\JDK";
private static final String KEY_JRE_9 = "SOFTWARE\\J... | 0 |
import java.io.Serializable;
import java.util.Objects; | 0 |
import org.apache.beam.sdk.options.ValueProvider.StaticValueProvider;
assertEquals(query, bound.getQuery());
String tableId = "sometable";
FakeDatasetService fakeDatasetService =
new FakeDatasetService().withTable(projectId, datasetId, tableId, null);
.withJobService(new FakeJobService())
... | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.