Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
/** * Assigns a state object to this connection. Connection managers may make * use of the connection state when allocating persistent connections. * * @param state The state object */ /** * Returns the state object associated with this connection. * * @return The st...
0
import org.apache.xml.security.utils.XMLUtils; * @see <A HREF="http://www.w3.org/Signature/Drafts/xmldsig-xfilter2/">XPath Filter v2.0 (editors copy)</A> /** @inheritDoc */ /** @inheritDoc */ /** @inheritDoc */ /** @inheritDoc */ * @inheritDoc * @inheritDoc new CachedXPathFuncHereAPI(in...
0
import org.apache.commons.vfs.provider.FileNameParser; final FileName zipFileUri, buffer.append(getOuterName().getURI()); public FileName createName(final String path) return new ZipFileName(getScheme(), getOuterName(), path);
0
import org.apache.batik.dom.anim.AnimationTarget;
0
parseTierConfig( "{\"tiers\":{" + "\"revocable\": {\"revocable\": true, \"preemptible\": true}" + "}}") .getTiers());
0
int index = ( key & MASK ) % table.length; int index = ( key & MASK ) % table.length; int index = ( key & MASK ) % table.length; int index = ( key & MASK ) % table.length;
0
import org.apache.beam.sdk.transforms.Combine.AccumulatingCombineFn; .apply("ProduceDefault", ParDo.withSideInputs(maybeEmptyView).of( PCollectionTuple split = input.apply("AddNonce", ParDo.of( new DoFn<KV<K, InputT>, KV<K, InputT>>() { transient int counter; @Override ...
0
final List<String> warnings = new ArrayList<>(); final List<String> infoMessages = new ArrayList<>();
0
import com.google.cloud.dataflow.sdk.util.TimeDomain; c.timers().deleteTimer(c.window().maxTimestamp(), TimeDomain.EVENT_TIME);
0
import org.apache.felix.moduleloader.*; public ICapability[] m_capabilities = null; public IRequirement[] m_requirements = null; public IRequirement[] m_dynamicRequirements = null; ICapability[] capabilities, IRequirement[] requirements, IRequirement[] dynamicRequirements, R4Library[] librar...
0
import org.apache.ambari.server.AmbariException; public Map<String, HostConfig> getDesiredHostConfigs(Cluster cluster) throws AmbariException;
0
import org.apache.cocoon.util.AbstractLogEnabled; public class SimpleSitemapExecutor extends AbstractLogEnabled implements ThreadSafe, SitemapExecutor { * @see SitemapExecutor#invokeAction(ExecutionContext, Map, Action, org.apache.cocoon.environment.Redirector, org.apache.cocoon...
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger log = LoggerFactory.getLogger(MockInstanceOperations.class);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/UnmodifiableCollection.java,v 1.2 2003/05/05 23:25:22 rwaldhoff Exp $ * @version $Revision: 1.2 $ $Date: 2003/05/05 23:25:22 $
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
@Override
0
* A function that decides which key values are stored in a tables sample. As Accumuo compacts data * and creates rfiles it uses a Sampler to decided what to store in the rfiles sample section. The * class name of the Sampler and the Samplers configuration are stored in each rfile. A scan of a * tables sample will o...
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
* 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 org.apache.beam.sdk.options.ValueProvider; abstract ValueProvider<String> getProjectId(); abstract ValueProvider<String> getInstanceId(); abstract ValueProvider<String> getDatabaseId(); abstract Builder setProjectId(ValueProvider<String> projectId); abstract Builder setInstanceId(ValuePro...
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
package org.apache.felix.sigil.model.osgi; import org.apache.felix.sigil.model.common.VersionRange;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/MessageOperationTag.java,v 1.3 2003/10/09 21:21:20 rdonkin Exp $ * $Revision: 1.3 $ * $Date: 2003/10/09 21:21:20 $ * any, must include the following acknowledgeme...
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
super(definition); if (!getCombinedState().isAcceptingInputs()) return; if (!getCombinedState().isAcceptingInputs()) return true;
0
import org.apache.cocoon.Constants; context.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, new MockContext());
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; LoggerFactory.getLogger(QuorumPeerTestBase.class);
0
public java.awt.image.RenderedImage createRendering (java.awt.image.renderable.RenderContext rc){
0
public MockServerCnxn() { super(null); } void disableRecv(boolean waitDisableRecv) {
0
import org.apache.http.client.utils.CloneUtils; import org.apache.http.message.HeaderGroup; import org.apache.http.params.HttpParams; implements HttpUriRequest, AbortableHttpRequest, Cloneable { private Lock abortLock; public boolean isAborted() { return this.aborted; } @Override pu...
0
EndOfWindowBroadcast eowBroadcast = // ~ no need for broad-casts upong "batched and attached windowing" windowing == null || windowing == BatchWindowing.get() ? new EndOfWindowBroadcast.NoopInstance() : new EndOfWindowBroadcast.NotifyingInstance(); reduceStateByKey...
0
import static java.util.Objects.requireNonNull; requireNonNull(tableId, "Invalid argument: null tableId"); requireNonNull(iterators, "Invalid argument: null iterator list"); requireNonNull(compactionStrategy, "Invalid argument: null compactionStrategy");
0
import org.apache.ambari.server.api.services.AmbariMetaInfo; private String projectVersion; public BootStrapImpl(Configuration conf, AmbariMetaInfo ambariMetaInfo) throws IOException { this.projectVersion = ambariMetaInfo.getServerVersion(); this.masterHostname, info.isVerbose(), this.clusterOsType, thi...
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 may not...
1
meanTemps.apply(Mean.globally()).apply(View.asSingleton());
0
import org.apache.avalon.framework.context.Context; import org.apache.avalon.framework.context.ContextException; import org.apache.avalon.framework.context.Contextualizable; import org.apache.cocoon.components.ContextHelper; * @version CVS $Id: CopletSource.java,v 1.8 2004/04/19 14:47:31 cziegeler Exp $ implements...
0
* @version $Id$ * @throws java.util.NoSuchElementException if the iteration is finished
0
import org.apache.hc.core5.util.TimeValue; execRuntime.markConnectionReusable(null, TimeValue.NEG_ONE_MILLISECONDS);
0
import org.apache.excalibur.source.SourceNotFoundException; * * <p> * Instead of src attribute, source can be specified using * * matches the supplied functionality. * @version CVS $Id: ResourceExistsAction.java,v 1.4 2003/12/12 14:33:09 vgritsenko Exp $ public Map act(Redirector redirector, SourceResolver ...
0
import com.google.inject.Singleton;
0
@Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE})
0
).getCounters(),
0
* or more contributor license agreements. See the NOTICE file * regarding copyright ownership. The ASF licenses this file * with the License. You may obtain a copy of the License at * KIND, either express or implied. See the License for the
0
* The link activation listeners. */ protected List linkActivationListeners = new LinkedList(); /** * Adds a LinkActivationListener to this component. */ public void addLinkActivationListener(LinkActivationListener l) { linkActivationListeners.add(l); } /** * Remove...
0
import org.junit.Assert; import org.junit.Test; @Test Assert.assertEquals("Test server status", IOReactorStatus.ACTIVE, this.server.getStatus()); Assert.assertNotNull(sessionRequest.getSession()); Assert.assertEquals("Test client status", IOReactorStatus.ACTIVE, this.client.getStatus());...
0
import javax.servlet.ServletContextListener; import com.google.inject.Module; import com.google.inject.Provider; import com.google.inject.util.Modules; import static org.apache.aurora.scheduler.http.JettyServerModule.makeServletContextListener; /** * Subclasses should override with a module that configures the se...
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(TaskVars.class); LOG.warn("Failed to find rack attribute associated with host " + host);
0
import org.apache.accumulo.server.util.TableDiskUsage; Map<TreeSet<String>,Long> diskUsage = TableDiskUsage.getDiskUsage(new ServerConfiguration(instance).getConfiguration(), tableIds, fs, conn);
1
assertEquals(Optional.absent(), select(ROLE_A)); assertQuotas(ImmutableMap.of()); assertEquals(Optional.absent(), select(ROLE_B)); assertEquals(Optional.absent(), select(ROLE_A)); assertEquals(Optional.absent(), select(ROLE_B)); assertQuotas(ImmutableMap.of()); assertEquals(Optional.absent()...
0
* <p></p>
0
(KeyedCombineFn) combineFn,
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
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights * @version $Id: VMSFTPEntryParser.java,v 1.10 2004/01/02 03:39:05 scohen Exp $
0
public ArrayListValuedHashMap(int initialListCapacity) { public ArrayListValuedHashMap(int initialMapCapacity, int initialListCapacity) { private void writeObject(ObjectOutputStream oos) throws IOException { private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
0
import java.util.function.Supplier; import org.apache.felix.dm.Logger; import org.apache.felix.dm.context.ComponentContext; * An event for a service dependency. * Not thread safe, but this class is assumed to be used under the protection of the component serial queue. private final ServiceReference<?> m_reference; ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/plugins/Declaration.java,v 1.4 2003/10/27 13:37:35 rdonkin Exp $ * $Revision: 1.4 $ * $Date: 2003/10/27 13:37:35 $ public Declaration(String pluginClassName) {
0
} finally { client.close();
0
public Thread newThread(final Runnable r) { for (final Thread thread : createdThreads) {
0
EasyMock.expect(mockBundleContext.getProperty(DirectoryWatcher.CONFIG_ENCODING)).andReturn(null);
0
private Map<PInput, PInput> aliasCollections = new HashMap<>(); while (aliasCollections.containsKey(input)) { input = aliasCollections.get(input); } /** * Set the given output as alias for another input, * i.e. there won't be a stream representation in the target DAG. * @param alias * @par...
0
public final class MapEntryUtils { private MapEntryUtils() { throw new UnsupportedOperationException("No instance");
0
task.getAssignedTask().getTask(), Tasks.id(task));
0
@Override protected Object getPropertyInternal(String key)
0
public static Map toRelationshipAttributes(Map map) { if (map != null && map.containsKey("typeName") && map.containsKey("relationshipAttributes") && map.get("relationshipAttributes") instanceof Map) { return (Map)map.get("relationshipAttributes"); } return map; }
1
ConstantCP cmr = (ConstantCP) cp.getConstant(super.getIndex()); ConstantCP cmr = (ConstantCP) cp.getConstant(super.getIndex()); ConstantCP cmr = (ConstantCP) cp.getConstant(super.getIndex()); ConstantCP cmr = (ConstantCP) cp.getConstant(super.getIndex());
0
* @param str public String encode(String str) throws EncoderException { return this.encode(str, getCharset()); * @param str public String decode(String str, Charset charset) throws DecoderException { if (str == null) { return new String(this.decode(StringUtils.getBytesUsAscii(s...
0
package org.apache.atlas.repository.converters;
0
public final class CodeExceptionGen implements InstructionTargeter, Cloneable, java.io.Serializable {
0
import org.apache.beam.runners.spark.SparkPipelineOptions; import org.apache.beam.runners.spark.translation.streaming.utils.TestPipelineOptions; public final TestPipelineOptions pipelineOptions = new TestPipelineOptions(); @Rule Pipeline p = Pipeline.create(pipelineOptions.getOptions());
0
statusBar.setMainMessage(resources.getString("Document.loading")); statusBar.setMainMessage(resources.getString("Document.creating"));
0
* @param timestamp the timestamp for which the trigger event was scheduled. * @param window the window this action is invoked for; i.e. the context of the invocation
0
@Override void encode(Encoder app, Object object, Map<Object,Type> visited) throws IOException { case '"' : app.append("\\\""); break; case '\\' : app.append("\\\\"); break; case '\b' : app.append("\\b"); break; case '\f' : app.append("\\f"); break; case...
0
HttpRoute ROUTE1 = new HttpRoute(TARGET1); setMaxConnectionsPerHost(null, ROUTE1, 3); setMaxConnectionsPerHost(params, ROUTE1, 0); getMaxConnectionsPerHost(null, ROUTE1); getMaxConnectionsPerHost(params, ROUTE1); getMaxConnectionsPerHost(pa...
0
* @return the bytes * @return the Text of the textNode public String getTextFromChildElement(String localname, String namespace) {
0
synchronized (this) synchronized (this) synchronized (this) synchronized (this) synchronized (this)
0
/* * Copyright 2016-2018 Seznam.cz, a.s.
0
import java.util.List; public void testWrap_NewLine2() { List wrapped = HelpFormatter.wrap("A really quite long general description of the option with specific alternatives documented:\n"+ " Indented special case\n"+ " Alternative scenario", 30); f...
0
private FactoryUtils() {}
0
@SuppressWarnings({ "rawtypes", "unchecked" })
0
chooser = Property.createInstanceFromPropertyName(conf, Property.GENERAL_VOLUME_CHOOSER, VolumeChooser.class, new RandomVolumeChooser());
0
import org.apache.felix.sigil.common.osgi.VersionRange;
0
* @version CVS $Id: Part.java,v 1.2 2003/04/17 20:11:24 haul Exp $ * Returns the original filename */ public String getUploadName(){ return (String) headers.get("filename"); } /**
0
* Factory policy : CUSTOMIZED. * Custom creation strategy */ public static final int CUSTOM_STRATEGY = -1; /** * Service providing policy. */ private final int m_policy; /** private final CreationStrategy m_strategy; CreationStrategy strategy; if (creationS...
0
validateConditionIsNotEmpty(condition); validateConditionIsNotEmpty(condition); validateConditionIsNotEmpty(condition); private void validateConditionIsNotEmpty(Condition condition) { throw new IllegalArgumentException("No filter criteria specified.");
0
import org.apache.zookeeper.server.util.OSMXBean; OSMXBean osMbean = new OSMXBean(); if (osMbean.getUnix() == false) { long initialFdCount = osMbean.getOpenFileDescriptorCount(); long currentCount = osMbean.getOpenFileDescriptorCount();
0
private final Log log = LogFactory.getLog(LRUFilesCache.class);
0
expect(kerberosHelper.getForceToggleKerberosDirective(anyObject(Map.class))) .andReturn(false) .once(); expect(kerberosHelper.getForceToggleKerberosDirective(null)) .andReturn(false) .once(); expect(kerberosHelper.getForceToggleKerberosDirective(anyObject(Map.class))) ...
0
// clear pending revalidations pendingRevalidations.clear();
0
Assert.assertTrue(executionCommand.getRoleParams().containsKey(KeyNames.PACKAGE_LIST)); Assert.assertTrue(executionCommand.getRoleParams().containsKey("stack_id"));
0
@Deprecated @Deprecated @Deprecated @Deprecated @Deprecated @Deprecated @Deprecated @Deprecated @Deprecated @Deprecated
1
VALUEOUT reducedValue = reducer.apply(new IteratorIterable<>( Iterators.transform(input.iterator(), e -> e.get().getValue()))); new MultiWindowedElement<>(Collections.emptySet(), Pair.of(key, reducedValue));
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList;
0
import org.apache.http.client.config.CookieSpecs; CookieSpecs.DEFAULT, new BestMatchSpecFactory()); registry.register(
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 org.apache.hc.core5.http.StreamClosedException; throw new StreamClosedException("Stream already closed"); throw new StreamClosedException("Stream already closed");
0
super(); /** * Splits a string into a number of tokens. * * @param text the text to split * @return the tokens, never null */ // used by wildcardMatch // package level so a unit test may run on this
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...
0