Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import java.io.IOException;
0
import org.apache.commons.lang.StringUtils; import java.util.Collections; import java.util.HashSet; import java.util.Set; private static final String OOZIE_SITE_CONFIG = "oozie-site"; private static final String OOZIE_AUTHENTICATION_KERBEROS_NAME_RULES = "oozie.authentication.kerberos.name.rules"; updateOozieC...
0
import org.junit.Assert; if (!outputDir.mkdirs()) { // either was not created or already existed Assert.assertTrue(outputDir.isDirectory()); // fail if missing }
0
* http://www.apache.org/licenses/LICENSE-2.0
0
final HttpRequest basicRequest = new BasicHttpRequest(theMethod, theUri); basicRequest.addHeader("Accept-Encoding", "gzip"); final HttpRequestWrapper requestWrapper = HttpRequestWrapper.wrap(basicRequest); Assert.assertNotSame(basicRequest, newRequest); Assert.assertEquals(basicR...
0
public static final String SVG_NUMBER_LIST_SEPARATOR
1
private final Set<String> clearedProperties = new HashSet<String>();
0
import org.apache.aurora.common.testing.easymock.EasyMockTest;
0
public class AwsModuleTest {
0
synchronized (this) { if (error) return; count--; synchronized (this) { error = true; } } else { e.printStackTrace(); // No UA so just output... } ...
0
* * * * * * * * * * * * return (Bag<E>) EMPTY_BAG; return (SortedBag<E>) EMPTY_SORTED_BAG;
0
public DoubleArrayConverter(final Object defaultValue) { public Object convert(final Class type, final Object value) { final String[] values = (String[]) value; final double[] results = new double[values.length]; } catch (final Exception e) { final List li...
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
private static ByteKey makeByteKey(ByteString key) { return ByteKey.copyFrom(key.asReadOnlyByteBuffer()); } return range.containsKey(makeByteKey(input.getKey())); return ByteKeyRange.of(makeByteKey(data.firstKey()), makeByteKey(data.lastKey())); || !source.getRange().containsKey(m...
0
return input.apply("Map", ParDo.of(new DoFn<InputT, OutputT>() {
0
package org.apache.atlas; import org.apache.atlas.repository.graph.GraphProvider;
0
import com.google.cloud.dataflow.sdk.util.common.CounterSet; ExecutionContext context, CounterSet.AddCounterMutator addCounterMutator) throws Exception {
0
* * public void testMini() throws Exception { JexlContext jc = new MapContext(); JexlExpression assign = JEXL.createExpression("quux = 10"); Object o = assign.evaluate(jc); assertEquals("Result is not 10", new Integer(10), o); }
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 m...
0
* Returns a new FluentIterable whose iterator will return an unmodifiable * view of this iterable. * * @return a new iterable, providing an unmodifiable view of this iterable */ public FluentIterable<E> unmodifiable() { return of(IterableUtils.unmodifiableIterable(iterable)); } ...
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
/** Collector that outputs elements to {@link BeamCollector}. */ public class DoFnCollector<InputT, OutputT, ElemT> implements Collector<ElemT>, Context, Serializable { DoFnCollector( AccumulatorProvider accumulators, BeamCollector<InputT, OutputT, ElemT> beamCollector) { *
0
"defaultNaming() supports only windows of type %s, " + "but got window %s of type %s", return (window, pane, numShards, shardIndex, compression) -> FileSystems.matchNewResource(baseDirectory.get(), true /* isDirectory */) .resolve( innerNaming.getFilename(wi...
0
* * * assertEquals(2, ds.getConnectionInitSqls().size()); assertEquals("SELECT 1", ds.getConnectionInitSqls().get(0)); assertEquals("SELECT 2", ds.getConnectionInitSqls().get(1));
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/test/org/apache/commons/digester/ObjectParamRuleTestCase.java,v 1.4 2003/10/05 15:36:03 rdonkin Exp $ * $Revision: 1.4 $ * $Date: 2003/10/05 15:36:03 $ * ==============================================================...
0
import org.apache.batik.dom.anim.AnimatableElement;
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger log = LoggerFactory.getLogger(IteratorUtil.class);
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
new HashSet<String>(Arrays.asList("fs.defaultFS", "hbase.rootdir", "instance.volumes")); if (properties.containsKey("accumulo-site") && properties.get("accumulo-site").get("instance.volumes").equals(origValue)) { // accumulo-site's reference to the namenode is handled differently in HA...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/TagLibrary.java,v 1.13 2002/09/05 16:43:29 jstrachan Exp $ * $Revision: 1.13 $ * $Date: 2002/09/05 16:43:29 $ * $Id: TagLibrary.java,v 1.13 2002/09/05 16:43:29 jstrachan Exp $ * @version ...
0
if (condition.getEndTime() >= condition.getStartTime()) { stmt = PhoenixTransactSQL.prepareGetMetricsSqlStmt(conn, condition); rs = stmt.executeQuery(); while (rs.next()) { appendMetricFromResultSet(metrics, condition, metricFunctions, rs); } } else { ...
0
package org.apache.felix.connect.felix.framework.capabilityset;
0
protected NHttpConnectionFactory<DefaultNHttpServerConnection> createServerConnectionFactory() throws Exception { return new LoggingSSLServerConnectionFactory(SSLTestContexts.createServerSSLContext()); protected NHttpConnectionFactory<DefaultNHttpClientConnection> createClientConnectionFactory() throws ...
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
public static final String ROLLING_UPGRADE_MIN_STACK_KEY = "rolling.upgrade.min.stack"; public static final String ROLLING_UPGRADE_MAX_STACK_KEY = "rolling.upgrade.max.stack"; public static final String ROLLING_UPGRADE_MIN_STACK_DEFAULT = "HDP-2.2"; public static final String ROLLING_UPGRADE_MAX_STACK_DEFAULT =...
0
* <p>Each of the calls to any of the {@link DoFn DoFn's} processing * <pre><{@code * }</pre> * <pre>{@code * }</pre> * <pre>{@code * }</pre>
0
Runnable failureHandler = () -> { List<QCMutation> mutations = new ArrayList<>(); failedMutations.drainTo(mutations); if (mutations.size() > 0) queue(mutations);
0
import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; import org.apache.commons.codec.DecoderException; import org.junit.Test; public class RFC1522CodecTest { @Test @Test
1
package org.apache.http.impl.client.cache; import org.apache.http.client.cache.HttpCacheEntry; interface HttpCache {
0
import com.google.cloud.dataflow.sdk.values.TimestampedValue; import com.google.common.base.Function; import com.google.common.collect.Iterables; protected TimestampedValue<Iterable<V>> finalValue(W window) throws Exception { Iterable<TimestampedValue<V>> result = windowingInternals.readTagList(tag); Instant ...
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.http.impl.IncomingHttpEntity; return new IncomingHttpEntity( null, len >= 0 ? len : -1, len == ContentLengthStrategy.CHUNKED, message.getFirstHeader(HttpHeaders.CONTENT_TYPE), message.getFirstHeader(HttpHeaders.CONTENT_ENCODING));
0
in.apply("AddKeys", ParDo.of(new OldDoFn<V, KV<K, V>>() {
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkNotNull; import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap;
0
* Copyright 2016 Seznam.cz, a.s.
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 m...
0
StreamingWindowedElement<WID, Pair<KEY, VALUE>>, window.getEmissionWatermark(), Pair.of(i.get().getFirst(), i.get().getSecond())));
0
import org.apache.cocoon.configuration.Settings; * @version $Id$ return (Element[]) elements.toArray(new Element[elements.size()]); register(beanDef, beanName, null, registry); this.logger.debug("Registering bean with name " + beanName + (al...
0
TransformResult<Long> result = runEvaluator(triggering, inputBundle, transform); TransformResult<Long> result = runEvaluator(windowed, inputBundle, transform); TransformResult<Long> result = runEvaluator(windowed, inputBundle, transform); TransformResult<Long> result = runEvaluator(windowed, inputBundle...
0
import org.apache.cocoon.portal.om.AbstractParameters; import org.apache.cocoon.portal.om.Item; import org.apache.cocoon.portal.om.Layout;
0
/* * (c) COPYRIGHT 1999 World Wide Web Consortium * (Massachusetts Institute of Technology, Institut National de Recherche * en Informatique et en Automatique, Keio University). * All Rights Reserved. http://www.w3.org/Consortium/Legal/ * * $Id$ */ package org.w3c.css.sac; /** * @version $Revision$ * @author...
1
package cz.seznam.euphoria.core.client.io; import java.io.Closeable; import java.io.IOException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Writer for data in a given partition. */ public abstract class Writer<T> implements Closeable { private static final Logger LOG = LoggerFactory.getLog...
0
import java.nio.charset.StandardCharsets; serialized = new String(baos.toByteArray(), StandardCharsets.UTF_8); ByteArrayInputStream bais = new ByteArrayInputStream(serialized.getBytes(StandardCharsets.UTF_8));
0
volatile boolean readyToStart = false; readyToStart = true; /* */
0
import org.apache.beam.runners.core.metrics.MetricsContainerStepMap;
0
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Objects; import javax.annotation.Nullable;
0
iters.add(smi); ColumnFamilySkippingIterator cfsi = new ColumnFamilySkippingIterator(delIter); ColumnQualifierFilter colFilter = new ColumnQualifierFilter(cfsi, columnSet);
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
public static boolean check(final String cn) final ClassLoader cl = DaemonLoader.class.getClassLoader(); final Class<?> c = cl.loadClass(cn); } catch (final Throwable t) { } catch (final Throwable ex) { public static boolean load(final String className, String args[]) ...
0
Multibinder<TypesChangeListener> typesChangeListenerBinder = Multibinder.newSetBinder(binder(), TypesChangeListener.class); typesChangeListenerBinder.addBinding().toProvider(GraphBackedSearchIndexer.class);
0
* an instance of {@link SessionOutputBuffer}. * protected final SessionOutputBuffer sessionBuffer; * *
0
import java.io.IOException; import java.util.Objects;
0
* @version CVS $Id: Item.java,v 1.3 2003/05/22 15:19:43 cziegeler Exp $ layout.setParent(this);
0
* an IllegalStateException will be thrown, else a {@code null} will * @param allowNull if <code>true</code>, a {@code null} value may be * @return the session attached to the MINA session or {@code null} * and a {@code null} value will be returned. Else the identification * @return the remote ...
0
public static KnownHostHashValue parse(String patternString) { String pattern = GenericUtils.replaceWhitespaceAndTrim(patternString); public static <V extends KnownHostHashValue> V parse(String patternString, V value) { String pattern = GenericUtils.replaceWhitespaceAndTrim(patternString);
0
response.put("last_client_response_size", stats.getClientResponseStats().getLastBufferSize()); response.put("max_client_response_size", stats.getClientResponseStats().getMaxBufferSize()); response.put("min_client_response_size", stats.getClientResponseStats().getMinBufferSize()); ...
1
import org.apache.http.pool.ConnFactory; super(new InternalConnFactory(), defaultMaxPerRoute, maxTotal); static class InternalConnFactory implements ConnFactory<HttpRoute, OperatedClientConnection> { public OperatedClientConnection create(final HttpRoute route) throws IOException { retu...
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
newsgroup = stdin.readLine(); if (newsgroup == null) { break; } newsgroup = newsgroup.trim();
0
WindowedValue.of(value, c.timestamp(), c.windowingInternals().windows())));
0
import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Font; import org.apache.batik.util.resources.ResourceManager;
0
* @param localAddress the local socket address. Can be {@code null}, * @param attachment the attachment object. Can be {@code null}. * @param callback interface. Can be {@code null}.
0
import org.apache.mesos.v1.Protos; .setAgentId(Protos.AgentID.newBuilder().setValue(attributes.getSlaveId()))
0
import org.apache.felix.webconsole.AbstractWebConsolePlugin; Map params = ( Map ) request.getAttribute( AbstractWebConsolePlugin.ATTR_FILEUPLOAD );
0
import cz.seznam.euphoria.core.annotation.operator.StateComplexity; @Derived( state = StateComplexity.CONSTANT_IF_COMBINABLE, repartitions = 1 )
0
HttpPoolEntry local = this.poolEntry; if (local != null) { OperatedClientConnection conn = local.getConnection(); local.getTracker().reset(); HttpPoolEntry local = this.poolEntry; if (local != null) { OperatedClientConnection conn = local.getConnection...
0
StoredCronJob job = new StoredCronJob(new JobConfiguration() .setOwner(new Identity().setUser("user")) .setKey(JOB_KEY) .setTaskConfig(task.newBuilder())); new JobConfiguration(job.getJobConfiguration()) .setOwner(new Identity(job.getJobConfiguration().getOwner()).setRole...
0
* @version CVS $Id: FOM_JavaScriptInterpreter.java,v 1.2 2003/06/22 18:12:27 coliver Exp $ FOM_Cocoon.init(scope); //int size = (params != null ? params.size() : 0); //NativeArray parameters = new NativeArray(size); //if (size != 0) { //for (int i = 0; i < size; i++) { ...
0
// This method should not be called directly. void __setState(int i) // Create the module instance. m_archive.getRevision(revision).getContent(), getFramework().getBundleStreamHandler());
1
weightedValue = new WeightedValue<>();
0
/* * Update the election vote here to ensure that all members of the * ensemble report the same vote to new servers that start up and * send leader election notifications to the ensemble. * * @see https://issues.apache.org/jira/browse/ZOOKEEPER-1732 */ ...
0
public UpgradeEntity getUpgradeInProgress() { throw new AmbariException("Unable to update the associated upgrade with the cluster", e); UpgradeEntity upgrade = getUpgradeInProgress(); if (null != upgrade) { return upgrade.isSuspended();
0
import org.apache.cocoon.portal.layout.LayoutException; import org.apache.cocoon.portal.om.CopletInstance; import org.apache.cocoon.portal.om.CopletInstanceFeatures; import org.apache.cocoon.portal.om.Layout; import org.apache.cocoon.portal.om.LayoutFeatures; try { portalLayoutRender...
0
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
0
if (dynamicSecureParts != null) { Iterator<Map.Entry<Object, SecurePart>> securePartsMapIterator = dynamicSecureParts.entrySet().iterator(); while (securePartsMapIterator.hasNext()) { Map.Entry<Object, SecurePart> securePartEntry = securePartsMapIterator.next(); ...
0
return Pair.of(schema, name(id)); } static String name(SqlIdentifier id) { if (id.isSimple()) { return id.getSimple(); } else { return Util.last(id.names); }
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...
1
ServerMetrics.getMetrics().UNRECOVERABLE_ERROR_COUNT.add(1);
0
import static org.junit.Assert.assertEquals; public class TrimmerOutputStreamTest { assertEquals(baos.size(), testStringBytes.length - 7); assertEquals(baos.toString(), testString); assertEquals(baos.size(), testStringBytes.length - 7); assertEquals(baos.toString(), stringBuffer.toStrin...
0
@Test public void testEnc() { System.out.println(TEST_CODER.asCloudObject()); }
0
public <R,P> R accept(NodeVisitor<? extends R, ? super P> visitor, P data) { return visitor.visit(this, data); }
0
final Method[] methods = SqlNullCheckedResultSet.class.getMethods(); final String methodName = methods[i].getName(); final String normalName = "get" + methodName.substring(GET_NULL_PREFIX.length()); final byte[] copy = new byte[this.nullBytes.length]; final Object res...
0
import org.apache.beam.sdk.values.BeamRecordType; public BeamTextCSVTable(BeamRecordType beamRowType, String filePattern) { this(beamRowType, filePattern, CSVFormat.DEFAULT); public BeamTextCSVTable(BeamRecordType beamRecordType, String filePattern, CSVFormat csvFormat) { super(be...
0
Trace.on("testing");
0
// Make enough room for two IPv6 addresses to avoid re-allocation in the StringBuilder. final StringBuilder buffer = new StringBuilder(78);
0
import com.google.cloud.dataflow.sdk.util.common.worker.NativeReader; try (NativeReader.LegacyReaderIterator<KV<byte[], byte[]>> iterator = reader.iterator()) {
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
* Copyright 2001-2005 The Apache Software Foundation
0
public static String baseUrl = "http://localhost:21000/";;
0
StringBuilder buf = new StringBuilder(64);
0