Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
boolean attr = false; boolean first = true;
0
/** Samza operator for {@link org.apache.beam.sdk.transforms.GroupByKey}. */ public GroupByKeyOp( TupleTag<KV<K, OutputT>> mainOutputTag, Coder<KeyedWorkItem<K, InputT>> inputCoder, SystemReduceFn<K, InputT, ?, OutputT, BoundedWindow> reduceFn, WindowingStrategy<?, BoundedWindow> windowingStra...
1
package org.apache.accumulo.core.spi.cache; /** * @since 2.0.0 */ interface Weighable { <T extends Weighable> T getIndex(Supplier<T> supplier);
0
protected void onRequestReceived(final HttpRequest request) { if (request != null && this.headerlog.isDebugEnabled()) { this.headerlog.debug(this.id + " >> " + request.getRequestLine().toString()); Header[] headers = request.getAllHeaders(); for (int i = 0; i < headers.le...
0
headerMap,
0
validateDirectives(Collections.emptySet(), resourceDefinition.getCreateDirectives()); validateDirectives(Collections.emptySet(), resourceDefinition.getReadDirectives()); validateDirectives(Collections.emptySet(), resourceDefinition.getUpdateDirectives()); validateDirectives(Collections.emptySet(), resou...
0
import org.apache.accumulo.core.security.tokens.InstanceTokenWrapper; public static void authenticate(InstanceTokenWrapper auth, State state, Properties props) throws Exception {
0
* @version $Id$
0
package com.twitter.nexus.scheduler.configuration;
0
/** * {@inheritDoc} */
0
import org.apache.beam.vendor.protobuf.v3.com.google.protobuf.InvalidProtocolBufferException;
0
* The purpose of this class is to server as fake tserver that is a data sink like /dev/null. NullTserver modifies the metadata location entries for a table to // modify metadata
1
import org.apache.http.conn.ssl.TrustSelfSignedStrategy; // Trust own CA and all self-signed certs .loadTrustMaterial(trustStore, new TrustSelfSignedStrategy()) // Allow TLSv1 protocol only SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory( sslcon...
0
import com.google.common.base.Optional; import com.google.common.collect.ImmutableSet; import org.apache.aurora.gen.JobUpdateQuery; import org.apache.aurora.scheduler.storage.entities.IJobUpdateDetails; import org.apache.aurora.scheduler.storage.entities.IJobUpdateSummary; @Override public ImmutableSet<IJobUpdat...
0
ctx.collect(windowedValue);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/util/TypeUtils.java,v 1.7 2002/06/12 21:02:05 dmitri Exp $ * $Revision: 1.7 $ * $Date: 2002/06/12 21:02:05 $ * Global type conversion utilities. * * @version $Revision: 1.7 $ $Date: 200...
0
import com.google.cloud.dataflow.examples.common.DataflowExampleOptions; public interface TrafficFlowOptions extends ExamplePubsubTopicOptions, ExampleBigQueryTableOptions, DataflowExampleOptions { copiedOptions.setNumWorkers(options.as(DataflowExampleOptions.class).getInjectorNumWorkers());
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 ...
1
public static <E> PredicatedBuffer<E> predicatedBuffer(final Buffer<E> buffer, final Predicate<? super E> predicate) {
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
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
import java.io.IOException; import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.coders.Coder.Context; public class ValueAndCoderKryoSerializable<T> implements KryoSerializable { private static final JavaSerializer JAVA_SERIALIZER = new JavaSerializer(); public void write(Kryo kryo, Output output) ...
0
if (c == '(') int end = find(')', '(');
0
import org.apache.cocoon.portal.om.CopletInstance;
0
configuration.setProperty("atlas.services.enabled", false);
1
import com.google.common.collect.ImmutableSet; import org.apache.aurora.gen.storage.StoredJobUpdateDetails; public void saveJobUpdate(IJobUpdate update, String lockToken) { requireNonNull(update); requireNonNull(lockToken); detailsMapper.insertLockToken(updateId, lockToken); .transform(new Functi...
0
public void set(String val, Object value) {
0
cat.debug("setElement(\"" + element.getTagName() + "\", \"" + BaseURI + "\")");
0
* * * Test for the SwappedDataInputStream. This also
0
ArrayList list = (ArrayList) root; assertEquals("Wrong number of classes created", 2 , list.size()); assertEquals("Pushed first", true , ((TestObject)list.get(0)).isPushed()); assertEquals("Didn't push second", false , ((TestObject)list.get(1)).isPushed());
0
public class HiveParititionTest extends MigrationBaseAsserts { public HiveParititionTest(AtlasGraph graph) { runFileImporter("parts_db");
0
final SocketConfig sconfig = SocketConfig.custom().setSoTimeout(100).build(); final SocketConfig sconfig = SocketConfig.custom().setSoTimeout(100).build(); final BasicPoolEntry entry = pool.createEntry(host, conn);
0
public int compareTo(Object reference) { throw new UnsupportedOperationException("This feature has not yet been implemented."); }
1
protected void addP(PropertyImpl prop)
0
@Nullable Iterable<WindowedValue<?>> elements = state.read();
0
if(units.length() == 0){ units = VALUE_OBJECT_BOUNDING_BOX; } at = SVGUtilities.convertAffineTransform(at, paintedNode, units); at);
0
import org.apache.batik.ext.awt.image.renderable.AffineRable; import org.apache.batik.ext.awt.image.rendered.CachableRed; import org.apache.batik.ext.awt.image.renderable.CompositeRable; import org.apache.batik.ext.awt.image.renderable.CompositeRule; import org.apache.batik.ext.awt.image.renderable.Filter; import org.a...
0
import com.google.common.base.Function; import com.google.common.base.Functions; import org.apache.aurora.scheduler.base.TaskGroupKey; import org.apache.aurora.scheduler.storage.entities.ITaskConfig; private final LoadingCache<TaskGroupKey, Fit> fitByGroupKey; fitByGroupKey = CacheBuilder.newBuilder() .bu...
0
private static final boolean REPORT = Boolean.parseBoolean(System.getProperty("PerformanceTest.report", "true"));; if (REPORT) { System.out.println("ClassParser.parse: " + parseTime); System.out.println("ClassGen.init: " + cgenTime); System.out.println("MethodGen.init: "...
0
/* * $Id$ * 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...
0
package org.apache.commons.vfs2.provider.ram; import org.apache.commons.vfs2.FileSystemException;
1
for (Reader.ReaderIterator<?> iterator = inMemoryReader.iterator();
0
import org.apache.hc.core5.http2.config.H2Setting; return createResetStream(streamId, error.getCode()); } public RawFrame createResetStream(final int streamId, final int code) { Args.positive(streamId, "Stream id"); payload.putInt(code); Args.notNegative(lastStream, "Last stream...
0
throw formatExceptionMessage(SshException::new, "Write failed signalled while wait %d msec.", timeout);
0
import com.google.cloud.dataflow.sdk.runners.inprocess.GroupByKeyEvaluatorFactory.InProcessGroupByKeyOverrideFactory; import com.google.cloud.dataflow.sdk.runners.inprocess.InProcessCreate.InProcessCreateOverrideFactory; import com.google.cloud.dataflow.sdk.runners.inprocess.ViewEvaluatorFactory.InProcessViewOverrideFa...
0
.format("/target/atlas-webapp-%s", System.getProperty("project.version"));
0
final int EXPECTED_TOTAL_COUNT = 191;
0
return ITaskConfig.build(new TaskConfig() .setExecutorConfig(new ExecutorConfig("aurora", "config")));
0
import org.apache.commons.configuration.ConfigurationAssert; static final File TEST_FILE = ConfigurationAssert.getTestFile("test.xml"); return TEST_FILE.toURI().toURL();
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 ...
1
case DEFLATE: return CompressedSource.from(new TextSource(filepattern)) .withDecompression(CompressedSource.CompressionMode.DEFLATE); ZIP(".zip"), /** * Deflate compressed. */ DEFLATE(".deflate");
0
public static ByteArrayInputStream toByteArrayInputStream(ByteBuffer buffer) {
0
@Override public void create(OutputStream out) throws IOException {
0
none(Constants.NONE, 0, 0, "None", 0, "None", 0) { aes128cbc(Constants.AES128_CBC, 16, 16, "AES", 128, "AES/CBC/NoPadding", 16), aes128ctr(Constants.AES128_CTR, 16, 16, "AES", 128, "AES/CTR/NoPadding", 16), aes192cbc(Constants.AES192_CBC, 16, 24, "AES", 192, "AES/CBC/NoPadding", 16), aes192ctr(Const...
0
import org.apache.accumulo.core.security.CredentialHelper; client.update(Tracer.traceInfo(), CredentialHelper.create(opts.principal, opts.getToken(), opts.instance), new KeyExtent(new Text("!!"), null, new Text("row_0003750000")).toThrift(), mutation.toThrift());
0
private int pos;
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
private final int bufferSize; private final int fragmentSizeHint; final int bufferSize, final int fragmentSizeHint, this.bufferSize = bufferSize; this.fragmentSizeHint = fragmentSizeHint; public int getBufferSize() { return bufferSize; } public int ge...
0
import java.util.Objects; @Override public boolean equals(Object object) { if (object instanceof GaugeCell) { GaugeCell gaugeCell = (GaugeCell) object; return Objects.equals(dirty, gaugeCell.dirty) && Objects.equals(gaugeValue.get(), gaugeCell.gaugeValue.get()) && Objects.equals...
0
final FileObject[] actualFiles = baseFolder.findFiles( selector ); assertEquals( expectedFiles.size(), actualFiles.length ); final FileObject actual = actualFiles[ i ];
0
import org.apache.ambari.logsearch.common.ConfigHelper; import org.apache.ambari.logsearch.common.PropertiesHelper; throw RESTErrorUtil.createRESTException("Solr configuration improper for " + logType.getLabel() +" logs", String jaasFile = PropertiesHelper.getProperty("logsearch.solr.jaas.file", "/etc/securit...
0
* @version $Id$
0
ReplicationTarget expected = new ReplicationTarget("remote_cluster_1", "4", tableId); workMaker.addWorkRecord(new Text(file), StatusUtil.fileClosedValue(), ImmutableMap.of("remote_cluster_1", "4"), tableId); expectedTargets.add(new ReplicationTarget(cluster.getKey(), cluster.getValue(), tableId)); w...
0
assertEquals(Boolean.TRUE, ds.getDefaultAutoCommit()); assertEquals(Boolean.FALSE, ds.getDefaultReadOnly());
0
public interface WorkQueue { void doWork(Callable<Boolean> work); void scheduleWork(Callable<Boolean> work, long executeDelay, TimeUnit delayUnit);
0
import org.apache.ambari.server.state.SecurityType; addKerberosClientIfNecessary(clusterName, blueprintHostGroups); * Add the kerberos client to groups if kerberos is enabled for the cluster. * * @param clusterName cluster name * @param groups host groups * * @throws NoSuchParentResourceE...
0
* Signals a problem encountered when trying to map a * * @since 4.1
0
private static final long serialVersionUID = 1L;
0
* The minimum interval between two consecutive memory dumps being taken * in seconds. This property allows the limitation of the number of memory * dumps being taken. The default value for the interval is 6 hours. This * means that * a memory threshold event is ignored unless the last memory du...
0
import java.io.IOException; import java.nio.file.Files; @Test public void testGetCACertificateChain() throws IOException { Injector injector = getInjector(); File directory = folder.newFolder(); String caCertFileName = "myca.crt"; String caCertChainFileName = "myca_chain.pem"; Configuration co...
0
import org.apache.felix.dm.annotation.api.ServiceDependency;
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 ap...
1
* @version $Id$
0
clientHandler, this.params); }
0
* @throws IOException * @throws IOException
0
import com.google.common.base.Preconditions;
0
import org.apache.accumulo.core.iterators.system.MapFileIterator; public SortedKeyValueIterator<Key,Value> reserveMapFileReader(String mapFileName) throws IOException { return new MapFileIterator(this.conf, fs, mapFileName, conf);
0
/* * Copyright (C) 2015 Google 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 to ...
0
boolean hasNext = false; if (hasNext) while (true) { try { return hasNext = true; if (!hasNext && !hasNext()) hasNext = false;
0
package org.apache.commons.exec.launcher; import java.io.File; import java.io.IOException; import org.apache.commons.exec.CommandLine; import org.apache.commons.exec.environment.Environment; public interface CommandLauncher { /** * Launches the given command in a new process. * * @param cmd ...
1
* @author Stephen Kestle public interface PredicateDecorator<T> extends Predicate<T> { Predicate<? super T>[] getPredicates();
0
ITypedReferenceableInstance ref = metadataService.getEntityDefinition(guid); Map<String, AtlasEntityWithAssociations> entities = restAdapters.getAtlasEntity(ref); return getOrderedEntityList(entities, guid); return this.getById(guid); private List<Atla...
0
.propagate(false).add("set").change("change").provides(AdaptedService.class).impl(new ServiceAdapter(e)).build(); .impl(new ServiceConsumer(e)).withSvc(AdaptedService.class, b -> b.add("set").change("change")).build(); Component adapter = adapter(m, OriginalService.class).propagate(false...
0
import com.google.cloud.dataflow.sdk.util.DirectModeExecutionContext; PipelineOptionsFactory.create(), cloudSource, DirectModeExecutionContext.create());
0
// Client is talking HTTPS to proxy, so we should rewrite all HTTP-based URLs... String rewritten = null; value = rewritten; String rewritten = null; location = rewritten; private String rewriteUrlIfNeeded(String value) throws URISyntaxException fi...
0
metadataManager = new TimelineMetricMetadataManager(new Configuration(), hdb);
0
import org.apache.beam.vendor.protobuf.v3.com.google.protobuf.InvalidProtocolBufferException;
0
output.setSecureValidation(secureValidation);
0
package org.apache.commons.net.examples.nntp;
0
.withArrivalTimeWatermarkPolicy()
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/set/UnmodifiableSortedSet.java,v 1.3 2003/12/03 12:27:37 scolebourne Exp $ * @version $Revision: 1.3 $ $Date: 2003/12/03 12:27:37 $ public final class UnmodifiableSortedSet extend...
0
import com.twitter.common.util.Random; import com.twitter.mesos.scheduler.async.TaskScheduler.OfferReturnDelay; @CmdLine(name = "min_offer_hold_time", help = "Minimum amount of time to hold a resource offer before declining.") private static final Arg<Amount<Integer, Time>> MIN_OFFER_HOLD_TIME = Arg.cre...
0
* {@link NumberConverter} implementation that handles conversion to * and from <b>java.lang.Short</b> objects. * <p> * This implementation can be configured to handle conversion either * by using Short's default String conversion, or by using a Locale's pattern * or by specifying a format pattern. See the {@link ...
0
if (a.containsKey("nlink")) { map.put(Attribute.NLink, a.get("nlink")); }
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.accumulo.core.client.Accumulo; try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) { try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
0
private volatile Bundle[] m_extensionsCache; m_extensionsCache = new Bundle[0]; m_extensionsCache = null; public URLConnection openConnection(URL url) throws IOException Bundle[] extensions = m_extensionsCache; URL result = null; for (Bundle extBundle : extensions) ...
0
SimpleFunction<Integer, ?> simpleFn = new SimpleFunction<Integer, Integer>() { SimpleFunction<Integer, ?> mapFn = new SimpleFunction<Integer, Integer>() { MapElements<Integer, ?> map = MapElements.via(mapFn); Set<DisplayData> displayData = evaluator.<Integer>displayDataForPrimitiveTransforms(map);
0
import com.twitter.mesos.executor.util.Disk; long diskUsedBytes = Disk.recursiveFileSize(scanDirectory); long fileSize = Disk.recursiveFileSize(file);
0