Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
* Bridge class for the <rect> element.
* Constructs a new bridge for the <rect> element. | 0 |
return fromProto(
proto.getWindowingStrategy(),
RehydratedComponents.forComponents(proto.getComponents()));
RunnerApi.WindowingStrategy proto, RehydratedComponents components) | 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 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/java/org/apache/commons/dbcp/datasources/CPDSConnectionFactory.java,v 1.1 2003/08/12 06:09:20 jmcnally Exp $
* $Revision: 1.1 $
* $Date: 2003/08/12 06:09:20 $
package org.apache.commons.dbcp.datasources;
* @version $Id: ... | 0 |
return new IfClosure<>(predicate, trueClosure, falseClosure); | 1 |
* Note that automatic registration of any
* {@link com.google.cloud.dataflow.sdk.options.PipelineOptions} requires users
* {@link com.google.auto.service.AutoService} to generate the necessary META-INF
* files automatically. | 0 |
package org.apache.felix.sigil.eclipse.ui.internal.editors.project; | 0 |
"Quartz tried to run a type of job we don't know about: %s",
bundle.getJobDetail().getJobClass()); | 0 |
@Parameter(defaultValue = "${project.build.directory}", alias = "outputDirectory", property = "accumulo.outputDirectory", required = true)
@Parameter(defaultValue = "testInstance", alias = "instanceName", property = "accumulo.instanceName", required = true)
@Parameter(defaultValue = "secret", alias = "rootPasswor... | 0 |
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;
import org.apache.beam.sdk.values.TypeDescriptor;
@Test
public void testEncodedTypeDescriptor() throws Exception {
TypeDescriptor<Map<Integer, String>> typeDescriptor =
new TypeDescriptor<Map<Integer, 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... | 1 |
public FileNotFolderException(final Object info0, final Throwable throwable) | 1 |
memoryManager.init(conf); | 0 |
import org.apache.accumulo.core.tabletserver.thrift.TUnloadTabletGoal;
public void unloadTablet(TInfo tinfo, TCredentials credentials, String lock, TKeyExtent extent, TUnloadTabletGoal goal, long requestTime) throws TException {} | 1 |
* Copyright 2016 Seznam.cz, a.s. | 0 |
*
*
*
* @version $Id$
* @since 1.0.0
protected Servlet createEmbeddedServlet(String embeddedServletClassName, ServletConfig servletConfig)
this.classLoader =
| 0 |
import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
import org.apache.hc.core5.http.NameValuePair;
@Test
public void testMultipartWriteTo() throws Exception {
final List<NameValuePair> parameters = new ArrayList<>();
parameters.add(new BasicNameValuePair(MIME.FIELD_PARAM_NAME, "tes... | 0 |
* Extension of {@link AbstractListTest} for exercising the | 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 |
/*
* 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 |
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
* permission of the Apache Software Foundation. | 0 |
import org.apache.felix.dm.annotation.api.dependency.ServiceDependency; | 0 |
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import com.google.inject.persist.UnitOfWork;
import junit.framework.Assert;
Stage s = new Stage(requestId, "/a/b", "cluster1", 1L, "action db accessor test",
"clusterHostInfo... | 0 |
RepositoryVersionState.INSTALLING); | 0 |
extent.getEndRow(), master.getContext());
| 0 |
public ConfigurationException(final String message)
public ConfigurationException(final Throwable cause)
public ConfigurationException(final String message, final Throwable cause) | 0 |
import com.google.cloud.dataflow.sdk.transforms.windowing.Trigger.MergeResult;
import com.google.cloud.dataflow.sdk.util.ExecutableTrigger;
private ExecutableTrigger<IntervalWindow> executableRepeated;
executableRepeated = tester.getTrigger().subTriggers().get(0);
tester.setTimer(firstWindow, new Instant(11)... | 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... | 1 |
import java.util.Collections;
import java.util.List;
this.className = className;
context.append("((");
context.append(")");
}
@Override
public List<GroovyExpression> getChildren() {
return Collections.singletonList(expr);
}
@Override
public GroovyExpression co... | 0 |
import org.apache.beam.vendor.grpc.v1.io.grpc.ManagedChannelBuilder;
import org.apache.beam.vendor.grpc.v1.io.grpc.inprocess.InProcessChannelBuilder; | 0 |
protected abstract Object visit(ASTSetAddNode node, Object data);
protected abstract Object visit(ASTSetSubNode node, Object data);
protected abstract Object visit(ASTSetMultNode node, Object data);
protected abstract Object visit(ASTSetDivNode node, Object data);
protected abstract Object visi... | 1 |
imageElement.setAttributeNS(null, SVG_WIDTH_ATTRIBUTE, String.valueOf( image.getWidth( null ) ) );
imageElement.setAttributeNS(null, SVG_HEIGHT_ATTRIBUTE, String.valueOf( image.getHeight( null ) ) );
imageElement.setAttributeNS(null, SVG_WIDTH_ATTRIBUTE, String.valueOf( image.getWidth() ) );
... | 0 |
import java.io.IOException;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.server.RequestProcessor;
import org.apache.zookeeper.txn.ErrorTxn;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
case OpCode.createSession:
case OpCode.closeSession:
... | 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 |
final byte[] key = toByteArray("10100110", 2);
final ByteArrayKeyAnalyzer ka = new ByteArrayKeyAnalyzer(key.length * 8);
final int length = ka.lengthInBits(key);
final PatriciaTrie<byte[], BigInteger> trie
final Map<byte[], BigInteger> map
final BigInteger value = Bi... | 0 |
for (Counter<?> counter : counters) {
} else if (dynamicSplitResult instanceof BasicSerializableSourceFormat.BoundedSourceSplit) {
status.setDynamicSourceSplit(
BasicSerializableSourceFormat.toSourceSplit(
(BasicSerializableSourceFormat.BoundedSourceSplit) dynamicSplitResult, opt... | 0 |
import org.apache.commons.vfs2.provider.AbstractFileName;
public class TarFileProvider extends AbstractLayeredFileProvider implements FileProvider
final AbstractFileName rootName = | 0 |
import org.apache.beam.sdk.transforms.DoFnSchemaInformation;
private final DoFnSchemaInformation doFnSchemaInformation;
Map<TupleTag<?>, Coder<?>> outputCoderMap,
DoFnSchemaInformation doFnSchemaInformation) {
this.doFnSchemaInformation = doFnSchemaInformation;
windowingStrategy,
... | 0 |
import org.apache.beam.sdk.options.PubsubOptions; | 0 |
package org.apache.hc.core5.http.nio.support.classic; | 0 |
/*
* Copyright (C) 2015 Google 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 in ... | 0 |
// notify the application about successful login
app.userDidLogin(user, loginContext);
// notify the application about accessing | 0 |
Copyright 1999-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 |
public final class ByteConverter implements Converter { | 0 |
private static final long serialVersionUID = 7587687059797903734L; | 0 |
* @since 3.0 | 0 |
Namespace.ID namespaceId = ClientServiceHandler.checkNamespaceId(master, oldName, tableOp);
Namespace.ID namespaceId = ClientServiceHandler.checkNamespaceId(master, namespace,
tableOp);
namespaceId = Namespaces.getNamespaceId(master, Tables.qualify(tableName).getFirst());
T... | 0 |
ImmutableList.of(DirectOptions.class, DirectTestOptions.class), | 0 |
* Retrieves {@link Aggregator Aggregators} at each {@link ParDo} and returns a {@link Map} of
* {@link Aggregator} to the {@link PTransform PTransforms} in which it is present.
* Returns a {@link Map} between each {@link Aggregator} in the {@link Pipeline} to the {@link | 0 |
import com.twitter.mesos.States;
default:
throw new IllegalArgumentException("Unsupported status: " + task.getStatus());
States.ACTIVE_FILTER); | 0 |
import junit.framework.Assert;
| 0 |
import org.apache.http.HeaderElement;
boolean mustRevalidate = false;
for(Header h : cacheEntry.getHeaders(HeaderConstants.CACHE_CONTROL)) {
for(HeaderElement elt : h.getElements()) {
if (HeaderConstants.CACHE_CONTROL_MUST_REVALIDATE.equalsIgnoreCase(elt.getName())
... | 0 |
@NamedQuery(name = "TopologyLogicalRequestEntity.findRequestIds", query = "SELECT DISTINCT t.topologyLogicalRequestEntity.topologyRequestId from TopologyHostRequestEntity t WHERE t.id IN :ids") | 0 |
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
@Override
public List<Set<AuthProperty>> getProperties() {
List<Set<AuthProperty>> toRet = new LinkedList<Set<AuthProperty>>();
Set<AuthProperty> internal = new TreeSet<AuthProperty>();
internal.add(new ... | 0 |
private long maxLatency = 120000;
* Defaults to 120 seconds.
if (maxLatency == 0)
this.maxLatency = Long.MAX_VALUE;
else
this.maxLatency = timeUnit.toMillis(maxLatency); | 0 |
import static org.junit.Assert.*;
assertEquals(1, groups.size());
assertNotNull(groups.get("lg1"));
assertEquals(2, groups.get("lg1").size());
assertTrue(groups.get("lg1").contains(new ArrayByteSequence("cf1")));
fail();
fail();
assertEquals(bs1, bs2);
assertEquals(ecf, Local... | 1 |
if (node.getNamespaceURI() == null) {
return SVG_ID_ATTRIBUTE.equals(node.getNodeName());
}
return node.getNodeName().equals(XML_ID_QNAME); | 0 |
import org.jline.utils.AttributedStringBuilder;
import org.jline.utils.AttributedStyle;
AttributedStringBuilder sb = new AttributedStringBuilder();
sb.style(sb.style().foreground(AttributedStyle.RED));
sb.append(e.toString());
... | 0 |
package org.apache.accumulo.examples.constraints;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.apache.accumulo.core.constraints.Constraint;
import org.apache.accumulo.core.data.ColumnUpdate;
import org.apache.accumulo.core.data.Mutation;
public class NumericValueConstra... | 1 |
* @version $Id$
* @since 2.2 | 0 |
private final Log log = LogFactory.getLog(getClass());
if (this.log.isDebugEnabled()) {
this.log.debug("Connection established " + conn);
} | 0 |
value -> key, | 0 |
AuthenticationStrategyImpl(final int challengeCode, final String headerName) { | 0 |
public static void warn(final Log vfslog, final Log commonslog, final String message, final Throwable t)
public static void warn(final Log vfslog, final Log commonslog, final String message)
public static void debug(final Log vfslog, final Log commonslog, final String message)
public static void debug(f... | 1 |
* Implementation of PropertyAccessor that provides "property" reference to "next" and "hasNext".
*
public class IteratorPropertyAccessor
extends ObjectPropertyAccessor
public Object getProperty( Map context, Object target, Object name )
throws OgnlException
Object result;
Iterator ite... | 0 |
* @version $Id$
public Iterator<String> getKeys() | 0 |
import org.apache.hc.core5.io.CloseMode;
shutdownSession(CloseMode.IMMEDIATE);
requestShutdown(CloseMode.GRACEFUL); | 0 |
* Locate the specified file and load the configuration. This does not
* change the source of the configuration (i.e. the internally maintained file name).
* Use one of the setter methods for this purpose.
* @param fileName the name of the file to be loaded
* @throws ConfigurationException if an... | 0 |
* @since 3.0
* @since 3.1 | 0 |
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.configuration.SynchronizerTestImpl;
import org.apache.commons.configuration.SynchronizerTestImpl.Methods;
* Tests whether a load() operation is correctly synchronized.
*/
@Test
public void testLoadSynchronized()... | 0 |
private Trigger mockTrigger;
private static Trigger.TriggerContext anyTriggerContext() {
return Mockito.<Trigger.TriggerContext>any();
private static Trigger.OnElementContext anyElementContext() {
return Mockito.<Trigger.OnElementContext>any();
mockTrigger = mock(Trigger.class, withSettings().serializ... | 0 |
import org.apache.hc.core5.io.ShutdownType;
} catch (final RuntimeException | IOException ex) {
execRuntime.discardConnection();
throw ex;
} catch (final Error error) {
connManager.shutdown(ShutdownType.IMMEDIATE);
throw error; | 0 |
ArrayList<TabletState> tabletStates = new ArrayList<>(tabletReportsCopy.values()); | 0 |
import static org.apache.beam.sdk.io.gcp.pubsub.PubsubClient.projectPathFromPath;
import java.util.concurrent.TimeoutException;
import org.apache.beam.sdk.io.gcp.pubsub.PubsubClient.ProjectPath;
import org.apache.beam.sdk.io.gcp.pubsub.PubsubClient.SubscriptionPath;
import org.joda.time.Duration;
import org.joda.time.S... | 0 |
import org.apache.accumulo.core.clientImpl.ClientContext;
import org.apache.accumulo.core.clientImpl.OfflineScanner;
import org.apache.accumulo.core.clientImpl.ScannerImpl;
import org.apache.accumulo.core.clientImpl.Table;
import org.apache.accumulo.core.clientImpl.Tables;
import org.apache.accumulo.core.clientImpl.Tab... | 0 |
import java.util.HashMap;
import junit.framework.TestCase;
import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.cocoon.environment.mock.MockRequest;
* @version CVS $Id$
public class RequestParamActionTestCase extends TestCase {
private Map objectModel = new HashMap();
MockRequest requ... | 0 |
private Long hostId;
setHostId(entry.getHostId());
public Long getHostId() {
return hostId;
public void setHostId(Long hostId) {
if (hostId == null)
throw new RuntimeException("HostId couldn't be null");
this.hostId = hostId;
result = prime * result + ((createTimestamp == null) ? 0 : c... | 0 |
ensureCapacity(buffer().position() + 1); | 0 |
* @see org.apache.http.entity.mime.MultipartEntityBuilder
* String)} or {@link org.apache.http.entity.mime.MultipartEntityBuilder} | 0 |
Set<String> seenEntries = new HashSet<>(); | 0 |
/**
* Empty Constructor Method Id.
*/
public static final String EMPTY_CONSTRUCTOR_ID = "$init";
/**
* Bundle Context Constructor Method Id.
*/
public static final String BC_CONSTRUCTOR_ID = "$init$org_osgi_framework_BundleContext";
/**
* Constructor Prefix.
... | 0 |
private int emptyLineCount;
private final MessageConstraints messageConstraints;
* @param messageConstraints Message constraints. If {@code null}
public AbstractMessageParser(final LineParser lineParser, final MessageConstraints messageConstraints) {
this.messageConstraints = messageConstraints... | 0 |
package org.apache.felix.sigil.ui.eclipse.ui.util;
import org.apache.felix.sigil.model.osgi.IPackageExport;
import org.apache.felix.sigil.model.osgi.IPackageImport; | 0 |
import javax.inject.Inject;
import javax.inject.Provider;
import javax.inject.Singleton;
import javax.xml.bind.JAXBException;
| 0 |
protected AbstractSerializableListDecorator(final List<E> list) {
private void writeObject(final ObjectOutputStream out) throws IOException {
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { | 0 |
public abstract class DigestManager {
public ChannelBuffer computeDigestAndPackageForSending(long entryId, long lastAddConfirmed, byte[] data) { | 0 |
/*
* @author <a href="mailto:felix-dev@incubator.apache.org">Felix Project Team</a>
*/ | 0 |
interface Params {
boolean useBetaDbTaskStore();
Amount<Long, Time> slowQueryLogThreshold();
}
private static Params paramsFromCommandLine() {
return new Params() {
@Override
public boolean useBetaDbTaskStore() {
return USE_DB_TASK_STORE.get();
}
@Override
publ... | 0 |
print("num_alive_connections", stats.getNumAliveClientConnections());
| 0 |
options.setRunner(TestFlinkRunner.class);
FlinkPipelineOptions flinkOptions = PipelineOptionsFactory.as(FlinkPipelineOptions.class); | 0 |
/**
* Copyright 2013 Apache Software Foundation | 0 |
* MapElements.into(TypeDescriptors.integers())
* .via((String word) -> word.length())); | 0 |
assertEquals("Check failed", new Pair<>(true, expected), KeyUtils.checkFingerPrint(test, key)); | 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 applic... | 0 |
import org.apache.sshd.common.cipher.AES128CTR;
import org.apache.sshd.common.cipher.AES256CTR;
import org.apache.sshd.common.cipher.ARCFOUR128;
import org.apache.sshd.common.cipher.ARCFOUR256;
import org.apache.sshd.server.session.DefaultForwardingAcceptorFactory;
avail.add(new AES128CTR.Factory());
av... | 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 |
public static final String NAME_PROPERTY = "name",
CREDENTIAL_PROVIDERS_PROPERTY = "credentialProviders";
protected void setWithCredentialProviders(String name, String credentialProviders)
throws IOException {
throw new IOException(
"No password could be extracted from CredentialProvider... | 0 |
import org.apache.batik.dom.svg.SVGOMAnimationElement;
import org.apache.batik.dom.svg.SVGOMDocument;
import org.apache.batik.util.ParsedURL;
String href = elt.getHref().getAnimVal();
ParsedURL purl = new ParsedURL(elt.getBaseURI(), href);
SVGOMDocument doc = (SVGOMDocument) elt.getO... | 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 |
* @version $Id$ | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.