Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/SynchronizedList.java,v 1.4 2003/05/07 12:18:55 scolebourne Exp $
* <code>SynchronizedList</code> decorates another <code>List</code>
* to synchronize its behavi... | 0 |
import org.apache.accumulo.cluster.ClusterServerType;
control.stopAllServers(ClusterServerType.TABLET_SERVER);
control.startAllServers(ClusterServerType.TABLET_SERVER); | 0 |
import org.apache.cocoon.SitemapComponentTestCase;
* @version CVS $Id: RequestParamActionTestCase.java,v 1.3 2003/11/26 16:27:22 stephan Exp $
public class RequestParamActionTestCase extends SitemapComponentTestCase { | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/observed/Attic/ObservableBuffer.java,v 1.2 2003/10/09 20:50:04 scolebourne Exp $
* The default handler is
* {@link org.apache.commons.collections.observed.standard.StandardModifi... | 0 |
Assert.assertEquals(12, responses.size()); | 0 |
LOG.debug("Received event {}", event);
LOG.debug("Received event {}", event);
| 0 |
public interface SerializerFactory { | 0 |
import org.apache.http.HttpResponseInterceptor;
import org.apache.http.params.SyncBasicHttpParams;
import org.apache.http.protocol.HttpProcessor;
import org.apache.http.protocol.ImmutableHttpProcessor;
HttpParams params = new SyncBasicHttpParams();
HttpProcessor httpproc = new ImmutableHttpProcessor(new... | 0 |
* Handles {@code gzip</tt> and <tt>deflate} compressed entities by using the following | 0 |
String algo = getSecurityToken().getPublicKey(null, null, null).getAlgorithm(); | 0 |
int execute(CommandLine command, Map<String, String> environment)
void execute(CommandLine command, Map<String, String> environment, ExecuteResultHandler handler) | 0 |
import org.apache.accumulo.core.util.RootTable;
if ((table.equals(MetadataTable.ID) || table.equals(RootTable.ID)) && permission.equals(TablePermission.READ)) | 0 |
import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryHelper;
import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryValidator;
* Set up a repository helper object for the repository connector to use.
*
* @param repositoryHelper - helper object f... | 0 |
.addRows(4L, 4, new BigDecimal(4.0))
@Test
public void testExceptRemovesDuplicates() throws Exception {
String sql = "(SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 1) EXCEPT SELECT 1";
PCollection<Row> rows = compilePipeline(sql, pipeline);
PAssert.that(rows).satisfies(new CheckSize(1)... | 0 |
case OpCode.multiRead:
case OpCode.multiRead:
case OpCode.multiRead:
return "multiRead"; | 0 |
return Iterators.size(scanner.iterator()) == 0; | 0 |
import org.apache.commons.lang.exception.NestableException;
* @version $Id: ConfigurationException.java,v 1.3 2004/06/02 16:42:24 ebourg Exp $ | 0 |
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override | 0 |
* .samplerConfiguration(sampleConf).autoAdjustRanges(false) // enabled by default
* .scanIsolation(true) // not available with batchScan()
* .offlineScan(true) // not available with batchScan() | 0 |
return parseFileList(entry);
return parseMemberList(entry);
return unixFTPEntryParser.parseFTPEntry(entry);
return parseJeslevel1List(entry);
return parseJeslevel2List(entry);
return null;
* @return null: entry was not parsed.
private FTPFile... | 0 |
String auditPrefix = getV1AuditPrefix(action);
public static String getV1AuditPrefix(EntityAuditAction action) {
public static String getV2AuditPrefix(EntityAuditAction action) {
final String ret;
switch (action) {
case ENTITY_CREATE:
ret = "Created: ";
... | 0 |
import org.apache.cocoon.components.ComponentInfo;
conf.expects(once()).method("getName").will(returnValue("roles-list"));
conf.expects(once()).method("getChildren").will(returnValue(roles));
child0.expects(once()).method("getName").will(returnValue("role"));
child0.expects(once()).metho... | 0 |
if ( value == null && parent != null && ExpressionNode.class.isInstance( parent ) )
if ( parent != null && ASTProperty.class.isInstance( parent ) )
else if ( !( parent != null
&& NumericExpression.class.isAssignableFrom( parent.getClass() ) )
if ( parent == null ) | 0 |
String clusterName, Map<String, String> requestProperties) throws AmbariException {
return amc.createAction(actionRequest, requestProperties); | 0 |
public void add(UpgradeContext context, HostsType hostsType, String service,
List<Task> tasks = resolveTasks(context, true, pc);
context.getComponentDisplay(service, pc.name), Collections.singleton(host));
Task t = resolveTask(context, pc);
if (null != t && RestartTask.class.is... | 0 |
*
*
*
/**
* A tag which calls a method in an object instantied by core:new
*
* @version $Revision: 1.10 $
//-------------------------------------------------------------------------
}
if(null != exceptionVar) {
context.setVariable(exceptionVar,e.getTargetExc... | 0 |
private String tableId;
TableBatchWriter(String tableId) {
this.tableId = tableId;
bw.addMutation(tableId, m);
bw.addMutation(tableId, iterable.iterator()); | 0 |
import static com.google.common.base.Charsets.UTF_8;
return new Value(newVal.getBytes(UTF_8));
return new Value(newVal.getBytes(UTF_8)); | 0 |
public static final void strictlyPositive(final int i) {
if (i <= 0)
throw new IllegalArgumentException("integer should be > 0, was " + i);
} | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final transient Logger logger = LoggerFactory.getLogger(XMLSignatureOutputProcessor.class); | 1 |
import java.nio.file.NoSuchFileException;
@Test
public void testGetSizeBytes() throws Exception {
String data = "TestData!!!";
File file = temporaryFolder.newFile();
Files.write(data, file, StandardCharsets.UTF_8);
assertEquals(data.length(), factory.getSizeBytes(file.getPath()));
}
@Test(expe... | 0 |
import com.google.common.base.Joiner;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URI; | 0 |
log.debug("{} mutations added to the BatchScanner", mutationsCopy.size());
mutationsApplied += mutationsCopy.size(); | 0 |
public void testCollections261() {
Flat3Map m = new Flat3Map();
m.put( new Integer(1), new Integer(1) );
m.put( new Integer(0), new Integer(0) );
assertEquals( new Integer(1), m.remove( new Integer(1) ) );
assertEquals( new Integer(0), m.remove( new Integer(0) ) );
... | 0 |
final char code = this.getStringEncoder().getMappingCode('#'); | 1 |
return pairDStream.map(v1 -> v1._2());
Iterators.transform(itr, kv -> new Tuple2<>(kv.getKey(), kv.getValue()));
final Iterator<KV<K, V>> outputItr = Iterators.transform(itr, t2 -> KV.of(t2._1(), t2._2()));
return new Tuple2<TupleTag<?>, byte[]>(
tupleTag, CoderHelpers.toByteArray(wi... | 0 |
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
private IPath[] sourcePaths;
private String[] classpath;
private String[] packages;
sourcePaths = new IPath[0];
classpath = new String[0];
packages = new String[0];
updateManifest(locat... | 0 |
* Copyright 2016 Seznam.cz, a.s. | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/test/org/apache/commons/jxpath/ri/compiler/ExtensionFunctionTest.java,v 1.7 2003/03/11 00:59:36 dmitri Exp $
* $Revision: 1.7 $
* $Date: 2003/03/11 00:59:36 $
* Copyright (c) 1999-2003 The Apache Software Foundation. ... | 0 |
private Trigger<IntervalWindow>.TriggerContext isTriggerContext() {
Mockito.<Trigger<IntervalWindow>.TriggerContext>any(),
Mockito.<Trigger<IntervalWindow>.TriggerContext>any(), | 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 |
package cz.seznam.euphoria.core.annotation.operator;
import cz.seznam.euphoria.core.client.operator.Operator;
import java.lang.annotation.Documented;
/**
* A {@code Recommended} operator is such an operator that is strongly
* advised to be implemented natively by executor due to performance
* reasons.
*/
@Docume... | 0 |
.map(
input -> {
List<String> empData = Splitter.on('_').splitToList(input.getValue());
return KV.of(
new Text(input.getKey()), new Employee(empData.get(0), empData.get(1)));
})
.collect(Collectors.toList()... | 0 |
propCache = zcf.getZooCache(instance.getZooKeepers(),
instance.getZooKeepersSessionTimeOut(), new TableConfWatcher(instance));
return ZooUtil.getRoot(instance.getInstanceID()) + Constants.ZTABLES + "/" + tableId
+ Constants.ZTABLE_CONF;
return new ServerConfigurationFactory(paren... | 0 |
public <OutputT extends POutput> OutputT apply(PTransform<? super PCollection<T>, OutputT> t) { | 0 |
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
private final Logger log = LogManager.getLogger(getClass()); | 0 |
* Test our decode with pad character in the middle.
* (Our current implementation: halt decode and return what we've got so far).
*
* The point of this test is not to say "this is the correct way to decode base64."
* The point is simply to keep us aware of the current logic since 1.4 so we
... | 0 |
private volatile ServerSocket serverSocket;
public InetAddress getInetAddress() {
final ServerSocket localSocket = this.serverSocket;
if (localSocket != null) {
return localSocket.getInetAddress();
} else {
return null;
}
}
public int getLocalPort... | 0 |
import org.apache.http.HttpEntity;
public class ByteArrayEntity implements HttpEntity { | 0 |
import org.apache.beam.runners.core.metrics.MonitoringInfoConstants;
.putLabels(MonitoringInfoConstants.Labels.PTRANSFORM, "anyValue")
.putLabels(MonitoringInfoConstants.Labels.PTRANSFORM, "anyValue") | 0 |
TestCase.assertSame( instance, SimpleComponent.INSTANCE ); | 0 |
import junit.framework.TestCase;
| 0 |
import org.apache.hc.core5.io.Closer;
Closer.closeQuietly(this); | 0 |
import java.util.LinkedList;
import java.util.List;
/**
* These are used to queue events while a rendering event
* is in progress.
*/
protected List eventQueue = new LinkedList();
protected boolean eventDispatchEnabled = true;
public void setEventDispatchEnabled(boolean b) {
even... | 0 |
/**
* @param n index of local variable
* @param c increment factor
*/ | 0 |
* @param <T> the type being encoded | 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 java.io.IOException;
import java.util.Objects;
import org.apache.sshd.common.util.ValidateUtils;
this.client = Objects.requireNonNull(client, "No client instance");
this.path = ValidateUtils.checkNotNullAndNotEmpty(path, "No remote path");
try {
return new SftpDirEntryIterato... | 0 |
package org.apache.beam.sdk.extensions.sql.impl.interpreter.operator;
import org.apache.beam.sdk.extensions.sql.impl.interpreter.BeamSqlFnExecutorTestBase; | 0 |
* @param op the filter to be applied to the image before rendering
* @param x the x coordinate in user space where the image is rendered
* @param y the y coordinate in user space where the image is rendered
* @param x the x position in user space where the glyphs should be
* rendered
... | 0 |
* @version $Id: NonStringTestHolder.java,v 1.2 2003/12/24 14:28:21 epugh Exp $
Assert.assertEquals(1, configuration.getList("test.boolean").size());
Assert.assertEquals(1, configuration.getList("test.byte").size());
Assert.assertEquals(1, configuration.getList("test.double").size());
As... | 0 |
import org.apache.beam.vendor.grpc.v1p13p1.io.grpc.Server;
import org.apache.beam.vendor.grpc.v1p13p1.io.grpc.inprocess.InProcessServerBuilder; | 0 |
public static void main(final String[] args) throws Exception {
try (final CloseableHttpClient httpclient = HttpClients.custom()
final Header idHeader = request.getFirstHeader("request-id");
final ClassicHttpResponse response = new BasicClassicHttpResponse... | 0 |
import org.apache.sshd.common.cipher.Cipher;
import org.apache.sshd.common.mac.Mac;
import org.apache.sshd.common.random.Random;
import org.apache.sshd.server.SshServer; | 0 |
import aQute.bnd.osgi.*;
import aQute.bnd.osgi.Clazz.MethodDef; | 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 |
long t1 = System.currentTimeMillis();
long t2 = System.currentTimeMillis();
System.out.println("---- GVT tree construction ---- " +
(t2 - t1) + " ms"); | 0 |
package org.apache.aurora.scheduler.cron; | 0 |
session.close(false).await();
session.close(false).await();
session.close(false).await();
session.close(false).await();
session.close(false).await();
session.close(false).await();
os.write(0);
os.flush(); | 0 |
package org.apache.beam.runners.direct; | 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 |
this(cs.toString().getBytes(UTF_8)); | 0 |
* Creates a new AbstractSVGList. | 0 |
private Host addHost(String hostName, Map<String, String> hostAttributes) throws Exception {
return host;
* Comprehensive test for host versions. It creates a cluster with 3 hosts and
* 3 services, one of which does not advertise a version. It then verifies
* that all 3 hosts have a version of CURRENT, ... | 0 |
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
private Lock lock;
this.lock = new ReentrantLock();
//
// DBCP-484 we need to make sure setClosedInternal(true) being
// invoked if transactionContext is not null as this ... | 0 |
import org.apache.beam.vendor.grpc.v1_13_1.com.google.protobuf.Struct; | 0 |
import java.util.Collections;
parser.parse(new StringReader("aString = 'World';")); | 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(Properties)
public Object prepareConfiguration(Properties configuration)
throws PortalExcept... | 0 |
package org.apache.beam.sdk.extensions.sql.interpreter.operator.string;
import org.apache.beam.sdk.extensions.sql.interpreter.BeamSqlFnExecutorTestBase;
import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlExpression;
import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlPrimitive; | 0 |
@SuppressWarnings("deprecation") // OptionBuilder is marked deprecated | 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 |
formDefinition.resolve(); | 0 |
/** Static utility methods that provide {@link KeyedWorkItem} implementations. */
* Returns an implementation of {@link KeyedWorkItem} that wraps around an timers iterable and an
* elements iterable. | 1 |
import java.io.IOException;
import java.io.ObjectInputStream;
private transient int hashCode;
calculateHashCode(keys);
/**
* Calculate the hash code of the instance using the provided keys.
* @param keys
*/
private void calculateHashCode(Object[] keys)
{
int total = 0;
for (int i = 0; i <... | 0 |
return sizeBefore != size(); | 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.hc.core5.pool.PoolReusePolicy;
private PoolReusePolicy poolReusePolicy;
* Assigns {@link PoolReusePolicy} instance.
public final AsyncRequesterBootstrap setPoolReusePolicy(final PoolReusePolicy poolReusePolicy) {
this.poolReusePolicy = poolReusePolicy;
poolReusePol... | 0 |
public final transient TestPipeline testPipeline = TestPipeline.create(); | 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 |
this.manager = new ServletContextManager(bundle, globalContext, false, null); | 0 |
import org.w3c.dom.Element;
this.documentFactory = new SAXSVGDocumentFactory(parser, true);
DocumentDescriptor desc = documentFactory.getDocumentDescriptor();
int num = desc.getNumberOfElements();
//System.out.println("disposing: "+state.uri);
"WARNING: The lo... | 0 |
* @throws SQLException - if a database access error occurs | 0 |
final String activateMethodName = getComponentMetadata().getActivate();
Method activateMethod = getMethod( implementationObject.getClass(), activateMethodName, new Class[]
{ ComponentContext.class }, false );
log( LogService.LOG_DEBUG, activateMethodName + " method is... | 0 |
import com.google.inject.Inject;
import static org.apache.ambari.server.orm.DBAccessor.DbType;
import org.apache.ambari.server.orm.DBAccessor;
@Inject
private DBAccessor dbAccessor;
public static final int ORACLE_LIST_LIMIT = 999;
public DbType getDbType() {
return dbAccessor.getDbType();
} | 0 |
@Override
@Override | 0 |
@Override
@Override
@Override
@Override
@Override
@Override | 0 |
/**
* default number of characters we will write per line.
*/
/**
* the output stream we're wrapped around
*/
/**
* the number of bytes written;
*/
/**
* number of bytes written on the current line
*/
/**
* line length we're dealing with
*/
/**
... | 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 |
* Triggers control when the elements for a specific key and window are output. As elements arrive,
* they are put into one or more windows by a {@link Window} transform and its associated {@link
* WindowFn}, and then passed to the associated {@link Trigger} to determine if the {@link
* BoundedWindow Window's} conte... | 1 |
cl = new AccumuloReloadingVFSClassLoader(TEST_DIR.toUri().toString(), vfs, ClassLoader.getSystemClassLoader());
cl = new AccumuloReloadingVFSClassLoader(TEST_DIR.toUri().toString(), vfs, ClassLoader.getSystemClassLoader(), 1000); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.