Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import com.google.common.collect.ImmutableMap; exp.evaluate(input, null, ImmutableMap.of()).getValue())); exp.getKey().evaluate(input, null, ImmutableMap.of()).getValue(), exp.getValue().evaluate(input, null, ImmutableMap.of()).getValue())));
0
import org.apache.sshd.common.util.Pair; import org.apache.sshd.common.util.ValidateUtils; for (Pair<PublicKey, String> pair : agent.getIdentities()) { String keyType = getKeyType(pair); Signature verif = ValidateUtils.checkNotNull( NamedFactory.Utils.create(manag...
0
* Options that can be used to configure the {@link DirectPipeline}.
0
log.debug("Create " + tableName + " failed, it exists"); } catch (IllegalArgumentException e) { log.debug("Create: " + e.toString());
0
/* * Copyright 1999-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...
0
import static com.google.common.base.Preconditions.checkArgument; import org.apache.beam.sdk.values.TaggedPValue; List<TaggedPValue> outputs = context.getOutputs(transform); transformTupleTagsToLabels(transform.getMainOutputTag(), outputs); UnionCoder outputUnionCoder = createUnionCoder(outputs...
0
/** * Returns the number of registered processes. * * @return the number of register process */ int size();
0
final String method = request.getRequestLine().getMethod().toUpperCase(Locale.ROOT);
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
import org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl.FilterJsonDescriptorImpl; public void init(FilterJsonDescriptorImpl filterJsonDescriptor) throws Exception { filterJson.loadConfig(filterJsonDescriptor); init(new FilterJsonDescriptorImpl()); init(new FilterJsonDescriptorImpl()); ...
0
* Copyright (C) 2015 Google Inc.
0
debug("Connection closed: " + conn); debug("Connection open: " + conn); debug("Connection timed out: " + conn); debug("I/O error: " + ex.getMessage()); debug("HTTP error: " + ex.getMessage()); debug("Incoming entity content (bytes): " + entityC...
0
/** Unit tests of {@link ValueAndCoderLazySerializable}. */ public class ValueAndCoderLazySerializableTest { ValueAndCoderLazySerializable<Iterable<WindowedValue<Integer>>> accUnderTest = ValueAndCoderLazySerializable.of(accumulatedValue, iterAccumCoder); ValueAndCoderLazySerializable<Iterable<WindowedV...
0
import org.apache.ambari.server.agent.HostInfo; final HostInfo nodeInfo; AgentVersion agentVersion, long registrationTime, HostInfo nodeInfo) {
0
* Indicates whether or not this is a system view. */ private boolean system; /** * Determine whether or not this is a system view. * * @return true if this is a system view */ public boolean isSystem() { return system; } /**
0
@Override @Override
0
import com.google.common.base.Joiner; @Override public String toString() { StringBuilder builder = new StringBuilder("AfterAll.of("); Joiner.on(", ").appendTo(builder, subTriggers); builder.append(")"); return builder.toString(); }
0
import static org.junit.Assert.assertEquals; import java.io.InputStream; import org.junit.After; import org.junit.Before; public abstract class AbstractAnnotatedPojoTestCase { @Before public void setUp() throws Exception { @After public void tearDown() throws Exception {
0
Calendar.MILLISECOND, Calendar.MINUTE, * @throws ParseException if timestamp cannot be parsed this.defaultDateFormat = new SimpleDateFormat(format);
0
@Component @Property(name="type", value="file")
0
* @param sourceName - name of the source of this event. EntityDetail processRetrievedEntity(String sourceName, String metadataCollectionId, * @param sourceName - name of the source of this event. ArrayList<EntityDetail> processRetrievedEntities(Str...
0
package org.apache.atlas.repository.impexp;
0
edge = edge.distributed(); edge = edge.partitioned(new PartitionedKeyExtractor(coder)); this.coder = Utils.isKeyedValueCoder(coder) ? (WindowedValue.WindowedValueCoder<KV<K, V>>) coder : null; if (coder == null) { return "ALL"; } else { ...
0
* @version CVS $Id: DOMStreamer.java,v 1.11 2003/08/01 17:48:44 vgritsenko Exp $ result.setLexicalHandler(lexicalHandler);
0
* {@link com.google.cloud.dataflow.sdk.transforms.windowing.AfterWatermark} * for details on the estimation.
0
* http://www.apache.org/licenses/LICENSE-2.0
0
/** Tests that Java SDK coders standardized by the Fn API meet the common spec. */ String testname = MoreObjects.toStringHelper(OneCoderTestSpec.class) .add("coder", test.getCoder()) .add("nested", test.getNested()) .add("serialized", test.getSerialize...
1
* Copyright (c) 2002 The Apache Software Foundation. All rights
0
import cz.seznam.euphoria.core.client.dataset.windowing.ElementWindowing; windowBy(ElementWindowing<Either<LEFT, RIGHT>, ?, WLABEL, W> windowing) private final ElementWindowing<Either<LEFT, RIGHT>, ?, WLABEL, W> windowing; ElementWindowing<Either<LEFT, RIGHT>, ?, WLABEL, W> windowing) El...
0
cfSet = new HashSet<>();
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
if (cands instanceof ShadowList) { m_candidateMap.put(r, ShadowList.deepCopy((ShadowList) cands)); } else { m_candidateMap.put(r, cands.copy()); }
0
return String.valueOf(this.docletTag.getContext().getParent().getParentSource().getURL()); } /** * @see org.apache.felix.scrplugin.tags.JavaTag#getLineNumber() */ public int getLineNumber() { return this.docletTag.getLineNumber();
0
public static ByteArrayShufflePosition fromBase64(String position) { public static ByteArrayShufflePosition of(byte[] position) {
0
package org.apache.beam.runners.flink.translation.types; import org.apache.beam.runners.flink.translation.wrappers.DataInputViewWrapper;
0
public FileAlterationObserver(final String directoryName, final FileFilter fileFilter, final IOCase caseSensitivity) { protected FileAlterationObserver(final FileEntry rootEntry, final FileFilter fileFilter, final IOCase caseSensitivity) { ...
1
* @version CVS $Id$ database.indexOf("ingres") > -1 ||
0
private final String clusterOsType; int requestId, long timeout, String hostName, boolean isVerbose, String clusterOsType) this.clusterOsType = clusterOsType; String commands[] = new String[9]; commands[7] = this.clusterOsType; commands[8] = this.passwordFile.toString(); // Startup a...
0
// If this changes, it implies the binary format has changed! private static final String EXPECTED_ENCODING_ID = ""; @Test public void testEncodingId() throws Exception { CoderProperties.coderHasEncodingId( KvCoder.of(VarIntCoder.of(), VarIntCoder.of()), EXPECTED_ENCODING_ID); }
0
result = result.replace("\\", "\\\\");
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 applic...
0
conf, options.cryptoService);
0
* HttpCore NIO integration tests using buffering versions of the * protocol handlers.
0
/* * Copyright 2003-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 appl...
0
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.ByteString;
0
false, true, null), new AttributeDefinition("type", DataTypes.STRING_TYPE.getName(), Multiplicity.REQUIRED, false, false, true, null), false, true, null),}; false, true, null), false, true, null),
0
int connTimeout = HttpConnectionParams.getConnectionTimeout(params); int soTimeout = HttpConnectionParams.getSoTimeout(params); sock.setSoTimeout(soTimeout); sock.connect(remoteAddress, connTimeout);
0
import org.apache.felix.sigil.common.model.IModelElement;
0
assertEquals("1234", buffer.toString()); assertEquals("1212341234", buffer.toString()); } public void testAppendString() throws Exception { CharArrayBuffer buffer = new CharArrayBuffer(8); buffer.append("stuff"); buffer.append(" and more stuff"); assertEquals("stuff an...
0
import org.apache.accumulo.core.security.tokens.AccumuloToken; root_conn.securityOperations().createUser(new UserPassToken(user, password.getBytes())); root_conn.securityOperations().createUser(new UserPassToken(user, password.getBytes())); test_user_conn.securityOperations().createUser(ne...
0
NameValuePair parseTokenOrParameter(final CharSequence buffer, final ParserCursor cursor) throws ParseException { public List<AuthChallenge> parse(final CharSequence buffer, final ParserCursor cursor) throws ParseException {
0
import static org.junit.Assert.assertTrue;
0
import java.util.Iterator; import java.util.List; import org.apache.accumulo.core.client.IteratorSetting; List<IteratorSetting> tableScanIterators = shellState.scanIteratorOptions.remove(tableName); if (tableScanIterators == null) Shell.log.info("Removed the following scan iterators from table " + t...
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
PublicKeyEntry entry = PublicKeyEntry.parsePublicKeyEntry( GenericUtils.join( Arrays.asList(getCurrentTestName(), "AAAA", getClass().getSimpleName()), ' ')); PublicKey key = entry.resolvePublicKey(null, resolver);
0
package org.apache.ambari.logsearch.model.response; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @ApiModel public class LogFileData { @ApiModelProperty @ApiModelProperty
0
@Override @Override
0
* @author Apache Software Foundation
0
* * <p>It is recommended to extend {@link PValueBase}
0
import org.apache.commons.vfs.provider.ParsedLayeredUri; public class ZipFileNameParser public ParsedLayeredUri parseZipUri( final String uriStr ) final ParsedLayeredUri uri = new ParsedLayeredUri(); uri.setOuterFileUri( zipName ); public String buildRootUri( final String scheme, final String ou...
0
import java.util.Arrays;
0
@Deprecated
0
public static <T> Predicate<T> nullIsFalsePredicate(Predicate<? super T> predicate) {
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 law o...
0
import java.lang.reflect.InvocationTargetException; true, Thread.currentThread().getContextClassLoader()).getConstructor().newInstance(); } catch (ClassNotFoundException | IllegalAccessException | InvocationTargetException | NoSuchMethodException | InstantiationException erro...
0
import org.apache.commons.lang.StringEscapeUtils; String dslQuery = String.format("%s where name = '%s' and clusterName = '%s'", typeName, public Referenceable getProcessReference(String queryStr) throws Exception { LOG.debug("Getting reference for process with query {}", queryStr); String t...
0
package org.apache.felix.jmood; import java.io.IOException; import java.net.URL; public String getFelixBundleUrl(String artifactId) throws IOException{ return getM2Url("org.apache.felix", artifactId, "0.8.0-SNAPSHOT"); } public String getM2Url(String groupId, String artifactId, String version)throws IOException{ ...
0
* Restricts the columns that will be mapped over for the single input table on this job. * Encode an iterator on the input for the single input table associated with this job.
0
public static final ImmutableMap<String, ResourceType> BY_MESOS_NAME = BY_MESOS_NAME.get(resource.getName()),
0
for (BSHostStatus hostStatus : tmpStatus.getHostsStatus()) { if ("FAILED".equals(hostStatus.getStatus())) { stat = BSStat.ERROR; break; } }
0
package org.apache.batik.ext.awt.image.renderable;
0
public List<ExecuteStage> executionStages; /** * Represents a single-stage execution that happens as part of a cluster-wide * upgrade or downgrade. */ public static class ExecuteStage { @XmlElement(name="direction") public Direction intendedDirection = null; if (null != execution.inten...
0
/** * {@inheritDoc} */
0
import org.apache.ambari.server.orm.dao.PermissionDAO; import org.apache.ambari.server.orm.entities.PermissionEntity; import org.apache.ambari.server.orm.entities.ResourceTypeEntity; import org.junit.Before; import org.junit.BeforeClass; import java.util.LinkedList; import java.util.List; import static org.easymock.Eas...
0
package com.twitter.mesos.scheduler.thrift; import org.junit.Before; import org.junit.Test; import com.twitter.common.testing.EasyMockTest; import com.twitter.mesos.gen.JobConfiguration; import com.twitter.mesos.gen.ResponseCode; import com.twitter.mesos.gen.SessionKey; import com.twitter.mesos.gen.StartUpdateRespons...
0
interface NamespaceResolver { interface NamespaceFunctor { interface ThreadLocal extends JexlContext {
0
public abstract class Metric { public void add(long value) {}; public void add(int key, long value) {}; public void add(String key, long value) {}; public void reset() {}; public abstract Map<String, Object > values();
0
* @author <a href="mailto:bluetkemeier@s-und-n.de">Bj&ouml;rn L&uuml;tkemeier</a> * @version CVS $Id: CopletInstanceDataReferenceFieldHandler.java,v 1.2 2003/07/10 13:16:56 cziegeler Exp $
0
String TRANSFORM_ROTATE = "rotate"; String TRANSFORM_SCALE = "scale"; String TRANSFORM_SKEWX = "skewX"; String TRANSFORM_SKEWY = "skewY"; String TRANSFORM_MATRIX = "matrix"; String PATH_ARC = "A"; String PATH_CLOSE = "Z"; String PATH_CUBIC_T...
0
import org.apache.ambari.server.orm.dao.PermissionDAO; import org.apache.ambari.server.orm.entities.PermissionEntity; /** * Data access object used to obtain permission entities. */ protected static PermissionDAO permissionDAO; // ----- Constructors ------------------------------------------------------ ...
0
* @version CVS $Id: DefaultLayoutFactory.java,v 1.10 2003/06/06 11:33:37 cziegeler Exp $ desc.setCreateId(layoutsConf[i].getAttributeAsBoolean("create-id", false)); String id = null; if ( layoutDescription.createId() ) { // TODO - set unique id id = layoutName + ...
0
import org.apache.http.message.BasicHeader; BasicHeader.format(this.buffer, (Header) it.next());
0
public ClientProtocolException(final String s) { public ClientProtocolException(final Throwable cause) { public ClientProtocolException(final String message, final Throwable cause) {
0
references = new HashMap<>(dataReferenceOrKeyReference.size() + 1); //+1 because the HashMap will resize otherwise
0
abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K, V> {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/Attic/Context.java,v 1.2 2002/02/12 21:34:33 jstrachan Exp $ * $Revision: 1.2 $ * $Date: 2002/02/12 21:34:33 $ * $Id: Context.java,v 1.2 2002/02/12 21:34:33 jstrachan Exp $ * @version $Re...
0
import org.apache.http.protocol.HttpContext; public HttpHost getTarget() { public void requestCompleted(final HttpContext context) { }
0
import org.apache.hc.client5.http.async.methods.SimpleHttpRequests; final SimpleHttpRequest get = SimpleHttpRequests.GET.create(target, "/random/2048"); SimpleHttpRequests.GET.create(target, "/random/2048"), null); SimpleHttpRequests.GET.create(target, "/random/2048"), nu...
0
import com.twitter.mesos.gen.comm.ExecutorStatus; import com.twitter.mesos.gen.comm.LiveTaskInfo; import com.twitter.mesos.gen.comm.RegisteredTaskUpdate; import com.twitter.mesos.gen.comm.SchedulerMessage;
0
/** * Used to indicate if the queue was resumed while * still running, so a 'resumed' event can be sent. */ protected boolean wasResumed; /** * Count of preempt entries in queue, so preempt entries * can be kept properly ordered. */ if (state == RUNNING) { ...
0
* <pre><code> * </code></pre>
0
package org.apache.felix.karaf.gshell.osgi;
0
byte[] array = new byte[1024]; byte[] resBytes = baos.toByteArray();
0
* Unit test for * @throws XPathExpressionException * @throws XPathExpressionException * @throws XPathExpressionException * @throws XPathExpressionException * @throws XPathExpressionException * @throws XPathExpressionException * @throws XPathExpressionException * @throws XP...
1
import org.apache.aurora.scheduler.storage.JobUpdateStore; import org.apache.aurora.scheduler.storage.entities.IJobUpdate; private final JobUpdateStore.Mutable writeBehindUpdateStore; @WriteBehind AttributeStore.Mutable attributeStore, @WriteBehind JobUpdateStore.Mutable updateStore) { ...
0
buildURL();
0
entry = getFreeEntry(routePool); entry = createEntry(routePool, operator); entry = createEntry(routePool, operator); // TODO: keep track of which routes have waiting threads, // so they avoid being sacrificed before necessary * @param ...
0
final HttpConnectionManager mgr = getClient().getHttpConnectionManager();
1
* It implements the system described in: * @version $Id$ */ * named: 'META-INF/services/&lt;fully qualified classname&gt; that list
0
private final HttpProcessor httpProcessor; private final HttpResponseFactory responseFactory; private final ConnectionReuseStrategy connStrategy; private final Executor executor; private final ByteBufferAllocator allocator; private final HttpParams params; final ByteBufferAllocator ...
0