Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import static com.google.common.base.Preconditions.checkArgument;
public ReadableInstant getDate() {
return (ReadableInstant) getValue();
return value instanceof ReadableInstant;
return value instanceof ReadableInstant;
if (SqlTypeName.DATETIME_TYPES.contains(typeName)) {
checkArgument(valu... | 0 |
new ScheduledTaskWrapper(a2Insert.getId(), TASK_A2.newBuilder())); | 0 |
import org.apache.cocoon.portal.tools.service.UserRightsService;
private UserRightsService userRightsService;
this.userRightsService = new UserRightsService();
public UserRightsService getUserRightsService() { | 0 |
String fileName = dict != null ? (String) dict.get(DirectoryWatcher.FILENAME) : null; | 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/io/InputStreamReader.java,v 1.6 2006/03/14 01:20:24 hargrave Exp $
*
* (C) Copyright 2001 Sun Microsystems, Inc.
* Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not u... | 0 |
import org.apache.felix.serializer.impl.json.JsonCodecImpl; | 0 |
import java.util.concurrent.Future;
import org.apache.hc.core5.concurrent.FutureCallback;
public Future<IOSession> requestSession(final HttpHost host, final TimeValue timeout, final FutureCallback<IOSession> callback) {
return reactor().connect(host, toSocketAddress(host), null, timeout, null, callback);
... | 0 |
AccumuloClient client = master.getClient();
Scanner metaScanner = client.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
AccumuloClient client = context.getClient();
Map<String,String> siteConfig = client.instanceOperations().getSiteConfiguration();
Map<String,String> systemConfig = client.... | 0 |
final Map<String, String> params = new HashMap<>();
for (String cookie : authUserName) {
browserUserAgents = new HashSet<>(); | 0 |
import org.apache.hc.client5.http.ssl.ConscryptClientTlsStrategy;
import org.apache.hc.core5.util.ReflectionUtils;
if (ReflectionUtils.determineJRELevel() <= 8 && ConscryptClientTlsStrategy.isSupported()) {
if (systemProperties) {
tlsStrategyCopy = ConscryptClientTlsStrat... | 0 |
log.error("Couldn't delete {}", trickFile); | 0 |
import org.junit.Assert;
import org.junit.Test;
| 0 |
import org.apache.commons.jexl3.JexlExpression;
import org.apache.commons.jexl3.parser.ASTJexlLambda;
* Position the debugger on the root of an expression.
* @param jscript the expression
* @return true if the expression was a {@link Script} instance, false otherwise
*/
public boolean debug(Jexl... | 1 |
package org.apache.beam.sdk.extensions.sql.interpreter.operator.math;
import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlExpression;
import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlPrimitive; | 0 |
import static org.junit.Assert.*; | 0 |
* @version CVS $Revision: 1.3 $ $Date: 2004/03/05 02:24:26 $
StringTokenizer st = new StringTokenizer(repositories, File.pathSeparator); | 0 |
package org.apache.hc.core5.http.nio; | 0 |
private final HttpContext context;
super();
this.context = new HttpExecutionContext(null);
this.context.setAttribute(HttpExecutionContext.HTTP_CONNECTION, this.conn);
preprocessRequest(request, this.context);
this.context.setAttribute(HttpExecutionContext.HTTP_REQUEST... | 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 app... | 0 |
* Output a nicely formatted manifest that still respects the 72 character line limit.
* | 0 |
opts.setTableName("dirlisttable"); | 0 |
public static final String OPTION_FETCH_TYPE = "fetchType";
public static final String OPTION_ATTR_MATCH_TYPE = "matchType";
public static final String OPTION_KEY_REPLICATED_TO = "replicatedTo";
public static final String FETCH_TYPE_FULL = "full";
pu... | 0 |
import org.apache.batik.gvt.TextNode;
* A dummy graphics node to dispacth "deselect" mouse events to. ie.
* when the mouse is clicked outside any nodes.
*/
protected GraphicsNode dummyNode = new TextNode();
/**
} else if (node == null && evt.getID() == evt.MOUSE_CLICKED
&... | 0 |
final AccumulatorProvider accumulators =
new LazyAccumulatorProvider(context.getAccumulatorFactory(), context.getSettings());
extracted.apply(
operator.getName() + "::combine",
Combine.perKey(asCombiner(reducer, accumulators, operator.getName())));
ReduceFunctor<... | 0 |
import org.apache.beam.sdk.extensions.sql.impl.schema.BaseBeamTable;
import org.apache.beam.sdk.values.PBegin;
private static class FakeTable extends BaseBeamTable {
public FakeTable() {
super(null);
public PCollection<Row> buildIOReader(PBegin begin) {
public POutput buildIOWriter(PCollection<Row> ... | 0 |
final ParDoSingle<?, ?> parDo, SdkComponents components) throws IOException { | 1 |
public Optional<HostOffer> getMatching(Protos.AgentID slaveId, ResourceRequest resourceRequest) {
return hostOffers.getMatching(slaveId, resourceRequest);
ResourceRequest resourceRequest) {
return hostOffers.getAllMatching(groupKey, resourceRequest); | 0 |
import java.util.Queue;
private Queue<AuthOption> authOptions;
/**
* Returns available authentication options.
*
* @return authentication options, if available, <code>null</null> otherwise.
*/
public Queue<AuthOption> getAuthOptions() {
return this.authOptions;
}
/**
... | 0 |
private SystemReduceFn<K, InputT, ?, OutputT, W> reduceFn;
SystemReduceFn<K, InputT, ?, OutputT, W> reduceFn) {
this.reduceFn = reduceFn;
DoFn<KV<K, Iterable<WindowedValue<InputT>>>, KV<K, OutputT>>.ProcessContext c)
throws Exception {
ReduceFnRunner<K, InputT, OutputT, W> reduceFnRunner... | 0 |
if (!shellState.getAccumuloClient().tableOperations().exists(tableName)) {
if (!shellState.getAccumuloClient().namespaceOperations().exists(namespace)) { | 0 |
package org.apache.beam.sdk.extensions.euphoria.beam;
import org.apache.beam.sdk.extensions.euphoria.beam.window.BeamWindowFn;
import org.apache.beam.sdk.extensions.euphoria.core.client.accumulators.AccumulatorProvider;
import org.apache.beam.sdk.extensions.euphoria.core.client.dataset.windowing.Window;
import org.apa... | 0 |
assertEquals("", ((NameValuePair)params.get(2)).getValue()); | 0 |
package org.apache.commons.vfs2.provider.bzip2;
import org.apache.commons.vfs2.Capability;
import org.apache.commons.vfs2.FileName;
import org.apache.commons.vfs2.FileObject;
import org.apache.commons.vfs2.FileSystem;
import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.FileSystemOptions;
... | 1 |
import org.apache.hc.client5.http.sync.methods.HttpExecutionAware;
import org.apache.hc.client5.http.impl.sync.RoutedHttpRequest; | 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 la... | 0 |
import java.util.*;
import org.apache.felix.bundlerepository.*;
import org.osgi.framework.*;
import org.osgi.service.obr.*;
long bundleId = -1;
bundleId = bundle.getBundleId(); | 0 |
* @version CVS $Id$
this.widgetId = null;
this.pipeContext = null; | 0 |
package org.apache.beam.sdk.transforms;
import org.apache.beam.sdk.coders.CannotProvideCoderException;
import org.apache.beam.sdk.coders.Coder;
import org.apache.beam.sdk.coders.CoderRegistry;
import org.apache.beam.sdk.transforms.Combine.CombineFn;
import org.apache.beam.sdk.transforms.Combine.KeyedCombineFn;
import ... | 0 |
/*
* $Source: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java,v $
* $Revision: 1.20 $
* $Date: 2003/08/22 16:08:31 $
* any, must include the following acknowledgement:
* Apache Software Foundation - http://www.apache.o... | 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 |
Registration registerForProcessBundleInstructionId(
/**
* Allows callers to deregister from receiving further state requests.
*/
interface Registration {
/**
* De-registers the handler for all future requests for state for the registered process
* bundle instruction id.
*/
void dereg... | 0 |
package org.apache.beam.integration.nexmark.drivers;
import org.apache.beam.integration.nexmark.NexmarkDriver;
import org.apache.beam.integration.nexmark.NexmarkOptions;
public interface NexmarkApexOptions extends NexmarkOptions, ApexPipelineOptions { | 0 |
for (final String protocol: protocols) {
for (final String cipher: ciphers) { | 0 |
import org.apache.accumulo.core.util.shell.commands.AddAuthsCommand;
import org.apache.accumulo.core.util.shell.commands.ListCompactionsCommand;
import org.apache.accumulo.core.util.shell.commands.PingCommand;
Command[] debuggingCommands = {new ClasspathCommand(), new DebugCommand(), new ListScansCommand(), new Lis... | 1 |
public void assertVerifyOK(final String classname, final String message) {
public void assertVerifyRejected(final String classname, final String message) {
public boolean doAllPasses(final String classname) { | 0 |
/** Example test that tests a specific OldDoFn. */ | 0 |
private void emptyShortQueryField(SavedQuery query) {
query.setShortQuery("");
storageFactory.getStorage().store(SavedQuery.class, query);
}
// Emptying short query so that in next read, this gets updated with proper value
// from the queryFile
emptyShortQueryField(savedQuery);
List<SavedQu... | 0 |
ServerContext context = new ServerContext(opts.iname, opts.keepers, zkTimeOut); | 0 |
String text = ExceptionAction.exception(this.exception, this.code);
| 0 |
* request coming from the other end.
* request coming from the other end.
* Tells this option whether to send a WILL request upon connection.
* Tells this option whether to send a DO request upon connection. | 0 |
private final Log log = LogFactory.getLog(getClass()); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestAll.java,v 1.35 2002/10/12 22:35:37 scolebourne Exp $
* $Revision: 1.35 $
* $Date: 2002/10/12 22:35:37 $
* @version $Id: TestAll.java,v 1.35 2002/10/12 22:35:37 scolebourne ... | 0 |
* Copyright (c) 2004 The Apache Software Foundation. All rights | 0 |
createEvaluator(singletonView, fn, output);
((PCollection<?>) Iterables.getOnlyElement(transform.getInputs().values()))
.getWindowingStrategy(), | 0 |
import org.apache.aurora.scheduler.base.TaskGroupKey;
private static final TaskGroupKey GROUP_KEY = TaskGroupKey.from(TASK);
eventSink.post(new Vetoed(GROUP_KEY, vetoes)); | 0 |
super(classificationDef, TypeCategory.CLASSIFICATION); | 0 |
HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
HttpProtocolParams.setContentCharset(params, "UTF-8");
HttpProtocolParams.setUserAgent(params, "Jakarta HTTP Demo"); | 0 |
import java.io.Serializable;
/** Static utilities for working with {@link DoFnInvoker}. */
/**
* Returns an {@link DoFnInvoker} for the given {@link DoFn}, using a default choice of {@link
* DoFnInvokerFactory}.
*
* <p>The default is permitted to change at any time. Users of this method may not depend on ... | 0 |
import org.apache.hc.core5.http.io.SocketConfig; | 0 |
import java.util.List;
import org.apache.hc.core5.reactor.ExceptionEvent;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
final List<ExceptionEvent> exceptionLog = server.getExceptionLog();
if (!exceptionLog.isEmpty()) {
... | 0 |
/**
* Generate the initial (default) properties for a table
* @param limitVersion
* include a VersioningIterator at priority 20 that retains a single version of a given K/V pair.
* @return A map of Table properties
*/
public static Map<String,String> generateInitialTableProperties(boolean limitVers... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/MutableDynaClass.java,v 1.7 2003/10/09 20:43:15 rdonkin Exp $
* $Revision: 1.7 $
* $Date: 2003/10/09 20:43:15 $
* Alternately, this acknowledgement may appear in the software its... | 0 |
if (reader.finish())
{
// And store the generated component descriptors in our resource list.
String name = c.getFQN();
Resource resource = createComponentResource(reader);
m_resources.put("OSGI-INF/dependen... | 0 |
JSONObject jsonObject = (JSONObject) JSONValue.parse(jsonString);
if (jsonObject.get("status") != null && (Long)jsonObject.get("status") >= 400L) {
// Throw exception if HTTP status is not OK
String message;
if (jsonObject.containsKey("message")) {
message = (String) jsonObject.get("me... | 0 |
this.hasCapacity = false; | 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 |
/** ReduceStateByKey builder which adds input {@link Dataset} to operator under build. */
/** ReduceStateByKey builder which adds key extractor to operator under build. */
/** ReduceStateByKey builder which adds value extractor to operator under build. */
/** ReduceStateByKey builder which adds state to operato... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/TypedSet.java,v 1.3 2003/08/31 12:56:23 scolebourne Exp $
* a specified <code>Class</code>. If an object cannot be added to the
* @version $Revision: 1.3 $ $Date... | 0 |
builder.add(DisplayData.item("combineFn" + (i + 1), combineFn.getClass())
.withLabel("Combine Function")); | 0 |
* Copyright (C) 2015 Google Inc. | 0 |
/**
* Closes the given filesystem.<br />
* If you use VFS as singleton it is VERY dangerous to call this method
*/
// inform the cache ...
getFilesCache().clear(filesystem);
// just in case the cache didnt call _closeFileSystem
_closeFileSystem(filesystem);
}
/**
* Closes the given filesystem.<br /... | 0 |
if (index > octets.length - 1 || index > 6) { // CHECKSTYLE IGNORE MagicNumber | 0 |
package org.apache.felix.httplite.server;
import org.apache.felix.httplite.osgi.Logger; | 0 |
@Override
public void testDefaultPrecision() {
testPrecision("PEP 4019 04/03/18 18:58:16 *STMF einladung.zip", CalendarUnit.SECOND);
}
@Override
public void testRecentPrecision() {
testPrecision("----rwxr-x 1 PEP 0 4019 Mar 18 18:58 einladung.zip"... | 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 |
Set<PrivilegeEntity> privilegeEntities = new HashSet<>();
Map<String, Object> properties = new LinkedHashMap<>();
List<PrincipalEntity> principalEntities = new LinkedList<>();
List<UserEntity> userEntities = new LinkedList<>();
List<PrivilegeEntity> privilegeEntities = new LinkedList<>();
List<C... | 1 |
package aQute.lib.properties;
public enum LineType {
blank, comment, entry, eof
} | 0 |
final WeakReference<ClassLoader> reference = new WeakReference<>(loader);
final ReferenceQueue<Object> queue = new ReferenceQueue<>();
final WeakReference<Integer> testReference = new WeakReference<>(test, queue);
final Map<TestClassLoader, Integer> map = new WeakHashMap<>();
fi... | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.math.LongMath;
import org.apache.beam.vendor.guava.v26_0... | 0 |
package org.apache.aurora.scheduler.mesos;
import org.apache.aurora.scheduler.TaskLauncher; | 0 |
Copyright 2001,2003 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... | 0 |
// make sure to snapshot, so that we have something there when
// truncateLog reloads the db
snaplog.save(zkdb.getDataTree(), zkdb.getSessionWithTimeOuts()); | 0 |
package org.apache.beam.sdk.transforms;
import org.apache.beam.sdk.options.GcsOptions;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.transforms.Combine.CombineFn;
import org.apache.beam.sdk.transforms.windowing.BoundedWindow;
import org.apache.beam.sdk.transforms.windowing.PaneInfo;
im... | 0 |
trustStorePassword.toCharArray() : 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 may ... | 0 |
import org.apache.commons.collections.list.AbstractListTest;
public abstract class AbstractTestArrayList<E> extends AbstractListTest<E> { | 0 |
public void acceptInverseOffer(OfferID offerID, Filters filter) {
whenRegistered(() -> {
LOG.info("Accepting Inverse Offer {}", offerID.getValue());
Futures.getUnchecked(mesosFuture).send(
Call.newBuilder()
.setFrameworkId(getFrameworkId())
.setType(Call.Type.ACC... | 0 |
import org.apache.ambari.server.state.alert.AlertDefinitionHash;
import com.google.gson.Gson;
import com.google.inject.Inject;
import com.google.inject.Injector;
import com.google.inject.Singleton;
private HeartbeatMonitor heartbeatMonitor;
private Injector injector;
private Configuration config;
private A... | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
import org.apache.beam.vendor.guava.v20_0.com.google.common.cache.Cache;
import org.apache.beam.vendor.guava.v20_0.com.google.common.cache.CacheBuilder; | 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 |
import static org.junit.Assert.assertTrue;
assertTrue(baseDir.mkdirs() || baseDir.isDirectory());
assertTrue(testDir.mkdir()); | 0 |
* @param <InputT> type type of iterator returned by this iterable
V, InputT extends ElementByteSizeObservableIterator<V>>
protected abstract InputT createIterator();
public InputT iterator() {
InputT iterator = createIterator(); | 0 |
String tableId = ClientServiceHandler.checkTableId(master.getInstance(), oldTableName, tableOp);
final String tableId = ClientServiceHandler.checkTableId(master.getInstance(), tableName, tableOp);
final String tableId = ClientServiceHandler.checkTableId(master.getInstance(), tableName, tableOp);... | 0 |
import java.util.concurrent.ConcurrentHashMap;
/*
* Latest revision of cluster definition
*/
protected long latestRevision;
* @return the latestRevision
public long getLatestRevision() {
return latestRevision;
/*
* Map of cluster revision to cluster definition
protected ... | 0 |
import java.util.concurrent.BlockingQueue;
public SimpleThreadPool(int max, final String name, BlockingQueue<Runnable> queue) {
super(max, max, 4l, TimeUnit.SECONDS, queue, new NamingThreadFactory(name));
allowCoreThreadTimeOut(true);
}
| 0 |
* Always return a fully populated copy of the object, however if the object
* is an immutable built-in scalar such as String or Long, then a copy is not
* needed. By default a wrapped object is returned by the converter if possible.
* @return
*/
Converting copy();
/** | 0 |
import static org.junit.Assert.assertTrue;
public class XMLX509SKITest { | 0 |
JavaType type = PipelineOptionsFactory.MAPPER.getTypeFactory()
.constructType(method.getGenericReturnType());
return PipelineOptionsFactory.MAPPER.readValue(jsonNode.toString(), type);
Map<String, Object> serializedItem =
PipelineOptionsFactory.MAPPER.convertValue(item, Map... | 0 |
import org.apache.beam.sdk.transforms.windowing.WindowMappingFn;
WindowMappingFn<?> sideInputWindowMappingFn =
FixedWindows.of(Duration.millis(4)).getDefaultWindowMappingFn();
when(mockView.getWindowMappingFn()).thenReturn((WindowMappingFn) sideInputWindowMappingFn); | 0 |
import static com.google.common.base.Preconditions.checkArgument;
checkArgument(
checkArgument(c.sideInput(view) == expectedValue);
checkArgument(
checkArgument(c.sideInput(view) == expectedValue);
checkArgument(
checkArgument(c.sideInput(view) == expectedValue);
checkArgument(... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.