Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
DoFnProcessContext<TimerOrElement<KV<K, VI>>, KV<K, VO>> context, DoFnProcessContext<TimerOrElement<KV<K, VI>>, KV<K, Iterable<VI>>> context, DoFnProcessContext<TimerOrElement<KV<K, VI>>, KV<K, VO>> context, @SuppressWarnings("unchecked") DoFnProcessContext<TimerOrElement<KV<K, V...
0
* Extension of {@link PredicatedMapTest} for exercising the public class PredicatedSortedMapTest<K, V> extends AbstractSortedMapTest<K, V> { public PredicatedSortedMapTest(String testName) {
0
import org.apache.http.message.BasicStatusLine; StatusLine statusline = new BasicStatusLine(HttpVersion.HTTP_1_0, 200, "OK"); StatusLine statusline = new BasicStatusLine(HttpVersion.HTTP_1_1, 200, "OK"); StatusLine statusline = new BasicStatusLine(HttpVersion.HTTP_1_1, 200, "OK"); Status...
0
import org.apache.xml.security.exceptions.XMLSecurityException; OutputStream outputStream = new FileOutputStream(signedFile); OutputStream outputStream = new FileOutputStream(signedFile);
0
cm.setConfigurationPid( "configurationPid" ); cm.setConfigurationPid( "configurationPid" );
0
import org.apache.atlas.ocf.properties.Connection; import org.apache.atlas.ocf.properties.Endpoint; import java.util.List; * Initialize the connector. * * @param connectorInstanceId - unique id for the connector instance - useful for messages etc * @param connection - POJO for the configuration used...
0
package org.apache.commons.codec.language.bm;
1
import org.apache.ambari.server.orm.OrmTestHelper; @Inject OrmTestHelper helper; helper.getOrCreateRepositoryVersion(stackId.getStackName(), stackId.getStackVersion());
0
BridgeUpdateEvent be = new BridgeUpdateEvent(this);
0
public class ConfigurationDynaBean implements DynaBean { if(log.isTraceEnabled()) log.trace("ConfigurationDynaBean("+configuration+")");
0
if (usePooledConnection)
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 l...
0
import org.apache.beam.sdk.coders.ByteArrayCoder; import org.apache.beam.sdk.io.Read.Unbounded; import org.apache.beam.sdk.transforms.PTransform; import org.joda.time.Duration;
0
/** * Tests whether an addNodes() operation works on a tracked node. */ @Test public void testAddNodesOnTrackedNode() { NodeKeyResolver<ImmutableNode> resolver = createResolver(false); prepareResolverForAddKeys(resolver); EasyMock.replay(resolver); model.trackN...
0
import javax.annotation.Nullable; @Nullable public TranslateAcceptor(Class<O> type, @Nullable UnaryPredicate<O> accept) {
0
import org.apache.cocoon.util.AbstractLogEnabled; public class JMSConnectionManagerImpl extends AbstractLogEnabled implements JMSConnectionManager, Serviceable, Configurable, Initializable, Startable, Disposable, ThreadSafe, ...
0
private boolean isBackgroundCommand = false; isBackgroundCommand = hostRoleCommandEntity.isBackgroundCommand(); hostRoleCommandEntity.setBackgroundCommand(isBackgroundCommand); * Gets whether this command runs in the background and does not block other * commands. * * @return {@code true} if this ...
0
/* * Copyright 2006 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 appl...
0
public abstract class Command { public abstract void run () throws Exception;
0
/* * Copyright 2013 Twitter, 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 t...
0
yarnSiteProperties.put("yarn.resourcemanager.address.rm1", expectedHostName + ":" + expectedPortNum); yarnSiteProperties.put("yarn.resourcemanager.address.rm2", expectedHostNameTwo + ":" + expectedPortNum); yarnSiteProperties.put("yarn.resourcemanager.admin.address.rm1", expectedHostName + ":" + expectedPor...
0
if (depth == d.depth) return d;
1
try (final OutputStream outstream = createContentOutputStream(len, this.outbuffer, socketHolder.getOutputStream(), entity.getTrailers())) { entity.writeTo(outstream); } try (final OutputStream outstream = createContentOutputStream(len, this.outbuffer, socketHolder.getOutputStream...
0
import junit.framework.Test;
0
private static final long serialVersionUID = -2160020248508943620L;
0
static final String KEY_IDENTITIES = Type.IDENTITY.getDescriptorPluralName(); static final String KEY_CONFIGURATIONS = Type.CONFIGURATION.getDescriptorPluralName(); static final String KEY_AUTH_TO_LOCAL_PROPERTIES = Type.AUTH_TO_LOCAL_PROPERTY.getDescriptorPluralName(); list = data.get(KEY_IDENTITIES); ...
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 org.apache.commons.dbcp2; import org.apache.commons.jocl2.JOCLContentHandler; * @see org.apache.commons.dbcp2.DelegatingConnection#getDelegate() * @see org.apache.commons.dbcp2.DelegatingConnection#getInnermostDelegate()
1
* <p>Temporary files, which are created for file items, should be * deleted later on. The best way to do this is using a * {@link FileCleaningTracker}, which you can set on the * {@link DiskFileItemFactory}. However, if you do use such a tracker, * then you must consider the following: Temporary files are automati...
0
int shownLength) {
0
* Returns the concatenated transform of this node. That is, this * @param newComposite the composite of this node * taking any of its rendering attribute into account. That is, * taking any of its rendering attribute into accoun. That is,
1
import org.apache.commons.lang.StringUtils; return StringUtils.replace(path, "/./", "/*/");
0
* @version CVS $Id: FlowJXPathSelectionList.java,v 1.4 2003/12/10 23:34:11 ugo Exp $ String stringValue = ""; String stringLabel = null; if (ptr.getValue() != null) { JXPathContext itemCtx = ctx.getRelativeContext(ptr); // Get the va...
0
public static boolean isEntityVertex(AtlasVertex vertex) { return StringUtils.isNotEmpty(getIdFromVertex(vertex)) && StringUtils.isNotEmpty(getTypeName(vertex)); }
0
* {@link #processRecord(Map, String, KerberosOperationHandler, Map, Map)}. Map<String, String> kerberosConfiguration = getConfiguration("kerberos-env"); handler.open(administratorCredential, defaultRealm, kerberosConfiguration); commandReport = processRecord(record, default...
0
return from(() -> staticExecutorService);
0
String fontSize = "" + font.getSize(); textElement.setAttributeNS(SVG_NAMESPACE_URI, attrName, attrValue); textElement.setAttributeNS(SVG_NAMESPACE_URI, SVG_FONT_SIZE_ATTRIBUTE, "30"); textElement.setAttributeNS(SVG_NAMESPACE_URI, SVG_X_ATTRIBUTE, "30"); textE...
0
* @version $Revision$ $Date$
0
// If credential decides it can handle it, the return code or message indicated // something specific to authentication, and no backoff is desired. // Otherwise, we defer to the judgement of our internal backoff handler.
0
public AlertCluster handleUpdate(AlertDefinitionEventType eventType, AlertCluster update) { AlertCluster mergedCluster = null; Map<Long, AlertDefinition> mergedDefinitions = new HashMap<>(); Integer mergedStaleIntervalMultiplier = null; for (Map.Entry<Long, AlertDefinition> alertDefinitionEntry : ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/CharListList.java,v 1.3 2003/11/07 20:09:15 rwaldhoff Exp $ * * @deprecated This code has been moved to Jakarta Commons Primitives (http://jakarta.apac...
0
public void resubmitTasks(List<Long> taskIds) { db.resubmitTasks(taskIds); }
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...
0
import org.apache.http.Header; import org.apache.http.protocol.HTTP; byte[] body) { Header ct = response.getFirstHeader(HTTP.CONTENT_TYPE); Header ce = response.getFirstHeader(HTTP.CONTENT_ENCODING); CacheEntity entity = new CacheEntity( body, ct != nu...
0
import org.apache.beam.sdk.util.DoFnInfo; * overridden to be what the Dataflow service expects.
0
package org.apache.commons.beanutils2.locale;
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 ma...
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables;
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
import org.apache.cocoon.el.impl.DefaultExpressionFactory; import org.apache.cocoon.el.impl.javascript.JavaScriptCompiler; import org.apache.cocoon.el.impl.jexl.JexlCompiler; import org.apache.cocoon.el.impl.jxpath.JXPathCompiler;
0
this.rootBeanFactory = BeanFactoryUtil.createRootBeanFactory(avalonEnv, new MockContext());
0
// Pick a random host. if (null != et.hosts && "any".equals(et.hosts) && !hosts.hosts.isEmpty()) { realHosts = Collections.singleton(hosts.hosts.iterator().next()); }
0
public int compare(final String o1, final String o2) {
0
* @version CVS $Id: ComponentsSelector.java,v 1.5 2003/08/12 15:48:02 sylvain Exp $ // Who are we ? // Not a component that has mime types if (this.hasDeclaredComponent(hint)) { return (String)this.hintMimeTypes.get(hint); ...
0
COUNTER_COMMITTER.submit( () -> { synchronized (attemptedLock) { finishedAttempted = aggregation.combine(asList(finishedAttempted, finalCumulative)); inflightAttempted.remove(bundle); } }); new MetricsMap<>(unusedKey -> new DirectMetri...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestByteListList.java,v 1.2 2003/08/31 17:28:38 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this acknowled...
0
final String exchangeId = String.format("ex-%08X", ExecSupport.getNextExecNumber()); final ExecChain.Scope scope = new ExecChain.Scope(exchangeId, route, request, execRuntime, localcontext); final ClassicHttpResponse response = this.execChain.execute(ClassicRequestCopier.INSTANCE.cop...
0
int aciEnd = aci.getEndIndex(); if ((aciIdx > runLimit) && (aciIdx < aciEnd)) {
0
maxMessageSize = config.getAsBytes(maxMessageSizeProperty);
1
SplittableParDo.forAppliedParDo(appliedTransform));
0
import java.io.InputStream; import java.io.OutputStream; import java.io.PrintStream; import java.util.ArrayList; import sqlline.SqlLine.Status; runSqlLine(args, null, System.out, System.err); } private static String[] checkConnectionArgs(String[] args) { List<String> argsList = new ArrayList<String>(Arrays...
0
import akka.actor.ActorRef; import akka.actor.ActorSystem; import akka.actor.Inbox; import com.google.common.base.Function; import com.google.common.base.Joiner; import com.google.common.base.Optional; import com.google.common.collect.FluentIterable; import com.google.common.collect.ImmutableList; import com.google.com...
0
final String names = this.getString(opts, KEY_CONFIG_NAMES); final String previousNames = this.getString(opts, KEY_CONFIG_NAMES); final String pathNames = this.getString(opts, KEY_CONFIG_PATHS); final String[] paths = pathNames.split(","); final Path[] realPaths = new Path[pa...
0
import org.apache.felix.scrplugin.annotations.ScannedAnnotation;
0
import org.apache.commons.vfs2.FileSystemException; import org.apache.commons.vfs2.provider.AbstractRandomAccessStreamContent; import org.apache.commons.vfs2.util.RandomAccessMode;
0
package org.apache.accumulo.trace.instrument; import org.apache.accumulo.trace.instrument.Span; import org.apache.accumulo.trace.instrument.Trace;
0
* returns {@code null}.
0
if (!fs.getConf().getBoolean(DFS_SUPPORT_APPEND, false)) {
0
import org.apache.commons.digester3.spi.Rules; * Invokes the bound providers, then create the rule and associate it to the related pattern, * storing them in the proper {@link Rules} implementation data structure. * * @param rules The {@link Rules} implementation to store the produced {@link Rule}s ...
0
import java.awt.AlphaComposite; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Composite; import java.awt.Font; import java.awt.Paint; import java.awt.Rectangle; import java.awt.RenderingHints; import java.awt.Shape; import java.awt.Stroke; import java.awt.font.FontRenderContext; import java.awt.ge...
0
import java.util.HashSet; if(m_validated) { return; } // nothing to do if already validated if (m_validated) { return; } HashSet refs = new HashSet(); ReferenceMetadata refMeta = ( ReferenceMetadata ) referenceIterator.next(); ...
0
import org.apache.aurora.scheduler.ResourceAggregates;
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
* @since 2.1 * @since 2.1 * @since 2.1 * @since 2.1 * @since 2.1 * @since 2.1 * @since 2.1
0
import java.io.File; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; import org.w3c.dom.Element; * @versi...
0
updateRuntimeChangeCount(); updateRuntimeChangeCount(); updateRuntimeChangeCount(); updateRuntimeChangeCount(); final FilterChain chain = new FilterChain() throws IOException, ServletException private void updateRuntimeChangeCount() { this.ser...
0
/** * provides a reference to the metadata table for updates by tablet servers */
0
CharArrayBuffer buffer = new CharArrayBuffer(32); buffer.append(this.hostname); buffer.append(":"); return buffer.toString(); } else { return this.hostname;
0
getLog().warn( "Ignoring project type " + projectType + " - supportedProjectTypes = " + supportedProjectTypes ); Document doc = parseFile( new File( repositoryXml ), initConstructor() ); Node finalDocument = cleanDocument( doc.getDocumentElement() ); ...
0
import org.apache.cocoon.portal.coplet.CopletDefinition; import org.apache.cocoon.portal.event.CopletDefinitionEvent; public class AbstractCopletDefinitionEvent implements CopletDefinitionEvent { protected CopletDefinition target; public AbstractCopletDefinitionEvent(CopletDefinition target) { * @see o...
0
return true; }
0
private boolean isAlphaNum(byte[] bytes) {
0
package org.apache.accumulo.core.util.shell.commands; import org.apache.accumulo.core.util.shell.Shell; import org.apache.accumulo.core.util.shell.Shell.Command;
0
import org.apache.zookeeper.Watcher.Event.EventType; import org.apache.zookeeper.data.StatPersisted; private DataNode root = new DataNode(null, new byte[0], null, new StatPersisted()); static public void copyStatPersisted(StatPersisted from, StatPersisted to) { to.setAversion(from.getAversion())...
0
* @throws IOException If an error occurs while reading the underlying * @throws IOException If an error occurs in reading the underlying * @throws IOException If an error occurs while reading the underlying
0
package org.apache.felix.dependencymanager.test2.integration.api; import org.ops4j.pax.exam.junit.PaxExam; import org.apache.felix.dependencymanager.test2.components.Ensure; import org.apache.felix.dependencymanager.test2.integration.common.TestBase; @RunWith(PaxExam.class) public class BundleDependencyTest extends Te...
0
elementCoder.encode(elem, dataOutStream); elementCoder.encode(elem, countingOutputStream); elements.add(elementCoder.decode(dataInStream)); elements.add(elementCoder.decode(dataInStream));
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/java/org/apache/commons/dbcp/PoolableConnectionFactory.java,v 1.7 2003/04/09 00:19:37 dgraham Exp $ * $Revision: 1.7 $ * $Date: 2003/04/09 00:19:37 $ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights ...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/compiler/Constant.java,v 1.4 2003/01/11 05:41:23 dmitri Exp $ * $Revision: 1.4 $ * $Date: 2003/01/11 05:41:23 $ * @version $Revision: 1.4 $ $Date: 2003/01/11 05:41:23 $ public Cons...
1
* $HeadURL:$ * $Revision:$ * $Date:$ package org.apache.http; public class OoopsieRuntimeException extends RuntimeException { private static final long serialVersionUID = 662807254163212266L; public OoopsieRuntimeException() { super("Ooopsie!!!");
0
return SlaUtil.percentile(waitTimes, 50.0); private static final Function<Collection<IScheduledTask>, List<ITaskEvent>> TO_SORTED_EVENTS = new Function<Collection<IScheduledTask>, List<ITaskEvent>>() { @Override public List<ITaskEvent> apply(Collection<IScheduledTask> tasks) { ...
0
* @version $Id: ExpressionContextImpl.java,v 1.3 2004/05/07 16:43:42 mpo Exp $ widget = ((ContainerWidget)this.widget.getParent()).lookupWidget(name); widget = ((ContainerWidget)this.widget).lookupWidget(name);
0
iterators = new ArrayList<>(); ranges = new ArrayList<>(); columns = new HashSet<>(); columns.add(new Pair<>(colFam, colQual));
1
import org.junit.Ignore; /** Unit tests for UDFs. */ @Ignore /** UdfProvider to help UDF registration. */
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.accumulo.core.conf.AccumuloConfiguration; public long close(AccumuloConfiguration conf, VolumeManager fs, Path source) throws IOException { return conf.getTimeInMillis(Property.MASTER_LEASE_RECOVERY_WAITING_PERIOD);
1
FileUtils.write(file, "Hello /u1234", (String) null); FileUtils.writeStringToFile(file, "this is brand new data", (String) null, true); FileUtils.writeStringToFile(file, "this is brand new data", (String) null, false); FileUtils.write(file, "this is brand new data", (String) null, true);...
0
* @version $Revision: 1.4 $, $Date: 2004/10/18 11:12:08 $ public void setAutoSave(boolean autoSave) { delegate.setAutoSave(autoSave); } public boolean isAutoSave() { return delegate.isAutoSave(); }
0
import org.apache.beam.sdk.transforms.OldDoFn; static class ParseEventFn extends OldDoFn<String, GameActionInfo> {
0
import static org.junit.Assert.assertTrue; assertTrue(shell.getInstance() instanceof org.apache.accumulo.core.client.mock.MockInstance);
0