Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
NamedFactory<UserAuth> factory = NamedResource.findByName(pref, String.CASE_INSENSITIVE_ORDER, authFactories); userAuth = NamedFactory.create(authFactories, method);
0
assertNull("Got a refresh delay", params.getReloadingRefreshDelay()); final Long delay = 10000L; .setReloadingRefreshDelay(1000L);
0
package org.apache.felix.sigil.ui.eclipse.ui.editors.project; import org.apache.felix.sigil.ui.eclipse.ui.util.ModelLabelProvider; import org.apache.felix.sigil.ui.eclipse.ui.util.SingletonSelection;
0
XMLStreamReader xmlStreamReader = null; try (InputStream is = new ByteArrayInputStream(baos.toByteArray())) { xmlStreamReader = xmlInputFactory.createXMLStreamReader(is); } XMLStreamReader xmlStreamReader = null; try (InputStream is = new ByteArrayInp...
0
* Returns true if the XML parser must be in validation mode, false * otherwise. */ boolean isXMLParserValidating(); /**
0
import org.apache.http.nio.NHttpServerIOTarget; import org.apache.http.params.HttpConnectionParams; * <li>{@link org.apache.http.params.CoreConnectionPNames#SO_TIMEOUT}</li> public class SSLNHttpServerConnectionFactory implements NHttpConnectionFactory<NHttpServerIOTarget> { protected NHttpServerIOTarget createCo...
0
import java.util.Iterator; import org.apache.sshd.common.keyprovider.KeyPairProviderHolder; provider = createTestHostKeyProvider(file); public static KeyPairProvider createTestHostKeyProvider(File file) { return createTestHostKeyProvider(ValidateUtils.checkNotNull(file, "No file").toPath()); } ...
0
split.setSamplerConfiguration(tableConfig.getSamplerConfiguration());
1
return input.apply("Map", ParDo.of(new OldDoFn<InputT, OutputT>() {
0
public class UrlFileSystem extends AbstractFileSystem { protected UrlFileSystem(final FileName rootName, final FileSystemOptions fileSystemOptions) { protected FileObject createFile(final AbstractFileName name) { protected void addCapabilities(final Collection<Capability> caps) {
1
/* * 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 java.util.Map; import org.apache.ambari.server.controller.utilities.PropertyHelper; import junit.framework.Assert;
0
import com.twitter.mesos.gen.Constraint; .setConstraints(ImmutableSet.<Constraint>of())
0
static QuickLinksProfile create(List<Filter> globalFilters, List<Service> services) { QuickLinksProfile profile = new QuickLinksProfile(); profile.setFilters(globalFilters); profile.setServices(services); return profile; }
0
import org.apache.beam.model.pipeline.v1.RunnerApi.StandardPTransforms; import org.apache.beam.runners.core.construction.BeamUrns; static final String URN = BeamUrns.getUrn(StandardPTransforms.Primitives.MAP_WINDOWS);
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; }
0
import java.util.ArrayList; import java.util.List; import org.apache.http.protocol.HTTP; public void testDefaultHeadersRedirect() throws Exception { String host = "localhost"; int port = this.localServer.getServicePort(); this.localServer.register("*", new BasicRedirectServ...
0
* @version $Id: VMSFTPEntryParser.java,v 1.5 2002/08/06 20:32:04 brekke Exp $ "\\[([0-9$A-Za-z_]+),([0-9$a-zA-Z_]+)\\]\\s*" +
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 applica...
0
import java.util.Dictionary; import org.apache.felix.dm.lambda.ConfigurationDependencyBuilder; * behind a dynamic proxy interface. * <p> Using such callback provides a way for creating type-safe configurations from the actual {@link Dictionary} that is * normally injected by Dependency Manager. * For more informati...
0
while (e != null && (!SVGConstants.SVG_NAMESPACE_URI.equals (e.getNamespaceURI()) || !SVGConstants.SVG_SVG_TAG.equals(e.getLocalName()))) {
1
import com.google.common.base.Preconditions; * * *
0
import java.util.concurrent.atomic.AtomicInteger; private AtomicInteger openStreams = new AtomicInteger(0); openStreams.incrementAndGet(); int count; do count = openStreams.get(); if (count < 1) return; } while(openStreams.compareAndSet(count,...
0
import java.io.IOException; * @deprecated (4.3) use * {@link org.apache.http.client.config.RequestConfig}. * @deprecated (4.3) use * {@link org.apache.http.impl.client.HttpClientBuilder}.
0
constraintViolated(o, "Cannot consume "+consume+" stack slots: only "+stack().slotsUsed()+" slot(s) left on stack!\nStack:\n"+stack()); int produce = o.produceStack(cpg) - o.consumeStack(cpg); // Stack values are always consumed first; then produced. constraintViolated(o, "Cannot produce "+produce+" stack slots...
0
import cz.seznam.euphoria.core.client.operator.Operator; static Set<Class<? extends Operator<?, ?, ?>>> getBasicOps() { return (Set) Sets.newHashSet(
0
import org.apache.beam.sdk.transforms.OldDoFn; * <li>State: The previous {@link PaneInfo} passed to the user's {@link OldDoFn#processElement},
0
package org.apache.ambari.common.rest.agent;
0
* http://www.apache.org/licenses/LICENSE-2.0
0
import org.apache.ambari.server.api.services.views.ViewExternalSubResourceService; import org.apache.ambari.server.api.services.views.ViewSubResourceService;
0
import org.apache.beam.sdk.transforms.OldDoFn; static class ExtractTimestamps extends OldDoFn<String, String> { public void processElement(OldDoFn<String, String>.ProcessContext c) throws Exception { static class ExtractStationSpeedFn extends OldDoFn<String, KV<String, StationSpeed>> { extends OldDoFn<KV<...
0
tester = TriggerTester.nonCombining( windowFn, underTest, AccumulationMode.DISCARDING_FIRED_PANES);
0
try (final FutureRequestExecutionService requestExecService = new FutureRequestExecutionService(
0
requests.add(getRequest(Collections.emptyMap()));
0
SimpleStore<String> sstore = new SimpleStore<>(); AgeOffStore<String> aoStore = new AgeOffStore<>(sstore, 10, tts); Assert.assertEquals(new HashSet<>(Arrays.asList(txid1, txid2, txid3, txid4)), new HashSet<>(aoStore.list())); Assert.assertEquals(4, new HashSet<>(aoStore.list()).size()); Assert.asser...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/impl/Attic/BeanTagScript.java,v 1.14 2002/08/12 19:11:46 jstrachan Exp $ * $Revision: 1.14 $ * $Date: 2002/08/12 19:11:46 $ * $Id: BeanTagScript.java,v 1.14 2002/08/12 19:11:46 jstrachan Ex...
0
textIdx = caseSensitivity.checkIndexOf(filename, textIdx, wcs[wcsIdx]); int repeat = caseSensitivity.checkIndexOf(filename, textIdx + 1, wcs[wcsIdx]); if (!caseSensitivity.checkRegionMatches(filename, textIdx, wcs[wcsIdx])) {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/fmt/src/java/org/apache/commons/jelly/tags/fmt/SetTimeZoneTag.java,v 1.2 2003/01/26 02:02:08 morgand Exp $ * $Revision: 1.2 $ * $Date: 2003/01/26 02:02:08 $ * $Id: SetTimeZoneTag.java,v 1.2 2003/01/26 02:02:08 mo...
0
@SuppressWarnings("rawtypes")
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions;
0
* Copyright 1999-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 ...
1
private static final long serialVersionUID = -1348448090193107031L;
0
import org.apache.commons.jelly.util.TagUtils; * @version $Revision: 1.35 $ TagUtils.trimScript(body);
0
/** * @deprecated this method defaults the region to "us-central1". Prefer using the overload with * an explicit regionId parameter. */ @Deprecated return getJobMonitoringPageURL(projectName, "us-central1", jobId); } public static String getJobMonitoringPageURL(String projectName, String regionId,...
0
if (!isAllowNullKey()) { if (!isAllowNullKey()) { if (!isAllowNullKey()) { if (!isAllowNullKey()) {
0
@SuppressWarnings("deprecation")
0
import org.apache.http.conn.scheme.SchemeSocketFactory; SchemeSocketFactory sf = PlainSocketFactory.getSocketFactory(); supportedSchemes.register(new Scheme("http", 80, sf));
0
* An object to encode * An encoder exception is thrown if the encoder experiences a failure condition during the encoding * process.
0
import org.apache.http.client.CookieStore; import org.apache.http.client.CredentialsProvider; protected CookieStore createCookieStore() { return new BasicCookieStore(); } protected CredentialsProvider createCredentialsProvider() { return new BasicCredentialsProvider(); getC...
0
private boolean isImportInProgress = false; public boolean isImportInProgress() { return isImportInProgress; } public void setImportInProgress(boolean importInProgress) { isImportInProgress = importInProgress; }
0
import org.apache.aurora.gen.JobUpdateQuery; import org.apache.aurora.gen.JobUpdateRequest; public Response startJobUpdate(JobUpdateRequest request, Lock lock, SessionKey session) return delegate.startJobUpdate(request, lock, session); public Response pauseJobUpdate(String updateId, Lock lock, SessionKey sessio...
0
List<Cookie> cookies = new ArrayList<>(); cookies = new ArrayList<>(); cookies = new ArrayList<>(); cookies = new ArrayList<>(); final List<Cookie> cookies = new ArrayList<>();
0
package org.apache.commons.io.input;
0
private ExtractEventTime<T> eventTimeAssigner; windowBy(Windowing<T, W> windowing, ExtractEventTime<T> eventTimeAssigner) { @Nullable ExtractEventTime<IN> eventTimeAssigner,
0
private final InheritableThreadLocal<InputStream> m_streams = new InheritableThreadLocal<InputStream>();
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
* @version $Id$
0
import java.util.Collection; import java.util.List; import org.apache.atlas.AtlasException; * Represents a query against the graph within the context of the * current transaction. * Adds a predicate that the returned vertices must have the specified * * Adds a predicate that the returned vertices mus...
0
boolean interrupted = false; do try { // Need to ensure that the other thread has obtained // the servic...
0
package org.apache.ambari.metrics.core.timeline;
0
try (InputStream invOut = channel.getInvertedOut(); OutputStream invIn = channel.getInvertedIn()) { ScpHelper helper = new ScpHelper(session, invOut, invIn, new MockFileSystem(remote), listener); try (InputStream invOut = channel.getInvertedOut(); OutputStream invIn...
0
* http://www.apache.org/licenses/LICENSE-2.0
0
public static void main(final String[] args)throws Exception { final Registry<ConnectionSocketFactory> reg = RegistryBuilder.<ConnectionSocketFactory>create() final PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager(reg); final InetSocketAddress socksaddr = ne...
0
* Returns <code>true</code> if the metadata declaration has used the * Declarative Services version 1.1 namespace or a later namespace. */ public boolean isDS11() { return getNamespaceCode() >= XmlHandler.DS_VERSION_1_1; } /**
0
import java.util.Objects; public int hashCode() { return Objects.hashCode(key); } @Override public boolean equals(Object obj) { return this == obj || (obj != null && obj instanceof Index && 0 == compareTo((Index) obj)); } @Override
0
* @param connStrategy the connection reuse strategy. If {@code null} * @param responseFactory the response factory. If {@code null} * @param connStrategy the connection reuse strategy. If {@code null} * @param responseFactory the response factory. If {@code null}
0
result.getAttributeValue(new InMemoryNodeModel() .getNodeHandler())); result.getAttributeValue(new InMemoryNodeModel().getNodeHandler());
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
@Component @Property(name = "foo", value = "bar") @Property(name="type", value="SimpleAnnotations")
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 may not...
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
"name2=\"\"; $Path=\"/\"; $Domain=\".domain.com\"",
0
zk.multi(Arrays.asList( public void testDeleteUpdateConflict() throws Exception { public void testGetResults() throws Exception {
0
final TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException { poolEntry = leaseFuture.get(timeout, timeUnit);
0
* @version $Revision$
0
if (null != cr.getProperties()) { // !!! empty property sets are supported, and need to be able to use // previously-defined configs (revert) Map<String, Config> all = cluster.getConfigsByType(cr.getType()); if (null == all || // none set !a...
0
* {@link DataflowRunner} to add user defined hooks to be public class DataflowRunnerHooks {
0
private static final Configuration hadoopConf = new Configuration(); protected Configuration conf = new Configuration(); CachableBuilder cb = new CachableBuilder().input(in2).length(data.length).conf(hadoopConf)
0
public class InvalidStateTransitionException extends Exception { public InvalidStateTransitionException(Enum<?> currentState, Enum<?> event) {
0
Predicate toPredicate(String prop, String val) throws InvalidQueryException;
0
Iterator i = instructions.entrySet().iterator(); while (i.hasNext()) { Map.Entry e = (Map.Entry)i.next(); String key = (String)e.getKey(); if (key.startsWith("_")) { key = "-"+key.substring(1); } properties.put(key, e.getValue()); }
0
self.maxSessionTimeout, self.clientPortListenBacklog, zkDb, self);
0
import com.google.common.base.Strings; /** * Gets name of the default tier. * * @return Name for the default tier. */ String getDefaultTierName(); /** * Gets the map of tier name to {@link TierInfo} instance. * * @return A readonly view of all tiers. */ Map<String, TierInfo> getTiers();...
0
public void encode(List value, OutputStream outStream) public List decode(InputStream inStream) public void encode(MyValue value, OutputStream outStream) public MyValue decode(InputStream inStream)
0
import java.util.ArrayList; import java.util.Iterator; import org.apache.sshd.client.ClientFactoryManager; private Iterator<String> passwords; private String current; private int nbTrials; private int maxTrials; List<String> pwds = new ArrayList<String>(); pwds.add((String) o); ...
0
* @see #copyFileToDirectory(File, File) * @see #copyFileToDirectory(File, File, boolean)
0
return getJobConfig().isSetCronSchedule();
0
@Path("/filters")
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
* A partial implementation of the <code>GraphicsNode</code> interface.
0
import org.apache.commons.lang.StringUtils; @javax.persistence.Table(name = "servicedesiredstate") @Column(name = "cluster_id", nullable = false, insertable = false, updatable = false, length = 10) @Id @Column(name = "service_name", nullable = false, insertable = false, updatable = false) private String servic...
0
public static File getTestResourceFile(final String name) return getTestResourceFile(name, true); public static File getTestResourceFile(final String name, final boolean mustExist) File file = new File(getTestDirectory(), name); public static File getTestDirectory() final String ...
0
import org.apache.accumulo.core.client.Accumulo; try (AccumuloClient c = Accumulo.newClient().from(getClientProperties()).build()) {
0
private final Map<Long, String> configGroupOverrides = new ConcurrentHashMap<>();
0
suite.addTest( new TestSuite( IOUtilsCopyTestCase.class ) ); suite.addTest( new TestSuite( IOUtilsWriteTestCase.class ) );
0
long stamp = el.getTimestamp(); long start = stamp - (stamp + durationMillis) % durationMillis;
0
import org.apache.ambari.server.serveraction.kerberos.stageutils.ResolvedKerberosPrincipal; protected CommandReport processIdentity(ResolvedKerberosPrincipal resolvedPrincipal, KerberosOperationHandler operationHandler, Map<String, String> kerberosConfiguration, Map<String, Object> requestSharedDataContext) throws Am...
0
List<HostEntity> hostEntities = new ArrayList<>(); List<ClusterServiceEntity> clusterServiceEntities = new ArrayList<>(); Set<UserEntity> users = new HashSet<>(); Map<String, String> hostAttributes = new HashMap<>();
1
/** * 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